GET
/v1/fx/rates- Authentication
- Bearer token
- Scope
marketdata:read
Before you integrate
- These are reference rates. Do not use them where an official rate is required for accounting or regulatory purposes.
- Show the attribution text wherever you display the rates when the reply includes it.
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
base | string | No | Three-letter currency code to quote against, for example INR or USD. Defaults to INR. |
Sample code
Set your key in the GRAPPI_API_KEY environment variable. Sample values are placeholders.
curl -sS -X GET 'https://grappi.ai/v1/fx/rates?base=INR' \ -H "Authorization: Bearer $GRAPPI_API_KEY"
Sample response
{
"request_id": "req_01HZY3K8M2",
"result": {
"base": "INR",
"rates": {
"USD": 0.012,
"EUR": 0.011,
"GBP": 0.0095,
"JPY": 1.85,
"AED": 0.044
},
"redistributable": true
}
}Response fields
| Field | Type | Description |
|---|---|---|
base | string | The currency the rates are quoted against. |
rates | object | Map of currency code to rate: how much of that currency one unit of base buys. |
redistributable | boolean | Whether you may show this data to your own users. |
attribution | string | Credit line to display next to the data wherever you show it; present only when one is required. |
disclaimer | string | Anything you must know before relying on the figures; present only when there is one. |
Errors
Every failure has the same shape. A call that fails on our side or at the data source is refunded to your wallet; a "no record found" answer is charged. See the error reference.