OCO 出售 MAX PYTHON 币安

时间:2021-03-24 17:19:04

标签: python python-3.x binance

我找不到一种方法来下 100% 数量的 OCO 卖单,我正在尝试这个,但我收到一个 MIN_NOTATIONAL 错误。在这种情况下,余额 = 5,所以我不需要对数量进行四舍五入。

balance = float(client.get_asset_balance(asset='VIA', recvWindow=10000)['free'])  
orderooco = client.create_oco_order(
    symbol = 'VIABTC',
    side = 'SELL',
    price = '0.00001770',
    quantity = balance,
    stopPrice = '0.00001745',
    stopLimitPrice = '0.00001740',
    stopLimitTimeInForce = 'GTC'
)

我也试试这个

    def sellAmount(coin):
    balanceSell = float(client.get_asset_balance(coin,
    recvWindow=10000)['free'])
    maxSell = round(balanceSell * .995, 5)
    return balanceSell


orderooco = client.create_oco_order(
    symbol = 'VIABTC',
    side = 'SELL',
    price = '0.00001770',
    quantity = sellAmount('VIA'),
    stopPrice = '0.00001745',
    stopLimitPrice = '0.00001740',
    stopLimitTimeInForce = 'GTC'
)

MIN_NOTATIONAL 也是错误

0 个答案:

没有答案