Konvertierung berechnen

post
https://api.cryptomus.com/v2/user-api/convert/calculate
KOPIEREN

Anfrage

Abfrageparameter

NameParametertypDefinition
from*stringmax:10Währung von
to*stringmax:10Betrag, der in der Währung von berechnet werden soll
from_amount*stringrequired_without: to_amountBetrag, der in der Währung von berechnet werden soll
to_amount*stringrequired_without: from_amountBetrag, der in der Währung zu berechnet werden soll

Parametertyp

stringmax:10

Definition

Währung von

Parametertyp

stringmax:10

Definition

Betrag, der in der Währung von berechnet werden soll

Parametertyp

stringrequired_without: to_amount

Definition

Betrag, der in der Währung von berechnet werden soll

Parametertyp

stringrequired_without: from_amount

Definition

Betrag, der in der Währung zu berechnet werden soll

* - obligatorischer Parameter

Beispiel anfordern

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"
    }'
KOPIEREN

Antwort

Antwortparameter

NameDefinition
fromBetrag von
approximate_rateUmrechnungskurs
commissionProvision
total_amountGesamtbetrag
toBetrag zu

Definition

Betrag von

Definition

Umrechnungskurs

Definition

Provision

Definition

Gesamtbetrag

Definition

Betrag zu

Antwortbeispiel


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}
KOPIEREN