# 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"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.onekeypayments.com/api-reference/deposits-api/currency-exchange/get-crypto-exchange.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
