Crypto Exchange Endpoint
The Crypto Exchange endpoint allows you to get the exchange of any cryptocurrency compared against USD or any other local currency
Last updated
The Crypto Exchange endpoint allows you to get the exchange of any cryptocurrency compared against USD or any other local currency
Last updated
GET
https://api-stg.onekeypayments.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.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Please find all the country and currencies codes in the Countries Specifications section.
The Crypto Exchange Endpoint allows you to convert any amount in USD or Local Currency to the specified Cryptocurrency.
In order to start using the Crypto Exchange endpoint, you need to:
Send the request with GET method.
Specify a valid currency code in the request as QUERY PARAMS.
Specify the amount to convert.* If it's not specified, 1 is assumed.
Specify a valid cryptocurrency symbol that will be converted the amount to.
Send the Authorization header with your read-only API Key as Bearer as follows:
Authorization: Bearer your_read_only_key_here
currency
string
USD or the country's local currency that will be used by the payer
amount
number
Amount in the previously specified currency. Used to calculate the exchange in the cryptocurrency specified below. Default: 1
crypto
string
Cryptocurrency symbol in which the amount will be converted to
Authorization
string
"Bearer " + Read-Only API Key
Field name
Format
Description
fx_rate
Number
Exchange rate of the cryptocurrency against the base currency
converted_amount
Number
Amount in the cryptocurrency specified. Default: 1
fee
Number
Fee for converting the specified amount to the cryptocurrency.