Skip to content
Sign up

Convert

Convert

Swap one asset or currency straight into another at the live price, in one request.

POST/api/v1/convertGet a key
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

  • fromstringrequired

    What you give.

  • tostringrequired

    What you get.

  • amountstringrequired

    How much of from, as a decimal string.

Response

  • fromstring

    What you give.

  • tostring

    What you get.

  • amountstring

    How much of from goes.

  • receivestring

    How much of to arrives.

  • ratestring

    Units of to for one of from, spread included.

  • valuestring

    What amount is worth, in euro.

  • spreadstring

    The spread, the only charge, in euro.

  • currencystring

    The currency of value and spread: always EUR.

  • orderIdsstring[]

    The orders it made: a sale and a buy, or one when either side is the euro.