0
Follow
0
Followers
代码中下,感觉应该是没有错的,但是接口总是返回说没有传对应的参数:
function main() {
exchange.IO("base", "https://api.btcgateway.pro")
//var obj = {"contract_code":"TRX-USDT","volume":10000,"direction":"sell","offset":"open","lever_rate":3,"order_price_type":"optimal_5"}
var obj = {"contract_code":"TRX-USDT"}
var str = JSON.stringify(obj)
Log(obj)
Log(str)
var hy_order_id = exchange.IO("api","POST", "/linear-swap-api/v1/swap_order_info", "", str)
Log(hy_order_id)
return hy_order_id
}
调用后返回的包如下
{"ts":1619326307135,"status":"error","err_code":1066,"err_msg":"The contractCode field cannot be empty. Please re-enter."}
说我没传contract_code,实际上我传了啊
Related Recommendations
How to Specify Different Versions of Data for the Rented Strategy by Its Rental Code MetadataAdvanced Tutorial for FMZ Quant platform Strategy WritingElementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?
Comment
All comments (1)
exchange.IO("api","POST", "/linear-swap-api/v1/swap_order_info", “contract_code=TRX-USDT”)
直接传入json不是每个交易所都能用
5 years ago
- 1
