Databento: how it works
Databento sells normalized exchange market data, billed per byte or on a live plan. What Taji reads from it, down to each field, is the coverage page. The crate taji-databento (plugins/databento/) is a data-only source with no brokerage side. Reads go over the vendor's historical HTTP gateway, and live streams over its raw-TCP live gateway. It is the one source whose reads cost money per ask, so every buy is priced before it is made.
The vendor
Hosts. The historical API is https://hist.databento.com/v0/<endpoint> (get_range, HTTP, fetched 2026-12-02). The live gateway is one host per dataset. The pinned databento 0.65.0 crate dials <dataset>.lsg.databento.com:13000, the dataset lower-cased with . as -, for example glbx-mdp3.lsg.databento.com (its src/live/protocol.rs, determine_gateway); none of the vendor pages fetched here names that host. Taji calls no sandbox: every historical byte it buys is billed to the key's team.
Auth. A key is "a 32-character string starting with db-" (historical authentication, fetched 2026-12-02). You create keys under API keys in the portal, which the manifest's keys step names.
- Historical: the key is sent as HTTP Basic with an empty password (
curl -u $YOUR_API_KEY:in the get_range HTTP page). - Live: the gateway uses "a challenge-response authentication mechanism to ensure that your API key is never sent over the network" (live authentication, fetched 2026-12-02). The pinned client implements it as CRAM.
API families Taji calls:
| Family | Endpoints | Vendor doc (fetched 2026-12-02) |
|---|---|---|
| Time series | timeseries.get_range (POST; encoding dbn/csv/json, compression zstd/none; start inclusive, end exclusive; filters on ts_recv where the schema has it, else ts_event; up to 2,000 symbols) | get_range |
| Metadata | metadata.get_cost (a float in USD; billing follows "the actual amount of bytes sent"), metadata.list_datasets, metadata.get_dataset_range | get_cost |
| Symbology | symbology.resolve (stype_in/stype_out among raw_symbol, instrument_id, parent, continuous; up to 2,000 symbols) | resolve, symbology |
| Batch | batch.submit_job, batch.list_jobs, batch.get_job_details, batch.list_files, file download (states queued, processing, done, expired; repeat downloads free) | submit_job |
| Live | one TCP session per dataset; subscribe by schema and symbols; start replays "within the last 24 hours" | intraday replay, connection limits |
Every body Taji decodes is DBN (Databento Binary Encoding): a metadata header, then fixed-length records, in versions 1 to 3 (DBN, fetched 2026-12-02). Prices are fixed-point integers in units of 1e-9, and i64::MAX means no price.
Symbology. A raw symbol is "the original string symbols used by the publisher" (ESZ6, not ESZ26). A parent is ROOT.FUT or ROOT.OPT. A continuous symbol is ROOT.RULE.RANK, roll rule c, n or v, for example ES.c.0. The numeric instrument_id is the publisher's, and "some publishers remap them daily" (symbology).
Datasets and schemas. A dataset is one venue's feed, or one of Databento's composites. A schema is one record shape inside it: ohlcv-*, trades, mbp-1, mbp-10, cmbp-1, definition, statistics, status, imbalance and others. The OHLCV page says bars are "aggregated from trades", that ts_event is the bar's start, that an interval with no trade has no record, and that "Our ohlcv-1d schema is based on UTC dates" (OHLCV, fetched 2026-12-02).
Entitlement. A key reads every dataset metadata.list_datasets lists for it. Historical access is usage-based on any key, and you can cap the spend only in the portal. Real-time access, and an OPRA license past about one day, need a live plan. The README's Pricing, Entitlement and Live sections hold what was measured. The manifest taji-plugin.toml holds the plan and cap steps.
Stated limits (rate limits, fetched 2026-12-02):
- Historical, per team: 100 concurrent connections; 100 time-series and 100 symbology requests a second; 20 metadata and 20 batch-list requests a second; 20 batch submits a minute.
- 429: a request over a limit is refused 429, and "The Retry-After response header indicates how long the user should wait".
- Live: 10 simultaneous sessions per dataset per team on Standard, 50 on Plus or Unlimited; "at most five incoming connections per second from the same IP address"; subscription requests "capped at 10 per second", delayed rather than refused (connection limits).
Offered, not read
What Taji reads is docs/reference/coverage/databento.md. What Databento serves past that, fetched 2026-12-04 unless a row says otherwise (usage: any key, billed per byte; live: a live plan, Standard $199 a month and up, pricing):
| Offered | Endpoint | Plan | Source |
|---|---|---|---|
Live streams of trades, quotes, depth and status, and replay: open_ticks subscribes, but READS lists only equity 1m bars live, because no live session is measured | live gateway, one session per dataset | live | pricing; live overview, 2026-12-02 |
The history Standard includes without a per-byte charge, 1 year of L1 and 1 month of L2 and L3. Taji prices every read with get_cost; what that answers for an included span is unmeasured | metadata.get_cost | Standard | pricing |
Every statistics type the decoder has no word for: 7 lowest offer, 8 highest bid, 10 fixing, 12 net change, 13 VWAP, 14 volatility, 15 delta, 16 uncrossing, 19 block volume, 20 indicative close, 21 to 23 market-wide circuit-breaker levels, 24 to 26 auction collar, 10001 and 10002 venue-specific; and stat_flags (CME's settlement is final or preliminary, intraday or not) | timeseries.get_range, statistics | usage | statistics, GLBX.MDP3 |
An imbalance record's auction_time, ssr_filling_price, upper_collar, lower_collar, market_imbalance_qty, unpaired_qty, unpaired_side, auction_status, freeze_status, num_extensions and significant_imbalance: the imbalance product holds none | timeseries.get_range, imbalance | usage | imbalance, XNAS.ITCH |
The venue of an option print (tcbbo publisher_id "will correspond to the venue the trade executed on") and of the quote's two sides (bid_pb_00, ask_pb_00): trades exchange stays null. An EQUS.MINI print names none, its publisher anonymised | timeseries.get_range, tcbbo | usage; OPRA past about T-1 needs live | TBBO, OPRA.PILLAR, EQUS.MINI |
A record's flags, sequence and ts_in_delta, and a book record's order counts (bid_ct, ask_ct; EQUS.MINI's are always 0): trades and quotes have no column for them | timeseries.get_range, trades, mbp-1 | usage | trades, mbp-1 |
bbo-1s and bbo-1m: the BBO with the last sale's price, size and side on each second or minute, which a quote's last could hold; cbbo-1s, cbbo-1m the consolidated counterparts (listed by list_schemas, README Futures and options) | timeseries.get_range, bbo-1s, bbo-1m | usage | bbo |
A chain row's open_interest: OPRA statistics type 9, published each morning about 6:30 ET, one record per venue; a chain row holds only the contract's name | timeseries.get_range, statistics, ROOT.OPT | usage | OPRA.PILLAR |
A listed option's other definition fields: min_price_increment, exchange, currency, security_type, cfi, underlying_id. A chain row keeps the OCC name, from which strike and expiry are read. unit_of_measure_qty, contract_multiplier and original_contract_size are undefined on OPRA (README Open) | timeseries.get_range, definition | usage | definition |
A future's other definition fields: currency, activation, asset, underlying, min_lot_size, high_limit_price, low_limit_price, market_depth, match_algorithm; and the spreads (instrument_class not F, one record per leg), which future_definition_of drops | timeseries.get_range, definition | usage | definition, GLBX.MDP3 |
Trading status (halts, pauses, auction starts, short-sale restriction): status_rows decodes it, READS lists none | timeseries.get_range, status | usage | status |
mbo (order by order) and mbp-10 outside XNAS.ITCH and GLBX.MDP3: not yet built | timeseries.get_range, mbo, mbp-10 | usage | schemas |
ohlcv-1s: DatabentoClient::schema maps only 1m, 1h and D | timeseries.get_range, ohlcv-1s | usage | OHLCV |
ohlcv-1d for a future, future option or index: refused by design, it buckets by UTC date (Why, below). OPRA.PILLAR ohlcv-*: one bar per publisher, never consolidated, so option bars fold trades instead (README Futures and options) | timeseries.get_range, ohlcv-1d | usage | OHLCV |
Live definition, statistics, imbalance and mbo: open_ticks refuses the first three, mbo is not yet built | live gateway | live | live overview, 2026-12-02 |
csv and json encodings: DBN only, Taji stores the bytes the gateway sent and parses them again on replay. Batch split_duration other than none: one file per job, which fetch_bytes in plugins/databento/src/source.rs requires. metadata.get_record_count, get_billable_size, list_schemas, list_unit_prices: called by hand for the README's measurements, never by the crate | timeseries.get_range, batch.submit_job, metadata.* | usage | get_range, submit_job, 2026-12-02 |
Code map
| File | Owns | Read first |
|---|---|---|
plugins/databento/src/lib.rs | Plugin, which registers the source; DatabentoClient, the historical client: per-family admission, get_range, get_range_bytes (Taji's own POST), get_cost, resolve, the batch calls, error mapping (failed, refused); DBN record readers (bar_of, record_of, statistic_of, imbalance_of, status_of, definition_of, future_definition_of); bar routing (bars_dataset, bars_schema, bought_span, raw_symbol, spell); bar folding (globex_days, et_days, fold_trades, parse_bars); impl HistoricalData | bars_target, then get_range_bytes |
plugins/databento/src/source.rs | Databento, the Source: FACTS, READS, FILLS, WORDS, CAP; seat, probe and key check; the catalog (catalog, admit); product routing (schema, target); record reads (read, raw_read, records_raw, contracts_raw, chains_raw), their parse (parse, rows); cost (cost, billed); batch fallback (batch_job); tick streaming (open_ticks) | schema, then target |
plugins/databento/src/live.rs | DatabentoStream: the plan probe (probe, PROBED), one session per dataset (attach, session_loop, revive, ended), replay sessions (replay, REPLAY_SECS), impl LiveStream (1m bars on EQUS.MINI), subscribe_records | probe, then session_loop |
plugins/databento/src/ratelimit.rs | The six endpoint-family budgets, one set per process (Families, rate_limits) | Families::of |
plugins/databento/src/offer.rs | OFFER: what the coverage page lists as offered, each class's reach and freshness | offered |
plugins/databento/tests/egress.rs | Taji's own POST, byte for byte against plugins/databento/tests/egress/range.txt; authorization and host grants | range |
plugins/databento/tests/live.rs | The billed live tests: one SPY daily bar, and the option_flow hour's recording | equity_bars_1d, opra_option_flow_hour_is_recorded |
plugins/databento/fixtures/option_flow/ | gen.py writes the committed synthetic/ hour; classify.py classes any hour's tcbbo and definition DBN outside Rust; recorded/ is the bought hour, git-ignored | classify.py |
plugins/databento/taji-plugin.toml | Identity, the [[sources]] id, the databento link form | — |
How it plugs into Taji
Composition. engine/crates/taji-open/src/lib.rs adds taji_databento::Plugin, whose build registers source::Databento under the id databento. The plugin depends on the SDK alone, taji-plugin with its vendor feature (ADR 0003).
Traits:
Source(taji_plugin::vendor), onDatabento;HistoricalData(substrate/taji-brokerage/src/traits/historical_data.rs), onDatabentoClient;LiveStream(substrate/taji-brokerage/src/traits/live_stream.rs), onDatabentoStream.
It implements no VenueReads, ExecutionOps or ReconcileOps: Databento places no orders and reads no account.
Statics.
FACTS(plugins/databento/src/source.rs):seat: Key { anew: true };reads,fillsandwords(READS,FILLS,WORDS);metered: true;permits: 100, the hub gate's shared permits, matching the vendor's 100 concurrent connections;gatedequity and future, the classes the probe decides;replay_s, 86,400 s;stamps_book;book, the depth scope: ten levels,XNASfor equities, CME's four exchanges for futures;bars_cap: CAP, raw prices only, metered, per-class history depth;- the raw formats it parses.
OFFER(plugins/databento/src/offer.rs) feedsGET /read/data/coverage. Its cells are generated into the coverage page.- There is no
VenueFacts.
Link. The manifest's one form, databento, is a single key field. POST /verb/link/data/link is refused 409 budget_unset until the device's data budget is set (POST /verb/link/data/budget). A metered provider never links without a ceiling. The link then calls Source::check, which prices one AAPL daily bar on CHECK_DAY (2024-07-01) with metadata.get_cost and buys nothing; verdict turns the answer into accepted, refused (the vendor's words) or unreachable. After the seal, seat builds one history client and one DatabentoStream, and probe opens and closes one live session per PROBED dataset (EQUS.MINI for equities, GLBX.MDP3 for futures). An authenticated session grants that class realtime; an auth refusal grants history. key_word folds those grants into the tier word GET /read/link shows: plan or usage.
Surfaces:
| Taji surface | Vendor call | Made in |
|---|---|---|
GET /get/bars: equity, future, future option, index, option | timeseries.get_range, dataset and schema per bars_target | lib.rs bars_raw, parse_bars |
The hub's price check before a bars buy (fetch_cost) | metadata.get_cost | lib.rs fetch_cost, called from engine/crates/taji-trading/src/hub/read.rs |
GET /get/trades, quotes (span), depth, status | timeseries.get_range of schema(class, product) | source.rs read |
GET /get/statistics, imbalance, search (future contracts), instrument of a parent: over a range | timeseries.get_range, plus symbology.resolve for a parent's contract names | source.rs records_raw, parse |
GET /get/instrument of a continuous: or parent: future | symbology.resolve, twice (symbol to ids, ids to raw symbols) | source.rs contracts_raw; lib.rs resolve |
GET /get/chains, option | timeseries.get_range definition of each root's ROOT.OPT on OPRA.PILLAR, newest sellable session | source.rs chains_raw, chain_answer |
GET /get/option_flow, an underlying | timeseries.get_range tcbbo and definition of each root's ROOT.OPT on OPRA.PILLAR; answers fetch_first (metered) | source.rs option_flow |
| The cost line of any product read | metadata.get_cost | source.rs cost, billed |
| An ask the stream refuses as oversize | batch.list_jobs, get_job_details, submit_job, list_files, download | source.rs batch_job; lib.rs find_job, submit_job, job_files |
| Refusal of a dataset the key lacks, or a date before its start | metadata.list_datasets, get_dataset_range, once per boot | source.rs catalog, admit |
GET /ws/market equity 1m bars | live ohlcv-1m on EQUS.MINI | live.rs subscribe_bars, session_loop |
GET /ws/market trades, quotes, depth, status, with from as replay | live trades, mbp-1, mbp-10, cmbp-1, status | source.rs open_ticks; live.rs subscribe_records, replay |
tier in GET /read/link | live connect and authenticate | live.rs probe; source.rs key_word |
GET /read/link/rate_limits, one process row | none: local budgets and the stream's symbol count | ratelimit.rs rate_limits; live.rs spend |
vendor_dataset and tier a stored pull records (GET /read/data/datasets) | none | source.rs catalogued |
The live tick cells stay offered on the coverage page: READS lists only equity bars as live, because no live session has been measured.
One read, wire to vendor and back. GET /get/bars for future:ESZ26 at D:
- The hub (
engine/crates/taji-trading/src/hub/read.rs) finds the span its store lacks. Under the provider's gate, it prices that span withfetch_cost. That runsbars_target, which answersGLBX.MDP3,ohlcv-1h,raw_symbol,ESZ6, andbought_span, which widens the start to the Globex open the evening before. Thenget_costprices it. - The device budget (
engine/crates/taji-trading/src/hub/budget.rs) holds the buy against the whole spend. get_bars_session_rawrefuses an adjusted ask and an hour tier Databento does not serve natively (hour_tier). It then callsbars_raw, andget_range_bytesadmits onetimeseriescharge (ratelimit.rs). It POSTs the form throughLogin::send, which reaches onlyHOSTS, with the key as Basic auth, and keeps the zstd DBN body and the form, never the key, as aRawof formatdatabento.bars.v1.- The hub keeps that raw pull and parses it through
FACTS.bars, which isparse_bars. That decodesbar_ofper record, folds the hours into Globex trade dates withglobex_days, drops a day whose closing hour has not ended, and answers OHLCV. The hub serves Arrow.
A 429 anywhere on the way holds that endpoint family for 60 s and answers RateLimited. A 422 "None of the symbols could be resolved" answers not_listed.
There is no order path: Databento is data only.
option_flow
GET /get/option_flow for an equity: or index: underlying is the underlying's option prints over a span of an hour at most, each with the quote standing at it (option_flow in plugins/databento/src/source.rs):
- One record holds the print and its quote.
OPRA.PILLARtcbbois "every trade event alongside the consolidated BBO immediately before the effect of each trade" (TBBO schema, fetched 2026-12-03), so the read joins no quotes. It asks the parentROOT.OPTof each of the underlying's roots, one request per root. - A record names its contract by
instrument_idalone, so the read also buys the same parent'sdefinitionfrom the UTC midnight before the span.raw_symbolis the contract, andunit_of_measure_qtyits multiplier (definition_of), null when undefined or not above zero: the premium is then null, and 100 is never assumed. A record with no definition is dropped. OPRA states none: the 12,540definitionrecords of SPY's options on 2026-11-25 leaveunit_of_measure_qty,contract_multiplierandoriginal_contract_sizeundefined (README Open), so every premium is null andmultiplieris no declared fill. - The kernel classes the side, not this plugin. The rows state the print and the
bidandaskof its quote, and the hub classes each by the shared rule (taji_brokerage::side, one tape per contract): the nearer side of the quote, else the contract's tick rule. OPRA states none: "OPRA does not disseminate the side of a trade, sosidewill always beN" (OPRA.PILLAR, fetched 2026-12-03). Nor does any schema read here state a sale condition, soconditionsis null and the kernel's exclusion of multi-leg, late and cancelled prints, which reads OPRA letters, never fires on these rows. - It is metered.
costprices each parent'stcbboanddefinitionwithget_cost, so over the wire a read answersfetch_first, and the buy is the device budget's to allow.POST /fetchrefusesoption_flow(400, owner, 2026-12-03), so a bought hour is never stored. With Massive linked, the hub's tie order answers from it first. - An hour is classed twice, once outside Rust.
fixtures/option_flow/synthetic/is a committed hour written bygen.py.classify.pyreads any hour'stcbboanddefinitionDBN with the vendor'sdatabentopackage, applies the kernel's rule indecimal, and writesexpected.jsonbeside them. The recorded hour, bought by the live test, stays infixtures/option_flow/recorded/, git-ignored and local: classify it withuv run classify.py recordedfromfixtures/option_flow/.
Why it is built this way
- The vendor's own client, and one POST of Taji's own.
databento::HistoricalClientmakes every call but the bars and stored-product reads, andLiveClientmakes every live call. Bars and stored products postget_rangethemselves (get_range_bytes), because the vendor's client hands back decoded records, never the bytes, and the hub stores the bytes the gateway sent so a replay parses the same pull (plugins/databento/src/lib.rs, theStreamdoc). That POST goes through egress: it reaches onlyhist.databento.comand follows no redirect (plugins/databento/tests/egress.rs). - A print's
aggressoris stated for futures alone. AGLBX.MDP3tradesrecord'ssideis the initiator:Bbuy,Asell,Nnone (an implied trade), soNis null, never a tick-rule guess.EQUS.MINI's page does not stateside(EQUS.MINI, fetched 2026-12-04), so an equity's is null, and no Databento print statesoff_exchange(source.rstrade_tick; Trades schema, fetched 2026-12-04). - A history print is bought with its quote. An equity's
tradesread buysEQUS.MINItbboand an option'sOPRA.PILLARtcbbo, each "alongside the BBO immediately before the effect of each trade" (TBBO schema, fetched 2026-12-03), andtrade_tickfills the print'sbidandaskfrom the record's one level. The kernel classes the print against them before any other quote (taji_brokerage::side), so no quotes read is joined or bought (owner, 2026-12-03: "let's use trades with quotes. no need to price it"). A future's staytrades. A live print streamstrades(live_schema): a livetbboframe is anmbp-1one, so its quote is the hub's live one. - Fills rest on the vendor's own statements. A print's
bidandaskare the one level of itstbboortcbborecord, andEQUS.MINI's one BBO sums the sizes across venues (TBBO, EQUS.MINI, fetched 2026-12-04). A depth row'scountismbp-10'sbid_ctandask_ct. A statistics fill is a stat it states: the open and close crosses onXNAS.ITCH, settlement and open interest onGLBX.MDP3(README Futures and options) and open interest on OPRA. An imbalance's near and far prices are stated from 9:28 and 15:55 ET, empty before (XNAS.ITCH, fetched 2026-12-04). An option bar'svwapis the plugin's fold of its prints, the 1m bar's alone. Futuresearchrows have no typed decoder, so none is declared. - The key is revealed to the vendor's clients. Live CRAM signs a challenge with the key itself, so no header marker can stand in for it (
revealsinplugins/databento/src/source.rs). The key still never reaches a client or a process plugin (ADR 0005). - Every buy is priced first. Databento is the first provider whose bars cost money, so
fetch_costis what the device budget reads, and a metered link is refused until that budget is set.get_costis free metadata. - A dataset per class, from measurement. Each choice follows a fact measured in the README:
- an equity's daily bar comes from
EQUS.SUMMARY, becauseEQUS.MINI's daily bar holds about 5% of the consolidated volume and trades outside the regular session (Dataset); - a future's daily bar is
ohlcv-1hsummed by Globex trade date, becauseohlcv-1dbuckets by UTC date and so holds the next session's first hours (What Taji uses); - an index's daily bar is hours summed by New York date;
- an option's bars are folded from
trades, becauseOPRA.PILLARohlcv-*is one bar per publisher (Futures and options).
- an equity's daily bar comes from
- Data as the vendor gives it.
CAP.adjustmentsisRawalone, and an adjusted ask is refused, not adjusted here (ADR 0007). - A capability through a hub product. Statistics, imbalance, status, depth scope, futures listings and chains are platform products a second provider could fill, never Databento-named routes (ADR 0004).
- The plan is detected, never typed. The live gateway authenticating a key is the plan, and a refusal is history.
checkuses the historical gateway instead, because the live one refuses a usage key with the same auth error a wrong key gets (probeinplugins/databento/src/live.rs,checkinplugins/databento/src/source.rs). - The catalog is free and asked once per boot. A read of a dataset the key lacks is
NoSourcebefore any billed call, and a date before the dataset's start is refused with that start. - Batch is looked at once, never waited on. A read runs under the hub's store lock, so
batch_jobadopts a matching vendor job (a restart forgets its own), submits one only when none exists, and answers "ask again" until the job isdone. A submit whose answer is lost may be billed and queued, so it is held asdatabento_submit_unconfirmedand never sent again; the vendor's portal is where you check it. - A 429 holds the family 60 s. The vendor's client keeps
Retry-Afterto itself, soapi_failedcannot honour it. - One live session per dataset. A session binds one dataset. Each
(schema, symbol)is subscribed once while any consumer holds it and fans out to its consumers, so a re-attach never sends a second subscribe, which would deliver every record twice; the session unsubscribes it at its first prune (PRUNE) after the last consumer goes. A dropped session is dialled again with backoff toMAX_BACKOFF, every held subscription sent again, and ends for good only when the gateway refuses the key. A replay (from) runs on its own session, so history never reaches a real-time consumer (plugins/databento/src/live.rs). - A chain steps back up to three sessions. Today's
definitionis 422 until the session ends, and a usage key's OPRA license stops about one session back, both measured 2026-09-24 (CHAIN_STEPS). - A future's raw symbol carries a one-digit year.
raw_symbolcutsESZ26toESZ6, becauseGLBX.MDP3resolves only that spelling. A future option keeps its single space (ESZ6 C7800), and an index loses its$. - A dated contract's
instrumentis refused.FACTS.symbologyrefusesraw_symbol: this source resolves continuous and parent futures, and another provider answers a dated contract.
Constraints and limits
- Rate budgets.
plugins/databento/src/ratelimit.rsholds oneBudgetper endpoint family:timeseries,symbology,metadata,batch_listandbatch_submitat the vendor's stated rates, andbatch_filesunlimited (the vendor states none).Families::ofmaps an endpoint to its family, and every call is admitted byqueue::admitbefore it is sent.- The set is one per process (
Families::gateway). The vendor counts per team ("Our historical API allows each team up to", fetched 2026-12-02), with no per-IP limit, so every Databento client in the process shares the set whatever its key. A client aimed at a mock server holds its own. - On top, the hub's gate gives the provider 100 shared permits (
FACTS.permits).
- The set is one per process (
- Stream caps. One session per dataset per process.
spendreports the distinct symbols carried, with no quota. The vendor's per-team session caps and 5 connects a second per IP are on its page; the README's Open lists them as unmeasured. The pinned client splits a subscribe into messages of 500 symbols itself. Each fan-out buffers 512 events (DEPTH), and a slower consumer hearsLagged. - Replay. A live
frommust fall within the last 86,400 s, else Taji refuses it before connecting (replay_start). The gateway answers an older one 422no_replay(README What Taji uses). - Entitlement.
- A dataset not in
list_datasetsisNoSource. - A span before
get_dataset_range's start names that date. - A 403
license_not_found_unauthorizedis the span's refusal (Refused), not the key's; every other 401 or 403 isAuth. - Live access and OPRA past about T-1 need a plan (README Futures and options).
- A dataset not in
- Symbology.
spellmaps acontinuous:item tostype_in=continuous(roll letter lower-cased), aparent:item toparent, and an instrument to its raw symbol. Spreads, series and other continuous spellings areUnsupported. The live gateway subscribes raw symbols alone. - Bars.
- 1m, 1h and D only. 5m and 30m are folded by the hub from 1m.
- Native 1h only for an equity's extended session and a future's sessions; every other 1h, and every 4h, is the hub's to fold (
hour_tier). - No
24hsession:EQUS.MINIis exchange-only. - A daily bar whose day has not fully been served is dropped, not shown forming.
- Refusals the hub reads.
- 422 "None of the symbols could be resolved" is
not_listed. - 422 naming batch or size is
oversize, which sends the ask to batch. - Any other 400 or 422 is
Refusedin the vendor'scase: message. - A transport failure is
Network.
- 422 "None of the symbols could be resolved" is
- Numbers. Prices, record counts and dataset start dates are the README's: Pricing, Entitlement, Auth and calls, Indexes and future options, Records.
Examples
Taji's request to the vendor. This is the golden that plugins/databento/tests/egress.rs range asserts, from plugins/databento/tests/egress/range.txt. The test sends it to a loopback upstream with the synthetic test key. The authorization value is that key, base64-encoded with an empty password, masked here:
http POST /v0/timeseries.get_range
accept: application/octet-stream
accept-encoding: gzip
authorization: Basic p1
content-length: 170
content-type: application/x-www-form-urlencoded
user-agent: taji-databento/0.1.0
body dataset=GLBX.MDP3&schema=ohlcv-1m&encoding=dbn&compression=zstd&stype_in=raw_symbol&stype_out=instrument_id&symbols=ESZ6&start=1704205800000000000&end=1704205860000000000
The vendor's answer is a zstd DBN stream, so no text capture exists. No DBN capture is kept either: the offline tests encode their records in memory (RecordEncoder in plugins/databento/src/lib.rs and plugins/databento/src/live.rs). DATABENTO_LIVE=1 cargo test -p taji-databento --test live -- --ignored --test-threads=1 buys one such answer, but it does not write it to disk.
The vendor's refusal of a wrong key. This is the body a_wrong_key_is_refused_in_the_vendors_words in plugins/databento/src/lib.rs replays on /v0/metadata.get_cost, as measured 2026-09-24:
{"detail":{"case":"auth_authentication_failed","message":"Authentication failed.","status_code":401,"docs":"https://databento.com/docs/portal/api-keys","payload":null}}
refused maps it to Auth, and verdict makes it a refused link, with "Authentication failed." as the reason.
The kernel's answer. engine/crates/taji/tests/fixtures/wire/data-depth.json is GET /get/depth for equity:SPY with databento serving. The rows come from the fixture's stand-in body (tick_answer in engine/crates/taji/src/wire/fixture.rs, shaped as Databento's mbp-10 records). The scope comes from FACTS.book:
"metadata": {
"provider": "{\"equity:SPY\":\"databento\"}",
"scope": "{\"levels\":10,\"venues\":[\"XNAS\"]}",
"source": "{\"equity:SPY\":\"vendor\"}"
},
"rows": 4,
Its pretty field, unescaped and cut to the first two rows:
| symbol | ts_event | ts_init | side | level | price | size | count | peak | step |
| SPY | 1791469798998750000 | 1791469799000000000 | bid | 0 | 501.2400000000 | 300.0000000000 | 3 | | |
| SPY | 1791469798998750000 | 1791469799000000000 | ask | 0 | 501.2600000000 | 200.0000000000 | 2 | | |
…
ts_init is the record's ts_recv, the instant Databento received it, and the read cuts on it. ts_event is the venue's own stamp. engine/crates/taji/tests/fixtures/wire/data-statistics.json (ESZ26 settlement, stat_type 3) and engine/crates/taji/tests/fixtures/wire/data-imbalance.json are built the same way.
The link. engine/crates/taji/tests/fixtures/wire/link-linked.json shows a Databento key accepted at plan. In data, databento reads "tier": "plan", and metered is ["databento"].
Live. No capture yet. The live tests run only with a plan key, and SKIP until one exists.
Testing
| What | Command | Needs |
|---|---|---|
Offline unit tests: routing, spelling, folding, DBN readers, refusals, batch states over wiremock, live fan-out and replay window | cargo test -p taji-databento | nothing |
| Egress golden, authorization, redirect and host grants | cargo test -p taji-databento --test egress | nothing |
The hub's seeded FACTS and the process rate-limit row | cargo test -p taji-trading | nothing |
| Unbilled resolve and price of an index and a future option | cargo test -p taji-databento -- --ignored live_ | DATABENTO_API_KEY in the environment |
One billed SPY daily bar, refused above $1.00 by get_cost first | DATABENTO_LIVE=1 cargo test -p taji-databento --test live -- --ignored --test-threads=1 | DATABENTO_LIVE=1 and DATABENTO_API_KEY; otherwise each test is a SKIP cell |
Price, and with DATABENTO_BUY_OK=1 buy, the option_flow hour into fixtures/option_flow/recorded/ (the buy is real money: set it only on the owner's yes to the printed cost) | DATABENTO_LIVE=1 cargo test -p taji-databento --test live -- --ignored --test-threads=1 opra_option_flow_hour_is_recorded | DATABENTO_LIVE=1 and DATABENTO_API_KEY; without DATABENTO_BUY_OK=1 it prints SKIP buy_unconfirmed cost=<usd> and buys nothing |
| Every vendor's live leg | engine/crates/taji-open/scripts/vendor_live.sh databento | never sets DATABENTO_LIVE, so Databento reports SKIP |
There are no captured fixtures under plugins/databento/tests/: the unit tests build each DBN record in memory, and the option_flow hour's fixtures are under plugins/databento/fixtures/option_flow/. There is no walk script, and no paper or SIM leg, because nothing here trades. When the wire fixture's Databento bodies change, regenerate them per the wire-fixture row of AGENTS.md.
References
All fetched 2026-12-02:
- Historical authentication
- Historical rate limits
- timeseries.get_range, HTTP form
- metadata.get_cost
- symbology.resolve
- batch.submit_job
- Live authentication
- Live intraday replay
- Live connection limits
- Live overview
- OHLCV schema
- Trades schema
- Symbology
- DBN
Fetched 2026-12-03: