Returns the latest price, NAV, and premium/discount percentage for ETFs.
Request
GET /api/v1/etf/priceHeaders
| Header | Value |
|---|---|
F-API-KEY | Your API key |
Query Parameters
| Parameter | Type | Required | Filter | Description |
|---|---|---|---|---|
code | string | No | exact | Fund code |
source | string | No | exact | Data source |
limit | integer | No | — | Max rows per page (default 100, max 1000) |
offset | integer | No | — | Rows to skip (default 0) |
sort | string | No | — | Sort field (default code) |
order | asc | desc | No | — | Sort direction (default asc) |
Example
curl -H "F-API-KEY: fk-xxxxx" \ "https://finance-api.xp-java.workers.dev/api/v1/etf/price?code=510300"Response
{ "code": 0, "message": "ok", "data": [ { "code": "510300", "latest_price": 3.856, "latest_nav": 3.861, "premium_pct": -0.13, "source": "exchange", "updated_at": "2024-12-31T15:30:00Z" } ], "meta": { "total": 1, "limit": 100, "offset": 0, "has_more": false }}