{"openapi":"3.1.0","info":{"title":"Sahmino API","version":"1.0.0","description":"Read access to Iran's markets: the instrument catalog and the day's board, price\nhistory and the statistics struck from it, computed technical indicators, the\nscreener over roughly two hundred and fifty fields, codal filings and the\nstatements parsed out of them, saved valuation runs, the macro layer, the\nshareholder and board ownership graph, and the caller's own alerts.\n\nAuthenticate with a bearer token minted at /dashboard/account/api. A token\ncarries scopes and nothing else: an endpoint either has its scope or answers\n403 with `error.code` of `scope_required`. Rate limits are the account's own —\na flat per-minute ceiling and a daily request budget whose cost varies by how\nmuch work the endpoint does.\n\nErrors are always `{\"error\": {\"code\", \"message\"}}`. Branch on the code; the\nmessage may be reworded in any release. /api/v1 never changes shape: a breaking\nchange is /api/v2."},"servers":[{"url":"https://sahmino.com"}],"security":[{"bearer":[]}],"paths":{"/api/v1/instruments":{"get":{"operationId":"instrumentsIndex","summary":"The instrument catalog, paged.","tags":["instruments"],"security":[{"bearer":["api:instruments"]}],"parameters":[{"name":"filter[market]","in":"query","required":false,"description":"One market type — gold, currency, tse and their like.","schema":{"type":"string"}},{"name":"filter[board]","in":"query","required":false,"description":"The listing venue, exactly.","schema":{"type":"string","enum":["bourse","fara","fara_base"]}},{"name":"filter[q]","in":"query","required":false,"description":"A search term over symbol and name, in either language.","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"A sort key; prefix with «-» for descending.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Which page, from one.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Identity, venue and the last price we hold. Both language names travel, always.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","description":"Identity, venue and the last price we hold. Both language names travel, always."}},"meta":{"type":"object","required":["page","perPage","total","lastPage"],"properties":{"page":{"type":"integer"},"perPage":{"type":"integer","default":100},"total":{"type":"integer"},"lastPage":{"type":"integer"}}}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/instruments/{instrument}":{"get":{"operationId":"instrumentsShow","summary":"One instrument, with its exchange profile.","tags":["instruments"],"security":[{"bearer":["api:instruments"]}],"parameters":[{"name":"instrument","in":"path","required":true,"description":"An instrument’s numeric id, exchange symbol or slug. All three are matched exactly.","schema":{"type":"string"}}],"responses":{"200":{"description":"The catalog row plus the nightly profile reading: free float, market capitalisation, the sector it is filed under.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","description":"The catalog row plus the nightly profile reading: free float, market capitalisation, the sector it is filed under."},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/board":{"get":{"operationId":"board","summary":"The day’s board — one page of it.","tags":["instruments"],"security":[{"bearer":["api:instruments"]}],"parameters":[{"name":"group","in":"query","required":false,"description":"Which half of the board.","schema":{"type":"string","enum":["all","equity","fund","fixed_income"]}},{"name":"exchange","in":"query","required":false,"description":"The listing venue.","schema":{"type":"string","enum":["bourse","fara","fara_base"]}},{"name":"industry","in":"query","required":false,"description":"One industry, as the exchange spells it.","schema":{"type":"string"}},{"name":"search","in":"query","required":false,"description":"A term over symbol and name.","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"What the whole match is ordered by before the page is cut.","schema":{"type":"string","enum":["value","volume","change","last"]}},{"name":"direction","in":"query","required":false,"description":"Ascending or descending.","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","required":false,"description":"Which page, from one.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Last, close, previous close, change, volume, value and the retail share of each side.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","description":"Last, close, previous close, change, volume, value and the retail share of each side."}},"meta":{"type":"object","required":["page","perPage","total","lastPage"],"properties":{"page":{"type":"integer"},"perPage":{"type":"integer","default":100},"total":{"type":"integer"},"lastPage":{"type":"integer"}}}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/instruments/{instrument}/prices":{"get":{"operationId":"instrumentsPrices","summary":"Daily history and the window statistics struck from it.","tags":["prices"],"security":[{"bearer":["api:prices"]}],"parameters":[{"name":"instrument","in":"path","required":true,"description":"An instrument’s numeric id, exchange symbol or slug. All three are matched exactly.","schema":{"type":"string"}},{"name":"days","in":"query","required":false,"description":"Rows of daily history, 20 to 365. Default 120.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Points are oldest first; a halted session is a row like any other and says so. `unit` is load-bearing — rial and toman differ by a factor of ten.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","description":"Points are oldest first; a halted session is a row like any other and says so. `unit` is load-bearing — rial and toman differ by a factor of ten."},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/instruments/{instrument}/indicators":{"get":{"operationId":"instrumentsIndicators","summary":"The stored technical readings for one instrument.","tags":["indicators"],"security":[{"bearer":["api:indicators"]}],"parameters":[{"name":"instrument","in":"path","required":true,"description":"An instrument’s numeric id, exchange symbol or slug. All three are matched exactly.","schema":{"type":"string"}}],"responses":{"200":{"description":"Read back, never recomputed: `seriesHash` says which sessions they were struck from. An indicator with no reading is absent rather than null.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","description":"Read back, never recomputed: `seriesHash` says which sessions they were struck from. An indicator with no reading is absent rather than null."},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/screener/fields":{"get":{"operationId":"screenerFields","summary":"Every screenable field, with its group, format and label.","tags":["screener"],"security":[{"bearer":["api:screener"]}],"parameters":[],"responses":{"200":{"description":"The catalog a client needs before it can write a condition. Generated from the field registry the screener itself draws.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","description":"The catalog a client needs before it can write a condition. Generated from the field registry the screener itself draws."},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/screens":{"get":{"operationId":"screensIndex","summary":"The caller’s own saved screens.","tags":["screener"],"security":[{"bearer":["api:screener"]}],"parameters":[],"responses":{"200":{"description":"The caller’s own saved screens.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","description":""},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/screener/run":{"post":{"operationId":"screenerRun","summary":"Run a saved screen, or a set of conditions posted with the request.","tags":["screener"],"security":[{"bearer":["api:screener"]}],"parameters":[],"responses":{"200":{"description":"A نماد with no reading on a field never passes a condition on it: an absent figure is not a zero. `matched` is how many passed; `data` is how many the plan let travel.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","description":"A نماد with no reading on a field never passes a condition on it: an absent figure is not a zero. `matched` is how many passed; `data` is how many the plan let travel."},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"screenId":{"type":"integer","description":"A saved screen of the caller’s. When present, `screen` and `scope` are ignored."},"screen":{"type":"object","description":"A condition set: `match` of «all» or «any», and up to 24 conditions of field, operator and value."},"scope":{"type":"object","description":"Narrow the universe first: `group`, `exchange`, `industry`."},"fields":{"type":"array","items":{"type":"string"},"description":"Extra readings each row should carry, beyond the ones it was screened on."},"sortBy":{"type":"string","description":"A field key the whole match is ordered by."},"sortDescending":{"type":"boolean","description":"Largest first. Default true."}},"required":[]}}}}}},"/api/v1/filings":{"get":{"operationId":"filingsIndex","summary":"codal letters as filed, newest first.","tags":["filings"],"security":[{"bearer":["api:filings"]}],"parameters":[{"name":"symbol","in":"query","required":false,"description":"One نماد, by symbol or slug. An unknown one narrows to nothing.","schema":{"type":"string"}},{"name":"since","in":"query","required":false,"description":"Only letters published on or after this date.","schema":{"type":"string"}},{"name":"parsedOnly","in":"query","required":false,"description":"Only letters whose statements we have parsed.","schema":{"type":"boolean"}},{"name":"page","in":"query","required":false,"description":"Which page, from one.","schema":{"type":"integer"}}],"responses":{"200":{"description":"`periodMonths` is the span the letter reports; comparing a three-month figure with a twelve-month one is the commonest way to publish a wrong number.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","description":"`periodMonths` is the span the letter reports; comparing a three-month figure with a twelve-month one is the commonest way to publish a wrong number."}},"meta":{"type":"object","required":["page","perPage","total","lastPage"],"properties":{"page":{"type":"integer"},"perPage":{"type":"integer","default":100},"total":{"type":"integer"},"lastPage":{"type":"integer"}}}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/instruments/{instrument}/statements":{"get":{"operationId":"instrumentsStatements","summary":"The financial statements parsed out of one instrument’s filings.","tags":["filings"],"security":[{"bearer":["api:filings"]}],"parameters":[{"name":"instrument","in":"path","required":true,"description":"An instrument’s numeric id, exchange symbol or slug. All three are matched exactly.","schema":{"type":"string"}},{"name":"letter","in":"query","required":false,"description":"One letter id, to read the grid as that letter filed it.","schema":{"type":"integer"}}],"responses":{"200":{"description":"How many periods travel is the tier’s `statement_periods` cell, and `quota` reports it beside the rows: `total` is how many the company filed, `shown` is how many the plan allows.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","description":"How many periods travel is the tier’s `statement_periods` cell, and `quota` reports it beside the rows: `total` is how many the company filed, `shown` is how many the plan allows."},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/valuations":{"get":{"operationId":"valuationsIndex","summary":"The caller’s saved valuation runs.","tags":["valuations"],"security":[{"bearer":["api:valuations"]}],"parameters":[],"responses":{"200":{"description":"`gapAtSave` is the argument the reader was making; `gapNow` is what the market has done to it since.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","description":"`gapAtSave` is the argument the reader was making; `gapNow` is what the market has done to it since."},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/instruments/{instrument}/valuations":{"get":{"operationId":"instrumentsValuations","summary":"The caller’s saved runs for one instrument.","tags":["valuations"],"security":[{"bearer":["api:valuations"]}],"parameters":[{"name":"instrument","in":"path","required":true,"description":"An instrument’s numeric id, exchange symbol or slug. All three are matched exactly.","schema":{"type":"string"}}],"responses":{"200":{"description":"The caller’s saved runs for one instrument.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","description":""},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/macro":{"get":{"operationId":"macroIndex","summary":"Every macro series we declare, with its freshness.","tags":["macro"],"security":[{"bearer":["api:macro"]}],"parameters":[],"responses":{"200":{"description":"`freshAt` is the last write of the ingest behind the series and `stale` is that clock against the series’ own cadence — a monthly series with no observation this week is not late.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","description":"`freshAt` is the last write of the ingest behind the series and `stale` is that clock against the series’ own cadence — a monthly series with no observation this week is not late."},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/macro/series":{"get":{"operationId":"macroSeries","summary":"The observations of up to 5 series.","tags":["macro"],"security":[{"bearer":["api:macro"]}],"parameters":[{"name":"keys[]","in":"query","required":true,"description":"Series keys, as the catalog spells them.","schema":{"type":"array","items":{"type":"string"}}},{"name":"days","in":"query","required":false,"description":"How far back, up to 3650.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Points are oldest first and a day with no observation is absent, never zero. An unknown key is a 404 rather than an empty series.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","description":"Points are oldest first and a day with no observation is absent, never zero. An unknown key is a 404 rather than an empty series."},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/instruments/{instrument}/ownership":{"get":{"operationId":"instrumentsOwnership","summary":"The shareholder register, the board and everything derived from them.","tags":["ownership"],"security":[{"bearer":["api:ownership"]}],"parameters":[{"name":"instrument","in":"path","required":true,"description":"An instrument’s numeric id, exchange symbol or slug. All three are matched exactly.","schema":{"type":"string"}}],"responses":{"200":{"description":"An individual’s کد ملی is never present: the query nulls it before the DTO is built.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"oneOf":[{"type":"object","properties":{"summary":{"type":"object","properties":{"asOf":{"type":["string","null"]},"holders":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"integer"},"name":{"type":"string"},"kind":{"type":"string"},"percent":{"type":["number","null"]},"shareCount":{"type":["integer","null"]},"asOf":{"type":"string"},"listedSymbol":{"type":["string","null"]},"listedSlug":{"type":["string","null"]}},"required":["entityId","name","kind","asOf"]}},"registeredPercent":{"type":"number"},"board":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"integer"},"name":{"type":"string"},"role":{"type":"string"},"isExecutive":{"type":["boolean","null"]},"representative":{"type":["string","null"]},"termStart":{"type":"string"},"termEndedAt":{"type":["string","null"]},"sourceUrl":{"type":["string","null"]}},"required":["entityId","name","role","termStart"]}}},"required":["holders","registeredPercent","board"]},"freeFloatPercent":{"type":["number","null"]},"floatGapPoints":{"type":["number","null"]},"history":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"integer"},"name":{"type":"string"},"asOf":{"type":"string"},"percent":{"type":["number","null"]},"previousPercent":{"type":["number","null"]},"deltaPoints":{"type":["number","null"]},"isEntry":{"type":"boolean"},"isExit":{"type":"boolean"}},"required":["entityId","name","asOf","isEntry","isExit"]}},"tree":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"integer"},"name":{"type":"string"},"percent":{"type":["number","null"]},"effectivePercent":{"type":["number","null"]},"end":{"type":["string","null"]},"listedSymbol":{"type":["string","null"]},"listedSlug":{"type":["string","null"]},"children":{"type":"array","items":{"type":"object","description":"Recursive: the same shape as its parent."}}},"required":["entityId","name","children"]}},"chains":{"type":"integer"},"treeTruncated":{"type":"boolean"},"lookThrough":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"integer"},"name":{"type":"string"},"kind":{"type":"string"},"effectivePercent":{"type":"number"},"paths":{"type":"integer"},"truncated":{"type":"boolean"},"listedSymbol":{"type":["string","null"]},"listedSlug":{"type":["string","null"]}},"required":["entityId","name","kind","effectivePercent","paths","truncated"]}},"interlocks":{"type":"array","items":{"type":"object","properties":{"instrumentId":{"type":"integer"},"symbol":{"type":"string"},"slug":{"type":["string","null"]},"shared":{"type":"array","items":{"type":"string"}}},"required":["instrumentId","symbol","shared"]}},"conflicts":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"integer"},"name":{"type":"string"},"parentInstrumentId":{"type":"integer"},"parentSymbol":{"type":"string"},"parentSlug":{"type":["string","null"]},"percentOfParent":{"type":["number","null"]},"parentPercentOfInstrument":{"type":["number","null"]}},"required":["entityId","name","parentInstrumentId","parentSymbol"]}},"profitImpact":{"type":"array","items":{"type":"object","properties":{"instrumentId":{"type":"integer"},"symbol":{"type":"string"},"slug":{"type":["string","null"]},"name":{"type":"string"},"percent":{"type":"number"},"netProfit":{"type":["number","null"]},"attributable":{"type":["number","null"]},"periodEnd":{"type":["string","null"]},"basis":{"type":["string","null"]},"sourceUrl":{"type":["string","null"]}},"required":["instrumentId","symbol","name","percent"]}}},"required":["summary","history","tree","chains","treeTruncated","lookThrough","interlocks","conflicts","profitImpact"]},{"type":"array","items":{"type":"object","properties":{"summary":{"type":"object","properties":{"asOf":{"type":["string","null"]},"holders":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"integer"},"name":{"type":"string"},"kind":{"type":"string"},"percent":{"type":["number","null"]},"shareCount":{"type":["integer","null"]},"asOf":{"type":"string"},"listedSymbol":{"type":["string","null"]},"listedSlug":{"type":["string","null"]}},"required":["entityId","name","kind","asOf"]}},"registeredPercent":{"type":"number"},"board":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"integer"},"name":{"type":"string"},"role":{"type":"string"},"isExecutive":{"type":["boolean","null"]},"representative":{"type":["string","null"]},"termStart":{"type":"string"},"termEndedAt":{"type":["string","null"]},"sourceUrl":{"type":["string","null"]}},"required":["entityId","name","role","termStart"]}}},"required":["holders","registeredPercent","board"]},"freeFloatPercent":{"type":["number","null"]},"floatGapPoints":{"type":["number","null"]},"history":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"integer"},"name":{"type":"string"},"asOf":{"type":"string"},"percent":{"type":["number","null"]},"previousPercent":{"type":["number","null"]},"deltaPoints":{"type":["number","null"]},"isEntry":{"type":"boolean"},"isExit":{"type":"boolean"}},"required":["entityId","name","asOf","isEntry","isExit"]}},"tree":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"integer"},"name":{"type":"string"},"percent":{"type":["number","null"]},"effectivePercent":{"type":["number","null"]},"end":{"type":["string","null"]},"listedSymbol":{"type":["string","null"]},"listedSlug":{"type":["string","null"]},"children":{"type":"array","items":{"type":"object","description":"Recursive: the same shape as its parent."}}},"required":["entityId","name","children"]}},"chains":{"type":"integer"},"treeTruncated":{"type":"boolean"},"lookThrough":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"integer"},"name":{"type":"string"},"kind":{"type":"string"},"effectivePercent":{"type":"number"},"paths":{"type":"integer"},"truncated":{"type":"boolean"},"listedSymbol":{"type":["string","null"]},"listedSlug":{"type":["string","null"]}},"required":["entityId","name","kind","effectivePercent","paths","truncated"]}},"interlocks":{"type":"array","items":{"type":"object","properties":{"instrumentId":{"type":"integer"},"symbol":{"type":"string"},"slug":{"type":["string","null"]},"shared":{"type":"array","items":{"type":"string"}}},"required":["instrumentId","symbol","shared"]}},"conflicts":{"type":"array","items":{"type":"object","properties":{"entityId":{"type":"integer"},"name":{"type":"string"},"parentInstrumentId":{"type":"integer"},"parentSymbol":{"type":"string"},"parentSlug":{"type":["string","null"]},"percentOfParent":{"type":["number","null"]},"parentPercentOfInstrument":{"type":["number","null"]}},"required":["entityId","name","parentInstrumentId","parentSymbol"]}},"profitImpact":{"type":"array","items":{"type":"object","properties":{"instrumentId":{"type":"integer"},"symbol":{"type":"string"},"slug":{"type":["string","null"]},"name":{"type":"string"},"percent":{"type":"number"},"netProfit":{"type":["number","null"]},"attributable":{"type":["number","null"]},"periodEnd":{"type":["string","null"]},"basis":{"type":["string","null"]},"sourceUrl":{"type":["string","null"]}},"required":["instrumentId","symbol","name","percent"]}}},"required":["summary","history","tree","chains","treeTruncated","lookThrough","interlocks","conflicts","profitImpact"]}}]},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/alerts":{"get":{"operationId":"alertsIndex","summary":"The caller’s alert rules.","tags":["alerts"],"security":[{"bearer":["api:alerts"]}],"parameters":[],"responses":{"200":{"description":"Read only. A rule is written through the terminal, where the plan cap and the re-arm rule live.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"oneOf":[{"type":"object","properties":{"id":{"type":"integer"},"kind":{"type":"string"},"name":{"type":["string","null"]},"instrumentId":{"type":["integer","null"]},"symbol":{"type":["string","null"]},"slug":{"type":["string","null"]},"screenId":{"type":["integer","null"]},"screen":{"type":["string","null"]},"config":{"type":"array","items":{"type":"string"}},"channels":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"},"disabledReason":{"type":["string","null"]},"lastEvaluatedAt":{"type":["string","null"]},"nextEvaluationAt":{"type":["string","null"]},"lastFiredAt":{"type":["string","null"]},"isArmed":{"type":"boolean"}},"required":["id","kind","config","channels","isActive","isArmed"]},{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"kind":{"type":"string"},"name":{"type":["string","null"]},"instrumentId":{"type":["integer","null"]},"symbol":{"type":["string","null"]},"slug":{"type":["string","null"]},"screenId":{"type":["integer","null"]},"screen":{"type":["string","null"]},"config":{"type":"array","items":{"type":"string"}},"channels":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"},"disabledReason":{"type":["string","null"]},"lastEvaluatedAt":{"type":["string","null"]},"nextEvaluationAt":{"type":["string","null"]},"lastFiredAt":{"type":["string","null"]},"isArmed":{"type":"boolean"}},"required":["id","kind","config","channels","isActive","isArmed"]}}]},"meta":{"type":"object"}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/alerts/deliveries":{"get":{"operationId":"alertsDeliveries","summary":"What has already been sent, newest first.","tags":["alerts"],"security":[{"bearer":["api:alerts"]}],"parameters":[{"name":"page","in":"query","required":false,"description":"Which page, from one.","schema":{"type":"integer"}}],"responses":{"200":{"description":"The feed an integration wants: an alert that fired, so it can reach a system rather than only a person.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"kind":{"type":"string"},"symbol":{"type":["string","null"]},"slug":{"type":["string","null"]},"payload":{"type":"array","items":{"type":"string"}},"headline":{"type":"string"},"url":{"type":"string"},"why":{"type":["string","null"]},"ruleIds":{"type":"array","items":{"type":"string"}},"firedAt":{"type":"string"},"notifiedAt":{"type":["string","null"]},"channels":{"type":"array","items":{"type":"string"}},"isRead":{"type":"boolean"}},"required":["id","kind","payload","headline","url","ruleIds","firedAt","channels","isRead"]}},"meta":{"type":"object","required":["page","perPage","total","lastPage"],"properties":{"page":{"type":"integer"},"perPage":{"type":"integer","default":100},"total":{"type":"integer"},"lastPage":{"type":"integer"}}}}}}}},"401":{"description":"error.code is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"error.code is scope_required or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"error.code is not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"error.code is invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"error.code is rate_limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A personal API token, minted at /dashboard/account/api. An MCP token is not one and will be refused."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthenticated","scope_required","plan_required","rate_limited","not_found","invalid_request","server_error"],"description":"Branch on this, never on the message."},"message":{"type":"string"},"detail":{"type":"object","description":"Optional. Read it if it is there; never require it."}}}}},"ScreenerField":{"type":"object","properties":{"key":{"type":"string","enum":["last","change","volume","value","trade_count","market_cap","band_room","volume_ratio","retail_buy","retail_net","pe","eps","ps","sector_pe","pe_to_sector","nav_gap","free_float","share_count","avg_volume_month","volume_surge","return_1w","return_1m","return_3m","return_6m","return_ytd","return_1y","return_5y","score","percentile_value","percentile_profitability","percentile_growth","percentile_liquidity","pe_ttm","ps_ttm","pb","eps_ttm","book_value_per_share","revenue_ttm","net_profit_ttm","gross_margin","operating_margin","net_margin","roe","roa","gross_profit_ttm","operating_profit_ttm","profit_before_tax_ttm","finance_costs_ttm","ebitda_ttm","total_assets","total_equity","total_liabilities","current_assets","current_liabilities","cash","interest_bearing_debt","inventory","trade_receivables","trade_payables","net_debt","enterprise_value","ev_sales","ev_ebit","ev_ebitda","p_fcff","p_fcfe","p_dividend","dividend_yield","payout_ratio","asset_turnover","inventory_turnover","receivable_turnover","payable_turnover","days_inventory","days_receivable","days_payable","cash_conversion_cycle","debt_to_assets","debt_to_equity","liabilities_to_assets","equity_ratio","interest_coverage","net_debt_to_ebitda","current_ratio","quick_ratio","cash_ratio","operating_cash_flow_ttm","capex_ttm","dividends_paid_ttm","interest_paid_ttm","net_borrowing_ttm","fcff","fcfe","ocf_to_revenue","ocf_to_net_profit","capex_to_revenue","ocf_per_share","fcf_yield","retail_net_5d","retail_net_20d","retail_share_20d","run_sessions","gap_open","volatility_30d","pattern_days","pattern_count","turnover_share","avg_volume_3d","avg_value_3d","volume_vs_3d","value_vs_3d","avg_volume_5d","avg_value_5d","volume_vs_5d","value_vs_5d","avg_volume_10d","avg_value_10d","volume_vs_10d","value_vs_10d","avg_volume_20d","avg_value_20d","volume_vs_20d","value_vs_20d","avg_volume_30d","avg_value_30d","volume_vs_30d","value_vs_30d","avg_volume_50d","avg_value_50d","volume_vs_50d","value_vs_50d","avg_volume_90d","avg_value_90d","volume_vs_90d","value_vs_90d","avg_volume_200d","avg_value_200d","volume_vs_200d","value_vs_200d","avg_volume_1y","avg_value_1y","volume_vs_1y","value_vs_1y","week_open","week_high","week_low","week_close","week_vwap","month_open","month_high","month_low","month_close","month_vwap","stdev_90d","semi_stdev_90d","stdev_60w","semi_stdev_60w","stdev_36m","semi_stdev_36m","beta_tedpix_90d","correlation_tedpix_90d","shared_sessions_tedpix_90d","beta_tedpix_60w","correlation_tedpix_60w","shared_sessions_tedpix_60w","beta_tedpix_36m","correlation_tedpix_36m","shared_sessions_tedpix_36m","beta_tepixew_90d","correlation_tepixew_90d","shared_sessions_tepixew_90d","beta_tepixew_60w","correlation_tepixew_60w","shared_sessions_tepixew_60w","beta_tepixew_36m","correlation_tepixew_36m","shared_sessions_tepixew_36m","high_gap","low_gap","range_position","revenue_growth_qoq","revenue_change_qoq","gross_profit_growth_qoq","gross_profit_change_qoq","operating_profit_growth_qoq","operating_profit_change_qoq","net_profit_growth_qoq","net_profit_change_qoq","gross_margin_change_qoq","operating_margin_change_qoq","net_margin_change_qoq","revenue_growth_yoy","revenue_change_yoy","gross_profit_growth_yoy","gross_profit_change_yoy","operating_profit_growth_yoy","operating_profit_change_yoy","net_profit_growth_yoy","net_profit_change_yoy","gross_margin_change_yoy","operating_margin_change_yoy","net_margin_change_yoy","revenue_growth_annual","revenue_change_annual","gross_profit_growth_annual","gross_profit_change_annual","operating_profit_growth_annual","operating_profit_change_annual","net_profit_growth_annual","net_profit_change_annual","gross_margin_change_annual","operating_margin_change_annual","net_margin_change_annual","rsi","macd_percent","macd_signal_percent","macd_histogram_percent","macd_cross","bbands_sma_position","bbands_sma_width","bbands_ema_position","bbands_ema_width","natr","stoch_k","stoch_d","stoch_cross","stochf_k","stochf_d","stochf_cross","stochrsi_k","stochrsi_d","stochrsi_cross","cci","willr","adx","plus_di","minus_di","sar_gap","mfi","sma_20_gap","sma_50_gap","sma_100_gap","sma_200_gap","ema_20_gap","ema_50_gap","ema_100_gap","ema_200_gap","wma_20_gap","wma_50_gap","wma_100_gap","wma_200_gap","pivot_standard_to_resistance","pivot_standard_to_support","pivot_fibonacci_to_resistance","pivot_fibonacci_to_support","pivot_demark_to_resistance","pivot_demark_to_support","pivot_camarilla_to_resistance","pivot_camarilla_to_support","pivot_woodie_to_resistance","pivot_woodie_to_support","largest_holder_percent","registered_percent","holder_count","holder_hhi","register_float_gap","board_change_days","interlock_count"],"description":"Every field a condition may name, in wire order."},"group":{"type":"string"},"format":{"type":"string"},"eager":{"type":"boolean"},"label":{"type":"string"},"hint":{"type":"string"}}}}},"tags":[{"name":"instruments","description":"Read the instrument catalog, board rows and one instrument’s profile. Needs the `api:instruments` scope."},{"name":"prices","description":"Read price history and derived series for one instrument. Needs the `api:prices` scope."},{"name":"indicators","description":"Read computed technical indicators for one instrument. Needs the `api:indicators` scope."},{"name":"screener","description":"Run a saved screen or an ad-hoc condition set over the universe. Needs the `api:screener` scope."},{"name":"filings","description":"Read codal filings and the financial statements parsed from them. Needs the `api:filings` scope."},{"name":"valuations","description":"Read saved valuation runs and their inputs. Needs the `api:valuations` scope."},{"name":"macro","description":"Read macroeconomic series. Needs the `api:macro` scope."},{"name":"ownership","description":"Read the shareholder register and board composition graph. Needs the `api:ownership` scope."},{"name":"alerts","description":"Read alert rules and their delivery history. Needs the `api:alerts` scope."}]}