Calculate convert
post
https://api.cryptomus.com/v2/user-api/convert/calculate
Request
Query parameters
Name | Parameter type | Definition |
---|---|---|
from* | stringmax:10 | Currency From |
to* | stringmax:10 | Amount to be calculated in Currency From |
from_amount* | stringrequired_without: to_amount | Amount to be calculated in Currency From |
to_amount* | stringrequired_without: from_amount | Amount to be calculated in Currency To |
Parameter type
stringmax:10Definition
Currency FromParameter type
stringmax:10Definition
Amount to be calculated in Currency FromParameter type
stringrequired_without: to_amountDefinition
Amount to be calculated in Currency FromParameter type
stringrequired_without: from_amountDefinition
Amount to be calculated in Currency To
* - mandatory parameter
Request example
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"
}'
COPYResponse
Response parameters
Name | Definition |
---|---|
from | Amount from |
approximate_rate | Convert course |
commission | Commission |
total_amount | Total amount |
to | Amount to |
Definition
Amount fromDefinition
Convert courseDefinition
CommissionDefinition
Total amountDefinition
Amount to
Response example
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}
COPY