HTTP 400错误:大小太准确。最小单位为0.00000001

时间:2019-10-30 06:53:37

标签: coinbase-api

我正在打


authedClient.placeOrder(sellParams)

带参数:


sellParams:any = {
    'side': 'sell',
    'product_id': 'BTC-USD',
    'type': ‘market’,
    ’size’: 0.012613515
}

这会引发错误:

Error: HTTP 400 Error: size is too accurate. Smallest unit is 0.00000001
    at Request._callback (/srv/node_modules/coinbase-pro/lib/clients/public.js:68:15)
    at Request.self.callback (/srv/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)

我不确定为什么会失败。请指教

1 个答案:

答案 0 :(得分:1)

它说,您只能放置以with open('test.txt', 'r') as f: lines = [i for i in f if i.strip() != ''] for i,line in enumerate(lines, 1): with open('test%s.txt' % i, 'w') as out: out.write(line) (下面的0.00000001)为增量的大小。当您的base_increment的精度为9:size时,它将被拒绝。

当前,我无法在0.012613515端点中找到base_increment,但是在/products频道中找到了

status