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

有 bitget交易所的策略 例子吗?管理员有帮忙的吗,谢谢

Author: fx8848, Created: 2022-04-13 12:18:25, Updated:

有 bitget交易所的策略 例子吗?简单调用, 返回数据都是空的呢? map[Balance:0 FrozenBalance:0 FrozenStocks:0 Info:map[equity:0 fixed_balance:0 forwardContractFlag:true longMarginRatio:<nil> margin:0 marginRatio:0 margin_frozen:0 margin_mode:crossed realized_pnl:0 shortMarginRatio:<nil> symbol:cmt_btcusdt timestamp:1649823429472 total_avail_balance:0 unrealized_pnl:0] Stocks:0]

看API文档,都试了几个参数,返回结果都一样 exchange.SetContractType(“swap_umcbl”) exchange.SetContractType(“swap_sumcbl”) exchange.SetContractType(“swap_dmcbl”) exchange.SetContractType(“swap_sdmcbl”)

def main(): initAccount = _C(exchange.GetAccount) Log(initAccount)


More

fx8848 另外bitget平台 有个问题,pos = exchange.GetPosition() 这个账号里面的交易记录,为什么总是只有一条,很奇怪,正式账号里面,明明有3条记录,只返还第一条,是什么原因呢 返还数据如下: [map[Amount:10 ContractType:swap_umcbl FrozenAmount:0 Info:map[achievedProfits:0 available:10 averageOpenPrice:2.7974 cTime:1649769731083 holdMode:double_hold holdSide:long keepMarginRate:0.015 leverage:50 liquidationPrice:0 locked:0 margin:0.55948 marginCoin:USDT marginMode:crossed openDelegateCount:0 symbol:SANDUSDT_UMCBL total:10 unrealizedPL:0.1218] Margin:0.55948 MarginLevel:50 Price:2.7974 Profit:0.1218 Type:0]]

fx8848 找到问题所在, exchange.SetContractType("swap_umcbl")

发明者量化-小小梦 OK,FMZ API文档上有说明。