Loading the API reference…

Browse the API reference

Stream symbols using a request body

post https://quant-ws.prod.thinkalpha.io/symbols/query/stream

Returns the same symbol records as POST /symbols/query, as a stream of newline-delimited JSON (NDJSON, content type application/x-ndjson), so you can process a large result row by row instead of buffering one big array.

Wire format. The body is zero or more lines. Each line is one JSON object, a symbol record, encoded exactly as an element of the array returned by POST /symbols/query, and is terminated by a line feed (\n), including the last line. There is no enclosing array, header line, trailer or separator, so an empty result is an empty body with status 200. Parse it line by line. The server buffers at least 64 KiB before emitting each chunk, except the final chunk; the HTTP transport may split or combine chunks.

Failures. If the request is invalid or unauthenticated, you receive an ordinary JSON error response before any data. Once the first bytes have been sent the status is already 200; if a failure occurs after that, the connection is closed early. Treat a response that ends before the HTTP body completes as incomplete and run the query again.

Filtering and paging. Filters, fields, sortBy, limit and skip behave as in POST /symbols/query. limit defaults to 500 and has no maximum, so pass a large limit (or none and page with skip) to read everything. Results follow sortBy, never the order of the tickers you send. Any authenticated caller can use this operation, and results do not depend on who is calling.

Caching. The data is reloaded about every 15 minutes. Each response carries a weak ETag and Cache-Control: private, no-cache; send the ETag back in If-None-Match and you receive 304 Not Modified with no body when nothing in the symbol data has changed since.

Use GET /symbols/query/stream for the same stream with URL parameters, POST /symbols/query for a single JSON array, and GET /symbols/{symbol} for one symbol.

Authentication
Bearer token or Client credentials (HTTP Basic)

Headers

  • if-none-match string

    The `ETag` value from an earlier response to the same query. If the symbol data and the resolved query are unchanged, the response is `304 Not Modified` with no body. Weak comparison is used; a comma-separated list of values and `*` are accepted.

Request body application/json required

Filters, field selection, sort and paging for the symbol list. Every property is optional; send `{}` to list all symbols.

Filters, field selection, sort and paging for the symbol list. Every property is optional; send `{}` to list all symbols.

  • symbols string[]

    Tickers to return, for example `AAPL`. Case-insensitive; leading and trailing spaces are ignored. Tickers that do not exist are skipped without an error, and results follow `sortBy`, not the order you send. Omit or send an empty list to match every symbol. A share class is written with a slash, such as `BRK/B`.

  • fields string[]

    Properties to include in each record. Allowed names: `symbol`, `rawSymbol`, `name`, `securityId`, `securityType`, `exchange`, `mic`, `operatingMic`, `description`, `gicsCode`, `sector`, `industry`, `industryGroup`, `subIndustry`, `cik`, `isin`, `cusip`, `isAdr`, `isEtf`, `isIpo`, `isOtc`, `isThreshold`, `ipoDate`, `lastUpdatedAt`, `close`, `averageDailyVolume14Days`, `isIpoReported` and `sourceDate`. Names are case-sensitive and unknown names are ignored. `symbol` and, when available, `securityId` are always included. Omit or send an empty list to receive every available property.

  • limit integer

    Maximum number of records to return, an integer of at least 1. Defaults to 500. There is no upper bound; to read the whole set use the streaming operations or page with `skip`.

    > 0<= 9007199254740991
  • skip integer

    Number of records to skip before returning results, an integer of at least 0. Defaults to 0. Use it with `limit` to page; results are ordered by `sortBy`.

    >= 0<= 9007199254740991
  • sortBy string

    Field to sort by, ascending, with the ticker as tie-breaker. Allowed values: `todayTicker` (the ticker; the default), `name` (company or fund name), `securityID` (numeric security identifier; note the capital `ID`) and `dint` (the data date as a `YYYYMMDD` number). Any other value is ignored and the default is used.

  • assetTypes string[]

    Keep only securities whose `securityType` equals one of these values exactly (case-sensitive), for example `Common or ordinary`, `Exchange Traded Fund` or `American Depository Receipt (ADR)`. Omit or send an empty list to include every security type.

Responses

