> For the complete documentation index, see [llms.txt](https://docs.calypso.money/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.calypso.money/api-reference/rate-api.md).

# Rate API

API for getting exchange rates

## Get exchange rates

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Rate API","description":"API for getting exchange rates"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/rate":{"post":{"tags":["Rate API"],"summary":"Get exchange rates","description":"Permission annotations:","operationId":"getRates","parameters":[{"name":"Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Sign","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContainerPGRatesRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PGRatesResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"ContainerPGRatesRequestDTO":{"required":["payload","timestamp"],"type":"object","properties":{"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/PGRatesRequestDTO"}},"description":"Object with request data"},"PGRatesRequestDTO":{"type":"object","properties":{"fromCurrencies":{"uniqueItems":true,"type":"array","description":"List of source currencies for getting rate","items":{"$ref":"#/components/schemas/Currency"}},"toCurrencies":{"uniqueItems":true,"type":"array","description":"List of target currencies for getting rate","items":{"$ref":"#/components/schemas/Currency"}}},"description":"Request with currencies parameters"},"Currency":{"type":"string"},"PGRatesResponseDTO":{"required":["currencyRates"],"type":"object","properties":{"currencyRates":{"type":"array","description":"List of exchange rates","items":{"$ref":"#/components/schemas/CurrencyRates"}}},"description":"Exchange rates"},"CurrencyRates":{"required":["fromCurrency","rates","ratesDate","toCurrency"],"type":"object","properties":{"fromCurrency":{"type":"string","description":"Source currency"},"toCurrency":{"type":"string","description":"Target currency"},"rates":{"type":"number","description":"Rates"},"ratesDate":{"type":"string","description":"Rates date-time","format":"date-time"}},"description":"Exchange rates"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Get fiat exchange rates

> Permission annotations:

```json
{"openapi":"3.0.1","info":{"title":"Public API","version":"dev"},"tags":[{"name":"Rate API","description":"API for getting exchange rates"}],"servers":[{"url":"https://api.calypso.money","description":"Generated server url"}],"paths":{"/api/v1/rate/fiat":{"post":{"tags":["Rate API"],"summary":"Get fiat exchange rates","description":"Permission annotations:","operationId":"getFiatRates","parameters":[{"name":"Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Sign","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContainerPGFiatRatesInvertRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PGFiatRatesInvertResponseDTO"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PublicGatewayErrorResponse"}}}}}}}},"components":{"schemas":{"ContainerPGFiatRatesInvertRequestDTO":{"required":["payload","timestamp"],"type":"object","properties":{"timestamp":{"type":"integer","description":"Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future","format":"int64"},"payload":{"$ref":"#/components/schemas/PGFiatRatesInvertRequestDTO"}},"description":"Object with request data"},"PGFiatRatesInvertRequestDTO":{"required":["from","to"],"type":"object","properties":{"from":{"type":"array","description":"List of source currencies for getting rate","items":{"$ref":"#/components/schemas/Currency"}},"to":{"type":"array","description":"List of target currencies for getting rate","items":{"$ref":"#/components/schemas/FiatCurrency"}}},"description":"Request with currencies parameters"},"Currency":{"type":"string"},"FiatCurrency":{"type":"string"},"PGFiatRatesInvertResponseDTO":{"required":["ratesMap"],"type":"object","properties":{"ratesMap":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"number"}}}},"description":"Response currency data"},"PublicGatewayErrorResponse":{"required":["errorCode","message","traceId"],"type":"object","properties":{"traceId":{"type":"string"},"errorCode":{"type":"string"},"message":{"type":"string"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.calypso.money/api-reference/rate-api.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.
