1
Follow
8
Followers
教程:适用于 - 下单仅有【个数】选项,无【USDT价值】选项的交易
下单个数 = 开仓USDT价值 除以 当前价格,取交易所精度最小变动单位
精度最小变动单位:例如 盘口数量为 1.315,那么最小变动单位为小数位=3
def transform_num(trade_usdt, price, num_precision):
return round(trade_usdt / price, num_precision)
num = transform_num(USDT价值, 当前价格, 保留小数位)
以上是Python代码示例,可供参考。
Related Recommendations
Built-In Function_Cross Analysis and InstructionsHow 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 engine

