Commodities & Macro API

2 endpoints · Commodities · Macro

Last updated 2026-10
Base URL
https://api.blave.org
Auth
api-key + secret-key headers on every request
Access
API plan or data fee
Rate Limit
500 requests / 5 min per key and per IP

CME / ICE Futures OHLCV

GET/studio/market/db/ohlcv/<dataset>/<symbol>/<schema>
Data From
2010-06-06
Update
~4 h delay
Source
Databento

Parameters

datasetstringpathRequired
Venue dataset
Allowed GLBX.MDP3 (CME), IFEU.IMPACT (ICE)
symbolstringpathRequired
Near-month continuous contract
Allowed GLBX.MDP3: CL (WTI crude), GC (gold); IFEU.IMPACT: BRN (Brent)
schemastringpathRequired
Bar size
Allowed ohlcv-1d, ohlcv-1h, ohlcv-1m
startstringquery
First day
Default end − the schema's max rangeAllowed YYYY-MM-DD
endstringquery
Last day
Default today (UTC)Allowed YYYY-MM-DD

Max range per request (end − start): ohlcv-1d 3650 d · ohlcv-1h 730 d · ohlcv-1m 31 d.

Example

Python
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}, ...]

Response

{"dataset", "symbol", "schema", "data": [...]}.

FieldTypeUnitDescription
tsstringUTC ISOBar open time
open / high / low / closefloatUSD (crude: per barrel; gold: per oz)Prices
volumeintcontractsVolume
instrument_idint—Databento instrument id carried through from the source bar

Errors

StatusBodyWhen
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
404error messageNo data

Notes

  • The most recent ~4 hours are not available.
  • For long ohlcv-1m history, request in ≤ 31-day chunks and concatenate (a chunk takes a few seconds).

Economic Calendar

GET/studio/market/anue/economic_calendar
Access
Any valid key
Rate Limit
100 requests / min per account
Data From
Rolling window of roughly the past month plus the next few weeks — not a history archive
Update
Server cache 5 min; real is filled in after the release
Source
Anue 鉅亨網 (licensed feed)

Parameters

All optional; unfiltered returns the whole feed (~1,400 rows), so always filter.

startstringquery
Events on or after this date
Default no lower boundAllowed YYYY-MM-DD (Taipei date)
endstringquery
Events on or before this date
Default no upper boundAllowed YYYY-MM-DD (Taipei date)
countrystringquery
Country filter
Default all countriesAllowed ISO-2 codes, comma-separated, case-insensitive — e.g. US,CN,TW
max_priorityintquery
Keep priority <= max_priority. 1 is the most important, so big events only = max_priority=1
Default all prioritiesAllowed 1 / 2 / 3
limitintquery
Sort by event time, then keep the first N
Default no limitAllowed ≥ 1
langstringquery
Display language for countryName / subject; names missing from the server's lookup table stay as-is, so en returns a zh/en mix
Default enAllowed en / zh

Example

Python
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}, ...]

Response

A bare JSON array (not wrapped in {"data": ...}). Order is the feed's own order unless limit is set (then sorted by startDate, time).

FieldTypeUnitDescription
startDateintepoch secondsThe event's Taipei calendar date
timestring | nullHH:MM Taipei timeRelease time; null if not published
countryIdstringISO-2Country code
countryNamestring—Country name (per lang)
subjectstring—Indicator name (per lang)
subjectTitlestring—Period label, e.g. <7月>, <2季>
predictnumber | nullunitMarket consensus
lastnumber | nullunitPrior value
realnumber | nullunitActual; null until released
unitstring—e.g. %, point, 億USD
priorityint1–31 = 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.

FieldTypeObserved
idintUpstream event id, e.g. 79382
dateintEpoch 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
dateUnitstringmonth
typeint2
areaIdstring"4"
placestring | nullnull
correctnumber | nullnull
correctMarkstring"N"

Errors

StatusBodyWhen
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

Notes

  • A range outside the rolling window returns 200 with [] — that means "not covered", not "no events scheduled".
  • With start / end set, events without a date are dropped; with max_priority set, events without a priority are dropped.
  • This is the only source for macro events and their numbers — never substitute a web search or a remembered value. Calendar aggregator sites carry wrong tables (one listed a published actual as the consensus), and fields a page does not cover get filled in from training data — a prior value, which has exactly one right answer, has been written wrong this way. If this endpoint cannot answer, say so.