A stream of symbol records, one JSON object per line (newline-delimited JSON). Every line, including the last, ends with a line feed; an empty result is an empty body. The schema shown describes one line. The response includes `ETag` and `Cache-Control: private, no-cache` headers.

  • symbol string

    Ticker symbol of the security, for example `AAPL`. Share classes use a slash, such as `BRK/B`. Unique per record and always present.

  • rawSymbol string

    Ticker symbol in the NYSE symbology, as the data source supplies it. It can be the same as `symbol`. Omitted when the source supplies no value.

  • name string

    Name of the company or fund, for example `Apple Inc.`.

  • securityId number

    Numeric identifier of the security in this API's reference data. It stays the same if the ticker changes and is the key used by other operations such as market data.

  • securityType string

    Kind of security, as free text. Values seen include `Common or ordinary`, `Preferred or preference`, `Warrant or right`, `Unit`, `Mutual or investment trust fund`, `Structured Product`, `Convertible preferred`, `American Depository Receipt (ADR)`, `American Depository Receipt (ADR) Preferred` and `Exchange Traded Fund`. Filter on it with `assetTypes` (exact, case-sensitive match).

  • exchange string

    Display name of the exchange or market the security is listed on, for example `NASDAQ`, `NYSE`, `NYSE ARCA` or `OTC`. Use `mic` for a standard code.

  • mic string

    Market Identifier Code (MIC, ISO 10383) of the market where the security primarily lists, such as `XNMS` (a Nasdaq market) or `ARCX` (NYSE Arca). Compare with `operatingMic`, which identifies the exchange operator.

  • operatingMic string

    Operating MIC (ISO 10383) of the exchange operator that runs the market in `mic`, such as `XNAS` (Nasdaq) or `XNYS` (New York Stock Exchange). Several markets can share one operating MIC.

  • description string

    Plain-language description of the company's or fund's business.

  • gicsCode string

    Current Global Industry Classification Standard (GICS) code of the security's sub-industry, an 8-digit code. The leading digits identify the sector (2), industry group (4) and industry (6).

  • sector string

    GICS sector name. Omitted for securities without a classification, such as many ETFs.

  • industry string

    GICS industry name.

  • industryGroup string

    GICS industry group name.

  • subIndustry string

    GICS sub-industry name.

  • cik string

    Central Index Key (CIK), the identifier the US Securities and Exchange Commission assigns to the issuer, zero-padded to 10 digits. Omitted for securities without one, such as many ETFs.

  • isin string

    International Securities Identification Number (ISIN), the 12-character global security identifier: a 2-letter country code, 9 alphanumeric characters and a check digit.

  • cusip string

    CUSIP (Committee on Uniform Securities Identification Procedures) number, the 9-character identifier of North American securities.

  • isAdr boolean

    `true` if the security is an American depositary receipt (ADR): a US-traded certificate that represents shares of a non-US company.

  • isEtf boolean

    `true` if the security is an exchange-traded fund (ETF): a fund whose shares trade on an exchange.

  • isIpo boolean

    `true` if the security is flagged as a recent initial public offering (IPO). Taken from the reported IPO flag, and from the recent-IPO flag when the reported flag is not available.

  • isOtc boolean

    `true` if the security trades over the counter (OTC), that is, not on a national exchange.

  • isThreshold boolean

    `true` if the security is on the threshold securities list: securities with a persistently large number of failed deliveries, as defined by US SEC Regulation SHO.

  • ipoDate string<date>

    Date of the security's initial public offering, `YYYY-MM-DD`. Omitted when unknown.

  • lastUpdatedAt string<date>

    Date, `YYYY-MM-DD`, of the most recent nightly update of this record.

  • close number

    Closing price from the most recent nightly update (see `sourceDate`), in the listing currency, not adjusted for stock splits.

  • averageDailyVolume14Days number

    Average number of shares traded per day over the trailing 14 days.

  • isIpoReported boolean

    The reported IPO flag on its own: `true` or `false` as reported, omitted when the source does not report it. Unlike `isIpo`, it never falls back to the recent-IPO flag.

  • sourceDate string<date>

    Date, `YYYY-MM-DD`, of the data behind `close` and `averageDailyVolume14Days`. Omitted when unknown.