Type/to search
0
Follow
0
Followers
python全仓买入和全仓卖出怎么写?
Help
Created 2021-04-27 16:51:55  
 3
 1297

api文档只给了买入指定数量的写法。
def main():
id = exchange.Buy(100, 1)
Log("id:", id)
请教python全仓买入和全仓卖出怎么写?

Related Recommendations
Comment
All comments (3)

    exchange.Buy("梭哈")

    5 years ago

    可用余额/价格

    5 years ago

    buyPrice = _N(ticker.Sell + spread, ZPrecision)
    buyAmount = _N(diffAsset / buyPrice, XPrecision)
    if buyAmount < MinStock:
    return False
    exchange.Buy(buyPrice, buyAmount)

    5 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)