# Exchange Rates

Use Apps.Rate to retrive price for asset pair and amount. You can retrieve exchange rate from various sources.

## Get sources

You can retrieve a list of available exchange rate sources.

{% tabs %}
{% tab title="cURL" %}

```shell
echo 'get exchange rate sources'

curl --location --request GET 'https://api.orangepill.cloud/v1/apps/rate/sources' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json'
```

{% endtab %}
{% endtabs %}

In response you will get a list of exchange rate sources as an `Array`.

```json
[
    "default", "bitstamp"
]
```

{% hint style="info" %}
Use `default` source to get exchange rate for FIAT-FIAT pairs.
{% endhint %}

## Get price

You must provide exchange rate source.

{% tabs %}
{% tab title="cURL" %}

```shell
echo 'get exchange rate USD 100.10 to BTC from Bitstamp'

curl --location --request GET 'https://api.orangepill.cloud/v1/apps/rate/bitstamp/btc/usd/100.10' \
--header 'x-api-key: AXVubzpwQDU1dzByYM==' \
--header 'Content-Type: application/json'
```

{% endtab %}
{% endtabs %}

In response you will get exchange rate.

<pre class="language-json"><code class="lang-json"><strong>0.00233
</strong></code></pre>


---

# 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://docs.orangepill.cloud/smartapps/exchange-rates.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.
