Convert
Convert
Swap one asset or currency straight into another at the live price, in one request.
curl --request POST \
--url "https://reirex.com/api/v1/convert" \
--header "GX-API-KEY: $GX_API_KEY" \
--header "GX-API-TIMESTAMP: $TIMESTAMP" \
--header "GX-API-SIGN: $SIGNATURE" \
--header "Content-Type: application/json" \
--data '{"from":"BTC","to":"ETH","amount":"0.01"}'201 Createdapplication/json
{
"from": "BTC",
"to": "ETH",
"amount": "0.01000000",
"receive": "0.29066952",
"rate": "29.066952",
"value": "727.66",
"spread": "1.46",
"currency": "EUR",
"orderIds": ["01JA8M2B6D9F1H4K7N0Q3S5V8X", "01JA8M2B6E0G2J5L8P1R4T7W9Y"]
}A conversion is a sale and a buy through the euro, so it shows in your order history as up to two orders, listed in orderIds. Shares and commodities convert in their markets' hours, currencies on weekdays, coins at any hour.
An asset converts from €10, a currency from its own minimum, and everything you hold of something can always go, however small.
Bodyapplication/json
fromstringrequiredWhat you give.
tostringrequiredWhat you get.
amountstringrequiredHow much of
from, as a decimal string.
Response
fromstringWhat you give.
tostringWhat you get.
amountstringHow much of
fromgoes.receivestringHow much of
toarrives.ratestringUnits of
tofor one offrom, spread included.valuestringWhat
amountis worth, in euro.spreadstringThe spread, the only charge, in euro.
currencystringThe currency of
valueandspread: alwaysEUR.orderIdsstring[]The orders it made: a sale and a buy, or one when either side is the euro.

