Crypto Exchange Endpoint

The Crypto Exchange endpoint allows you to get the exchange of any cryptocurrency compared against USD or any other local currency

Crypto Exchange Endpoint

GET https://api-stg.directa24.com/v3/exchange_rates/crypto?currency={currency}&amount={amount}&crypto={crypto}

The Crypto Exchange endpoint allows you to get the exchange of any crypto currency compared against USD or any other local currency.

Query Parameters

Headers

{
  "fx_rate": 5.8829,
  "converted_amount": 58.829,
  "fee": 0.64
}

Please find all the country and currencies codes in the Countries Specifications section.

Description

The Crypto Exchange Endpoint allows you to convert any amount in USD or Local Currency to the specified Cryptocurrency.

Request

In order to start using the Crypto Exchange endpoint, you need to:

  1. Send the request with GET method.

  2. Specify a valid currency code in the request as QUERY PARAMS.

  3. Specify the amount to convert.* If it's not specified, 1 is assumed.

  4. Specify a valid cryptocurrency symbol that will be converted the amount to.

  5. Send the Authorization header with your read-only API Key as Bearer as follows:

Authorization: Bearer your_read_only_key_here

Example request

curl --location --request GET 'https://api-stg.directa24.com/v3/exchange_rates/crypto?currency=BRL&crypto=USDT' \
--header 'Authorization: Bearer your_read_only_key_here'

Example Response

{
  "fx_rate": 5.8829,
  "converted_amount": 58.829,
  "fee": 0.64
}

Response fields

Last updated