On this page
Examples
A working request + a representative response for every endpoint family.
Replace art_live_<your-key> with a real key from
POST /keys and evt_01HMPK... with
a real universal event id from GET /v1/events.
All examples use the production base URL https://api.artery.questflow.ai. For local dev, swap
in https://api.artery.questflow.ai — the wire shape is identical.
Events
List universal events
bash# All multi-provider BTC events resolving in 2026 (page size 50)
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/events?underlying=BTC&resolution_after=2026-01-01T00:00:00Z&min_providers=2&limit=50"jsonc{
"events": [
{
"universalId": "evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D",
"canonicalName": "BTC ≥ $120,000 by 2026-12-31",
"kind": "price_binary",
"underlying": "BTC",
"threshold": 120000,
"op": "gte",
"resolutionDate": "2026-12-31T23:59:59Z",
"status": "open",
"firstSeenAt": "2026-04-02T14:11:08.412Z",
"lastSeenAt": "2026-05-13T08:42:13.991Z",
"links": [
{ "provider": "polymarket", "providerMarketId": "0xCONDITION_ID", "confidence": 0.97, "source": "ner" },
{ "provider": "kalshi", "providerMarketId": "KXBTC-26DEC31-T120K", "confidence": 0.95, "source": "ner" }
]
}
],
"meta": { "total": 142, "lastReconcile": { "at": "2026-05-13T08:00:00Z", "ingested": 1422 } }
}Event detail + composite health
bash# One-shot dashboard fetch — spread + arbitrage + settlement + disputes + half-life
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/events/evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D/health"jsonc{
"universalId": "evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D",
"event": { "...": "ArteryEvent shape" },
"spread": {
"universalId": "evt_01HMPKW8...",
"legs": [
{ "provider": "polymarket", "yesBid": 0.42, "yesAsk": 0.45, "yesMid": 0.435 },
{ "provider": "kalshi", "yesBid": 0.39, "yesAsk": 0.42, "yesMid": 0.405 }
],
"fetchedAt": "2026-05-13T08:42:18.220Z"
},
"arbitrage": {
"crossProvider": { "buyProvider": "kalshi", "sellProvider": "polymarket", "grossEdge": 0.015, "netEdge": 0.008 },
"negationPair": null
},
"consensusScore": null,
"settlement": [],
"disputeHistory": [],
"edgeHalfLife": { "medianHalfLifeSec": 84, "decayedSignals": 32, "computedAt": "2026-05-13T03:00:00Z" },
"recentAnomalies": [],
"recentTrades": [],
"fetchedAt": "2026-05-13T08:42:18.224Z"
}Spread / arbitrage / arb-decay
bashcurl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/events/evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D/spread"
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/events/evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D/arbitrage"
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/events/evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D/arb-decay"jsonc// /arb-decay response
{
"universalId": "evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D",
"signalsConsidered": 87,
"decayedSignals": 64,
"medianHalfLifeMs": 84_312,
"medianHalfLifeSec": 84,
"computedAt": "2026-05-13T03:00:00Z"
}Trades, anomaly history, dispute history, settlement
bash# Last 100 fills observed for this event (cross-provider)
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/events/evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D/trades?limit=100"
# Anomalies in the trailing 7d (default), filter to spread-widening
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/events/evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D/anomaly-history?kind=spread_widening&limit=50"
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/events/evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D/dispute-history"
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/events/evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D/settlement"jsonc// /anomaly-history response
{
"universalId": "evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D",
"anomalies": [
{
"id": "an_01HMQ0J7P5G2N7VK0H9F6X3M2A",
"kind": "spread_widening",
"universalId": "evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D",
"provider": "polymarket",
"marketId": "0xCONDITION_ID",
"ts": "2026-05-13T07:11:42.000Z",
"bucketVol": null,
"baselineMean": 0.012,
"baselineStddev": 0.004,
"zScore": 6.4,
"raw": null
}
]
}Me (org-scoped)
Wallet bindings
bash# Bind a public address — only the address is stored, never keys
curl -X POST -H "Authorization: Bearer art_live_<your-key>" \
-H "Content-Type: application/json" \
-d '{"provider":"polymarket","address":"0xabc123...","label":"prod-trader-1"}' \
"https://api.artery.questflow.ai/v1/me/wallets"
# List bindings
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/me/wallets"
# Remove a binding
curl -X DELETE -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/me/wallets/wal_01HMQ1XYZ..."jsonc// POST response
{
"id": "wal_01HMQ1XYZ8K5C0F8H4Q4ZE7VX9D",
"provider": "polymarket",
"address": "0xabc123...",
"label": "prod-trader-1",
"createdAt": "2026-05-13T08:43:01.140Z"
}Fills, PnL, anomaly feed
bash# Every observed trade where one of your bound wallets is maker or taker
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/me/fills?limit=200"
# Realized + unrealized PnL across all your wallets, grouped by event
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/me/pnl"
# Anomalies on events you care about (default trailing 24h, max 30d)
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/me/anomaly-feed?since=2026-05-12T00:00:00Z&limit=100"jsonc// /me/pnl response
{
"total": { "realized": 1843.22, "unrealized": -120.55, "totalNotional": 42_188.0 },
"byEvent": [
{
"universalId": "evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D",
"canonicalName": "BTC ≥ $120,000 by 2026-12-31",
"realized": 510.0,
"unrealized": -22.5,
"openPosition": 250,
"avgCost": 0.421,
"currentPrice": 0.412,
"tradeCount": 18
}
]
}Backtest
Backtest endpoints are expensive — each call walks every historic signal in the requested
window against real trade flow. They consume the backtest.compute_min quota in addition to
api.request. Stick to ≤ 7-day windows for interactive use; for 30-day backtests, expect
multi-second response times.
bash# Replay every cross-provider arbitrage signal in [from, to] vs real trades
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/me/backtest/replay-arbitrage?from=2026-05-01T00:00:00Z&to=2026-05-08T00:00:00Z&min_net_edge=0.005&fill_window_ms=3600000¬ional=1000"
# Same idea, but for negation-pair (YES on A + NO on B, sum <$1) signals
curl -H "Authorization: Bearer art_live_<your-key>" \
"https://api.artery.questflow.ai/v1/me/backtest/replay-negation?from=2026-05-01T00:00:00Z&to=2026-05-08T00:00:00Z&min_net_edge=0.005¬ional=1000"jsonc// /backtest/replay-arbitrage response shape
{
"range": { "from": "2026-05-01T00:00:00Z", "to": "2026-05-08T00:00:00Z" },
"parameters": { "minNetEdge": 0.005, "fillWindowMs": 3_600_000, "notionalPerSignal": 1000 },
"totals": {
"signalsConsidered": 412,
"filledSignals": 287,
"cumulativePnl": 1842.7,
"maxDrawdown": -212.4,
"sharpe": 1.83
},
"curve": [
{ "ts": "2026-05-01T01:14:22Z", "pnl": 0, "cumulative": 0 },
{ "ts": "2026-05-01T01:14:48Z", "pnl": 5.2, "cumulative": 5.2 }
]
}Window constraints: to - from ≤ 30d, fill_window_ms ≤ 24h,
notional ∈ [0.01, 1_000_000].
Webhooks
bash# Create a webhook — the signing secret is returned exactly once
curl -X POST -H "Authorization: Bearer art_live_<your-admin-key>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://app.example.com/artery-hooks",
"channels": ["artery:stream:anomaly:*"],
"universalIds": ["evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D"],
"description": "Anomaly alerts for our BTC binary"
}' \
"https://api.artery.questflow.ai/v1/webhooks"
# List webhooks (secret is omitted from list output)
curl -H "Authorization: Bearer art_live_<your-admin-key>" \
"https://api.artery.questflow.ai/v1/webhooks"
# Update channels / status / universalIds
curl -X PATCH -H "Authorization: Bearer art_live_<your-admin-key>" \
-H "Content-Type: application/json" \
-d '{"status":"paused"}' \
"https://api.artery.questflow.ai/v1/webhooks/wh_01HMQ2..."
# Delete
curl -X DELETE -H "Authorization: Bearer art_live_<your-admin-key>" \
"https://api.artery.questflow.ai/v1/webhooks/wh_01HMQ2..."jsonc// POST response — store the secret IMMEDIATELY, it cannot be re-derived
{
"id": "wh_01HMQ2ABCDEFGHIJKLMNOPQRST",
"url": "https://app.example.com/artery-hooks",
"channels": ["artery:stream:anomaly:*"],
"secret": "whsec_<base64url-32-byte-secret>",
"createdAt": "2026-05-13T08:50:21.001Z"
}API keys
bash# Mint a key — Endpoint is unauthenticated; gate behind admin in prod
curl -X POST -H "Content-Type: application/json" \
-d '{
"name": "trader-bot",
"userId": "u-001",
"scopes": ["read","stream"],
"rateLimitTier": "pro"
}' \
"https://api.artery.questflow.ai/keys"
# Revoke
curl -X DELETE -H "Authorization: Bearer art_live_<your-admin-key>" \
"https://api.artery.questflow.ai/keys/<id>"jsonc// POST /keys response — plaintext shown ONCE
{
"id": "key_01HMQ3...",
"plaintext": "art_live_01HMQ3....s_kJ8a4Kv2qBpH...",
"name": "trader-bot",
"orgId": "org_01HMP0...",
"scopes": ["read", "stream"],
"environment": "live",
"createdAt": "2026-05-13T08:51:08.700Z"
}Admin
All /v1/admin/* routes require the admin scope. They're stable but intentionally undocumented
in the public OpenAPI export — use them through the internal admin app, not customer SDKs.
bash# Every wallet binding across every tenant
curl -H "Authorization: Bearer art_live_<your-admin-key>" \
"https://api.artery.questflow.ai/v1/admin/wallets"
# Recent webhook deliveries (pull-based observability)
curl -H "Authorization: Bearer art_live_<your-admin-key>" \
"https://api.artery.questflow.ai/v1/admin/webhook-deliveries?limit=100"
# Force a single delivery retry
curl -X POST -H "Authorization: Bearer art_live_<your-admin-key>" \
"https://api.artery.questflow.ai/v1/admin/webhook-deliveries/whd_01HMQ4.../retry"
# Promote / demote an org's plan
curl -X PATCH -H "Authorization: Bearer art_live_<your-admin-key>" \
-H "Content-Type: application/json" \
-d '{"planId":"pro"}' \
"https://api.artery.questflow.ai/v1/admin/orgs/org_01HMP0.../plan"Stream — quick test from CLI
bashTOKEN=art_live_<your-key>
websocat "wss://api.artery.questflow.ai/v1/stream?token=$TOKEN" \
-x '{"type":"subscribe","channels":["artery:stream:event:evt_01HMPKW8YJ5C0F8H4Q4ZE7VX9D"]}'
# → {"type":"subscribed","subscription_id":"sub_01HMQ5..."}
# → {"type":"event","subscription_id":"sub_01HMQ5...","data":{...spread snapshot...}}See the WebSocket channel catalog for every channel name + envelope shape.
See also
- Authentication — token format and scopes
- Error code reference — error.code enum
- Rate limits & quotas — tier table and headers
- WebSocket channel catalog — channel names, envelopes