변환 계산
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}
복사