kucoin2: fetchOrder() return zero result of price and cost of a order
See original GitHub issueATTENTION!!!
MUST READ THIS BEFORE SUBMITTING ISSUES:
https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-submit-an-issue
- OS: Windows 10
- Programming Language version: python
- CCXT version: 1.18.437
- Exchange: kucoin2
- Method: fetchOrder()
fetchOrder() method returns, as a result:
{“id”: “5cab45ea054b46124e0761ea”, “symbol”: “ETH/USDT”, “type”: “market”, “side”: “buy”, “amount”: 0.11574, “price”: 0.0, “cost”: 0.0, “filled”: 0.11574, “remaining”: 0.0, “timestamp”: 1554728426000, “datetime”: “2019-04-08T13:00:26.000Z”, “fee”: {“currency”: “USDT”, “cost”: 0.0203088978}, “status”: “closed”, “info”: {“symbol”: “ETH-USDT”, “hidden”: false, “opType”: “DEAL”, “fee”: “0.0203088978”, “channel”: “API”, “feeCurrency”: “USDT”, “type”: “market”, “isActive”: false, “createdAt”: 1554728426000, “visibleSize”: “0”, “price”: “0”, “iceberg”: false, “stopTriggered”: false, “funds”: “0”, “id”: “5cab45ea054b46124e0761ea”, “timeInForce”: “GTC”, “side”: “buy”, “dealSize”: “0.11574”, “cancelAfter”: 0, “dealFunds”: “20.3088978”, “stp”: “”, “postOnly”: false, “stopPrice”: “0”, “size”: “0.11574”, “stop”: “”, “cancelExist”: false, “clientOid”: “fa721e3b-2ffb-47b9-86b0-8e933fbdd3ce”}}
With "price": 0.0, "cost": 0.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
@DmitryVil The fix should be already there (since
1.18.450
). Let us know if that doesn’t help.This was a market order and for market orders the price and cost always returns zero because you could have filled different prices with your market order. Use fetchMyTrades to find the prices and costs for your executed market order and build the average of it.