The getposition function can only retrieve the holding information for the first contract transaction pair, ask if it is possible to use the for loop to get the holding information for multiple transaction pairs at the same time.

Author: Bees love to eat meat, Created: 2021-10-16 21:24:27, Updated:

The question is, when I set up multiple contract pairs and getposition only gets holdings for the first contract, how do I get holdings for the other pairs?


More

truendGuys, can you give me a contact, I'm just starting to do this too, so let's explore it together.

Bees love to eat meatI've been crying and crying and finally solved it myself, so please share the modified code: def main (: for i in range (exchanges)): This is a list of all the different ways Exchanges[i].SetContractType is credited in the database. R = exchanges[i].GetRecords ((() P = exchanges[i].GetPosition ((() Log ((R) Log ((P))

Bees love to eat meatI may have found a bug, the same program, okx can read multiple transaction pairs of parameters, but on the binary exchange, it can only read the data of the first transaction pair.

Bees love to eat meatI'm basically white, I guess I can't help you either.

The Little DreamBoss, the cow!

Bees love to eat meatI solved it myself.

Bees love to eat meatMultiple pairs of transactions can only read the first red one, the next green one does not.

Bees love to eat meatI have been stuck with this question for a few days.

The Little DreamThe time for retesting should not be too early.

The Little DreamSwitching a contract for reset. Each exchange object sets at least one contract.

Bees love to eat meatInvalid ContractType: Invalid ContractType: Invalid ContractType: Invalid ContractType: Invalid ContractType

Bees love to eat meatThere is also a problem, the analogue retest selects the binary exchange, respectively the BTC and the ETH trading pairs, the program can only get the BTC market data, error message: variety subscription failed ETH_USDT_Futures_Binance My procedure is as follows: def main (: Exchange.SetContractType (swap) is the name of the exchange. for i in range (exchanges)): R = exchanges[i].GetRecords ((() P = exchanges[i].GetPosition ((() account = exchange.GetAccount Log ((R) Log ((P)) Log ((account))

The Little Dream ```js function main() { for (var i = 0 ; i < exchanges.length ; i++) { var pos = exchanges[i].GetPosition() Log(exchanges[i].GetName(), exchanges[i].GetCurrency(), "pos:", pos) } } ```

[Translated from Chinese]Remember to switch the exchange object