変換を計算する

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}
コピー