Type/to search
0
Follow
1
Followers
求助,使用 exchange.IO 和 Bitfinex 保证金交易模板下保证金单均提示出错)
FAQ
Created 2018-05-06 00:07:05  Updated 2018-05-06 00:07:27
 1
 2239

2018-05-05 23:52:23 Bitfinex 错误 Futures_OP 4: 400: {"message":"Key amount should be a decimal string."}

$.bitfinexBuy = function(price, amount){
var message = "symbol=" + basecurrency + quotecurrency + "&amount=" + amount.toString() + "&price=" + price.toString() + "&side=buy" + "&type=limit"
var id = exchanges[bitfinexIndex].IO("api", "POST", "/v1/order/new", message)
return id.order_id

似乎是你们IO封装参数的时候强制设置为字符型,但是场子只接受整字,所以报错。
这个问题已经很长时间了,还是没有更改啊,
求助处理

Related Recommendations
Comment
All comments (1)

    问题 处理了。
    您试下这样书写:

    var message = "symbol=" + basecurrency + quotecurrency + "&amount='" + amount.toString() + "'&price=" + price.toString() + "&side=buy" + "&type=limit" var id = exchanges[bitfinexIndex].IO("api", "POST", "/v1/order/new", message)

    即,在 参数字符串 amount 的值, 左右两边加 单引号。
    如果依然有问题,请您回复,或者 在QQ群联系管理员。

    8 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)