2 endpoints · Commodities · Macro
https://api.blave.orgapi-key + secret-key headers on every requestAPI plan or Blave Agent plan/studio/market/db/ohlcv/<dataset>/<symbol>/<schema> | Name | Description | Allowed | Default |
|---|---|---|---|
datasetstring · pathRequired | Venue dataset | GLBX.MDP3 (CME), IFEU.IMPACT (ICE) | |
symbolstring · pathRequired | Near-month continuous contract | GLBX.MDP3: CL (WTI crude), GC (gold); IFEU.IMPACT: BRN (Brent) | |
schemastring · pathRequired | Bar size | ohlcv-1d, ohlcv-1h, ohlcv-1m | |
startstring · query | First day | YYYY-MM-DD | end − the schema's max range |
endstring · query | Last day | YYYY-MM-DD | today (UTC) |
Max range per request (end − start): ohlcv-1d 3650 d · ohlcv-1h 730 d · ohlcv-1m 31 d.
data = requests.get(f"{BASE_URL}/studio/market/db/ohlcv/GLBX.MDP3/CL/ohlcv-1d" , headers=headers, params={"start": "2024-01-01", "end": "2024-12-31"}, timeout=60).json()["data"]# [{"ts": "2024-01-02 00:00:00+00:00", "open": 71.95, "high": 73.64, "low": 70.06, "close": 70.5,# "volume": 263594, "instrument_id": 686071},# {"ts": "2024-01-03 00:00:00+00:00", "open": 70.49, "high": 73.23, "low": 69.28, "close": 73.05,# "volume": 253755, "instrument_id": 686071}, ...]{"dataset", "symbol", "schema", "data": [...]}.
| Field | Type | Unit | Description |
|---|---|---|---|
ts | string | UTC ISO | Bar open time |
open / high / low / close | float | USD (crude: per barrel; gold: per oz) | Prices |
volume | int | contracts | Volume |
instrument_id | int | — | Upstream instrument id carried through from the source bar |
| Status | Body | When |
|---|---|---|
| 400 | {"error": "Invalid schema. Allowed: [...]"} | Bad schema |
| 400 | {"error": "Invalid dataset/symbol combination"} | Bad pair |
| 400 | {"error": "Invalid date format. Use YYYY-MM-DD"} | Malformed date |
| 400 | {"error": "date_range_too_large", "message": "...", "max_days": <n>} | Range over the cap |
| 404 | error message | No data |
ohlcv-1m history, request in ≤ 31-day chunks and concatenate (a chunk takes a few seconds)./studio/market/anue/economic_calendar All optional; unfiltered returns the whole feed (~1,400 rows), so always filter.
| Name | Description | Allowed | Default |
|---|---|---|---|
startstring · query | Events on or after this date | YYYY-MM-DD (Taipei date) | no lower bound |
endstring · query | Events on or before this date | YYYY-MM-DD (Taipei date) | no upper bound |
countrystring · query | Country filter | ISO-2 codes, comma-separated, case-insensitive — e.g. US,CN,TW | all countries |
max_priorityint · query | Keep priority <= max_priority. 1 is the most important, so big events only = max_priority=1 | 1 / 2 / 3 | all priorities |
limitint · query | Sort by event time, then keep the first N | ≥ 1 | no limit |
langstring · query | Display language for countryName / subject; names missing from the server's lookup table stay as-is, so en returns a zh/en mix | en / zh | en |
params = {"start": "2026-09-16", "end": "2026-09-23", "max_priority": 1, "lang": "zh"}response = requests.get( f"{BASE_URL}/studio/market/anue/economic_calendar" , headers=headers, params=params, timeout=60,)data = response.json()# [{"id": 79382, "startDate": 1790121600, "date": 1788220800, "dateUnit": "month", "time": "16:30",# "countryId": "GB", "countryName": "英國", "areaId": "4",# "subject": "S&P Global Manufacturing PMI - 初值", "subjectTitle": "<9月>", "unit": "point",# "predict": 51.7, "last": 51.7, "real": None, "correct": None, "correctMark": "N",# "place": None, "priority": 1, "type": 2}, ...]A bare JSON array (not wrapped in {"data": ...}). Order is the feed's own order unless limit is set (then sorted by startDate, time).
| Field | Type | Unit | Description |
|---|---|---|---|
startDate | int | epoch seconds | The event's Taipei calendar date |
time | string | null | HH:MM Taipei time | Release time; null if not published |
countryId | string | ISO-2 | Country code |
countryName | string | — | Country name (per lang) |
subject | string | — | Indicator name (per lang) |
subjectTitle | string | — | Period label, e.g. <7月>, <2季> |
predict | number | null | unit | Market consensus |
last | number | null | unit | Prior value |
real | number | null | unit | Actual; null until released |
unit | string | — | e.g. %, point, 億USD |
priority | int | 1–3 | 1 = most important (non-farm payrolls, rate decisions), 3 = least (rig counts) |
A live response carried these further fields, passed through from the upstream feed. Only what was observed is stated; do not read more into them than that.
| Field | Type | Observed |
|---|---|---|
id | int | Upstream event id, e.g. 79382 |
date | int | Epoch seconds for the period the reading covers, not the release — rows labelled subjectTitle: "<9月>" carried date = 2026-09-01 while startDate was 2026-09-23 |
dateUnit | string | month |
type | int | 2 |
areaId | string | "4" |
place | string | null | null |
correct | number | null | null |
correctMark | string | "N" |
| Status | Body | When |
|---|---|---|
| 400 | {"error": "Invalid date format. Use YYYY-MM-DD"} | Malformed start / end |
| 400 | {"error": "max_priority must be an integer"} | Non-integer max_priority |
| 400 | {"error": "limit must be an integer"} / {"error": "limit must be >= 1"} | Bad limit |
| 429 | {"error_code": "ERR429", "message": "User rate limit exceeded"} | Over 100 requests / min |
200 with [] — that means "not covered", not "no events scheduled".start / end set, events without a date are dropped; with max_priority set, events without a priority are dropped.real is filled in after the release.