fetch_order() order from Binance gives the limit price instead of the executed price
See original GitHub issueI noticed this discrepancy in context of this issue: https://github.com/enigmampc/catalyst/issues/151.
Basically, I’m doing a fetch_order() on a filled order to determine the avg executed price. However, the price
attribute corresponds to the limit price. I don’t see this data in the info
dict either. Let me know if you are already aware of this. If not, I’ll do a PR to fix it.
Here is the output. 0.00000836 is my limit. It’s missing my avg price which is 0.00000827. Dividing cost
by amount
also gives me 0.00000836.
{
'status':'closed',
'timestamp':1515641853506,
'price':8.36e-06,
'datetime':'2018-01-11T03:37:33.506Z',
'cost':0.0030346799999999997,
'id':'17210371',
'remaining':0.0,
'info':{
u'orderId':17210371,
u'clientOrderId':u'z8xl93tiQH5ZRTOGEtNI9D',
u'origQty':u'363.00000000',
u'icebergQty':u'0.00000000',
u'symbol':u'TRXBTC',
u'side':u'BUY',
u'timeInForce':u'GTC',
u'status':u'FILLED',
u'stopPrice':u'0.00000000',
u'time':1515641853506,
u'isWorking':True,
u'type':u'LIMIT',
u'price':u'0.00000836',
u'executedQty':u'363.00000000'
},
'fee':None,
'side':u'buy',
'amount':363.0,
'type':u'limit',
'symbol':u'TRX/BTC',
'filled':363.0
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
What Is a Limit Order? - Binance Academy
A limit order is a type of trading order that has a specific buy or sell price. It will only be executed if...
Read more >Different Order Types in Spot Trading | Binance Support
A limit order is an order that you place on the order book with a specific limit price. It will not be executed...
Read more >Types of Order on Binance Futures
A Stop Limit order is a conditional order over a set timeframe, executed at a specified price after a given stop price has...
Read more >What are Market Order and Limit Order, and How to Place Them
A market order is an instruction to buy or sell an asset immediately (at the market's current price), while a limit order is...
Read more >What is The Stop-Limit Function and How to Use It - Binance
A stop-limit order is a limit order that has a limit price and a stop price. When the stop price is reached, the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@benediamond you can obtain that info with
this.options['newOrderRespType']
.'ACK'
for order id,'RESULT'
for full order or'FULL'
for order with fills.'RESULT'
is their default.Yes, that makes sense. We’ll work with
fetchMyTrades()
to get this info.