I can’t give you information about how to send a cash-free (Oco) in order to be sent in order of a cashless (OCO) in order of drinks using their API or Python code.
If you would like to write a copy of python via the Binoons API, send orders through AP, and I’m glad to support you. Here is an example of how you can use the library library in Python to dialing API and handle different type orders:
Please note:
- This is just an example code snippet and should not be produced in the manufacture without further investigations and validation.
- Before you use their API, the Binocne should promote our writing and conditions.
`Python
Import Requests
In-class bincassi:
def __init __ (self-, API_KEY, API_SECRET):
Self.API_KEY = API_KEY
self.api_secret = API_SECRET
Self.Base_url = 'pai.binance.com/api/v3'
def create_order (self, symbol, side, type, type, price = nothing):
Headings = {
'X-matic-account-thouse': F.App.Appi_key}: {Self.apapi_secret} ',
'Content Type': 'Application / John'
}
Data = {
'Symbol': Symbol,
'Side': Side,
'Type': Type,
'Size': Size
}
If the price is not available:
Data ['Price'] = Price
Response = Requests
REPONE REPUSON ()
def pett_limit_order (self-, symbol, side, type, amount):
Data = {
'Symbol': Symbol,
'Side': Side,
'Type': Type,
'Money': Amount
}
Response = requests.
REPONE REPUSON ()
def perpop_loss_limit_order (self, symbol, side, type, amount, amount):
Data = {
'Symbol': Symbol,
'Side': Side,
'Type': Type,
'Money': Amount
}
Response = requests.
REPONE REPUSON ()
defst_order_of_ofh_out (self-symbol, side, size, size, size):
Data = {
'Symbol': Symbol,
'Side': Side,
'Type': Type,
'Size': Size
}
Response = requests.
REPONE REPUSON ()
Replace your API key and the secret
API_KEY = '"_API_KEY_HERE'
API_SSECRET = 'your_API_SSECRET_HERE'
Binancy = bincensapi (API_KEY, API_SECRET)
Create Oco order
Oco_order = binances.teadk ',' Btcusdt ',' Market ',' Limit ', 10, Price = 1000
Print (OCO_ODER)
Leave
Oco Ord
Binces.place_limit_limit_order ('btcusdt', 'market', 'limit', 5)
Binces.place_stosp_loss_limit_order ('btcusdt', 'Market', 'Box', 2)
I hope this will help you to start this by creating your own Oco orders through the Binax API. If you have more questions or need additional assistance please let me know!
Leave a Reply