I have a position, but with GetPosition ((() I get an empty array, and Binance seems to be able to. function main (()) {
exchange.SetContractType(‘swap’) var pos = exchange.GetPosition() Log(pos) }
laoballThank you so much.
laoballAfter checking, Dream was always right, and the next grass used pos = JSON.parse ((exchange.GetRawJSON))) to parse all the transactional position information of the account that was finally obtained. But on APOLLOX, using this GetRawJSON function seems to get only the position information of the policy-defaulted transactional pair, not all the transactional position information. I wrote a simple code test and ended up with only the position of btcusdt. What do you mean? function main (()) { Exchange.SetContractType (('swap') is the name of the exchange. var account = exchange.GetAccount ((() var pos = exchange.GetPosition ()) This is a list of all the different ways Exchange.GetRawJSON is credited in the database. Log ((account)) Log (s)
laoball 不是应该返回所有持仓的交易对的仓位情况吗?我用小草的币安期货多币种对冲策略移植到APOLLOX上,其他都可以,就是仓位数据全部为0.
Inventors quantify - small dreamsNo holds return an empty array. Does your hold correspond to the current transaction pair?
Inventors quantify - small dreamsYes, each exchange's interface raw information is different, and if the strategy is designed based on the specific interface returning data, then different interfaces need to be specifically handled for each exchange.
Inventors quantify - small dreamsReturns only the current trading pair, the current contract. It is not the policy that directly calls the interface associated with the exchange. It is necessary to check the code. The definition of GetPosition is always to obtain the current trading pair, the holding of the contract, not to obtain all the holdings. It's not about returning everything.