@polygon.io/client-js
Version:
Isomorphic Javascript client for Polygon.io Stocks, Forex, and Crypto APIs
1,918 lines (1,913 loc) • 1.2 MB
TypeScript
import { AxiosInstance, RawAxiosRequestConfig } from 'axios';
import * as websocket from 'websocket';
/**
* Polygon API
* The future of fintech.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
interface ConfigurationParameters {
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
username?: string;
password?: string;
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
basePath?: string;
serverIndex?: number;
baseOptions?: any;
formDataCtor?: new () => any;
}
declare class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
/**
* override server index
*
* @type {number}
* @memberof Configuration
*/
serverIndex?: number;
/**
* base options for axios calls
*
* @type {any}
* @memberof Configuration
*/
baseOptions?: any;
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any;
constructor(param?: ConfigurationParameters);
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
isJsonMime(mime: string): boolean;
}
/**
* Polygon API
* The future of fintech.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface RequestArgs
*/
interface RequestArgs {
url: string;
options: RawAxiosRequestConfig;
}
/**
*
* @export
* @class BaseAPI
*/
declare class BaseAPI {
protected basePath: string;
protected axios: AxiosInstance;
protected configuration: Configuration | undefined;
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
}
/**
* Polygon API
* The future of fintech.
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface Company
*/
interface Company {
/**
* Indicates if the security is actively listed. If false, this means the company is no longer listed and cannot be traded.
* @type {boolean}
* @memberof Company
*/
'active'?: boolean;
/**
* The Bloomberg guid for the symbol.
* @type {string}
* @memberof Company
*/
'bloomberg'?: string;
/**
* The name of the company\'s current CEO.
* @type {string}
* @memberof Company
*/
'ceo'?: string;
/**
* The official CIK guid used for SEC database/filings.
* @type {string}
* @memberof Company
*/
'cik'?: string;
/**
* The country in which the company is registered.
* @type {string}
* @memberof Company
*/
'country'?: string;
/**
* A description of the company and what they do/offer.
* @type {string}
* @memberof Company
*/
'description'?: string;
/**
* The approximate number of employees for the company.
* @type {number}
* @memberof Company
*/
'employees'?: number;
/**
* The symbol\'s primary exchange.
* @type {string}
* @memberof Company
*/
'exchange'?: string;
/**
* The exchange code (id) of the symbol\'s primary exchange.
* @type {string}
* @memberof Company
*/
'exchangeSymbol'?: string;
/**
* The OpenFigi project guid for the symbol. (<a rel=\"nofollow\" target=\"_blank\" href=\"https://openfigi.com/\">https://openfigi.com/</a>)
* @type {string}
* @memberof Company
*/
'figi'?: string;
/**
* The street address for the company\'s headquarters.
* @type {string}
* @memberof Company
*/
'hq_address'?: string;
/**
* The country in which the company\'s headquarters is located.
* @type {string}
* @memberof Company
*/
'hq_country'?: string;
/**
* The state in which the company\'s headquarters is located.
* @type {string}
* @memberof Company
*/
'hq_state'?: string;
/**
* The industry in which the company operates.
* @type {string}
* @memberof Company
*/
'industry'?: string;
/**
* The Legal Entity Identifier (LEI) guid for the symbol. (<a rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Legal_Entity_Identifier\">https://en.wikipedia.org/wiki/Legal_Entity_Identifier</a>)
* @type {string}
* @memberof Company
*/
'lei'?: string;
/**
* The date that the symbol was listed on the exchange.
* @type {string}
* @memberof Company
*/
'listdate'?: string;
/**
* The URL of the entity\'s logo.
* @type {string}
* @memberof Company
*/
'logo'?: string;
/**
* The current market cap for the company.
* @type {number}
* @memberof Company
*/
'marketcap'?: number;
/**
* The name of the company/entity.
* @type {string}
* @memberof Company
*/
'name'?: string;
/**
* The phone number for the company. This is usually a corporate contact number.
* @type {string}
* @memberof Company
*/
'phone'?: string;
/**
* The sector of the indsutry in which the symbol operates.
* @type {string}
* @memberof Company
*/
'sector'?: string;
/**
* Standard Industrial Classification (SIC) id for the symbol. (<a rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Standard_Industrial_Classification\">https://en.wikipedia.org/wiki/Legal_Entity_Identifier</a>)
* @type {number}
* @memberof Company
*/
'sic'?: number;
/**
* A list of ticker symbols for similar companies.
* @type {Array<string>}
* @memberof Company
*/
'similar'?: Array<string>;
/**
* The exchange symbol that this item is traded under.
* @type {string}
* @memberof Company
*/
'symbol'?: string;
/**
*
* @type {Array<string>}
* @memberof Company
*/
'tags'?: Array<string>;
/**
* The type or class of the security. (<a alt=\"Full List of Ticker Types\" href=\"https://polygon.io/docs/stocks/get_v3_reference_tickers_types\">Full List of Ticker Types</a>)
* @type {string}
* @memberof Company
*/
'type'?: string;
/**
* The last time this company record was updated.
* @type {string}
* @memberof Company
*/
'updated'?: string;
/**
* The URL of the company\'s website
* @type {string}
* @memberof Company
*/
'url'?: string;
}
/**
*
* @export
* @interface ConditionTypeMap
*/
interface ConditionTypeMap {
/**
* Polygon.io\'s mapping for condition codes. For more information, see our <a href=\"https://polygon.io/glossary/us/stocks/trade-conditions\" alt=\"Trade Conditions Glossary\" target=\"_blank\">Trade Conditions Glossary</a>.
* @type {string}
* @memberof ConditionTypeMap
*/
'condition'?: string;
}
/**
*
* @export
* @interface CryptoExchangeInner
*/
interface CryptoExchangeInner {
/**
* The exchange ID. See <a href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\">Exchanges</a> for Polygon.io\'s mapping of exchange IDs.
* @type {number}
* @memberof CryptoExchangeInner
*/
'id': number;
/**
* Market data type this exchange contains ( crypto only currently )
* @type {string}
* @memberof CryptoExchangeInner
*/
'market': string;
/**
* Name of the exchange
* @type {string}
* @memberof CryptoExchangeInner
*/
'name': string;
/**
* Type of exchange feed
* @type {string}
* @memberof CryptoExchangeInner
*/
'type': string;
/**
* URL of this exchange
* @type {string}
* @memberof CryptoExchangeInner
*/
'url': string;
}
/**
*
* @export
* @interface CryptoGroupedResults
*/
interface CryptoGroupedResults {
/**
* An array of results containing the requested data.
* @type {Array<GetGroupedCryptoAggregates200ResponseAllOfResultsInner>}
* @memberof CryptoGroupedResults
*/
'results'?: Array<GetGroupedCryptoAggregates200ResponseAllOfResultsInner>;
}
/**
*
* @export
* @interface CryptoHistoricTrades
*/
interface CryptoHistoricTrades {
/**
* The date that was evaluated from the request.
* @type {string}
* @memberof CryptoHistoricTrades
*/
'day': string;
/**
* A map for shortened result keys.
* @type {object}
* @memberof CryptoHistoricTrades
*/
'map': object;
/**
* The milliseconds of latency for the query results.
* @type {number}
* @memberof CryptoHistoricTrades
*/
'msLatency': number;
/**
* The symbol pair that was evaluated from the request.
* @type {string}
* @memberof CryptoHistoricTrades
*/
'symbol': string;
/**
*
* @type {Array<DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner>}
* @memberof CryptoHistoricTrades
*/
'ticks': Array<DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner>;
}
/**
*
* @export
* @interface CryptoLastTrade
*/
interface CryptoLastTrade {
/**
*
* @type {CryptoLastTradeLast}
* @memberof CryptoLastTrade
*/
'last'?: CryptoLastTradeLast;
/**
* The symbol pair that was evaluated from the request.
* @type {string}
* @memberof CryptoLastTrade
*/
'symbol': string;
}
/**
*
* @export
* @interface CryptoLastTradeLast
*/
interface CryptoLastTradeLast {
/**
* A list of condition codes.
* @type {Array<number>}
* @memberof CryptoLastTradeLast
*/
'conditions': Array<number>;
/**
* The exchange that this crypto trade happened on. See <a href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\">Exchanges</a> for a mapping of exchanges to IDs.
* @type {number}
* @memberof CryptoLastTradeLast
*/
'exchange': number;
/**
* The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.
* @type {number}
* @memberof CryptoLastTradeLast
*/
'price': number;
/**
* The size of a trade (also known as volume).
* @type {number}
* @memberof CryptoLastTradeLast
*/
'size': number;
/**
* The Unix millisecond timestamp for the start of the aggregate window.
* @type {number}
* @memberof CryptoLastTradeLast
*/
'timestamp': number;
}
/**
*
* @export
* @interface CryptoOpenClose
*/
interface CryptoOpenClose {
/**
* The close price for the symbol in the given time period.
* @type {number}
* @memberof CryptoOpenClose
*/
'close': number;
/**
* An array of results containing the requested data.
* @type {Array<DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner>}
* @memberof CryptoOpenClose
*/
'closingTrades': Array<DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner>;
/**
* The date requested.
* @type {string}
* @memberof CryptoOpenClose
*/
'day': string;
/**
* Whether or not the timestamps are in UTC timezone.
* @type {boolean}
* @memberof CryptoOpenClose
*/
'isUTC': boolean;
/**
* The open price for the symbol in the given time period.
* @type {number}
* @memberof CryptoOpenClose
*/
'open': number;
/**
* An array of results containing the requested data.
* @type {Array<DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner>}
* @memberof CryptoOpenClose
*/
'openTrades': Array<DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner>;
/**
* The symbol pair that was evaluated from the request.
* @type {string}
* @memberof CryptoOpenClose
*/
'symbol': string;
}
/**
*
* @export
* @interface CryptoSnapshotMinute
*/
interface CryptoSnapshotMinute {
/**
* The close price for the symbol in the given time period.
* @type {number}
* @memberof CryptoSnapshotMinute
*/
'c': number;
/**
* The highest price for the symbol in the given time period.
* @type {number}
* @memberof CryptoSnapshotMinute
*/
'h': number;
/**
* The lowest price for the symbol in the given time period.
* @type {number}
* @memberof CryptoSnapshotMinute
*/
'l': number;
/**
* The number of transactions in the aggregate window.
* @type {number}
* @memberof CryptoSnapshotMinute
*/
'n': number;
/**
* The open price for the symbol in the given time period.
* @type {number}
* @memberof CryptoSnapshotMinute
*/
'o': number;
/**
* The Unix millisecond timestamp for the start of the aggregate window.
* @type {number}
* @memberof CryptoSnapshotMinute
*/
't': number;
/**
* The trading volume of the symbol in the given time period.
* @type {number}
* @memberof CryptoSnapshotMinute
*/
'v': number;
/**
* The volume weighted average price.
* @type {number}
* @memberof CryptoSnapshotMinute
*/
'vw': number;
}
/**
*
* @export
* @interface CryptoSnapshotTicker
*/
interface CryptoSnapshotTicker {
/**
*
* @type {GetCryptoSnapshotTicker200ResponseAllOfTicker}
* @memberof CryptoSnapshotTicker
*/
'ticker'?: GetCryptoSnapshotTicker200ResponseAllOfTicker;
}
/**
*
* @export
* @interface CryptoSnapshotTickerFullBook
*/
interface CryptoSnapshotTickerFullBook {
/**
*
* @type {DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData}
* @memberof CryptoSnapshotTickerFullBook
*/
'data'?: DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData;
}
/**
*
* @export
* @interface CryptoSnapshotTickers
*/
interface CryptoSnapshotTickers {
/**
* An array of snapshot data for the specified tickers.
* @type {Array<GetCryptoSnapshotTickers200ResponseAllOfTickersInner>}
* @memberof CryptoSnapshotTickers
*/
'tickers'?: Array<GetCryptoSnapshotTickers200ResponseAllOfTickersInner>;
}
/**
*
* @export
* @interface CryptoTick
*/
interface CryptoTick {
/**
* A list of condition codes.
* @type {Array<number>}
* @memberof CryptoTick
*/
'c': Array<number>;
/**
* The Trade ID which uniquely identifies a trade. These are unique per combination of ticker, exchange, and TRF. For example: A trade for AAPL executed on NYSE and a trade for AAPL executed on NASDAQ could potentially have the same Trade ID.
* @type {string}
* @memberof CryptoTick
*/
'i': string;
/**
* The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.
* @type {number}
* @memberof CryptoTick
*/
'p': number;
/**
* The size of a trade (also known as volume).
* @type {number}
* @memberof CryptoTick
*/
's': number;
/**
* The Unix millisecond timestamp for the start of the aggregate window.
* @type {number}
* @memberof CryptoTick
*/
't': number;
/**
* The exchange that this crypto trade happened on. See <a href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\">Exchanges</a> for a mapping of exchanges to IDs.
* @type {number}
* @memberof CryptoTick
*/
'x': number;
}
/**
*
* @export
* @interface DeprecatedGetCryptoSnapshotTickerBook200Response
*/
interface DeprecatedGetCryptoSnapshotTickerBook200Response {
/**
*
* @type {DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData}
* @memberof DeprecatedGetCryptoSnapshotTickerBook200Response
*/
'data'?: DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData;
}
/**
*
* @export
* @interface DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData
*/
interface DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData {
/**
* The combined total number of asks in the book.
* @type {number}
* @memberof DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData
*/
'askCount': number;
/**
*
* @type {Array<DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfDataAsksInner>}
* @memberof DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData
*/
'asks': Array<DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfDataAsksInner>;
/**
* The combined total number of bids in the book.
* @type {number}
* @memberof DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData
*/
'bidCount': number;
/**
*
* @type {Array<DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfDataAsksInner>}
* @memberof DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData
*/
'bids': Array<DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfDataAsksInner>;
/**
* The difference between the best bid and the best ask price across exchanges.
* @type {number}
* @memberof DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData
*/
'spread': number;
/**
* The exchange symbol that this item is traded under.
* @type {string}
* @memberof DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData
*/
'ticker': string;
/**
* The last updated timestamp.
* @type {number}
* @memberof DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfData
*/
'updated': number;
}
/**
*
* @export
* @interface DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfDataAsksInner
*/
interface DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfDataAsksInner {
/**
* The price of this book level.
* @type {number}
* @memberof DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfDataAsksInner
*/
'p': number;
/**
* A map of the exchange ID to number of shares at this price level. <br /> <br /> **Example:** <br /> `{ \"p\": 16302.94, \"x\": { \"1\": 0.02859424, \"6\": 0.023455 } }` <br /> <br /> In this example, exchange ID 1 has 0.02859424 shares available at $16,302.94, and exchange ID 6 has 0.023455 shares at the same price level.
* @type {object}
* @memberof DeprecatedGetCryptoSnapshotTickerBook200ResponseAllOfDataAsksInner
*/
'x': object;
}
/**
*
* @export
* @interface DeprecatedGetHistoricCryptoTrades200Response
*/
interface DeprecatedGetHistoricCryptoTrades200Response {
/**
* The date that was evaluated from the request.
* @type {string}
* @memberof DeprecatedGetHistoricCryptoTrades200Response
*/
'day': string;
/**
* A map for shortened result keys.
* @type {object}
* @memberof DeprecatedGetHistoricCryptoTrades200Response
*/
'map': object;
/**
* The milliseconds of latency for the query results.
* @type {number}
* @memberof DeprecatedGetHistoricCryptoTrades200Response
*/
'msLatency': number;
/**
* The symbol pair that was evaluated from the request.
* @type {string}
* @memberof DeprecatedGetHistoricCryptoTrades200Response
*/
'symbol': string;
/**
*
* @type {Array<DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner>}
* @memberof DeprecatedGetHistoricCryptoTrades200Response
*/
'ticks': Array<DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner>;
}
/**
*
* @export
* @interface DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner
*/
interface DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner {
/**
* A list of condition codes.
* @type {Array<number>}
* @memberof DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner
*/
'c': Array<number>;
/**
* The Trade ID which uniquely identifies a trade. These are unique per combination of ticker, exchange, and TRF. For example: A trade for AAPL executed on NYSE and a trade for AAPL executed on NASDAQ could potentially have the same Trade ID.
* @type {string}
* @memberof DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner
*/
'i': string;
/**
* The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.
* @type {number}
* @memberof DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner
*/
'p': number;
/**
* The size of a trade (also known as volume).
* @type {number}
* @memberof DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner
*/
's': number;
/**
* The Unix millisecond timestamp for the start of the aggregate window.
* @type {number}
* @memberof DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner
*/
't': number;
/**
* The exchange that this crypto trade happened on. See <a href=\"https://polygon.io/docs/crypto/get_v3_reference_exchanges\">Exchanges</a> for a mapping of exchanges to IDs.
* @type {number}
* @memberof DeprecatedGetHistoricCryptoTrades200ResponseAllOfTicksInner
*/
'x': number;
}
/**
*
* @export
* @interface DeprecatedGetHistoricForexQuotes200Response
*/
interface DeprecatedGetHistoricForexQuotes200Response {
/**
* The status of this request\'s response.
* @type {string}
* @memberof DeprecatedGetHistoricForexQuotes200Response
*/
'status': string;
/**
* The date that was evaluated from the request.
* @type {string}
* @memberof DeprecatedGetHistoricForexQuotes200Response
*/
'day': string;
/**
* A map for shortened result keys.
* @type {object}
* @memberof DeprecatedGetHistoricForexQuotes200Response
*/
'map': object;
/**
* The milliseconds of latency for the query results.
* @type {number}
* @memberof DeprecatedGetHistoricForexQuotes200Response
*/
'msLatency': number;
/**
* The currency pair that was evaluated from the request.
* @type {string}
* @memberof DeprecatedGetHistoricForexQuotes200Response
*/
'pair': string;
/**
*
* @type {Array<DeprecatedGetHistoricForexQuotes200ResponseAllOfTicksInner>}
* @memberof DeprecatedGetHistoricForexQuotes200Response
*/
'ticks': Array<DeprecatedGetHistoricForexQuotes200ResponseAllOfTicksInner>;
}
/**
*
* @export
* @interface DeprecatedGetHistoricForexQuotes200ResponseAllOfTicksInner
*/
interface DeprecatedGetHistoricForexQuotes200ResponseAllOfTicksInner {
/**
* The ask price.
* @type {number}
* @memberof DeprecatedGetHistoricForexQuotes200ResponseAllOfTicksInner
*/
'a': number;
/**
* The bid price.
* @type {number}
* @memberof DeprecatedGetHistoricForexQuotes200ResponseAllOfTicksInner
*/
'b': number;
/**
* The Unix millisecond timestamp for the start of the aggregate window.
* @type {number}
* @memberof DeprecatedGetHistoricForexQuotes200ResponseAllOfTicksInner
*/
't': number;
/**
* The exchange ID. See <a href=\"https://polygon.io/docs/forex/get_v3_reference_exchanges\" alt=\"Exchanges\">Exchanges</a> for Polygon.io\'s mapping of exchange IDs.
* @type {number}
* @memberof DeprecatedGetHistoricForexQuotes200ResponseAllOfTicksInner
*/
'x': number;
}
/**
*
* @export
* @interface DeprecatedGetHistoricStocksQuotes200Response
*/
interface DeprecatedGetHistoricStocksQuotes200Response {
/**
* Latency in milliseconds for the query results from the database.
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200Response
*/
'db_latency'?: number;
/**
* The total number of results for this request.
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200Response
*/
'results_count'?: number;
/**
* Whether or not this query was executed successfully.
* @type {boolean}
* @memberof DeprecatedGetHistoricStocksQuotes200Response
*/
'success'?: boolean;
/**
* The exchange symbol that this item is traded under.
* @type {string}
* @memberof DeprecatedGetHistoricStocksQuotes200Response
*/
'ticker'?: string;
/**
*
* @type {Array<DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner>}
* @memberof DeprecatedGetHistoricStocksQuotes200Response
*/
'results'?: Array<DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner>;
}
/**
*
* @export
* @interface DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
interface DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner {
/**
* The exchange symbol that this item is traded under.
* @type {string}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
'T': string;
/**
* The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
'f': number;
/**
* The sequence number represents the sequence in which message events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11).
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
'q': number;
/**
* The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
't': number;
/**
* The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
'y': number;
/**
* The ask price.
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
'P': number;
/**
* The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
'S': number;
/**
* The ask exchange ID. See <a href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\">Exchanges</a> for Polygon.io\'s mapping of exchange IDs.
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
'X': number;
/**
* A list of condition codes.
* @type {Array<number>}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
'c': Array<number>;
/**
* The indicators. For more information, see our glossary of [Conditions and Indicators](https://polygon.io/glossary/us/stocks/conditions-indicators).
* @type {Array<number>}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
'i': Array<number>;
/**
* The bid price.
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
'p': number;
/**
* The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
's': number;
/**
* The bid exchange ID. See <a href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\">Exchanges</a> for Polygon.io\'s mapping of exchange IDs.
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
'x': number;
/**
* There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C. * Tape A is NYSE listed securities * Tape B is NYSE ARCA / NYSE American * Tape C is NASDAQ
* @type {number}
* @memberof DeprecatedGetHistoricStocksQuotes200ResponseAllOfResultsInner
*/
'z': number;
}
/**
*
* @export
* @interface DeprecatedGetHistoricStocksTrades200Response
*/
interface DeprecatedGetHistoricStocksTrades200Response {
/**
* Latency in milliseconds for the query results from the database.
* @type {number}
* @memberof DeprecatedGetHistoricStocksTrades200Response
*/
'db_latency'?: number;
/**
* The total number of results for this request.
* @type {number}
* @memberof DeprecatedGetHistoricStocksTrades200Response
*/
'results_count'?: number;
/**
* Whether or not this query was executed successfully.
* @type {boolean}
* @memberof DeprecatedGetHistoricStocksTrades200Response
*/
'success'?: boolean;
/**
* The exchange symbol that this item is traded under.
* @type {string}
* @memberof DeprecatedGetHistoricStocksTrades200Response
*/
'ticker'?: string;
/**
*
* @type {Array<DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner>}
* @memberof DeprecatedGetHistoricStocksTrades200Response
*/
'results'?: Array<DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner>;
}
/**
*
* @export
* @interface DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
interface DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner {
/**
* The exchange symbol that this item is traded under.
* @type {string}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
'T': string;
/**
* The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.
* @type {number}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
'f': number;
/**
* The sequence number represents the sequence in which message events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11).
* @type {number}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
'q': number;
/**
* The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.
* @type {number}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
't': number;
/**
* The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.
* @type {number}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
'y': number;
/**
* A list of condition codes.
* @type {Array<number>}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
'c': Array<number>;
/**
* The trade correction indicator.
* @type {number}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
'e': number;
/**
* The Trade ID which uniquely identifies a trade. These are unique per combination of ticker, exchange, and TRF. For example: A trade for AAPL executed on NYSE and a trade for AAPL executed on NASDAQ could potentially have the same Trade ID.
* @type {string}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
'i': string;
/**
* The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.
* @type {number}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
'p': number;
/**
* The ID for the Trade Reporting Facility where the trade took place.
* @type {number}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
'r': number;
/**
* The size of a trade (also known as volume).
* @type {number}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
's': number;
/**
* The exchange ID. See <a href=\"https://polygon.io/docs/stocks/get_v3_reference_exchanges\" alt=\"Exchanges\">Exchanges</a> for Polygon.io\'s mapping of exchange IDs.
* @type {number}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
'x': number;
/**
* There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C. * Tape A is NYSE listed securities * Tape B is NYSE ARCA / NYSE American * Tape C is NASDAQ
* @type {number}
* @memberof DeprecatedGetHistoricStocksTrades200ResponseAllOfResultsInner
*/
'z': number;
}
/**
*
* @export
* @interface ExchangeInner
*/
interface ExchangeInner {
/**
* A unique identifier for the exchange internal to Polygon.io. This is not an industry code or ISO standard.
* @type {string}
* @memberof ExchangeInner
*/
'code'?: string;
/**
* The ID of the exchange.
* @type {number}
* @memberof ExchangeInner
*/
'id'?: number;
/**
* The market data type that this exchange contains.
* @type {string}
* @memberof ExchangeInner
*/
'market'?: string;
/**
* The Market Identification Code or MIC as defined in ISO 10383 (<a rel=\"nofollow\" target=\"_blank\" href=\"https://en.wikipedia.org/wiki/Market_Identifier_Code\">https://en.wikipedia.org/wiki/Market_Identifier_Code</a>).
* @type {string}
* @memberof ExchangeInner
*/
'mic'?: string;
/**
* The name of the exchange.
* @type {string}
* @memberof ExchangeInner
*/
'name'?: string;
/**
* The tape id of the exchange.
* @type {string}
* @memberof ExchangeInner
*/
'tape'?: string;
/**
* The type of exchange. - TRF = Trade Reporting Facility - exchange = Reporting exchange on the tape
* @type {string}
* @memberof ExchangeInner
*/
'type'?: string;
}
/**
*
* @export
* @interface Financial
*/
interface Financial {
/**
*
* @type {number}
* @memberof Financial
*/
'cashChange'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'cashFlow'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'costOfRevenue'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'currentAssets'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'currentCash'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'currentDebt'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'grossProfit'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'netIncome'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'operatingExpense'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'operatingGainsLosses'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'operatingIncome'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'operatingRevenue'?: number;
/**
* Report Date
* @type {string}
* @memberof Financial
*/
'reportDate': string;
/**
* Report date as non date format
* @type {string}
* @memberof Financial
*/
'reportDateStr': string;
/**
*
* @type {number}
* @memberof Financial
*/
'researchAndDevelopment'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'shareholderEquity'?: number;
/**
* Stock Symbol
* @type {string}
* @memberof Financial
*/
'symbol': string;
/**
*
* @type {number}
* @memberof Financial
*/
'totalAssets'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'totalCash'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'totalDebt'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'totalLiabilities'?: number;
/**
*
* @type {number}
* @memberof Financial
*/
'totalRevenue'?: number;
}
/**
* Financials
* @export
* @interface Financials
*/
interface Financials {
/**
*
* @type {number}
* @memberof Financials
*/
'EBITDAMargin'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'accumulatedOtherComprehensiveIncome'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'accumulatedRetainedEarningsDeficit'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'assetTurnover'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'assets'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'assetsAverage'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'assetsCurrent'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'assetsNonCurrent'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'averageEquity'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'bookValuePerShare'?: number;
/**
*
* @type {string}
* @memberof Financials
*/
'calendarDate'?: string;
/**
*
* @type {number}
* @memberof Financials
*/
'capitalExpenditure'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'cashAndEquivalents'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'cashAndEquivalentsUSD'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'consolidatedIncome'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'costOfRevenue'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'currentLiabilities'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'currentRatio'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'debt'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'debtCurrent'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'debtNonCurrent'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'debtToEquityRatio'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'debtUSD'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'deferredRevenue'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'deposits'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'depreciationAmortizationAndAccretion'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'dividendYield'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'dividendsPerBasicCommonShare'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'earningBeforeInterestTaxes'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'earningBeforeInterestTaxesUSD'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'earningsBeforeInterestTaxesDepreciationAmortization'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'earningsBeforeInterestTaxesDepreciationAmortizationUSD'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'earningsBeforeTax'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'earningsPerBasicShare'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'earningsPerBasicShareUSD'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'earningsPerDilutedShare'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'effectOfExchangeRateChangesOnCash'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'enterpriseValue'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'enterpriseValueOverEBIT'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'enterpriseValueOverEBITDA'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'foreignCurrencyUSDExchangeRate'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'freeCashFlow'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'freeCashFlowPerShare'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'goodwillAndIntangibleAssets'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'grossMargin'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'grossProfit'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'incomeTaxExpense'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'interestExpense'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'inventory'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'investedCapital'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'investedCapitalAverage'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'investments'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'investmentsCurrent'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'investmentsNonCurrent'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'issuanceDebtSecurities'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'issuanceEquityShares'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'liabilitiesNonCurrent'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'marketCapitalization'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'netCashFlow'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'netCashFlowBusinessAcquisitionsDisposals'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'netCashFlowFromFinancing'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'netCashFlowFromInvesting'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'netCashFlowFromOperations'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'netCashFlowInvestmentAcquisitionsDisposals'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'netIncome'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'netIncomeCommonStock'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'netIncomeCommonStockUSD'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'netIncomeToNonControllingInterests'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'netLossIncomeFromDiscontinuedOperations'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'operatingExpenses'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'operatingIncome'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'paymentDividendsOtherCashDistributions'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'payoutRatio'?: number;
/**
* Reporting period.
* @type {string}
* @memberof Financials
*/
'period'?: FinancialsPeriodEnum;
/**
*
* @type {number}
* @memberof Financials
*/
'preferredDividendsIncomeStatementImpact'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'priceEarnings'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'priceSales'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'priceToBookValue'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'priceToEarningsRatio'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'priceToSalesRatio'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'profitMargin'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'propertyPlantEquipmentNet'?: number;
/**
*
* @type {string}
* @memberof Financials
*/
'reportPeriod'?: string;
/**
*
* @type {number}
* @memberof Financials
*/
'researchAndDevelopmentExpense'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'returnOnAverageAssets'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'returnOnAverageEquity'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'returnOnInvestedCapital'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'returnOnSales'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'revenues'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'revenuesUSD'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'salesPerShare'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'sellingGeneralAndAdministrativeExpense'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'shareBasedCompensation'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'shareFactor'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'sharePriceAdjustedClose'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'shareholdersEquity'?: number;
/**
*
* @type {number}
* @memberof Financials
*/
'shareholdersEquityUSD'?: num