> For the complete documentation index, see [llms.txt](https://apidocs.onekeypayments.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.onekeypayments.com/api-reference/deposits-api/currency-exchange/get-crypto-exchange.md).

# Get crypto exchange

## Get Cryptocurrency Exchange Rate

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

```json
{"openapi":"3.0.0","info":{"title":"Crypto Exchange API","version":"v3"},"servers":[{"url":"https://api-stg.directa24.com","description":"Staging environment"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Your Read-Only API Key prefixed with 'Bearer '. Example: 'Bearer your_read_only_key_here'"}},"schemas":{"CryptoExchangeResponse":{"type":"object","properties":{"fx_rate":{"type":"number","format":"float","description":"Exchange rate of the cryptocurrency against the base currency."},"converted_amount":{"type":"number","format":"float","description":"Amount in the cryptocurrency specified."},"fee":{"type":"number","format":"float","description":"Fee for converting the specified amount to the cryptocurrency."}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"integer","description":"Error code."},"description":{"type":"string","description":"Error description."}}}}},"paths":{"/v3/exchange_rates/crypto":{"get":{"summary":"Get Cryptocurrency Exchange Rate","description":"The Crypto Exchange Endpoint allows you to convert any amount in USD or Local Currency to the specified Cryptocurrency.","tags":["Exchange Rates"],"parameters":[{"name":"currency","in":"query","required":true,"description":"USD or the country's local currency that will be used by the payer.","schema":{"type":"string"}},{"name":"amount","in":"query","required":false,"description":"Amount in the previously specified currency. Used to calculate the exchange in the cryptocurrency specified below. Default 1.","schema":{"type":"number","format":"float","default":1}},{"name":"crypto","in":"query","required":true,"description":"Cryptocurrency symbol in which the amount will be converted to.","schema":{"type":"string"}}],"responses":{"200":{"description":"Currency exchange correctly returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoExchangeResponse"}}}},"401":{"description":"Invalid credentials error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
