「FTX CCXT」:修訂間差異
跳至導覽
跳至搜尋
已建立頁面,內容為 "*<python> #掛單小數精度換算 symbol = 'BTC/USDT' ftx.load_markets() amount = 1.2345678 # amount in base currency BTC price = 87654.321 # price in quote cur…" |
無編輯摘要 |
||
| 第1行: | 第1行: | ||
*< | *<c> | ||
#掛單小數精度換算 | #掛單小數精度換算 | ||
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> | ||
於 2021年11月4日 (四) 20:16 的修訂
- <c>
- 掛單小數精度換算
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) </c>