ccxt / ccxt

A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
https://docs.ccxt.com
MIT License
33.09k stars 7.55k forks source link

Bitget and MEXC fetchOrder returns None in "fee" field #18059

Open grozz97 opened 1 year ago

grozz97 commented 1 year ago

Operating System

Ubuntu 20.04.5 LTS

Programming Languages

python

CCXT Version

3.1.14

Description

Bitget and MEXC fetchOrder returns None in "fee" field:

// bitget
{'info': {'accountId': '7147260223', 'symbol': 'CEEKUSDT_SPBL', 'orderId': '1231231232147584', 'clientOrderId': '2cbd32b4-4fc9-4fa3-bf90-3a0ab3e393fa', 'price': '0.0720800000000000', 'quantity': '121.7465000000000000', 'orderType': 'limit', 'side': 'sell', 'status': 'full_fill', 'fillPrice': '0.0720800000000000', 'fillQuantity': '121.7465000000000000', 'fillTotalAmount': '8.7754877200000000', 'enterPointSource': 'API', 'feeDetail': '{"USDT":{"deduction":false,"feeCoinCode":"USDT","totalDeductionFee":0,"totalFee":-0.008775487720}}', 'orderSource': 'normal', 'cTime': '1685353684535'}, 'id': '104701472342342147584', 'clientOrderId': '2cbd30-3a0ab213e393fa', 'timestamp': 1685353684535, 'datetime': '2023-05-29T09:48:04.535Z', 'lastTradeTimestamp': None, 'symbol': 'CEEK/USDT', 'type': 'limit', 'timeInForce': None, 'postOnly': None, 'side': 'sell', 'price': 0.07208, 'stopPrice': None, 'triggerPrice': None, 'average': 0.07208, 'cost': 8.77548772, 'amount': 121.7465, 'filled': 121.7465, 'remaining': 0.0, 'status': 'closed', 'fee': None, 'trades': [], 'fees': [], 'reduceOnly': None}

// mexc 
{'id': 'a4369fc004704c9932ffcb26c42f2062', 'clientOrderId': None, 'timestamp': 1685354359000, 'datetime': '2023-05-29T09:59:19.000Z', 'lastTradeTimestamp': None, 'status': 'closed', 'symbol': 'NEXA/USDT', 'type': 'limit', 'timeInForce': None, 'side': 'sell', 'price': 1.019e-05, 'stopPrice': None, 'triggerPrice': None, 'average': 1.019e-05, 'amount': 566632.0, 'cost': 5.77398008, 'filled': 566632.0, 'remaining': 0.0, 'fee': None, 'trades': [], 'info': {'symbol': 'NEXAUSDT', 'orderId': 'a4369fc004704c9932ffcb26c42f2062', 'orderListId': '-1', 'clientOrderId': None, 'price': '0.00001019', 'origQty': '566632', 'executedQty': '566632', 'cummulativeQuoteQty': '5.77398008', 'status': 'FILLED', 'timeInForce': None, 'type': 'LIMIT', 'side': 'SELL', 'stopPrice': None, 'icebergQty': None, 'time': '1685354359000', 'updateTime': '1685354359000', 'isWorking': True, 'origQuoteOrderQty': '5.77398008'}, 'fees': [], 'postOnly': None, 'reduceOnly': None}

Code

  bitget.fetchOrder(..)
  
  mexc.fetchOrder(..)
sc0Vu commented 1 year ago

Hi @grozz97

I didn't see fee column in mexc response, they probably didn't return it.

grozz97 commented 1 year ago

Hi @grozz97

I didn't see fee column in mexc response, they probably didn't return it.

MEXC now has zero commission, apparently that's why they don't return?