API reference / Market Data
Data-source licence matrix
The attribution each market-data feed's licence obliges you to display, and whether you may redistribute it to your own users.
GET
/v1/marketdata/sources- Authentication
- Bearer token
- Scope
marketdata:read
Before you integrate
- Check this before you show market data to your own customers: where redistributable is false you must not display it, and where attribution is present you must show it.
Sample code
Set your key in the GRAPPI_API_KEY environment variable. Sample values are placeholders.
curl -sS -X GET 'https://grappi.ai/v1/marketdata/sources' \ -H "Authorization: Bearer $GRAPPI_API_KEY"
Sample response
{
"request_id": "req_01HZY3K8M2",
"result": {
"fx": {
"redistributable": true
},
"equity": {
"redistributable": true
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
fx | object | Terms for the exchange-rate data. |
fx.redistributable | boolean | Whether you may show exchange rates to your own users. |
fx.attribution | string | Credit line to display with exchange rates; present only when one is required. |
fx.disclaimer | string | What to know before relying on the rates; present only when there is one. |
equity | object | Terms for the equity-quote data; same fields as fx. |
equity.redistributable | boolean | Whether you may show equity quotes to your own users. |
equity.attribution | string | Credit line to display with quotes; present only when one is required. |
equity.disclaimer | string | What to know before relying on the quotes; 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.