0
Follow
1
Followers

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.

Created: 2021-10-16 21:24:27, Updated on:
comments   14
hits   618

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 content
All comments
avatar of truend
truend
Guys, can you give me a contact, I'm just starting to do this too, so let's explore it together.
2021-10-22 11:58:52
avatar of 蜜蜂爱吃肉
Bees love to eat meat
I'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))
2021-10-20 19:08:20
avatar of 蜜蜂爱吃肉
Bees love to eat meat
I 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.
2021-10-16 22:31:15
avatar of 蜜蜂爱吃肉
Bees love to eat meat
I'm basically white, I guess I can't help you either.
2021-10-23 10:49:02
avatar of 发明者量化-小小梦
Inventors quantify - small dreams
Boss, the cow!
2021-10-20 20:50:34
avatar of 蜜蜂爱吃肉
Bees love to eat meat
I solved it myself.
2021-10-20 19:08:41
avatar of 蜜蜂爱吃肉
Bees love to eat meat
Multiple pairs of transactions can only read the first red one, the next green one does not.
2021-10-20 18:19:21
avatar of 蜜蜂爱吃肉
Bees love to eat meat
I have been stuck with this question for a few days.
2021-10-20 18:17:00
avatar of 发明者量化-小小梦
Inventors quantify - small dreams
The time for retesting should not be too early.
2021-10-20 08:39:41
avatar of 发明者量化-小小梦
Inventors quantify - small dreams
Switching a contract for reset. Each exchange object sets at least one contract.
2021-10-20 08:39:17
avatar of 蜜蜂爱吃肉
Bees love to eat meat
Invalid ContractType: Invalid ContractType: Invalid ContractType: Invalid ContractType: Invalid ContractType
2021-10-20 00:24:15
avatar of 蜜蜂爱吃肉
Bees love to eat meat
There 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))
2021-10-20 00:06:52
avatar of 发明者量化-小小梦
Inventors quantify - small dreams
```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) } } ```
2021-10-17 09:18:21
avatar of Exodus[策略代写]
[Translated from Chinese]
Remember to switch the exchange object
2021-10-17 03:48:29