资源加载中... loading...

bitmex 之前策略使用不了

Author: 18767120196, Created: 2024-03-27 01:17:35, Updated:

bitmex交易平台 之前写的策略运行不了 Invalid ContractType


More

发明者量化-小小梦 您好,这个报错一般是由于开始没有设置合约,您使用exchange.SetContractType设置合约试下。

发明者量化-小小梦 合约使用swap 试下。 ```js function main() { Log(exchange.GetName()) exchange.SetContractType("swap") return exchange.GetTicker() } ```

18767120196 exchange.SetContractType("XBTUSD") 以前可以用,现在这样设置读取不出来

18767120196 function main() { exchange.SetContractType("XBTUSD") Log(_C(exchange.GetAccount)) // Log(_C(exchange.GetTicker)) // Log(_C(exchange.GetDepth)) // Log(_C(exchange.GetRecords)) // Log(_C(exchange.GetTrades)) // IO Test // Log(_C(exchange.IO, "api", "GET", "user/affiliateStatus")) // Log(_C(exchange.SetMarginLevel, 10)) /* exchange.SetDirection("buy") var orderId = exchange.Buy(-1, 3) if (orderId) { Log(_C(exchange.GetOrder, orderId)) }*/ Log(_C(exchange.GetPosition)) }