Kucoin / kucoin-python-sdk

MIT License
45 stars 15 forks source link

trade.get_order_details intermittently returns 0 for dealfunds and dealsize #53

Closed rayphoon88 closed 1 month ago

rayphoon88 commented 2 years ago

trade.get_order_details intermittently returns 0 for dealfunds and dealsize instead of float values for market buy/sell orders. This only seems to happen when dealfunds and dealsize are less than 0.

Example below: {'id': '61e10013f782bf0001719a84', 'symbol': 'SHIB-USDT', 'opType': 'DEAL', 'type': 'market', 'side': 'buy', 'price': '0', 'size': '1427461.315', 'funds': '0', 'dealFunds': '0', 'dealSize': '0', 'fee': '0', 'feeCurrency': 'USDT', 'stp': '', 'stop': '', 'stopTriggered': False, 'stopPrice': '0', 'timeInForce': 'GTC', 'postOnly': False, 'hidden': False, 'iceberg': False, 'visibleSize': '0', 'cancelAfter': 0, 'channel': 'API', 'clientOid': 'b255fb2e-6caf-42b0-bf91-393d567d053b', 'remark': None, 'tags': None, 'isActive': True, 'cancelExist': False, 'createdAt': 1642135571449, 'tradeType': 'TRADE'}

ISAAC-XXYYZZ commented 1 month ago

Please refer to our documentation. Both "dealfunds" and "dealsize" are of the string type:

https://www.kucoin.com/docs/rest/spot-trading/orders/get-order-details-by-orderid