priorcase
priorcase

Sign in

To make a key, and to see what yours have spent.

Docs

Overview

Precedent search for markets. Send a moment in time and get the past moments most like it, each with the market as it stood then and what happened in the hours that followed.

One call

Request
curl -H "Authorization: Bearer pc_live_…" \
  'https://priorcase.com/v1/search?asset=BTC&scale=15m&k=8'
Response (trimmed)
{
  "asset": "BTC",
  "query": {
    "time": "2026-10-22T03:10:00Z",
    "then": { "close": 82781.09, "ret_24h_pct": 0.12, … },
    "after": null
  },
  "matches": [{
    "rank": 1, "similarity": 0.872,
    "moment": {
      "time": "2020-03-20T21:00:00Z",
      "then":  { "close": 6186.25, … },
      "after": { "ret_32h_pct": 5.62, … }
    }
  }],
  "quality": { "n": 8, "range_percentile": 25.1, … },
  …
}

Shortened to the shape. A moment carries twelve figures in then and six in after, and the answer also carries normal, attestation and a disclaimer. The reference lists every field.

Send and receive JSON. All times are UTC, in ISO 8601. The base is https://priorcase.com/v1. Every call that returns results takes your key as a bearer token. Create one in your account, then see authentication for the rest.

Endpoints

Ask in one of three ways: for the moments most like one you pick, for every event of a kind, or for the moments a condition held. The rest give you what you need to read those.

  • GET/v1/searchFind the past moments most like a given one, with what happened after each1 answer / 10 k
  • GET/v1/whenFind the moments a condition became true, with the data known then and what happened after1 answer / 10 limit
  • GET/v1/moment/{at}Get the market at one moment: returns from 1h to 30d, the day's high and low, and volume1 answer
  • GET/v1/after/{topic}List every event of a topic, newest first, with the data before and after each1 answer
  • GET/v1/pathsGet the price path around a set of moments, ready to plot on top of each other1 answer
  • GET/v1/normalGet the usual range of these figures for an asset, and where a set of moments sits in it1 answer

These six count against your allowance. Thirteen more cost nothing: assets, topics, events, prices, news, plans, spell, across and status. They describe the catalogue instead of reading from it.

/v1/search is the one that needs a model, so today it answers for Bitcoin alone. The rest read the data and answer for every asset we carry.

See the full reference for all nineteen. We generate it from the API's own openapi.json, so it always matches the version that is running.

What you can rely on

  • Ask about a moment and you get only what was known then. We leave out anything that had not closed or been published by that moment. Check attestation.verified: the engine proved it, so you do not have to take our word for it.
  • Read what followed from after. We never mix it into then, and it stays null until those hours have closed. We match on then alone, and a past moment becomes a candidate only once its 32 hours have closed, so no match you get is still running.
  • A past moment never changes, so the same question about the same instant answers the same way for ever. Walk at forward over your sample and no row can see its own future.

Before you trust an answer

similarity ranks the matches. It says nothing about whether the set is worth reading. Read quality for that. It compares how widely the matched outcomes landed against sets of the same size drawn at random.

range_percentile runs 0 to 100, and low is tight. Near 50 the matched outcomes are spread about as widely as moments picked at random, whatever their similarity scores say. Above 50 they are spread wider, which is a reading of its own: what followed these moments moved more than usual.

alike answers a different question, about the matches rather than what followed them: how many past windows were about as similar as the ones returned. n is what you asked for; this is how many there were to ask for. Measured on BTC at 15m it ran from 22 to 195 across nearby queries — eight out of twenty-two is a different answer from eight out of a hundred and ninety-five, and a chart cannot tell you which one you are looking at.

Small sets are noisy. Over 288 searches the median spread was 4.73pp at k=8 against 0.75pp at k=50. Ask for more than you intend to look at whenever you plan to read quality.

What comes back

Matches one by one, each with what was knowable at it and what happened after it. They are listed, never averaged into one view. The spread between them is the answer, and a mean would hide it.

A model of ours does the matching. It reads the shape of the price before a moment rather than its level, which is why two moments years and thousands of dollars apart can be alike. How it does that is ours. What an answer guarantees is above, and that is the part you can hold us to.

What is in it, and what it costs

Today you can search Bitcoin and Ether, back to 2017, and 10 daily series at 1d. Coverage has every source and what is coming.

Nothing is charged today. There is no checkout yet, so a key you create lands on the free plan: 1,000 answers a month, no card.

Plans are a fixed monthly fee with no metered overage. Past the allowance we refuse the call rather than bill you, and the month turns over on the first. Pricing has the plans and limits and errors has what each call costs and whether a run will fit.

For agents and scripts

Point an agent at priorcase.com/llms.txt for all of these pages in one file, or priorcase.com/openapi.json for the machine-readable spec. Or skip both and connect over MCP, which reaches the same endpoints with the same key.

Quickstart: get a key and make your first call →