変換を計算する
post
https://api.cryptomus.com/v2/user-api/convert/calculate
リクエスト
クエリパラメーター
名前 | パラメータータイプ | 意味 |
---|---|---|
from* | stringmax:10 | 元通貨 |
to* | stringmax:10 | 元通貨で計算される金額 |
from_amount* | stringrequired_without: to_amount | 元通貨で計算される金額 |
to_amount* | stringrequired_without: from_amount | 先通貨で計算される金額 |
パラメータータイプ
stringmax:10意味
元通貨パラメータータイプ
stringmax:10意味
元通貨で計算される金額パラメータータイプ
stringrequired_without: to_amount意味
元通貨で計算される金額パラメータータイプ
stringrequired_without: from_amount意味
先通貨で計算される金額
* - 必須パラメーター
リクエスト例
curl https://api.cryptomus.com/v2/user-api/calculate \
-X POST \
-H 'userId: 8b03432e-385b-4670-8d06-064591096795' \
-H 'sign: fe99035f86fa436181717b302b95bacff1' \
-H 'Content-Type: application/json' \
-d '{
"from": "BTC",
"to": "USDT",
"from_amount": "0.0001"
}'
コピー応答
応答パラメーター
名前 | 意味 |
---|---|
from | 金額元 |
approximate_rate | 換算レート |
commission | 手数料 |
total_amount | 合計金額 |
to | 金額先 |
意味
金額元意味
換算レート意味
手数料意味
合計金額意味
金額先
応答の例
1{
2 "state": 0,
3 "result": {
4 "from": "0.001",
5 "approximate_rate": "57853.000",
6 "commission": "3",
7 "total_amount": "60.000",
8 "to": "60.000"
9 }
10}
コピー