Consume a delivery
Panel formats, payload types and a webhook receiver.
This is the receiving side. Someone has set up a delivery pointed at you — an SFTP directory, a webhook endpoint, an S3 prefix, or a mailbox — and you have to turn what arrives into something your systems can act on. That means knowing the file format, knowing which payload type you are getting, and handling the two things that will eventually happen: a duplicate send, and a send you missed.
What is actually sent
A delivery is an ordinary workflow on the sender's side — a trigger, an index_panel node, and one send node. index_panel is what produces your file: a flat table, one header row, one record per row, no merged headers or spanning cells, always carrying an index_id column. The send node only decides how that file reaches you.
index_event_triggerfires when the index publishes — here, on a new weighting (a rebalance).index_panelrenders the chosenpayload_type.history: "latest"means the newest snapshot only, andcategory: "symbol"keys the rows by ticker instead of FIGI.send_sftpwrites it into the agreed directory under the filename fromfilename_template.
| Channel | What you get | How you pick it up |
|---|---|---|
send_email | The CSV as an attachment, with the configured subject and body | Mailbox rules, or a scripted IMAP fetch |
send_webhook | An HTTP request to your endpoint, one per index unless per_index is off | An HTTP handler you own |
send_sftp | The CSV written into an agreed directory | Poll the directory, or an inotify-style watcher |
send_s3 | The CSV written to an object key | S3 event notification, or poll the prefix |
If the sender is feeding you through a partner integration instead — send_refinitiv, send_alphabot, send_alphathena, send_stratifi — there is no index_panel node and none of this applies: those operations format and transport the data the one way that partner accepts, and you consume it through that partner's own product.
The payload types
Establish with the sender which of these you are receiving before you write a parser. They have different grains and different keys.
| `payload_type` | Grain | What it answers |
|---|---|---|
values | One row per session | "What is the index level?" — carries every configured series, typically value_pr and value_tr. |
weightings | One row per constituent, per rebalance | "What proportions was the index targeting?" |
holdings | One row per constituent, per rebalance or corporate action | "What does the index actually own?" — share counts plus the divisor; a latest file weights them at its own time. |
changes | One row per changed position | "What moved since last time?" — adds, drops and rebalances. |
corporate_actions | One row per action | "What splits and dividends were applied?" |
tracker_legacy | One file per snapshot | The v1 tracker layout, kept for systems that parse that exact file. Not a flat panel — see below. |
The leading columns are fixed per payload type, and anything else the record carries is appended after them:
| `payload_type` | Leading columns |
|---|---|
values | index_id, time, value, then each configured series |
weightings | index_id, time, security, weight |
holdings | index_id, time, security, weight, shares, divisor |
changes | index_id, time, security, change_type, then shares_prev / shares_new / shares_change and weight_prev / weight_new / weight_change |
corporate_actions | index_id, time, security, type, then the action's own fields (nested ones such as impact arrive JSON-encoded) |
change_type on a changes panel is one of added, removed or rebalance. If the sender set include_unchanged, you will also see hold rows for positions that did not move — so do not treat the presence of a row as proof that something changed.
weightings and holdings are not interchangeable
latest holdings file weights them at the file's own time. If you are replicating the index or need its current
weights, you want holdings. If you are checking methodology, you want weightings. The two differ between
rebalances, and that is expected, not a bug.Ask what `security` is keyed by
security column holds the stored identifier, which is a FIGI. If the sender set
category on the panel — symbol is the common one — the column holds that identifier instead, and duplicates
are summed on the way. Two feeds from the same index can therefore key positions differently. Agree it once,
in writing.history on the sender side decides how much arrives. latest sends the newest snapshot only — the normal recurring case, and the one where a missed file is a real gap. full sends the whole series, which is self-healing but large.
A webhook receiver
With per_index: true — the default — you get one request per index, and the body is a records-orient envelope. With per_index: false you get a single request carrying {generated_at, deliveries: [...]}, where each entry is one of these envelopes. Handle whichever the sender configured; ask, rather than inferring it from the first request you see.
{"index_id": "idx_bh7fgXWJMaa3","index_name": "US 500","payload_type": "weightings","time": "2026-06-30 00:00:00","generated_at": "2026-06-30 21:12:04","records": [{ "index_id": "idx_bh7fgXWJMaa3", "time": "2026-06-30 00:00:00", "security": "AAPL", "weight": 0.0712 },{ "index_id": "idx_bh7fgXWJMaa3", "time": "2026-06-30 00:00:00", "security": "MSFT", "weight": 0.0664 }]}
time is the snapshot the data belongs to; generated_at is when the file was built. They are not the same and the difference matters for idempotency — a resend of the same snapshot carries the same time and a new generated_at.
One exception: a tracker_legacy payload is an already-rendered file body, so it arrives as content (a string) plus filename, with no records array. Every other payload type sends records.
The important properties of a good receiver: it accepts the request quickly, it is idempotent, and it never does the downstream work inline. Acknowledge, persist the raw body, and process asynchronously — that way a slow database does not turn into a failed delivery.
# FastAPIimport hmac, osfrom fastapi import FastAPI, Header, HTTPException, Requestapp = FastAPI()SHARED_SECRET = os.environ["INDEXONE_SHARED_SECRET"]@app.post("/hooks/indexone")async def receive(request: Request, x_shared_secret: str = Header(default="")):# There is no signature on delivery webhooks — a shared secret in a header# is the available control. Compare in constant time.if not hmac.compare_digest(x_shared_secret, SHARED_SECRET):raise HTTPException(status_code=401)body = await request.body()payload = await request.json()# per_index: false bundles every index under "deliveries".envelopes = payload.get("deliveries") or [payload]accepted = []for envelope in envelopes:# tracker_legacy arrives as a rendered file body, everything else as rows.rows = envelope.get("records")if rows is None:rows = parse_legacy_file(envelope["content"])# Idempotency key: the sender does not provide one, so derive it from the# SNAPSHOT time — generated_at changes on every resend of the same data.key = f"{envelope['index_id']}:{envelope['payload_type']}:{envelope['time']}"if already_seen(key):accepted.append({"key": key, "status": "duplicate"})continuestore_raw(key, body)enqueue_processing(key, envelope["index_id"], rows)accepted.append({"key": key, "status": "accepted", "rows": len(rows)})return {"results": accepted}
Delivery webhooks are not signed
GET /query before acting on it.Return a 2xx, or you will be retried
SFTP pickup
The pattern that survives contact with reality: list, filter by the agreed filename shape, move each file out of the drop directory before parsing it, and record what you took.
import csv, io, posixpathimport paramikoDROP = "/incoming/indices"DONE = "/incoming/indices/processed"transport = paramiko.Transport(("sftp.example.com", 22))transport.connect(username="you", pkey=paramiko.RSAKey.from_private_key_file("id_rsa"))sftp = paramiko.SFTPClient.from_transport(transport)for name in sorted(sftp.listdir(DROP)):if not name.endswith(".csv"):continuesrc = posixpath.join(DROP, name)# Move first. A file still in DROP after a crash gets retried; a file# parsed in place and then lost does not.dst = posixpath.join(DONE, name)sftp.rename(src, dst)with sftp.open(dst) as fh:rows = list(csv.DictReader(io.TextIOWrapper(fh, encoding="utf-8")))process(name, rows)
Partial files
Idempotency and replay
Assume every delivery can arrive more than once and that some will not arrive at all. Neither is exotic: a retry after a timeout produces a duplicate, and a receiver that was down during a send produces a gap.
- Derive a key.
(index_id, payload_type, time)identifies a snapshot. Store it and reject repeats — the same file processed twice is worse than one processed late. Do not key ongenerated_at; it is different on every resend of the same data. - Keep the raw payload. Store the bytes before parsing. When a downstream mapping turns out to be wrong you can reprocess without asking for a resend.
- Detect gaps, do not just log them. For a
valuesfeed you know which sessions to expect from the index'sexchange_calendar. A missing session should raise an alarm, not sit in a log. - Backfill from the API, not from a resend.
GET /queryonindex-values-eod,index-holdingsorindex-weightingsis authoritative and available immediately. Asking the sender to re-run a delivery is slower and gives you the same data. - Watch for restatements. A corrected historical row will not be pushed to you — event triggers ignore rows older than about three hours. Periodically re-pull a trailing window and compare.
curl -G "https://api.indexone.io/query" \--data-urlencode "table=index-values-eod" \--data-urlencode "pk=idx_bh7fgXWJMaa3" \--data-urlencode "order=descending" \--data-urlencode "limit=20" \-H "x-api-key: YOUR_API_KEY" \-H "Authorization: YOUR_ID_TOKEN"
There is no endpoint that returns a delivery's artifacts
GET /deliveries/{id}/executions tells you that a run happened, not what it contained. An artifact-retrieval
endpoint is documented as planned. Until then, the receiver is the system of record for what was delivered, and
GET /query is the system of record for what the index says — which is why keeping the raw payload matters.Checking what the sender saw
If a file did not arrive, the sender can check that delivery's run history. This route takes the delivery id — the dlv_ one. (GET /deliveries/{id}, which lists a team's deliveries, is the odd one out: that {id} is a team id.)
curl "https://api.indexone.io/deliveries/dlv_YOUR_DELIVERY_ID/executions" \-H "x-api-key: YOUR_API_KEY" \-H "Authorization: YOUR_ID_TOKEN"
The thing to know before reading it: a failed send is recorded as a warning, not an error. That is deliberate — the coordinator parks a live execution group permanently once it errors, so treating a transient failure as an error would silently stop the delivery for good. The consequence is that a run marked complete does not mean your file arrived.
Three outcomes tell you where the problem is. A send reporting {"sent": false, "reason": "sends are disabled in backtest mode"} was a simulation — nothing was ever going to arrive. A run in a warning state means at least one target was refused: the send operation's output carries a per-target results list — [{index_id, target, ok, attempts, detail}] — naming which indices failed and why, and one index failing does not stop the others, so a partially delivered run is a normal thing to see. A send recorded with sent: true against your endpoint means the file left; look at your own intake next.
Stored executions rarely keep the per-target rows
results from the record it persists, so the run history usually gives you the run's
state and timing but not which index failed. The reliable way to get per-index detail is to run the delivery once
on demand — the console's Test delivery button, which posts to /execute and returns the operation output
inline.