ประเภทหนัง
ตัวอย่างหนัง Ethereum: Close position Binance Futures with ccxt
Close the position of Binance Futures with CXT *
Introduction
—————
When optimizing trading in trading, it is decisive for optimizing trading trading. In this art, we will show you a tax to close the position on Binan Futures to use Python penis.
* prewites
———–
- You install the required libraries:
+ “Crist” (currency and exchanges)
+.
- Read the sweat created an account with binance with a joke and the key got the API key
Code implementation
—————
`Comfort
CCXT
Define API as and other necessary parameters
AP_EYE = ‘Yourinicingi_pi_KEY '
AP_SECRET = ‘yourancilipili_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_ci_cet
exchange_name = “binance”
I am Fetch_position ():
“Fech the Balace.”
Exchange = cext.binance ()
Presumpsum = Exchange.FECED.FEITCH_BALANCE () ['INMED]
to be responsible.
deaf closure (positions):
“Close the holding of the binant futures.”
the possibilities
Exchange = cext.binance ()
Resols = Exchange.Clums_position (ACTS
'pposes_id': Mase_id,
“Type”: “Close”,
“Side”: “Market”
})
return
Fitch the Ballance
Land = Fetchy_positics ()
Successful CXT advice
Post = [p position p ['smbol'] = = = Exchange Name and p.get ('Stuts') = =]
restlessness:
Clase_posement (this [0]
P
Explanation
—————
- The Festicity Filter Filters of Correspondence () Loads the Account Menu, uses a pound MXT.BINANCE ().
- The second function is Illose_posement (), which takes place the project as an entry and clocks it T.Biinance () pound. You can access the details of the details Use a variable, white contact with information that applies the opening or hourly position.
* Note: Separate replace “yourpilipipi_cey” with the actual API key, ‘ourpinopiticcipipipipipipipipipipipipipipipipi_i diet (only symptom in this test). Nevertheless, Thress sang a recent version of the library.
Fold cases of use *
———–
- Closing an open position to lock the occupation
- There is no asset to close the closed holding on nee.
- Disconnect closed market positions
Folling in this article you ordered Beable to close the assets from Binance Futures, use Python cocks. Be sure to cook your API key and update them according to them.