変換を計算する
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/convert/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 | string | 金額元 |
| approximate_rate | string | 換算レート変換バージョンに応じて返されます |
| commission | string | 手数料 |
| total_amount | string | 合計金額 |
| to | string | 金額先 |
パラメータータイプ
string意味
金額元パラメータータイプ
string意味
換算レート変換バージョンに応じて返されますパラメータータイプ
string意味
手数料パラメータータイプ
string意味
合計金額パラメータータイプ
string意味
金額先
応答の例
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}コピー