"One cancels the other" not in python-binance
Hi, I know you mentioned here https://github.com/sammchardy/python-binance/issues/207 that OCO is not possible on Binance, but it seems to be, looking at the readme docs on Tony Ho's package using Java here: https://github.com/tony-ho/binance-oco It is a feature on the exchange too (recently added?) so I am hoping it can be incorporated. Is it possible to add this to the package?
please!!!
Please!!! (2)
i did it with:
params={'symbol':name,'side':'SELL','quantity':qty,'price':"%.8f"%precio_high,'stopPrice':"%.8f"%precio_sl,'stopLimitPrice':"%.8f"%precio_low,'stopLimitTimeInForce':'GTC'} r = client._post('order/oco',True,data=params)
it worked!!!
i did it with:
params={'symbol':name,'side':'SELL','quantity':qty,'price':"%.8f"%precio_high,'stopPrice':"%.8f"%precio_sl,'stopLimitPrice':"%.8f"%precio_low,'stopLimitTimeInForce':'GTC'} r = client._post('order/oco',True,data=params)
it worked!!!
Wow, so simple. Thank you!
@cesarmassri thanks a mill for cracking this one. Any idea if there is a way to get the OCO working on the margin side? I cannot get that side to work. I can get this to work for a straight limit but not OCO:
client._request_margin_api('post', 'margin/order', signed=True, data=params)
Mmm
I have no idea... I didnt read the documentation...
If I figure it out, i let you know
Kind Regards Cesar
El mar., 4 de feb. de 2020 08:09, givenx [email protected] escribió:
@cesarmassri https://github.com/cesarmassri thanks a mill for cracking this one. Any idea if there is a way to get the OCO working on the margin side? I cannot get that side to work. I can get this to work for a straight limit but not OCO: client._request_margin_api('post', 'margin/order', signed=True, data=params)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sammchardy/python-binance/issues/458?email_source=notifications&email_token=ALG5H2M2X7EPOWYGKFT34ELRBFEFLA5CNFSM4JSZB5T2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKXHELI#issuecomment-581857837, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALG5H2MGHKMCI55XPGXVEFLRBFEFLANCNFSM4JSZB5TQ .
Tx @cesarmassri ! I don't think its part of the main exchange yet:
ie it is here:
https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#new-oco-trade
but not here:
https://github.com/binance-exchange/binance-official-api-docs/blob/master/margin-api.md
I don't know how to request this on the main binance-exchange.
Tx @cesarmassri ! I don't think its part of the main exchange yet: ie it is here:
https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#new-oco-tradebut not here:https://github.com/binance-exchange/binance-official-api-docs/blob/master/margin-api.mdI don't know how to request this on the main binance-exchange.
It is now: https://binance-docs.github.io/apidocs/spot/en/#margin-account-new-oco-trade