「FTX CCXT」:修訂間差異

出自TSK WIKI
跳至導覽 跳至搜尋
無編輯摘要
無編輯摘要
第1行: 第1行:
*<c>
*<python>
#掛單小數精度換算
#掛單小數精度換算
symbol = 'BTC/USDT'  
symbol = 'BTC/USDT'  
第8行: 第8行:
formatted_price = ftx.price_to_precision(symbol, price)
formatted_price = ftx.price_to_precision(symbol, price)
print(formatted_amount, formatted_price)
print(formatted_amount, formatted_price)
</c>
<python/>

於 2021年11月4日 (四) 20:17 的修訂

  • <python>
  1. 掛單小數精度換算

symbol = 'BTC/USDT' ftx.load_markets() amount = 1.2345678 # amount in base currency BTC price = 87654.321 # price in quote currency USDT formatted_amount = ftx.amount_to_precision(symbol, amount) formatted_price = ftx.price_to_precision(symbol, price) print(formatted_amount, formatted_price) <python/>