0
Follow
1
Followers
getposition 関数では、最初の契約取引ペアのポジション情報しか取得できません。for ループを使用して、複数の取引ペアのポジション情報を同時に取得できますか?
Created 2021-10-16 21:24:27
14
1227
例えば,複数の取引ペアを設定したときに,getpositionは最初の取引先の保有情報のみを取得できます. では,他の取引先の保有情報を取得するにはどうすればよいですか?
Related Recommendations
How to Specify Different Versions of Data for the Rented Strategy by Its Rental Code MetadataAdvanced Tutorial for FMZ Quant platform Strategy WritingElementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?
Comment
All comments (14)
泪流满面,终于自己解决掉了,给大家分享一下修改后的代码:
def main():
for i in range(len(exchanges)):
exchanges[i].SetContractType("swap")
R = exchanges[i].GetRecords()
P = exchanges[i].GetPosition()
Log(R)
Log(P)
5 years ago
javascript
function main() {
for (var i = 0 ; i < exchanges.length ; i++) {
var pos = exchanges[i].GetPosition()
Log(exchanges[i].GetName(), exchanges[i].GetCurrency(), "pos:", pos)
}
}
5 years ago
还是有问题,模拟回测选择币安交易所,分别是btc 与ETH交易对,程序只能获取btc行情数据,报错:品种订阅失败 ETH_USDT_Futures_Binance
我的程序如下:
def main():
exchange.SetContractType("swap")
for i in range(len(exchanges)):
R = exchanges[i].GetRecords()
P = exchanges[i].GetPosition()
account = exchange.GetAccount()
Log(R)
Log(P)
Log(account)
5 years ago
- 1

