변환 계산

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}
복사