{"openapi":"3.1.0","info":{"title":"Priorcase API","description":"Precedent search for markets. Every answer is a set of past moments and the price paths that actually followed them. Point-in-time: what a moment reports was knowable then, and what followed is labelled as having followed. No forecasts, no probabilities, no advice.","termsOfService":"https://priorcase.com/terms","contact":{"name":"Priorcase","url":"https://priorcase.com/docs","email":"api@priorcase.com"},"version":"1.0"},"servers":[{"url":"https://priorcase.com"}],"paths":{"/similar":{"get":{"tags":["retrieval"],"summary":"Get Similar","operationId":"get_similar_similar_get","parameters":[{"name":"asset","in":"query","required":false,"schema":{"type":"string","description":"Asset symbol","default":"BTC","title":"Asset"},"description":"Asset symbol"},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Top K"}},{"name":"query_anchor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Specific anchor id to use as query","title":"Query Anchor Id"},"description":"Specific anchor id to use as query"},{"name":"query_time","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"UTC time; nearest anchor at or before is used","title":"Query Time"},"description":"UTC time; nearest anchor at or before is used"},{"name":"exclude_recent_days","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":30,"title":"Exclude Recent Days"}},{"name":"min_gap_hours","in":"query","required":false,"schema":{"type":"number","minimum":0,"default":24.0,"title":"Min Gap Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-internal":true}},"/chart":{"get":{"tags":["chart"],"summary":"Get Chart","operationId":"get_chart_chart_get","parameters":[{"name":"asset","in":"query","required":false,"schema":{"type":"string","description":"Asset symbol","default":"BTC","title":"Asset"},"description":"Asset symbol"},{"name":"timeframe","in":"query","required":false,"schema":{"type":"string","description":"5m / 15m / 30m / 1h. 5m is source; the rest are aggregated on read.","default":"5m","title":"Timeframe"},"description":"5m / 15m / 30m / 1h. 5m is source; the rest are aggregated on read."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Right edge (inclusive). UTC. Default: latest available.","title":"To"},"description":"Right edge (inclusive). UTC. Default: latest available."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":1500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-internal":true}},"/v1/status":{"get":{"tags":["search"],"summary":"Get Status","description":"Describe what this engine is serving.\n\nLists every asset with how far its data reaches back, its most recent bar,\nand whether a yardstick is loaded for it.\n\n`sample` is true when the deployment is running on synthetic prices. Check\nit before you treat the numbers as a live feed.","operationId":"get_status_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusOut"}}}}}}},"/v1/search":{"get":{"tags":["search"],"summary":"Get Search","description":"Find the past moments whose price path most resembles a given one.\n\nEach match comes with what happened in the hours after it.\n\nMatching is done by a model of our own. It reads the shape of the price\nbefore a moment rather than its level, so a quiet stretch can match a\nviolent one and two moments years and thousands of dollars apart can be\nalike. `scale` is the window the paths come back drawn at and nothing\nelse. It does not change which moments are found.\n\nLeave out `at` and `event` to search from now. A past moment becomes a\ncandidate only once the 32 hours after it have closed, so you never get a\nmatch whose outcome is still running.","operationId":"get_search_v1_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"asset","in":"query","required":false,"schema":{"type":"string","description":"Asset symbol","default":"BTC","title":"Asset"},"description":"Asset symbol"},{"name":"at","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"UTC time; default = now (the last closed bar)","title":"At"},"description":"UTC time; default = now (the last closed bar)"},{"name":"event","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Event slug; the moment it became known","title":"Event"},"description":"Event slug; the moment it became known"},{"name":"k","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"How many past moments to return. The model's list holds a fixed number for each instant (`most` in /v1/assets), and asking for more gives that many and is billed as that many. On `basis=shape` there is no such cap, and small values are noisy there: measured on BTC at 15m, the spread of what followed had a median width of 4.73pp at k=8 against 0.75pp at k=50.","default":10,"title":"K"},"description":"How many past moments to return. The model's list holds a fixed number for each instant (`most` in /v1/assets), and asking for more gives that many and is billed as that many. On `basis=shape` there is no such cap, and small values are noisy there: measured on BTC at 15m, the spread of what followed had a median width of 4.73pp at k=8 against 0.75pp at k=50."},{"name":"scale","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"How far the returned paths reach back around each moment. It does not change which moments are found: the same question at any scale gives the same matches.","title":"Scale"},"description":"How far the returned paths reach back around each moment. It does not change which moments are found: the same question at any scale gives the same matches."},{"name":"basis","in":"query","required":false,"schema":{"type":"string","description":"Which way to find the moments. `shape` is the default and works for every asset: it compares the price path by correlation on the window's own shape. `model` is the product: a model of ours picks the moments, and only assets that carry one can be searched — `/v1/assets` names the bases each asset offers.","default":"shape","title":"Basis"},"description":"Which way to find the moments. `shape` is the default and works for every asset: it compares the price path by correlation on the window's own shape. `model` is the product: a model of ours picks the moments, and only assets that carry one can be searched — `/v1/assets` names the bases each asset offers."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/moment/{at}":{"get":{"tags":["search"],"summary":"Get Moment","description":"Get the state of the market at one moment.\n\nReturns from 1h to 30d, the day's high and low, the volume, and how\nvolatile it was against its own month.\n\nEvery figure is read from bars that had closed by that moment, so a\nquestion about 2019 is answered with 2019 numbers and nothing later.","operationId":"get_moment_v1_moment__at__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"at","in":"path","required":true,"schema":{"type":"string","format":"date-time","description":"The moment to read, UTC, ISO 8601. Rounded down to the five-minute grid.","title":"At"},"description":"The moment to read, UTC, ISO 8601. Rounded down to the five-minute grid."},{"name":"asset","in":"query","required":false,"schema":{"type":"string","description":"Asset symbol","default":"BTC","title":"Asset"},"description":"Asset symbol"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MomentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/events":{"get":{"tags":["search"],"summary":"Get Events","description":"List the events already known by the end of the data, most recent first.","operationId":"get_events_v1_events_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Words that must all appear in the name or aliases","title":"Q"},"description":"Words that must all appear in the name or aliases"},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"fomc, cpi, crypto, macro or market","title":"Kind"},"description":"fomc, cpi, crypto, macro or market"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Known at or after (UTC)","title":"Since"},"description":"Known at or after (UTC)"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Known at or before (UTC)","title":"Until"},"description":"Known at or before (UTC)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"How many events to return.","default":10,"title":"Limit"},"description":"How many events to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/events/next":{"get":{"tags":["search"],"summary":"Get Next Event","description":"Get the next scheduled event after the end of the data.","operationId":"get_next_event_v1_events_next_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventOut"}}}}}}},"/v1/events/upcoming":{"get":{"tags":["search"],"summary":"Get Upcoming Events","description":"List the scheduled events due in the next `days`, soonest first.\n\nCounted from the end of the data, not from now.\n\nA calendar is public in advance but what a release will say is not, so an\nevent still ahead carries only its kind: that an FOMC statement is due, not\nwhat it will decide.","operationId":"get_upcoming_events_v1_events_upcoming_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":800,"minimum":1,"description":"How far ahead to look, in days.","default":30,"title":"Days"},"description":"How far ahead to look, in days."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"How many events to return.","default":5,"title":"Limit"},"description":"How many events to return."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/normal":{"get":{"tags":["search"],"summary":"Get Normal","description":"Get the usual range of these figures for an asset.\n\nAlso shows where a given set of moments sits inside that range.\n\nThis is the same yardstick `/v1/search` returns beside its matches,\navailable on its own for sets you found another way: every past CPI\nrelease, every moment a condition was met.\n\n`known_by` is the moment you are comparing from, not now. Ask about 2019\nand you get what was normal in 2019.","operationId":"get_normal_v1_normal_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"at","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"date-time"},"description":"UTC times, up to 24: the moments to read against the yardstick","title":"At"},"description":"UTC times, up to 24: the moments to read against the yardstick"},{"name":"known_by","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Read the yardstick as it stood at this moment, never later","title":"Known By"},"description":"Read the yardstick as it stood at this moment, never later"},{"name":"asset","in":"query","required":false,"schema":{"type":"string","description":"Asset symbol","default":"BTC","title":"Asset"},"description":"Asset symbol"},{"name":"scale","in":"query","required":false,"schema":{"type":"string","description":"One of 5m, 15m, 30m, 1h, 2h, 4h, 1d: which aftermath figure is the one drawn","default":"15m","title":"Scale"},"description":"One of 5m, 15m, 30m, 1h, 2h, 4h, 1d: which aftermath figure is the one drawn"},{"name":"bars","in":"query","required":false,"schema":{"type":"integer","maximum":100000,"minimum":1,"description":"How many buckets after a moment the window rows measure. The engine's own window is 144; a list that reads further says so in /v1/search's window_bars.","default":144,"title":"Bars"},"description":"How many buckets after a moment the window rows measure. The engine's own window is 144; a list that reads further says so in /v1/search's window_bars."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NormalsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/paths":{"get":{"tags":["search"],"summary":"Get Paths","description":"Get the price paths around a set of moments, ready to plot.\n\nEach path covers the window at that scale plus the 32 hours after. Values\nare percent from the close at the moment, and each path carries the events\nthat became known across it. The present moment has no `after`.\n\n`before_minutes` widens what you get back, not what was matched: the base\nis still the close at the moment, so you can zoom out without searching\nagain.","operationId":"get_paths_v1_paths_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"at","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"date-time"},"description":"UTC times, up to 24: the moment searched and the ones it is compared with","title":"At"},"description":"UTC times, up to 24: the moment searched and the ones it is compared with"},{"name":"asset","in":"query","required":false,"schema":{"type":"string","description":"Asset symbol","default":"BTC","title":"Asset"},"description":"Asset symbol"},{"name":"scale","in":"query","required":false,"schema":{"type":"string","description":"One of 5m, 15m, 30m, 1h, 2h, 4h, 1d","default":"15m","title":"Scale"},"description":"One of 5m, 15m, 30m, 1h, 2h, 4h, 1d"},{"name":"after_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":1244160,"minimum":0,"description":"How far past T; default 32 hours (longer: through an event ahead)","default":1920,"title":"After Minutes"},"description":"How far past T; default 32 hours (longer: through an event ahead)"},{"name":"before_minutes","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1244160,"minimum":0},{"type":"null"}],"description":"How far behind each moment to reach; the scale's own window by default.","title":"Before Minutes"},"description":"How far behind each moment to reach; the scale's own window by default."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PathsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/across":{"get":{"tags":["search"],"summary":"Get Across","description":"Get every other asset and measure as it stood at each moment.\n\nUse this to see what the rest of the market was doing.\n\nEverything is point-in-time. An asset whose market was closed is read from\nits last close before the moment, and the response says how long before.\nAn asset whose data does not reach the moment is left out.","operationId":"get_across_v1_across_get","parameters":[{"name":"at","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"date-time"},"description":"UTC times, up to 24: the moments to read the other assets at","title":"At"},"description":"UTC times, up to 24: the moments to read the other assets at"},{"name":"asset","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Leave this one out: the page is already about it","title":"Asset"},"description":"Leave this one out: the page is already about it"},{"name":"window_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":43200,"minimum":60,"description":"How far back each shape reaches","default":2160,"title":"Window Minutes"},"description":"How far back each shape reaches"},{"name":"after_minutes","in":"query","required":false,"schema":{"type":"integer","maximum":43200,"minimum":0,"description":"How far past the moment each shape runs","default":1920,"title":"After Minutes"},"description":"How far past the moment each shape runs"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcrossOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/when":{"get":{"tags":["search"],"summary":"Get When","description":"Find the moments a condition became true, most recent first.\n\nEach comes with the data known at that moment and what happened after.\n\nA run of bars that all meet the condition counts once, at the first. Every\nvalue is measured on bars that had closed by that moment, so nothing comes\nfrom the future.","operationId":"get_when_v1_when_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","maxLength":200,"description":"A condition in words: \"last time bitcoin fell 10%\", \"under 100k\"","title":"Q"},"description":"A condition in words: \"last time bitcoin fell 10%\", \"under 100k\""},{"name":"asset","in":"query","required":false,"schema":{"type":"string","description":"Asset symbol","default":"BTC","title":"Asset"},"description":"Asset symbol"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"How many moments to return, most recent first. Costs one answer per ten.","default":8,"title":"Limit"},"description":"How many moments to return, most recent first. Costs one answer per ten."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhenOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/spell":{"get":{"tags":["search"],"summary":"Get Spell","description":"Correct misspelt words in a query against the words the search knows, so \"halvng\" becomes \"halving\".","operationId":"get_spell_v1_spell_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","maxLength":200,"description":"The question to check, in words.","title":"Q"},"description":"The question to check, in words."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpellOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/events/{slug}":{"get":{"tags":["search"],"summary":"Get Event","description":"Get one event by its slug, with the time it became public and its source.\n\nThe timestamp is when the event became knowable, not when it happened. An\nevent known only by its date counts from the end of that day.","operationId":"get_event_v1_events__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","description":"The event's stable id, as /v1/events gives it.","title":"Slug"},"description":"The event's stable id, as /v1/events gives it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/topics":{"get":{"tags":["search"],"summary":"Get Topics","description":"List the kinds of event with their members, so you can ask what happened after halvings.","operationId":"get_topics_v1_topics_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A question such as 'after rate cuts'","title":"Q"},"description":"A question such as 'after rate cuts'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/after/{topic}":{"get":{"tags":["search"],"summary":"Get After","description":"List every event of `topic`, most recent first, each with the data before and after it.\n\n**`alike` asks a different question of the same list.** Without it this is\nthe record: every FOMC, newest first. With it the list is ranked by how\nmuch each moment looked like the one named (\"of the 75 past FOMCs, the\nones that looked like now\"), and each item carries that number.\n\nThe ruler is the same one `basis=shape` uses, so the numbers mean here what\nthey mean there. Every member is read in one pass (scales.blend_many):\nmeasured, a kind of 480 takes 30ms where one at a time takes 2.2s.","operationId":"get_after_v1_after__topic__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topic","in":"path","required":true,"schema":{"type":"string","description":"The topic's slug, as /v1/topics gives it.","title":"Topic"},"description":"The topic's slug, as /v1/topics gives it."},{"name":"asset","in":"query","required":false,"schema":{"type":"string","description":"Asset symbol","default":"BTC","title":"Asset"},"description":"Asset symbol"},{"name":"alike","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Order by how alike each is to this moment (ISO, or 'now') instead of by date.","title":"Alike"},"description":"Order by how alike each is to this moment (ISO, or 'now') instead of by date."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicAfterOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/prices":{"get":{"tags":["search"],"summary":"Get Prices","description":"Get closes at every step boundary: the long chart a moment is picked from.\n\nA weekly series cannot be searched, but its closes can still be drawn.\nThese are the same closes the original source publishes, so a page beside a\nmoment can show where today's reading sits in its own history.","operationId":"get_prices_v1_prices_get","parameters":[{"name":"asset","in":"query","required":false,"schema":{"type":"string","description":"Asset symbol","default":"BTC","title":"Asset"},"description":"Asset symbol"},{"name":"step","in":"query","required":false,"schema":{"type":"string","description":"5m, 15m, 30m, 1h, 4h or 1d","default":"1d","title":"Step"},"description":"5m, 15m, 30m, 1h, 4h or 1d"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"From (UTC)","title":"Since"},"description":"From (UTC)"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"To (UTC)","title":"Until"},"description":"To (UTC)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricesOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/assets":{"get":{"tags":["search"],"summary":"Get Assets","description":"List the assets a search can be about. The measures beside them are not searched.","operationId":"get_assets_v1_assets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetsOut"}}}}}}},"/v1/news":{"get":{"tags":["search"],"summary":"Get News","description":"List government headlines known in the window, most recent first, with title, source, time and link.","operationId":"get_news_v1_news_get","parameters":[{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Known by (UTC); default now","title":"Until"},"description":"Known by (UTC); default now"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Known from (UTC); default 72 hours before until","title":"Since"},"description":"Known from (UTC); default 72 hours before until"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"How many headlines to return.","default":20,"title":"Limit"},"description":"How many headlines to return."},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"description":"Words the title must have","default":"","title":"Q"},"description":"Words the title must have"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/plans":{"get":{"tags":["search"],"summary":"Get Plans","description":"Get the plans this engine sells, as the engine itself holds them.\n\nNo key is needed. The pricing page reads from here, so the row a buyer sees\nand the limit the meter keeps are the same thing.","operationId":"get_plans_v1_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlansOut"}}}}}}},"/v1/usage":{"get":{"tags":["search"],"summary":"Get Usage","description":"Get what this person's keys have spent this month.","operationId":"get_usage_v1_usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":254,"description":"The email a key was issued to","title":"Owner"},"description":"The email a key was issued to"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-internal":true}},"/v1/logs":{"get":{"tags":["search"],"summary":"Get Logs","description":"Get this person's calls, newest first.\n\n**주인으로 거르는 일이 여기 있다.** 기록은 열쇠 아이디만 들고 있고 주인이\n누구인지는 열쇠 쪽이 안다(`core.keys`). 둘을 잇지 않으면 남의 호출이\n섞이는데, 그건 조금 틀린 쪽이 아니라 사고다.","operationId":"get_logs_v1_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":254,"description":"The email a key was issued to","title":"Owner"},"description":"The email a key was issued to"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":92,"minimum":1,"description":"How far back, in days","default":1,"title":"Days"},"description":"How far back, in days"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`ok` · `refused` · an exact code like `429`","title":"Status"},"description":"`ok` · `refused` · an exact code like `429`"},{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One key's id, to read it alone","title":"Key"},"description":"One key's id, to read it alone"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"How many lines at most","default":100,"title":"Limit"},"description":"How many lines at most"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-internal":true}},"/v1/keys":{"post":{"tags":["search"],"summary":"Post Key","description":"Create a key for this person, on the plan their existing keys are already on.\n\nThe plan is not taken from the request. It is read from the keys this owner\nalready holds, so creating a key can never grant a better one: a free owner\ngets a free key, and a paying one gets what they pay for.","operationId":"post_key_v1_keys_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":254,"description":"The signed-in email","title":"Owner"},"description":"The signed-in email"},{"name":"name","in":"query","required":false,"schema":{"type":"string","maxLength":40,"description":"What this key is for, as its holder calls it","default":"","title":"Name"},"description":"What this key is for, as its holder calls it"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-internal":true}},"/v1/keys/{key_id}":{"patch":{"tags":["search"],"summary":"Patch Key","description":"Rename one of this person's keys.\n\n이름만 바뀐다 — 비밀도, 아이디도, 플랜도, 폐기 여부도 그대로다. 이것이\n있어야 **이 칸이 생기기 전에 만든 열쇠도** 이름을 받는다. 없으면 새 칸은\n오늘 이후의 열쇠에만 붙고, 지금 쓰고 있는 열쇠는 영영 `pc_live_…427a` 로\n남는다 — 고치려던 바로 그것이다.\n\n폐기된 열쇠도 이름을 받는다. 목록에 남아 있는 한 「이게 뭐였더라」는\n살아 있는 열쇠에만 생기는 물음이 아니다.","operationId":"patch_key_v1_keys__key_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"owner","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":254,"description":"The signed-in email","title":"Owner"},"description":"The signed-in email"},{"name":"name","in":"query","required":false,"schema":{"type":"string","maxLength":40,"description":"The new name. Empty clears it.","default":"","title":"Name"},"description":"The new name. Empty clears it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Patch Key V1 Keys  Key Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-internal":true},"delete":{"tags":["search"],"summary":"Delete Key","description":"Stop one of this person's keys working, and with `forget`, take it off the list.\n\nThe owner is checked here rather than trusted from the path: an id is a\nshort hex string and guessing one must not be a way to turn off somebody\nelse's key.\n\n**세우기와 치우기는 다른 일이다.** 세운 열쇠는 「이것이 있었고 이제 안\n된다」를 말하려고 목록에 남는다. 시험하다 만든 것, 오타로 만든 것에는 그\n말이 없는데, 그런 줄이 일곱이면 산 열쇠 하나를 찾는 일이 훑는 일이 된다.\n\n**치우기가 세우기를 건너뛰지 않는다.** 건너뛰면 쓰이던 열쇠가 쓰인 적\n없던 것이 되고, 기록에 구멍이 뚫린다. 산 열쇠에는 409 다 — 먼저 세워라.","operationId":"delete_key_v1_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"owner","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":254,"description":"The signed-in email","title":"Owner"},"description":"The signed-in email"},{"name":"forget","in":"query","required":false,"schema":{"type":"boolean","description":"Also take it off the list. Only a revoked key.","default":false,"title":"Forget"},"description":"Also take it off the list. Only a revoked key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Delete Key V1 Keys  Key Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-internal":true}},"/v1/pins":{"get":{"tags":["search"],"summary":"Get Pins","description":"The moments this person has kept, newest moment first.","operationId":"get_pins_v1_pins_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":254,"description":"The signed-in email","title":"Owner"},"description":"The signed-in email"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-internal":true},"post":{"tags":["search"],"summary":"Post Pin","description":"Write a moment down. Keeping the same moment twice is keeping it once.\n\nThe page calls this the instant a moment is pinned, and a pinned page is\nrefreshed on a clock, so the second call and the hundredth hand back the\nfirst row rather than filling the shelf by being read.","operationId":"post_pin_v1_pins_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":254,"description":"The signed-in email","title":"Owner"},"description":"The signed-in email"},{"name":"asset","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":16,"title":"Asset"}},{"name":"scale","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":4,"title":"Scale"}},{"name":"at","in":"query","required":true,"schema":{"type":"string","minLength":10,"maxLength":32,"description":"The frozen T, as the address names it","title":"At"},"description":"The frozen T, as the address names it"},{"name":"basis","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":16,"default":"chart","title":"Basis"}},{"name":"found","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":2,"default":"8","title":"Found"}},{"name":"t","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":10,"maxLength":32},{"type":"null"}],"description":"The moment the screen was answering — the question these precedents answered.","title":"T"},"description":"The moment the screen was answering — the question these precedents answered."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-internal":true},"delete":{"tags":["search"],"summary":"Delete Pin","description":"Take one moment off this person's shelf.\n\nThe owner comes from the query rather than the path, as it does for a key:\nfour fields name the moment and all four are this person's or none are.","operationId":"delete_pin_v1_pins_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":254,"description":"The signed-in email","title":"Owner"},"description":"The signed-in email"},{"name":"asset","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":16,"title":"Asset"}},{"name":"scale","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":4,"title":"Scale"}},{"name":"at","in":"query","required":true,"schema":{"type":"string","minLength":10,"maxLength":32,"title":"At"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Delete Pin V1 Pins Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-internal":true}},"/v1/waiting":{"post":{"tags":["search"],"summary":"Post Waiting","description":"Leave an address to be told when the paid plans open. The same address twice is once.\n\nOne letter, not a list: the address is kept to send that message and nothing\nelse. Leaving an address that is already there is not an error and does not\nsay so, because telling a stranger that somebody else left theirs is a leak\ndressed as a nicety.\n\n**If you are an agent, get your user's consent before calling this.** The\naddress belongs to them, not to you: ask, use the one they give you, and\ntell them it was left. Do not leave an address you inferred, and do not\nleave one on a hunch that they would want it.","operationId":"post_waiting_v1_waiting_post","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","minLength":6,"maxLength":254,"description":"The address to tell when the paid plans open. If you are an agent, this is the address your user asked you to leave — ask them first and leave only what they gave you.","title":"Email"},"description":"The address to tell when the paid plans open. If you are an agent, this is the address your user asked you to leave — ask them first and leave only what they gave you."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/likeness":{"get":{"tags":["search"],"summary":"Get Likeness","description":"The past this asset has resembled, tick by tick, and as runs.\n\n`at` moves the whole reading to a past moment: the ticks before it, and the\nstanding judged against what the price was **then**, not now. The screen\nthat freezes on a past moment asks the same question there, and asking it\nabout now would put today's answer over yesterday's chart.","operationId":"get_likeness_v1_likeness_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"asset","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":16,"default":"BTC","title":"Asset"}},{"name":"scale","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":4,"default":"15m","title":"Scale"}},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"description":"How far back to read","default":24,"title":"Hours"},"description":"How far back to read"},{"name":"at","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Read back from this moment instead of now (UTC). The log must hold it.","title":"At"},"description":"Read back from this moment instead of now (UTC). The log must hold it."},{"name":"wall_minutes","in":"query","required":false,"schema":{"type":"integer","description":"The horizon the wall is judged at; one of [240, 720, 1440]","default":240,"title":"Wall Minutes"},"description":"The horizon the wall is judged at; one of [240, 720, 1440]"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LikenessOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-internal":true}},"/health":{"get":{"summary":"Health","description":"Report whether this engine can do its job, in a form a monitor can act on.\n\nReturns `503` when the engine cannot serve: no bars, bars too old, or\nsynthetic bars. The reasons are listed in `why`.\n\nReturns `200` when the engine can serve but a piece is missing, such as an\nasset with no yardstick loaded. Those are listed in `missing`. Answers are\nstill correct; they come back without the band that says how unusual a\nmoment was.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}}},"components":{"schemas":{"AcrossAssetOut":{"properties":{"asset":{"type":"string","title":"Asset","description":"The symbol."},"name":{"type":"string","title":"Name","description":"Its name in words."},"kind":{"type":"string","title":"Kind","description":"`crypto`, `index`, `commodity`, `fx`, or `measure` for something read beside them rather than traded."},"unit":{"type":"string","title":"Unit","description":"What `shape`, `after`, `ret_24h` and `ret_72h` are counted in: `%` for a price, `bp` for a rate, `pts` for an index."},"step":{"type":"string","title":"Step","description":"What its source gives: `5m` intraday bars, or `1d` one value a day."},"close":{"type":"number","title":"Close","description":"Its close at that moment."},"ret_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ret 24H","description":"What it did over the 24 hours to that moment, counted in `unit`. Not named `pct`: for a rate it is basis points, and a percentage of a yield near zero measures the denominator."},"ret_72h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ret 72H","description":"The same over 72 hours."},"stale_minutes":{"type":"integer","title":"Stale Minutes","description":"How long before the moment this asset last traded. Large where its market was shut."},"shape":{"items":{"type":"number"},"type":"array","title":"Shape","description":"The window before the moment, each point in `unit` from the close at it: what it was doing."},"after":{"items":{"type":"number"},"type":"array","title":"After","description":"What followed, on the same base. Empty for a moment whose window has not closed."}},"type":"object","required":["asset","name","kind","unit","step","close","ret_24h","ret_72h","stale_minutes","shape","after"],"title":"AcrossAssetOut","description":"One asset at one moment, drawn so it can be read beside the others."},"AcrossMomentOut":{"properties":{"time":{"type":"string","format":"date-time","title":"Time","description":"The moment, UTC."},"assets":{"items":{"$ref":"#/components/schemas/AcrossAssetOut"},"type":"array","title":"Assets","description":"Every asset at it."}},"type":"object","required":["time","assets"],"title":"AcrossMomentOut","description":"One moment, read across every asset at once."},"AcrossOut":{"properties":{"moments":{"items":{"$ref":"#/components/schemas/AcrossMomentOut"},"type":"array","title":"Moments","description":"One entry per moment asked for."}},"type":"object","required":["moments"],"title":"AcrossOut","description":"A set of moments, each read across every asset."},"AfterItem":{"properties":{"event":{"$ref":"#/components/schemas/EventOut","description":"The event."},"moment":{"$ref":"#/components/schemas/MomentOut","description":"The first five-minute boundary after it became known, with what was knowable then and what followed."},"similarity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Similarity","description":"How alike this moment and the one `alike` named are, where that was asked for. Absent otherwise."}},"type":"object","required":["event","moment"],"title":"AfterItem","description":"One event, and the market at the first moment it was public."},"AfterOut":{"properties":{"ret_4h_pct":{"type":"number","title":"Ret 4H Pct","description":"Percent change from the moment to 4 hours after it."},"ret_24h_pct":{"type":"number","title":"Ret 24H Pct","description":"Percent change from the moment to 24 hours after it."},"ret_32h_pct":{"type":"number","title":"Ret 32H Pct","description":"Percent change from the moment to 32 hours after it."},"max_up_32h_pct":{"type":"number","title":"Max Up 32H Pct","description":"The highest price reached in those 32 hours, in percent from the moment. Reached at some point, not held."},"max_down_32h_pct":{"type":"number","title":"Max Down 32H Pct","description":"The lowest price reached in those 32 hours, in percent from the moment. Negative unless the price never traded below."},"path_pct":{"items":{"type":"number"},"type":"array","title":"Path Pct","description":"The whole 32 hours, one point every 30 minutes (64 of them), each in percent from the moment. Plot this to draw what followed."}},"type":"object","required":["ret_4h_pct","ret_24h_pct","ret_32h_pct","max_up_32h_pct","max_down_32h_pct","path_pct"],"title":"AfterOut","description":"What happened in the 32 hours from the moment.\n\nEvery figure is measured from `then.close`, the last close before the\nmoment. This field is null on a moment whose 32 hours have not closed yet,\nwhich is always true of the moment you asked about."},"AssetOut":{"properties":{"symbol":{"type":"string","title":"Symbol","description":"What to pass as `asset`, e.g. `BTC`."},"name":{"type":"string","title":"Name","description":"Its name in words."},"kind":{"type":"string","title":"Kind","description":"`crypto`, `index`, `commodity` or `fx`."},"aliases":{"type":"string","title":"Aliases","description":"Words a question may name it by."},"source":{"type":"string","title":"Source","description":"Where its bars come from."},"live":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Live","description":"Where the price can be watched between bars, as \"venue:symbol\". Null where nothing streams it. A search only ever reads closed bars."},"sample":{"type":"boolean","title":"Sample","description":"True where its prices are synthetic rather than market data."},"start":{"type":"string","format":"date-time","title":"Start","description":"The first bar held for it."},"now":{"type":"string","format":"date-time","title":"Now","description":"The latest moment it can be searched at."},"spans":{"additionalProperties":{"type":"integer"},"type":"object","title":"Spans","description":"The scales this asset can honestly be drawn at, and how many minutes a path at each one covers.","default":{}},"searched":{"items":{"type":"string"},"type":"array","title":"Searched","description":"The windows this asset is searched on: what `mix` may name on `basis=shape`. A subset of `spans`.","default":[]},"bases":{"items":{"type":"string"},"type":"array","title":"Bases","description":"What it can be searched on. `shape` always; `model` where a computed list has been loaded for it.","default":["chart"]},"reach":{"additionalProperties":{"type":"string","format":"date-time"},"type":"object","title":"Reach","description":"The last moment each computed basis can answer about. `chart` is absent: it reads the bars and reaches as far as they do.","default":{}},"most":{"additionalProperties":{"type":"integer"},"type":"object","title":"Most","description":"The most moments each computed basis returns for one instant. Asking for more gives this many. `chart` is absent: it reads the bars.","default":{}}},"type":"object","required":["symbol","name","kind","aliases","source","live","sample","start","now"],"title":"AssetOut","description":"One asset the engine can answer about."},"AssetStateOut":{"properties":{"trend_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trend Label"},"volatility_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Volatility Label"},"drawdown_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Drawdown Label"},"volume_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Volume Label"},"regime_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regime Label"},"ret_72h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ret 72H"},"realized_vol_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Realized Vol 24H"},"drawdown_from_7d_high":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Drawdown From 7D High"},"volume_ratio_24h_30d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Ratio 24H 30D"}},"type":"object","title":"AssetStateOut","description":"v0 rule-based labels on the asset itself (BTC trend / vol / drawdown / volume).\n\nSee `src/pastcast/pipelines/asset_state/` for the build pipeline."},"AssetStatusOut":{"properties":{"asset":{"type":"string","title":"Asset","description":"The symbol."},"start":{"type":"string","format":"date-time","title":"Start","description":"The first bar it holds. Nothing before this can be asked about."},"now":{"type":"string","format":"date-time","title":"Now","description":"Just after the last closed bar: the latest moment that can be searched."},"yardstick":{"type":"boolean","title":"Yardstick","description":"Whether a measured yardstick is loaded for this asset. Without one every search for it carries `normal: null` and there is nothing to read a match against."}},"type":"object","required":["asset","start","now","yardstick"],"title":"AssetStatusOut","description":"What the engine can currently answer for one asset."},"AssetsOut":{"properties":{"assets":{"items":{"$ref":"#/components/schemas/AssetOut"},"type":"array","title":"Assets","description":"Every asset, with where its data starts and ends."},"scales":{"items":{"type":"string"},"type":"array","title":"Scales","description":"The windows a path can be drawn at. A scale changes how far a returned path reaches, not which moments are found."},"conditions":{"items":{"type":"string"},"type":"array","title":"Conditions","description":"Conditions /v1/when understands, written the way they are said.","default":[]}},"type":"object","required":["assets","scales"],"title":"AssetsOut","description":"What can be asked about, and in what words."},"Attestation":{"properties":{"asked_at":{"type":"string","format":"date-time","title":"Asked At","description":"The moment this answer is about, UTC."},"basis":{"type":"string","title":"Basis","description":"Which of the ways the moments were found with: `shape` or `model`. You choose it on the request."},"recipe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe","description":"The ruler that found them: the windows it compared, what each counted for, and how many bars each reads: `15mx144`, `5m:1+15m:2x144`. Two answers with the same `basis`, `provider_version` and `recipe` were compared the same way. Null on `basis=model`, whose way is not yours to set."},"provider":{"type":"string","title":"Provider","description":"Who computed it."},"provider_version":{"type":"string","title":"Provider Version","description":"Which way of matching produced it. An identifier, not a description."},"rule":{"type":"string","title":"Rule","description":"The rule the answer was checked against, in words."},"verified":{"type":"boolean","title":"Verified","description":"True where the engine checked that nothing in this answer was unknowable at `asked_at`. It refuses rather than return a leak, so this is never false."}},"type":"object","required":["asked_at","basis","provider","provider_version","rule","verified"],"title":"Attestation","description":"What this answer was computed from, and under which rule.\n\nThe claim the product rests on is that nothing in a reply was unknowable at\nthe moment it is about. The engine checks that on every answer already and\nrefuses rather than return a leak (`pastcast.search.service.search`). This\nsays so in the reply, so a caller can quote it rather than take it on\nfaith: an agent can show its working, and a backtest can show that its own\nnumbers were not drawn from their own future."},"CallOut":{"properties":{"at":{"type":"string","title":"At"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name","default":""},"tail":{"type":"string","title":"Tail","default":""},"path":{"type":"string","title":"Path"},"status":{"type":"integer","title":"Status"},"cost":{"type":"integer","title":"Cost"},"why":{"type":"string","title":"Why","default":""}},"type":"object","required":["at","key","path","status","cost"],"title":"CallOut","description":"호출 한 줄. **합계가 아니라 그 하나.**\n\n`/v1/usage` 는 같은 파일을 접어서 수로 준다 — 「이번 달 39,874 답」은\n플랜이 맞는지 말해 주지만, 「어제 02:13 에 이 열쇠로 부른 /v1/search 가\n429 였다」는 **고칠 수 있는 것**을 말한다. 붙이는 사람이 제 코드를\n고치려면 뒤의 것이 필요하다."},"ChartBar":{"properties":{"time":{"type":"integer","title":"Time"},"open":{"type":"number","title":"Open"},"high":{"type":"number","title":"High"},"low":{"type":"number","title":"Low"},"close":{"type":"number","title":"Close"},"volume":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume"}},"type":"object","required":["time","open","high","low","close"],"title":"ChartBar"},"ChartResponse":{"properties":{"asset":{"type":"string","title":"Asset"},"timeframe":{"type":"string","title":"Timeframe"},"bars":{"items":{"$ref":"#/components/schemas/ChartBar"},"type":"array","title":"Bars"}},"type":"object","required":["asset","timeframe","bars"],"title":"ChartResponse"},"ConditionOut":{"properties":{"field":{"type":"string","title":"Field","description":"The figure the condition tests, named as it appears in `then`, e.g. `ret_24h_pct`."},"op":{"type":"string","title":"Op","description":"How it is compared: `<=`, `>=`, `<`, `>` or `==`."},"value":{"type":"number","title":"Value","description":"What it is compared against, in that figure's own unit."},"label":{"type":"string","title":"Label","description":"The condition read back in words, e.g. \"the price fell 10% or more in a day\"."}},"type":"object","required":["field","op","value","label"],"title":"ConditionOut","description":"How your words were understood. Check this before trusting the moments."},"EventOut":{"properties":{"slug":{"type":"string","title":"Slug","description":"Stable id for the event, e.g. `cpi-2026-09`. Use it with /v1/events/{slug}."},"kind":{"type":"string","title":"Kind","description":"What sort of event it is, e.g. `cpi`, `fomc`, `halving`."},"name":{"type":"string","title":"Name","description":"The event in words, as a reader would name it."},"known_at":{"type":"string","format":"date-time","title":"Known At","description":"When it became public knowledge, UTC. Searches treat the event as unknown before this instant."},"precision":{"type":"string","title":"Precision","description":"How exactly `known_at` is dated: `minute` for a timed release, `day` for one known only to the day."},"day":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Day","description":"For `precision: day`, the local date the event concerns."},"source":{"type":"string","title":"Source","description":"Who published it."},"topics":{"items":{"type":"string"},"type":"array","title":"Topics","description":"The topics it belongs to. Pass one to /v1/after/{topic} to get every event of that kind.","default":[]}},"type":"object","required":["slug","kind","name","known_at","precision","source"],"title":"EventOut","description":"One scheduled or published event, and the instant it became knowable."},"EventsOut":{"properties":{"events":{"items":{"$ref":"#/components/schemas/EventOut"},"type":"array","title":"Events","description":"The events that matched."}},"type":"object","required":["events"],"title":"EventsOut","description":"Events, newest first."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HeadlineOut":{"properties":{"source":{"type":"string","title":"Source","description":"Who published it."},"title":{"type":"string","title":"Title","description":"The headline."},"url":{"type":"string","title":"Url","description":"Where to read it."},"published_at":{"type":"string","format":"date-time","title":"Published At","description":"The publisher's own time, UTC."},"known_at":{"type":"string","format":"date-time","title":"Known At","description":"When it could first be known: when we saw it live, or the publisher's time where we did not."},"publisher_time":{"type":"boolean","title":"Publisher Time","description":"True where `known_at` is the publisher's claim rather than a first sighting of ours."}},"type":"object","required":["source","title","url","published_at","known_at","publisher_time"],"title":"HeadlineOut","description":"One headline, dated by when it could be known rather than when it was filed."},"IssuedOut":{"properties":{"secret":{"type":"string","title":"Secret"},"key":{"$ref":"#/components/schemas/KeyUse"}},"type":"object","required":["secret","key"],"title":"IssuedOut","description":"A key just made. The secret is here and nowhere else, ever again."},"KeyUse":{"properties":{"id":{"type":"string","title":"Id"},"tail":{"type":"string","title":"Tail","default":""},"name":{"type":"string","title":"Name","default":""},"plan":{"type":"string","title":"Plan"},"issued":{"type":"string","title":"Issued"},"revoked":{"type":"boolean","title":"Revoked"},"answers":{"type":"integer","title":"Answers"},"included":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Included"},"left":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Left"},"per_second":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Per Second"},"last_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used"},"daily":{"items":{"prefixItems":[{"type":"string"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Daily","default":[]},"refused":{"type":"integer","title":"Refused","default":0},"refused_why":{"additionalProperties":{"type":"integer"},"type":"object","title":"Refused Why","default":{}},"refused_daily":{"items":{"prefixItems":[{"type":"string"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Refused Daily","default":[]},"paths":{"items":{"prefixItems":[{"type":"string"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Paths","default":[]}},"type":"object","required":["id","plan","issued","revoked","answers","included","left","per_second"],"title":"KeyUse","description":"One key of a customer's, and what it has spent this month."},"LikeBlockOut":{"properties":{"best":{"type":"string","title":"Best"},"ticks":{"type":"integer","title":"Ticks"},"first":{"type":"string","title":"First"},"last":{"type":"string","title":"Last"}},"type":"object","required":["best","ticks","first","last"],"title":"LikeBlockOut","description":"연달아 같은 과거가 1등이던 구간.\n\n**읽을 단위는 틱이 아니라 블록이다.** 「11:00 · 11:15 · 11:30 전부\n2025-08-15」는 세 줄이 아니라 한 가지 사실이고, 그 길이가 곧 지금 모양이\n얼마나 단단한지다."},"LikeOut":{"properties":{"at":{"type":"string","title":"At"},"best":{"type":"string","title":"Best"},"sim":{"type":"number","title":"Sim"},"close":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Close"}},"type":"object","required":["at","best","sim"],"title":"LikeOut","description":"한 틱에, 그때 가장 닮았던 과거 하나."},"LikenessOut":{"properties":{"asset":{"type":"string","title":"Asset"},"scale":{"type":"string","title":"Scale"},"ticks":{"items":{"$ref":"#/components/schemas/LikeOut"},"type":"array","title":"Ticks"},"blocks":{"items":{"$ref":"#/components/schemas/LikeBlockOut"},"type":"array","title":"Blocks"},"standing":{"items":{"$ref":"#/components/schemas/StandingOut"},"type":"array","title":"Standing"},"wall":{"items":{"$ref":"#/components/schemas/StandingOut"},"type":"array","title":"Wall"},"wall_minutes":{"type":"integer","title":"Wall Minutes"}},"type":"object","required":["asset","scale","ticks","blocks","standing","wall","wall_minutes"],"title":"LikenessOut","description":"오늘 이 자산이 어느 과거들을 거쳐 왔나, 그리고 지난 답들이 지금 어떤가."},"LogsOut":{"properties":{"owner":{"type":"string","title":"Owner"},"since":{"type":"string","title":"Since"},"until":{"type":"string","title":"Until"},"calls":{"items":{"$ref":"#/components/schemas/CallOut"},"type":"array","title":"Calls"},"more":{"type":"boolean","title":"More","default":false}},"type":"object","required":["owner","since","until","calls"],"title":"LogsOut","description":"한 사람의 호출들, 새것부터."},"MarketDriverOut":{"properties":{"type":{"type":"string","title":"Type"},"strength":{"type":"number","title":"Strength"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["type","strength"],"title":"MarketDriverOut","description":"A single fired driver at one anchor (1:N with anchors)."},"MarketStateOut":{"properties":{"risk_regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Regime"},"rates_trend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rates Trend"},"dollar_trend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dollar Trend"},"vol_regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vol Regime"},"equity_breadth_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equity Breadth State"},"commodity_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commodity State"},"liquidity_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Liquidity State"},"macro_pressure_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Macro Pressure Score"},"state_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Summary"},"spx_5d_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spx 5D Return Pct"},"spx_z_60d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spx Z 60D"},"vix_level":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vix Level"},"vix_5d_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vix 5D Change Pct"},"us10y_level":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Us10Y Level"},"us10y_5d_change_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Us10Y 5D Change Bps"},"dxy_5d_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dxy 5D Change Pct"},"dxy_z_60d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dxy Z 60D"},"ndx_5d_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndx 5D Return Pct"},"rut_5d_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rut 5D Return Pct"},"ndx_rut_5d_diff":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ndx Rut 5D Diff"},"gold_5d_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gold 5D Return Pct"},"gold_z_60d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gold Z 60D"},"wti_5d_return_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wti 5D Return Pct"},"wti_z_60d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wti Z 60D"},"stablecoin_30d_change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Stablecoin 30D Change Pct"},"fed_net_liquidity_bn":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fed Net Liquidity Bn"},"fed_net_liquidity_z_60d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fed Net Liquidity Z 60D"},"credit_spread_level":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit Spread Level"},"credit_spread_5d_change_pp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credit Spread 5D Change Pp"}},"type":"object","title":"MarketStateOut","description":"v1 cross-asset macro context labels (SPX / VIX / US10Y / DXY based).\n\nSee `src/pastcast/pipelines/market_state/` for the build pipeline."},"MatchOut":{"properties":{"rank":{"type":"integer","title":"Rank","description":"Its place in the answer, 1 being the closest."},"similarity":{"type":"number","title":"Similarity","description":"How alike the two moments are, 0 to 1, higher being closer. Use it to rank; a model of ours computes it. It reads the shape of the price rather than its level, so a quiet stretch can match a violent one and the two closes never enter it. A high score does not mean the answer is worth much. `quality` is what says that."},"moment":{"$ref":"#/components/schemas/MomentOut","description":"The matched moment, with what was knowable then and what followed."}},"type":"object","required":["rank","similarity","moment"],"title":"MatchOut","description":"One past moment that resembles the one asked about."},"MomentOut":{"properties":{"time":{"type":"string","format":"date-time","title":"Time","description":"The moment itself, UTC, on a five-minute boundary."},"then":{"anyOf":[{"$ref":"#/components/schemas/ThenOut"},{"type":"null"}],"description":"The market as it stood at that moment. Null where the history behind it is too short to measure."},"after":{"anyOf":[{"$ref":"#/components/schemas/AfterOut"},{"type":"null"}],"description":"What happened in the 32 hours after. Null until those hours have closed, so always null on the moment you asked about."},"events":{"items":{"$ref":"#/components/schemas/EventOut"},"type":"array","title":"Events","description":"Events already public at that moment and no more than 24 hours old.","default":[]}},"type":"object","required":["time","then","after"],"title":"MomentOut","description":"One moment, in two parts that are never mixed.\n\n`then` is what was knowable at it; `after` is what happened next. Anything\nthat had not closed or been published by `time` is left out of `then`."},"MomentResponse":{"properties":{"asset":{"type":"string","title":"Asset","description":"The asset asked about."},"moment":{"$ref":"#/components/schemas/MomentOut","description":"The moment, with what was knowable then and what followed."},"chart":{"items":{"$ref":"#/components/schemas/PricePoint"},"type":"array","title":"Chart","description":"The price around it, one point every 30 minutes, from 72 hours before to 32 hours after.","default":[]},"disclaimer":{"type":"string","title":"Disclaimer","description":"What this answer is not."}},"type":"object","required":["asset","moment","disclaimer"],"title":"MomentResponse","description":"One moment read on its own, with the chart around it."},"NewsOut":{"properties":{"since":{"type":"string","format":"date-time","title":"Since","description":"The start of the stretch, UTC."},"until":{"type":"string","format":"date-time","title":"Until","description":"Its end, UTC."},"headlines":{"items":{"$ref":"#/components/schemas/HeadlineOut"},"type":"array","title":"Headlines","description":"What was published in it, newest first."}},"type":"object","required":["since","until","headlines"],"title":"NewsOut","description":"Headlines over a stretch of time."},"NormalOut":{"properties":{"figure":{"type":"string","title":"Figure","description":"Which figure this band is for, named as it appears in a moment: \"then.ret_24h_pct\", \"after.ret_32h_pct\"."},"minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minutes","description":"The stretch of time the figure measures, in minutes. The window rows (\"after.window_5m\" and its halves) run as long as the answer was drawn at, which depends on which basis answered, so read this rather than assuming the engine's own 144 buckets."},"low":{"type":"number","title":"Low","description":"The 5th percentile of that figure for this asset: the low edge of ordinary."},"mid":{"type":"number","title":"Mid","description":"The median. Where nothing happening actually sits, which is rarely zero."},"high":{"type":"number","title":"High","description":"The 95th percentile: the high edge of ordinary."},"readings":{"type":"integer","title":"Readings","description":"How many past moments the band was measured from."},"since_days":{"type":"integer","title":"Since Days","description":"How far back those readings reach, in days."},"spread":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spread","description":"For the set of moments asked about: its widest reading minus its narrowest."},"rarity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rarity","description":"Where that spread sits among random sets of the same size, 0 to 1. 0 holds together, 0.5 is ordinary, 1 is scattered."},"share_up":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Share Up","description":"Of the same readings, the share above zero: the base rate a count of \"how many rose\" has to beat. A coin is the wrong null: BTC's 36h return is positive 53.4% of the time at 15m, and six of eight comes up 29% of the time against a coin but 39% against the real rate. Direction-free figures carry this field too and it means nothing there."}},"type":"object","required":["figure","low","mid","high","readings","since_days"],"title":"NormalOut","description":"What one figure normally does for this asset, and whether this set is unusual.\n\nThe band is the yardstick an answer is read against: a set of matches between\n−2.4% and −0.7% means nothing until you know the asset runs −3.5% to +4.0%\non an ordinary day. Measured from the asset's own past as it stood at the\nmoment asked about, never later (pastcast/search/usual.py).\n\n`rarity` is the matched comparison, and the only one worth quoting: of sets\nthe same size drawn at random, the share that spread less than this one.\nHolding it against `low`..`high` instead would measure the sample size:\neight points rarely reach a tail, so they always look narrow."},"NormalsOut":{"properties":{"asset":{"type":"string","title":"Asset","description":"The asset the yardsticks are for."},"normal":{"anyOf":[{"items":{"$ref":"#/components/schemas/NormalOut"},"type":"array"},{"type":"null"}],"title":"Normal","description":"One band per figure asked for."}},"type":"object","required":["asset"],"title":"NormalsOut","description":"The yardsticks alone, for a set of moments that was not found by a search.\n\n/v1/search carries these already. The two other ways a set of moments is\narrived at (every past event of a kind, every moment a condition was met)\nreturn the moments and nothing to read them against, and the page drew an\nempty block where the bars belong. They are a fact about the asset and the\nmoments, not about how the moments were chosen, so they are asked for here."},"PathEventOut":{"properties":{"slug":{"type":"string","title":"Slug","description":"Stable id for the event."},"name":{"type":"string","title":"Name","description":"The event in words."},"kind":{"type":"string","title":"Kind","description":"What sort of event it is."},"offset_minutes":{"type":"integer","title":"Offset Minutes","description":"Minutes from the moment to when it became known, or is due. Negative is before the moment."},"scheduled":{"type":"boolean","title":"Scheduled","description":"True where the event is still ahead: its time is known, what it will say is not."}},"type":"object","required":["slug","name","kind","offset_minutes","scheduled"],"title":"PathEventOut","description":"An event marked on a path, placed by where it falls along it."},"PathOut":{"properties":{"time":{"type":"string","format":"date-time","title":"Time","description":"The moment this path is centred on, UTC."},"base_close":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Base Close","description":"The close at the moment, which every percent here is measured from. Null where the window behind it is incomplete."},"offsets":{"items":{"type":"integer"},"type":"array","title":"Offsets","description":"Minutes from the moment to each point. 0 and below is the window before; above 0 is what followed."},"pct":{"items":{"type":"number"},"type":"array","title":"Pct","description":"Each point in percent from `base_close`, lined up with `offsets`. Paths of different sizes can be plotted on top of each other."},"high_pct":{"items":{"type":"number"},"type":"array","title":"High Pct","description":"How far inside each bucket the price went up, on the same base. Empty for assets whose bar is a daily close with no inside to it."},"low_pct":{"items":{"type":"number"},"type":"array","title":"Low Pct","description":"The same, downward."},"open_pct":{"items":{"type":"number"},"type":"array","title":"Open Pct","description":"Where each bucket opened, on the same base. Empty for assets whose bar is a daily close."},"vol_x":{"items":{"type":"number"},"type":"array","title":"Vol X","description":"Volume in each bucket as a multiple of this path's own normal: the median volume of the window behind the moment. 1.0 is an ordinary bucket for that moment, 3.0 is three times it. Empty for assets whose bars carry no volume."},"events":{"items":{"$ref":"#/components/schemas/PathEventOut"},"type":"array","title":"Events","description":"Events that fall along this path, with where they fall."}},"type":"object","required":["time","base_close","offsets","pct","high_pct","low_pct","events"],"title":"PathOut","description":"One moment drawn: the window before it and the hours after, on one base."},"PathsOut":{"properties":{"asset":{"type":"string","title":"Asset","description":"The asset these paths are of."},"scale":{"type":"string","title":"Scale","description":"The window these paths are drawn at."},"step_minutes":{"type":"integer","title":"Step Minutes","description":"Minutes between one point and the next."},"window_minutes":{"type":"integer","title":"Window Minutes","description":"How far each path reaches before its moment."},"after_minutes":{"type":"integer","title":"After Minutes","description":"How far each path reaches after its moment."},"paths":{"items":{"$ref":"#/components/schemas/PathOut"},"type":"array","title":"Paths","description":"One path per moment asked for, in the order asked."}},"type":"object","required":["asset","scale","step_minutes","window_minutes","after_minutes","paths"],"title":"PathsOut","description":"The price paths around a set of moments, ready to plot."},"PinOut":{"properties":{"asset":{"type":"string","title":"Asset"},"scale":{"type":"string","title":"Scale"},"at":{"type":"string","title":"At"},"basis":{"type":"string","title":"Basis"},"found":{"type":"string","title":"Found"},"kept":{"type":"string","title":"Kept"},"t":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"T"}},"type":"object","required":["asset","scale","at","basis","found","kept"],"title":"PinOut","description":"One moment a reader froze and kept.\n\nThe question, not the answer. A frozen T is deterministic: the same asset,\nscale, basis and k give the same precedents whenever they are asked for\nagain. So what came of it is read fresh rather than stored. A kept outcome\ncould not be re-checked, and the whole point of keeping the moment is that\nit can be."},"PinsOut":{"properties":{"owner":{"type":"string","title":"Owner"},"most":{"type":"integer","title":"Most"},"pins":{"items":{"$ref":"#/components/schemas/PinOut"},"type":"array","title":"Pins"}},"type":"object","required":["owner","most","pins"],"title":"PinsOut","description":"What one person keeps, newest moment first.\n\nBy the moment, not by when it was written: a reader marking an old crash\ntoday is filing it where it belongs in time."},"PlanOut":{"properties":{"id":{"type":"string","title":"Id","description":"Stable id for the plan."},"name":{"type":"string","title":"Name","description":"Its name on the pricing page."},"blurb":{"type":"string","title":"Blurb","description":"Who it is for, in one line."},"monthly_usd":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Usd","description":"What it costs a month, in USD. Null where the price is agreed rather than listed."},"answers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Answers","description":"Answers included a month. Null is no limit."},"per_second":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Per Second","description":"How many answers a second it may ask for."},"keys":{"type":"integer","title":"Keys","description":"How many keys it may hold at once."},"over_usd_per_1k":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Over Usd Per 1K","description":"What each further 1,000 answers costs. Null where there is no overage: the allowance is the limit."},"rights":{"type":"string","title":"Rights","description":"What an answer may be used for under this plan."}},"type":"object","required":["id","name","blurb","monthly_usd","answers","per_second","keys","over_usd_per_1k","rights"],"title":"PlanOut","description":"A plan as the pricing page draws it and the meter enforces it.\n\nBoth read this, so a row on the page and a limit in the engine cannot come\nto mean different things."},"PlansOut":{"properties":{"counted_in":{"type":"string","title":"Counted In","description":"What a call is charged, in words. The pricing and limits pages print this verbatim.","default":"answers; one answer is up to ten moments in one reply, so asking for fifty at once costs five"},"plans":{"items":{"$ref":"#/components/schemas/PlanOut"},"type":"array","title":"Plans","description":"Every plan, cheapest first."}},"type":"object","required":["plans"],"title":"PlansOut"},"PricePoint":{"properties":{"time":{"type":"string","format":"date-time","title":"Time","description":"When the bar closed, UTC."},"close":{"type":"number","title":"Close","description":"Its close."}},"type":"object","required":["time","close"],"title":"PricePoint","description":"One price, and when it was true."},"PricesOut":{"properties":{"asset":{"type":"string","title":"Asset","description":"The asset."},"step":{"type":"string","title":"Step","description":"How far apart the points are: `5m`, `15m`, `30m`, `1h` or `1d`."},"points":{"items":{"$ref":"#/components/schemas/PricePoint"},"type":"array","title":"Points","description":"The prices, oldest first."}},"type":"object","required":["asset","step","points"],"title":"PricesOut","description":"A plain price series."},"QualityOut":{"properties":{"n":{"type":"integer","title":"N","description":"How many matched moments this was computed from."},"alike":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Alike","description":"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. Eight out of ten is a different answer from eight out of sixty, and the two look the same on a chart. The bar is set from the answer itself — the spread of the returned similarities, dropped once below the last of them — because similarity is not on the same scale from one query to the next. Empty where the list was read from a precomputed file rather than scored here."},"first_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Year","description":"The year of the oldest matched moment."},"last_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Year","description":"The year of the newest matched moment."},"range_median_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Range Median Pct","description":"How far apart the matched outcomes landed: the median width, in percentage points."},"baseline_range_median_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Baseline Range Median Pct","description":"The same width for sets of the same size drawn at random. The number to read `range_median_pct` against."},"range_percentile":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Range Percentile","description":"Where this answer's spread sits among 2,000 random sets of the same size, 0 to 100. **Low is tight**: 25 means only a quarter of random sets held together more closely than this one. Near 50 the outcomes are spread about as widely as moments picked at random; above 50 they are spread wider, which says what followed these moments moved more than usual."},"halves_range_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Halves Range Ratio","description":"The older half's spread over the newer half's. Far from 1 means the two halves of the history disagree."}},"type":"object","required":["n","first_year","last_year","range_median_pct","baseline_range_median_pct","range_percentile","halves_range_ratio"],"title":"QualityOut","description":"How much this answer is worth, said without a direction.\n\nNothing here says up or down. It says how many moments were found, how far\napart their outcomes landed, and whether that spread is narrower than the\nsame number of moments drawn at random would be.\n\nSmall sets are noisy. Measured on BTC at 15m on the engine's own basis, k=8 gave a\nmedian spread of 4.73pp against 1.28pp at k=20 and 0.75pp at k=50. The\nmodel's list holds a fixed number of moments for each instant, so there the\ncount is what it is (`most` in /v1/assets)."},"QueryAnchorOut":{"properties":{"anchor_id":{"type":"integer","title":"Anchor Id"},"anchor_time":{"type":"string","format":"date-time","title":"Anchor Time"},"asset_state":{"anyOf":[{"$ref":"#/components/schemas/AssetStateOut"},{"type":"null"}]},"market_state":{"anyOf":[{"$ref":"#/components/schemas/MarketStateOut"},{"type":"null"}]},"drivers":{"items":{"$ref":"#/components/schemas/MarketDriverOut"},"type":"array","title":"Drivers","default":[]}},"type":"object","required":["anchor_id","anchor_time"],"title":"QueryAnchorOut"},"SearchOut":{"properties":{"asset":{"type":"string","title":"Asset","description":"The asset searched."},"window_bars":{"additionalProperties":{"type":"integer"},"type":"object","title":"Window Bars","description":"How far back this way of matching reads, in bars at each scale. The engine's own way reads 144 at every scale and says nothing here. Where it is given, a chart can be drawn over what was actually compared instead of over a different window."},"provider":{"type":"string","title":"Provider","description":"Who computed the answer."},"provider_version":{"type":"string","title":"Provider Version","description":"Which way of matching produced it. Two answers with the same value were computed the same way, and a change to the way changes it. It is an identifier, not a description."},"query":{"$ref":"#/components/schemas/MomentOut","description":"The moment answered about. Its `after` is always null, because it has not happened yet. Name one with `at` and this is that moment. Leave `at` out and it is the most recent moment that could be answered, which on `basis=model` is the last one the list holds, a few minutes behind the last bar while the list catches up. Read it rather than assuming the clock."},"matches":{"items":{"$ref":"#/components/schemas/MatchOut"},"type":"array","title":"Matches","description":"The past moments that resemble it, closest first."},"quality":{"anyOf":[{"$ref":"#/components/schemas/QualityOut"},{"type":"null"}],"description":"How much the answer is worth: how many, how far apart, and against chance. Null where too few moments were found to say."},"normal":{"anyOf":[{"items":{"$ref":"#/components/schemas/NormalOut"},"type":"array"},{"type":"null"}],"title":"Normal","description":"What these figures normally do for this asset. The yardstick a match is read against: −2% means nothing until you know the asset runs ±4% on an ordinary day."},"attestation":{"$ref":"#/components/schemas/Attestation","description":"What this was computed from, and that nothing in it was unknowable at the moment asked about."},"disclaimer":{"type":"string","title":"Disclaimer","description":"What this answer is not. Show it wherever you show the moments."}},"type":"object","required":["asset","provider","provider_version","query","matches","quality","attestation","disclaimer"],"title":"SearchOut","description":"The past moments most like the one asked about, with what followed each."},"SimilarMatchOut":{"properties":{"rank":{"type":"integer","title":"Rank"},"anchor_id":{"type":"integer","title":"Anchor Id"},"anchor_time":{"type":"string","format":"date-time","title":"Anchor Time"},"similarity":{"type":"number","title":"Similarity"},"future_return_4h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Future Return 4H"},"future_return_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Future Return 24H"},"future_return_32h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Future Return 32H"},"direction_32h":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction 32H"},"asset_state":{"anyOf":[{"$ref":"#/components/schemas/AssetStateOut"},{"type":"null"}]},"market_state":{"anyOf":[{"$ref":"#/components/schemas/MarketStateOut"},{"type":"null"}]},"drivers":{"items":{"$ref":"#/components/schemas/MarketDriverOut"},"type":"array","title":"Drivers","default":[]}},"type":"object","required":["rank","anchor_id","anchor_time","similarity"],"title":"SimilarMatchOut"},"SimilarResponse":{"properties":{"asset":{"type":"string","title":"Asset"},"query_anchor":{"$ref":"#/components/schemas/QueryAnchorOut"},"candidate_count":{"type":"integer","title":"Candidate Count","description":"Number of past anchors searched after recent-window exclusion."},"results":{"items":{"$ref":"#/components/schemas/SimilarMatchOut"},"type":"array","title":"Results"},"summary":{"$ref":"#/components/schemas/TopKSummaryOut"}},"type":"object","required":["asset","query_anchor","candidate_count","results","summary"],"title":"SimilarResponse"},"SpellOut":{"properties":{"q":{"type":"string","title":"Q","description":"The question as it was sent."},"corrected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Corrected","description":"The same question with its misspelt words corrected. Null where nothing changed."}},"type":"object","required":["q","corrected"],"title":"SpellOut","description":"A question read back with its spelling set right."},"StandingOut":{"properties":{"at":{"type":"string","title":"At"},"minutes":{"type":"integer","title":"Minutes"},"close":{"type":"number","title":"Close"},"went":{"type":"number","title":"Went"},"fan":{"items":{"type":"number"},"type":"array","title":"Fan"},"rank":{"type":"integer","title":"Rank"}},"type":"object","required":["at","minutes","close","went","fan","rank"],"title":"StandingOut","description":"몇 시간 전의 답이 지금 어디까지 왔나.\n\n**예보가 아니다.** 그 시각은 이미 과거이고, 그때 뽑힌 전례 여덟이\n그만큼 지난 시점에 어디 있었는지와 그 뒤로 실제로 간 자리를 나란히\n놓은 것뿐이다. 방향은 한 글자도 말하지 않는다."},"StatusOut":{"properties":{"sample":{"type":"boolean","title":"Sample","description":"True where the prices are synthetic rather than market data. Never true in production."},"assets":{"items":{"$ref":"#/components/schemas/AssetStatusOut"},"type":"array","title":"Assets","description":"One row per asset, with how far its data reaches."}},"type":"object","required":["sample","assets"],"title":"StatusOut","description":"What the engine holds right now. No key needed. Call it before you call anything else."},"ThenOut":{"properties":{"close":{"type":"number","title":"Close","description":"The last close at or before this moment. Every percent figure in `then` and `after` is measured from it."},"ret_1h_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ret 1H Pct","description":"Percent change over the hour to this moment."},"ret_24h_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ret 24H Pct","description":"Percent change over the 24 hours to this moment."},"ret_72h_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ret 72H Pct","description":"Percent change over the 72 hours to this moment."},"vol_ratio_24h_30d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Vol Ratio 24H 30D","description":"How jumpy the last 24 hours were against this asset's own 30-day level: the standard deviation of the day's log returns over the month's. 1.0 is an ordinary day, 2.0 is twice the usual."},"drawdown_7d_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Drawdown 7D Pct","description":"How far the close sits below the highest price of the past 7 days, in percent. 0 means at the high; it is never positive."},"volume_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume 24H","description":"What traded in the 24 hours to this moment, in the quote currency (USD for BTC)."},"volume_ratio_24h_30d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Ratio 24H 30D","description":"The same day's turnover against this asset's own average day over the past 30 days. Use this rather than `volume_24h` to compare across years: bitcoin traded 338M a day in 2019 and 2.9B in 2021."},"ret_7d_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ret 7D Pct","description":"Percent change over the 7 days to this moment."},"ret_30d_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ret 30D Pct","description":"Percent change over the 30 days to this moment."},"high_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"High 24H","description":"The highest price in the 24 hours to this moment."},"low_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Low 24H","description":"The lowest price in the 24 hours to this moment."}},"type":"object","required":["close","ret_1h_pct","ret_24h_pct","ret_72h_pct","vol_ratio_24h_30d","drawdown_7d_pct","volume_24h","volume_ratio_24h_30d","ret_7d_pct","ret_30d_pct","high_24h","low_24h"],"title":"ThenOut","description":"What was knowable at the moment: measured on bars that closed by then.\n\nEvery figure is null where the history does not reach back far enough for\nit. Each window is measured on the calendar, not on bar counts, so a\nMonday morning is read against Friday rather than left blank."},"TopKSummaryOut":{"properties":{"matches_count":{"type":"integer","title":"Matches Count"},"future_return_4h_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Future Return 4H Mean"},"future_return_24h_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Future Return 24H Mean"},"future_return_32h_mean":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Future Return 32H Mean"},"direction_32h_distribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Direction 32H Distribution"},"direction_32h_majority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction 32H Majority"},"direction_32h_majority_share":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Direction 32H Majority Share"},"asset_regime_top":{"items":{"prefixItems":[{"type":"string"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Asset Regime Top"},"macro_risk_regime_top":{"items":{"prefixItems":[{"type":"string"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Macro Risk Regime Top"},"macro_vol_regime_top":{"items":{"prefixItems":[{"type":"string"},{"type":"integer"}],"type":"array","maxItems":2,"minItems":2},"type":"array","title":"Macro Vol Regime Top"},"avg_macro_pressure_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Macro Pressure Score"}},"type":"object","required":["matches_count"],"title":"TopKSummaryOut","description":"Aggregate signal across the top-K matches."},"TopicAfterOut":{"properties":{"topic":{"$ref":"#/components/schemas/TopicOut","description":"The topic asked for."},"items":{"items":{"$ref":"#/components/schemas/AfterItem"},"type":"array","title":"Items","description":"Every event of it, most recent first, or most alike first where `alike` asked for that. No summary across them: read the moments."},"disclaimer":{"type":"string","title":"Disclaimer","description":"What this answer is not."}},"type":"object","required":["topic","items","disclaimer"],"title":"TopicAfterOut","description":"Every event of a topic, each with its own before and after. No summary across them."},"TopicOut":{"properties":{"slug":{"type":"string","title":"Slug","description":"Pass this to /v1/after/{topic}."},"label":{"type":"string","title":"Label","description":"The topic in words."},"count":{"type":"integer","title":"Count","description":"How many events of this topic are already known."}},"type":"object","required":["slug","label","count"],"title":"TopicOut","description":"A kind of event, and how many of them the engine holds."},"TopicsOut":{"properties":{"topics":{"items":{"$ref":"#/components/schemas/TopicOut"},"type":"array","title":"Topics","description":"One row per topic."}},"type":"object","required":["topics"],"title":"TopicsOut","description":"Every kind of event that can be asked for."},"UsageOut":{"properties":{"owner":{"type":"string","title":"Owner"},"month":{"type":"string","title":"Month"},"keys":{"items":{"$ref":"#/components/schemas/KeyUse"},"type":"array","title":"Keys"}},"type":"object","required":["owner","month","keys"],"title":"UsageOut","description":"Everything the usage page shows, for one person, by the email they own.\n\nKeyed on the email because that is what `keys.jsonl` already records as a\nkey's owner, and what a sign-in (Google's, Microsoft's) verifies. The two\nmeet there and no third store is needed to join them."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WaitingOut":{"properties":{"kept":{"type":"boolean","title":"Kept","description":"True where the address is now on the list, whether it was new or already there."},"first":{"type":"boolean","title":"First","description":"True only where this call is the one that added it. The page says the same thing either way."}},"type":"object","required":["kept","first"],"title":"WaitingOut","description":"An address left to be told when it opens."},"WhenOut":{"properties":{"asset":{"type":"string","title":"Asset","description":"The asset asked about."},"condition":{"$ref":"#/components/schemas/ConditionOut","description":"How the question was parsed. Read it before the matches."},"matches":{"items":{"$ref":"#/components/schemas/MatchOut"},"type":"array","title":"Matches","description":"The moments the condition held, most recent first."},"disclaimer":{"type":"string","title":"Disclaimer","description":"What this answer is not. Show it wherever you show the moments."}},"type":"object","required":["asset","condition","matches","disclaimer"],"title":"WhenOut","description":"Every past moment a condition held, with what followed each."}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"An API key, as `Bearer pc_live_…`","scheme":"bearer"}}}}