Reference
HTTP API
19 operations, read from the engine's own description of itself. A path, a parameter or a default that changes there changes here; nothing on this page is a list kept beside it.
Base
https://priorcase.com/v1
JSON in and out, UTC and ISO 8601 throughout, and Priorcase API version 1.0. The spec itself is at https://priorcase.com/openapi.json, which needs no key.
Answers, which a key is spent on
Each of these draws the moments and their price paths, and each costs what it draws. The k or limit you ask for is what the count follows.
GET/v1/after/{topic}key
Every event of `topic` in the data, most recent first, each with its before and after.
topicstringrequiredassetstring- Asset symbol Defaults to
BTC.
GET/v1/moment/{at}key
What the market was at one moment: the returns over 1h to 30d, the day's high and low, the volume, and how wild it was against its own month.
atstringrequiredassetstring- Asset symbol Defaults to
BTC.
GET/v1/normalkey
What these figures normally do for this asset, and how this set sits against it.
atstring[]required- UTC times, up to 24: the moments to read against the yardstick
known_bystringrequired- Read the yardstick as it stood at this moment, never later
assetstring- Asset symbol Defaults to
BTC. scalestring- One of 5m, 15m, 30m, 1h, 2h, 4h, 1d: which aftermath figure is the one drawn Defaults to
15m.
GET/v1/pathskey
The paths a search compared, to draw side by side or over each other.
atstring[]required- UTC times, up to 24: the moment searched and the ones it is compared with
assetstring- Asset symbol Defaults to
BTC. scalestring- One of 5m, 15m, 30m, 1h, 2h, 4h, 1d Defaults to
15m. after_minutesinteger- How far past T; default 32 hours (longer: through an event ahead) Defaults to
1920. before_minutesinteger- How far behind T; the scale's own window by default (wider: to zoom out of it)
GET/v1/searchkey
The past moments whose price path most resembles a given one, with what followed each.
assetstring- Asset symbol Defaults to
BTC. atstring- UTC time; default = now (the last closed bar)
eventstring- Event slug; the moment it became known
kinteger- Defaults to
10. scalestring- What alike means in time: the last 144 bars of 5m, 15m, 30m or 1h
basisstring- What alike is measured on: chart, model Defaults to
chart.
GET/v1/whenkey
The moments a condition became true, most recent first, each with what was known then and what followed.
qstringrequired- A condition in words: "last time bitcoin fell 10%", "under 100k"
assetstring- Asset symbol Defaults to
BTC. limitinteger- Defaults to
8.
The rest, open
What the data is and what is in it. No key, and nothing counted — they describe the catalogue rather than draw from it.
GET/healthopen
Whether this engine can do its job, as a thing a monitor can act on.
GET/v1/acrossopen
Every other asset and measure as it stood at each moment — what the rest of the market was doing then.
atstring[]required- UTC times, up to 24: the moments to read the other assets at
assetstring- Leave this one out: the page is already about it
window_minutesinteger- How far back each shape reaches Defaults to
2160. after_minutesinteger- How far past the moment each shape runs Defaults to
1920.
GET/v1/assetsopen
The assets a search can be about — the measures beside them are not searched.
GET/v1/eventsopen
Events already known by the end of the data, most recent first.
qstring- Words that must all appear in the name or aliases
kindstring- fomc, cpi, crypto, macro or market
sincestring- Known at or after (UTC)
untilstring- Known at or before (UTC)
limitinteger- Defaults to
10.
GET/v1/events/{slug}open
One event by its slug, with the time it became public and its source.
slugstringrequired
GET/v1/events/nextopen
The next scheduled event after the end of the data.
GET/v1/events/upcomingopen
Scheduled events due in the next `days` after the end of the data, soonest first.
daysinteger- Defaults to
30. limitinteger- Defaults to
5.
GET/v1/newsopen
Government headlines known in the window, most recent first: title, source, time, link.
untilstring- Known by (UTC); default now
sincestring- Known from (UTC); default 72 hours before until
limitinteger- Defaults to
20. qstring- Words the title must have
GET/v1/plansopen
What the engine sells, as the engine itself holds it.
GET/v1/pricesopen
Closes at every step boundary: the long chart a moment is picked from.
assetstring- Asset symbol Defaults to
BTC. stepstring- 5m, 15m, 30m, 1h, 4h or 1d Defaults to
1d. sincestring- From (UTC)
untilstring- To (UTC)
GET/v1/spellopen
The query with misspelt words set right against the words the search knows ("halvng" is "halving").
qstringrequired
GET/v1/statusopen
What the engine holds: each asset, how far back it reaches, its newest bar, and whether a yardstick was loaded for it.
GET/v1/topicsopen
Kinds of event, each a list of its members: "what happened after halvings?".
qstring- A question such as 'after rate cuts'