The resource loading... loading...

Is there anything to be aware of about exchange.IO sending POST packets?

Author: koy0755, Created: 2021-04-25 13:50:54, Updated:

In the middle of the code, the feeling should be that there is nothing wrong, but the interface always returns a parameter that does not correspond:

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 }

Here are the packages returned after the call: {ts:1619326307135,status:error,err_code:1066,err_msg: The contractCode field cannot be empty. Please re-enter.}

Say I didn't pass the contract_code, but I did.


More

The grassexchange.IO (("api","POST", "/linear-swap-api/v1/swap_order_info", contract_code=TRX-USDT) is a free and open-source exchange. Directly to json is not available on all exchanges