okx
okx copied to clipboard
DOGE-USDT_SWAP 计算 get_quantity() 有问题
问题如下,它计算出的 sz 为0, 和实际不符,疑似是向上取整和合约张数最小单位的锅。
Input:
get_quantity_result = a.trade.get_quantity( openPrice=0.234, openMoney=10, instId='DOGE-USDT-SWAP', ordType='limit', leverage=20, ) print(get_quantity_result)
OutPut: '{'code': '0', 'data': 0, 'msg': ''}'
相关代码应该位于 okx/app/trade/tradeSWAP/quantity_and_price.py/get_quantity()