kalshi-typescript
Version:
OpenAPI client for kalshi-typescript
452 lines • 51.3 kB
TypeScript
/**
* Kalshi Trade API Manual Endpoints
* Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
*
* The version of the OpenAPI document: 3.11.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import { type RequestArgs, BaseAPI } from '../base';
import type { BatchGetMarketCandlesticksResponse } from '../models';
import type { GetMarketCandlesticksResponse } from '../models';
import type { GetMarketOrderbookResponse } from '../models';
import type { GetMarketOrderbooksResponse } from '../models';
import type { GetMarketResponse } from '../models';
import type { GetMarketsResponse } from '../models';
import type { GetSeriesListResponse } from '../models';
import type { GetSeriesResponse } from '../models';
import type { GetTradesResponse } from '../models';
/**
* MarketApi - axios parameter creator
*/
export declare const MarketApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Endpoint for retrieving candlestick data for multiple markets. - Accepts up to 100 market tickers per request - Returns up to 10,000 candlesticks total across all markets - Returns candlesticks grouped by market_id - Optionally includes a synthetic initial candlestick for price continuity (see `include_latest_before_start` parameter)
* @summary Batch Get Market Candlesticks
* @param {string} marketTickers Comma-separated list of market tickers (maximum 100)
* @param {number} startTs Start timestamp in Unix seconds
* @param {number} endTs End timestamp in Unix seconds
* @param {number} periodInterval Candlestick period interval in minutes
* @param {boolean} [includeLatestBeforeStart] If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by: 1. Finding the most recent real candlestick before start_ts 2. Projecting it forward to the first period boundary (calculated as the next period interval after start_ts) 3. Setting all OHLC prices to null, and `previous_price` to the close price from the real candlestick
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
batchGetMarketCandlesticks: (marketTickers: string, startTs: number, endTs: number, periodInterval: number, includeLatestBeforeStart?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Endpoint for getting data about a specific market by its ticker. A market represents a specific binary outcome within an event that users can trade on (e.g., \"Will candidate X win?\"). Markets have yes/no positions, current prices, volume, and settlement rules.
* @summary Get Market
* @param {string} ticker Market ticker
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarket: (ticker: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Time period length of each candlestick in minutes. Valid values: 1 (1 minute), 60 (1 hour), 1440 (1 day). Candlesticks for markets that settled before the historical cutoff are only available via `GET /historical/markets/{ticker}/candlesticks`. See [Historical Data](https://kalshi.com/docs/getting_started/historical_data) for details.
* @summary Get Market Candlesticks
* @param {string} seriesTicker Series ticker - the series that contains the target market
* @param {string} ticker Market ticker - unique identifier for the specific market
* @param {number} startTs Start timestamp (Unix timestamp). Candlesticks will include those ending on or after this time.
* @param {number} endTs End timestamp (Unix timestamp). Candlesticks will include those ending on or before this time.
* @param {GetMarketCandlesticksPeriodIntervalEnum} periodInterval Time period length of each candlestick in minutes. Valid values are 1 (1 minute), 60 (1 hour), or 1440 (1 day).
* @param {boolean} [includeLatestBeforeStart] If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by: 1. Finding the most recent real candlestick before start_ts 2. Projecting it forward to the first period boundary (calculated as the next period interval after start_ts) 3. Setting all OHLC prices to null, and `previous_price` to the close price from the real candlestick
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketCandlesticks: (seriesTicker: string, ticker: string, startTs: number, endTs: number, periodInterval: GetMarketCandlesticksPeriodIntervalEnum, includeLatestBeforeStart?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Endpoint for getting the current order book for a specific market. The order book shows all active bid orders for both yes and no sides of a binary market. It returns yes bids and no bids only (no asks are returned). This is because in binary markets, a bid for yes at price X is equivalent to an ask for no at price (100-X). For example, a yes bid at 7¢ is the same as a no ask at 93¢, with identical contract sizes. Each side shows price levels with their corresponding quantities and order counts, organized from best to worst prices.
* @summary Get Market Orderbook
* @param {string} ticker Market ticker
* @param {number} [depth] Depth of the orderbook to retrieve (0 or negative means all levels, 1-100 for specific depth)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketOrderbook: (ticker: string, depth?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Endpoint for getting the current order books for multiple markets in a single request. The order book shows all active bid orders for both yes and no sides of a binary market. It returns yes bids and no bids only (no asks are returned). This is because in binary markets, a bid for yes at price X is equivalent to an ask for no at price (100-X). For example, a yes bid at 7¢ is the same as a no ask at 93¢, with identical contract sizes. Each side shows price levels with their corresponding quantities and order counts, organized from best to worst prices. Returns one orderbook per requested market ticker.
* @summary Get Multiple Market Orderbooks
* @param {Array<string>} tickers List of market tickers to fetch orderbooks for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketOrderbooks: (tickers: Array<string>, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Filter by market status. Possible values: `unopened`, `open`, `closed`, `settled`. Leave empty to return markets with any status. - Only one `status` filter may be supplied at a time. - Timestamp filters will be mutually exclusive from other timestamp filters and certain status filters. | Compatible Timestamp Filters | Additional Status Filters| Extra Notes | |------------------------------|--------------------------|-------------| | min_created_ts, max_created_ts | `unopened`, `open`, *empty* | | | min_close_ts, max_close_ts | `closed`, *empty* | | | min_settled_ts, max_settled_ts | `settled`, *empty* | | | min_updated_ts | *empty* | Incompatible with all filters besides `mve_filter=exclude` | Markets that settled before the historical cutoff are only available via `GET /historical/markets`. See [Historical Data](https://kalshi.com/docs/getting_started/historical_data) for details.
* @summary Get Markets
* @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 1000.
* @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
* @param {string} [eventTicker] Event ticker to filter by. Only a single event ticker is supported.
* @param {string} [seriesTicker] Filter by series ticker
* @param {number} [minCreatedTs] Filter items that created after this Unix timestamp
* @param {number} [maxCreatedTs] Filter items that created before this Unix timestamp
* @param {number} [minUpdatedTs] Return markets with metadata updated later than this Unix timestamp. Tracks non-trading changes only. Incompatible with any other filters.
* @param {number} [maxCloseTs] Filter items that close before this Unix timestamp
* @param {number} [minCloseTs] Filter items that close after this Unix timestamp
* @param {number} [minSettledTs] Filter items that settled after this Unix timestamp
* @param {number} [maxSettledTs] Filter items that settled before this Unix timestamp
* @param {GetMarketsStatusEnum} [status] Filter by market status. Leave empty to return markets with any status.
* @param {string} [tickers] Filter by specific market tickers. Comma-separated list of market tickers to retrieve.
* @param {GetMarketsMveFilterEnum} [mveFilter] Filter by multivariate events (combos). \'only\' returns only multivariate events, \'exclude\' excludes multivariate events.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarkets: (limit?: number, cursor?: string, eventTicker?: string, seriesTicker?: string, minCreatedTs?: number, maxCreatedTs?: number, minUpdatedTs?: number, maxCloseTs?: number, minCloseTs?: number, minSettledTs?: number, maxSettledTs?: number, status?: GetMarketsStatusEnum, tickers?: string, mveFilter?: GetMarketsMveFilterEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Endpoint for getting data about a specific series by its ticker. A series represents a template for recurring events that follow the same format and rules (e.g., \"Monthly Jobs Report\", \"Weekly Initial Jobless Claims\", \"Daily Weather in NYC\"). Series define the structure, settlement sources, and metadata that will be applied to each recurring event instance within that series.
* @summary Get Series
* @param {string} seriesTicker The ticker of the series to retrieve
* @param {boolean} [includeVolume] If true, includes the total volume traded across all events in this series.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSeries: (seriesTicker: string, includeVolume?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Endpoint for getting data about multiple series with specified filters. A series represents a template for recurring events that follow the same format and rules (e.g., \"Monthly Jobs Report\", \"Weekly Initial Jobless Claims\", \"Daily Weather in NYC\"). This endpoint allows you to browse and discover available series templates by category.
* @summary Get Series List
* @param {string} [category]
* @param {string} [tags]
* @param {boolean} [includeProductMetadata]
* @param {boolean} [includeVolume] If true, includes the total volume traded across all events in each series.
* @param {number} [minUpdatedTs] Filter series with metadata updated after this Unix timestamp (in seconds). Use this to efficiently poll for changes.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSeriesList: (category?: string, tags?: string, includeProductMetadata?: boolean, includeVolume?: boolean, minUpdatedTs?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Endpoint for getting all trades for all markets. A trade represents a completed transaction between two users on a specific market. Each trade includes the market ticker, price, quantity, and timestamp information. This endpoint returns a paginated response. Use the \'limit\' parameter to control page size (1-1000, defaults to 100). The response includes a \'cursor\' field - pass this value in the \'cursor\' parameter of your next request to get the next page. An empty cursor indicates no more pages are available.
* @summary Get Trades
* @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 1000.
* @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
* @param {string} [ticker] Filter by market ticker
* @param {number} [minTs] Filter items after this Unix timestamp
* @param {number} [maxTs] Filter items before this Unix timestamp
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTrades: (limit?: number, cursor?: string, ticker?: string, minTs?: number, maxTs?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* MarketApi - functional programming interface
*/
export declare const MarketApiFp: (configuration?: Configuration) => {
/**
* Endpoint for retrieving candlestick data for multiple markets. - Accepts up to 100 market tickers per request - Returns up to 10,000 candlesticks total across all markets - Returns candlesticks grouped by market_id - Optionally includes a synthetic initial candlestick for price continuity (see `include_latest_before_start` parameter)
* @summary Batch Get Market Candlesticks
* @param {string} marketTickers Comma-separated list of market tickers (maximum 100)
* @param {number} startTs Start timestamp in Unix seconds
* @param {number} endTs End timestamp in Unix seconds
* @param {number} periodInterval Candlestick period interval in minutes
* @param {boolean} [includeLatestBeforeStart] If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by: 1. Finding the most recent real candlestick before start_ts 2. Projecting it forward to the first period boundary (calculated as the next period interval after start_ts) 3. Setting all OHLC prices to null, and `previous_price` to the close price from the real candlestick
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
batchGetMarketCandlesticks(marketTickers: string, startTs: number, endTs: number, periodInterval: number, includeLatestBeforeStart?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BatchGetMarketCandlesticksResponse>>;
/**
* Endpoint for getting data about a specific market by its ticker. A market represents a specific binary outcome within an event that users can trade on (e.g., \"Will candidate X win?\"). Markets have yes/no positions, current prices, volume, and settlement rules.
* @summary Get Market
* @param {string} ticker Market ticker
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarket(ticker: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetMarketResponse>>;
/**
* Time period length of each candlestick in minutes. Valid values: 1 (1 minute), 60 (1 hour), 1440 (1 day). Candlesticks for markets that settled before the historical cutoff are only available via `GET /historical/markets/{ticker}/candlesticks`. See [Historical Data](https://kalshi.com/docs/getting_started/historical_data) for details.
* @summary Get Market Candlesticks
* @param {string} seriesTicker Series ticker - the series that contains the target market
* @param {string} ticker Market ticker - unique identifier for the specific market
* @param {number} startTs Start timestamp (Unix timestamp). Candlesticks will include those ending on or after this time.
* @param {number} endTs End timestamp (Unix timestamp). Candlesticks will include those ending on or before this time.
* @param {GetMarketCandlesticksPeriodIntervalEnum} periodInterval Time period length of each candlestick in minutes. Valid values are 1 (1 minute), 60 (1 hour), or 1440 (1 day).
* @param {boolean} [includeLatestBeforeStart] If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by: 1. Finding the most recent real candlestick before start_ts 2. Projecting it forward to the first period boundary (calculated as the next period interval after start_ts) 3. Setting all OHLC prices to null, and `previous_price` to the close price from the real candlestick
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketCandlesticks(seriesTicker: string, ticker: string, startTs: number, endTs: number, periodInterval: GetMarketCandlesticksPeriodIntervalEnum, includeLatestBeforeStart?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetMarketCandlesticksResponse>>;
/**
* Endpoint for getting the current order book for a specific market. The order book shows all active bid orders for both yes and no sides of a binary market. It returns yes bids and no bids only (no asks are returned). This is because in binary markets, a bid for yes at price X is equivalent to an ask for no at price (100-X). For example, a yes bid at 7¢ is the same as a no ask at 93¢, with identical contract sizes. Each side shows price levels with their corresponding quantities and order counts, organized from best to worst prices.
* @summary Get Market Orderbook
* @param {string} ticker Market ticker
* @param {number} [depth] Depth of the orderbook to retrieve (0 or negative means all levels, 1-100 for specific depth)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketOrderbook(ticker: string, depth?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetMarketOrderbookResponse>>;
/**
* Endpoint for getting the current order books for multiple markets in a single request. The order book shows all active bid orders for both yes and no sides of a binary market. It returns yes bids and no bids only (no asks are returned). This is because in binary markets, a bid for yes at price X is equivalent to an ask for no at price (100-X). For example, a yes bid at 7¢ is the same as a no ask at 93¢, with identical contract sizes. Each side shows price levels with their corresponding quantities and order counts, organized from best to worst prices. Returns one orderbook per requested market ticker.
* @summary Get Multiple Market Orderbooks
* @param {Array<string>} tickers List of market tickers to fetch orderbooks for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketOrderbooks(tickers: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetMarketOrderbooksResponse>>;
/**
* Filter by market status. Possible values: `unopened`, `open`, `closed`, `settled`. Leave empty to return markets with any status. - Only one `status` filter may be supplied at a time. - Timestamp filters will be mutually exclusive from other timestamp filters and certain status filters. | Compatible Timestamp Filters | Additional Status Filters| Extra Notes | |------------------------------|--------------------------|-------------| | min_created_ts, max_created_ts | `unopened`, `open`, *empty* | | | min_close_ts, max_close_ts | `closed`, *empty* | | | min_settled_ts, max_settled_ts | `settled`, *empty* | | | min_updated_ts | *empty* | Incompatible with all filters besides `mve_filter=exclude` | Markets that settled before the historical cutoff are only available via `GET /historical/markets`. See [Historical Data](https://kalshi.com/docs/getting_started/historical_data) for details.
* @summary Get Markets
* @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 1000.
* @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
* @param {string} [eventTicker] Event ticker to filter by. Only a single event ticker is supported.
* @param {string} [seriesTicker] Filter by series ticker
* @param {number} [minCreatedTs] Filter items that created after this Unix timestamp
* @param {number} [maxCreatedTs] Filter items that created before this Unix timestamp
* @param {number} [minUpdatedTs] Return markets with metadata updated later than this Unix timestamp. Tracks non-trading changes only. Incompatible with any other filters.
* @param {number} [maxCloseTs] Filter items that close before this Unix timestamp
* @param {number} [minCloseTs] Filter items that close after this Unix timestamp
* @param {number} [minSettledTs] Filter items that settled after this Unix timestamp
* @param {number} [maxSettledTs] Filter items that settled before this Unix timestamp
* @param {GetMarketsStatusEnum} [status] Filter by market status. Leave empty to return markets with any status.
* @param {string} [tickers] Filter by specific market tickers. Comma-separated list of market tickers to retrieve.
* @param {GetMarketsMveFilterEnum} [mveFilter] Filter by multivariate events (combos). \'only\' returns only multivariate events, \'exclude\' excludes multivariate events.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarkets(limit?: number, cursor?: string, eventTicker?: string, seriesTicker?: string, minCreatedTs?: number, maxCreatedTs?: number, minUpdatedTs?: number, maxCloseTs?: number, minCloseTs?: number, minSettledTs?: number, maxSettledTs?: number, status?: GetMarketsStatusEnum, tickers?: string, mveFilter?: GetMarketsMveFilterEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetMarketsResponse>>;
/**
* Endpoint for getting data about a specific series by its ticker. A series represents a template for recurring events that follow the same format and rules (e.g., \"Monthly Jobs Report\", \"Weekly Initial Jobless Claims\", \"Daily Weather in NYC\"). Series define the structure, settlement sources, and metadata that will be applied to each recurring event instance within that series.
* @summary Get Series
* @param {string} seriesTicker The ticker of the series to retrieve
* @param {boolean} [includeVolume] If true, includes the total volume traded across all events in this series.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSeries(seriesTicker: string, includeVolume?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetSeriesResponse>>;
/**
* Endpoint for getting data about multiple series with specified filters. A series represents a template for recurring events that follow the same format and rules (e.g., \"Monthly Jobs Report\", \"Weekly Initial Jobless Claims\", \"Daily Weather in NYC\"). This endpoint allows you to browse and discover available series templates by category.
* @summary Get Series List
* @param {string} [category]
* @param {string} [tags]
* @param {boolean} [includeProductMetadata]
* @param {boolean} [includeVolume] If true, includes the total volume traded across all events in each series.
* @param {number} [minUpdatedTs] Filter series with metadata updated after this Unix timestamp (in seconds). Use this to efficiently poll for changes.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSeriesList(category?: string, tags?: string, includeProductMetadata?: boolean, includeVolume?: boolean, minUpdatedTs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetSeriesListResponse>>;
/**
* Endpoint for getting all trades for all markets. A trade represents a completed transaction between two users on a specific market. Each trade includes the market ticker, price, quantity, and timestamp information. This endpoint returns a paginated response. Use the \'limit\' parameter to control page size (1-1000, defaults to 100). The response includes a \'cursor\' field - pass this value in the \'cursor\' parameter of your next request to get the next page. An empty cursor indicates no more pages are available.
* @summary Get Trades
* @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 1000.
* @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
* @param {string} [ticker] Filter by market ticker
* @param {number} [minTs] Filter items after this Unix timestamp
* @param {number} [maxTs] Filter items before this Unix timestamp
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTrades(limit?: number, cursor?: string, ticker?: string, minTs?: number, maxTs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetTradesResponse>>;
};
/**
* MarketApi - factory interface
*/
export declare const MarketApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Endpoint for retrieving candlestick data for multiple markets. - Accepts up to 100 market tickers per request - Returns up to 10,000 candlesticks total across all markets - Returns candlesticks grouped by market_id - Optionally includes a synthetic initial candlestick for price continuity (see `include_latest_before_start` parameter)
* @summary Batch Get Market Candlesticks
* @param {string} marketTickers Comma-separated list of market tickers (maximum 100)
* @param {number} startTs Start timestamp in Unix seconds
* @param {number} endTs End timestamp in Unix seconds
* @param {number} periodInterval Candlestick period interval in minutes
* @param {boolean} [includeLatestBeforeStart] If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by: 1. Finding the most recent real candlestick before start_ts 2. Projecting it forward to the first period boundary (calculated as the next period interval after start_ts) 3. Setting all OHLC prices to null, and `previous_price` to the close price from the real candlestick
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
batchGetMarketCandlesticks(marketTickers: string, startTs: number, endTs: number, periodInterval: number, includeLatestBeforeStart?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<BatchGetMarketCandlesticksResponse>;
/**
* Endpoint for getting data about a specific market by its ticker. A market represents a specific binary outcome within an event that users can trade on (e.g., \"Will candidate X win?\"). Markets have yes/no positions, current prices, volume, and settlement rules.
* @summary Get Market
* @param {string} ticker Market ticker
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarket(ticker: string, options?: RawAxiosRequestConfig): AxiosPromise<GetMarketResponse>;
/**
* Time period length of each candlestick in minutes. Valid values: 1 (1 minute), 60 (1 hour), 1440 (1 day). Candlesticks for markets that settled before the historical cutoff are only available via `GET /historical/markets/{ticker}/candlesticks`. See [Historical Data](https://kalshi.com/docs/getting_started/historical_data) for details.
* @summary Get Market Candlesticks
* @param {string} seriesTicker Series ticker - the series that contains the target market
* @param {string} ticker Market ticker - unique identifier for the specific market
* @param {number} startTs Start timestamp (Unix timestamp). Candlesticks will include those ending on or after this time.
* @param {number} endTs End timestamp (Unix timestamp). Candlesticks will include those ending on or before this time.
* @param {GetMarketCandlesticksPeriodIntervalEnum} periodInterval Time period length of each candlestick in minutes. Valid values are 1 (1 minute), 60 (1 hour), or 1440 (1 day).
* @param {boolean} [includeLatestBeforeStart] If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by: 1. Finding the most recent real candlestick before start_ts 2. Projecting it forward to the first period boundary (calculated as the next period interval after start_ts) 3. Setting all OHLC prices to null, and `previous_price` to the close price from the real candlestick
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketCandlesticks(seriesTicker: string, ticker: string, startTs: number, endTs: number, periodInterval: GetMarketCandlesticksPeriodIntervalEnum, includeLatestBeforeStart?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<GetMarketCandlesticksResponse>;
/**
* Endpoint for getting the current order book for a specific market. The order book shows all active bid orders for both yes and no sides of a binary market. It returns yes bids and no bids only (no asks are returned). This is because in binary markets, a bid for yes at price X is equivalent to an ask for no at price (100-X). For example, a yes bid at 7¢ is the same as a no ask at 93¢, with identical contract sizes. Each side shows price levels with their corresponding quantities and order counts, organized from best to worst prices.
* @summary Get Market Orderbook
* @param {string} ticker Market ticker
* @param {number} [depth] Depth of the orderbook to retrieve (0 or negative means all levels, 1-100 for specific depth)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketOrderbook(ticker: string, depth?: number, options?: RawAxiosRequestConfig): AxiosPromise<GetMarketOrderbookResponse>;
/**
* Endpoint for getting the current order books for multiple markets in a single request. The order book shows all active bid orders for both yes and no sides of a binary market. It returns yes bids and no bids only (no asks are returned). This is because in binary markets, a bid for yes at price X is equivalent to an ask for no at price (100-X). For example, a yes bid at 7¢ is the same as a no ask at 93¢, with identical contract sizes. Each side shows price levels with their corresponding quantities and order counts, organized from best to worst prices. Returns one orderbook per requested market ticker.
* @summary Get Multiple Market Orderbooks
* @param {Array<string>} tickers List of market tickers to fetch orderbooks for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketOrderbooks(tickers: Array<string>, options?: RawAxiosRequestConfig): AxiosPromise<GetMarketOrderbooksResponse>;
/**
* Filter by market status. Possible values: `unopened`, `open`, `closed`, `settled`. Leave empty to return markets with any status. - Only one `status` filter may be supplied at a time. - Timestamp filters will be mutually exclusive from other timestamp filters and certain status filters. | Compatible Timestamp Filters | Additional Status Filters| Extra Notes | |------------------------------|--------------------------|-------------| | min_created_ts, max_created_ts | `unopened`, `open`, *empty* | | | min_close_ts, max_close_ts | `closed`, *empty* | | | min_settled_ts, max_settled_ts | `settled`, *empty* | | | min_updated_ts | *empty* | Incompatible with all filters besides `mve_filter=exclude` | Markets that settled before the historical cutoff are only available via `GET /historical/markets`. See [Historical Data](https://kalshi.com/docs/getting_started/historical_data) for details.
* @summary Get Markets
* @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 1000.
* @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
* @param {string} [eventTicker] Event ticker to filter by. Only a single event ticker is supported.
* @param {string} [seriesTicker] Filter by series ticker
* @param {number} [minCreatedTs] Filter items that created after this Unix timestamp
* @param {number} [maxCreatedTs] Filter items that created before this Unix timestamp
* @param {number} [minUpdatedTs] Return markets with metadata updated later than this Unix timestamp. Tracks non-trading changes only. Incompatible with any other filters.
* @param {number} [maxCloseTs] Filter items that close before this Unix timestamp
* @param {number} [minCloseTs] Filter items that close after this Unix timestamp
* @param {number} [minSettledTs] Filter items that settled after this Unix timestamp
* @param {number} [maxSettledTs] Filter items that settled before this Unix timestamp
* @param {GetMarketsStatusEnum} [status] Filter by market status. Leave empty to return markets with any status.
* @param {string} [tickers] Filter by specific market tickers. Comma-separated list of market tickers to retrieve.
* @param {GetMarketsMveFilterEnum} [mveFilter] Filter by multivariate events (combos). \'only\' returns only multivariate events, \'exclude\' excludes multivariate events.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarkets(limit?: number, cursor?: string, eventTicker?: string, seriesTicker?: string, minCreatedTs?: number, maxCreatedTs?: number, minUpdatedTs?: number, maxCloseTs?: number, minCloseTs?: number, minSettledTs?: number, maxSettledTs?: number, status?: GetMarketsStatusEnum, tickers?: string, mveFilter?: GetMarketsMveFilterEnum, options?: RawAxiosRequestConfig): AxiosPromise<GetMarketsResponse>;
/**
* Endpoint for getting data about a specific series by its ticker. A series represents a template for recurring events that follow the same format and rules (e.g., \"Monthly Jobs Report\", \"Weekly Initial Jobless Claims\", \"Daily Weather in NYC\"). Series define the structure, settlement sources, and metadata that will be applied to each recurring event instance within that series.
* @summary Get Series
* @param {string} seriesTicker The ticker of the series to retrieve
* @param {boolean} [includeVolume] If true, includes the total volume traded across all events in this series.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSeries(seriesTicker: string, includeVolume?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<GetSeriesResponse>;
/**
* Endpoint for getting data about multiple series with specified filters. A series represents a template for recurring events that follow the same format and rules (e.g., \"Monthly Jobs Report\", \"Weekly Initial Jobless Claims\", \"Daily Weather in NYC\"). This endpoint allows you to browse and discover available series templates by category.
* @summary Get Series List
* @param {string} [category]
* @param {string} [tags]
* @param {boolean} [includeProductMetadata]
* @param {boolean} [includeVolume] If true, includes the total volume traded across all events in each series.
* @param {number} [minUpdatedTs] Filter series with metadata updated after this Unix timestamp (in seconds). Use this to efficiently poll for changes.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSeriesList(category?: string, tags?: string, includeProductMetadata?: boolean, includeVolume?: boolean, minUpdatedTs?: number, options?: RawAxiosRequestConfig): AxiosPromise<GetSeriesListResponse>;
/**
* Endpoint for getting all trades for all markets. A trade represents a completed transaction between two users on a specific market. Each trade includes the market ticker, price, quantity, and timestamp information. This endpoint returns a paginated response. Use the \'limit\' parameter to control page size (1-1000, defaults to 100). The response includes a \'cursor\' field - pass this value in the \'cursor\' parameter of your next request to get the next page. An empty cursor indicates no more pages are available.
* @summary Get Trades
* @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 1000.
* @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
* @param {string} [ticker] Filter by market ticker
* @param {number} [minTs] Filter items after this Unix timestamp
* @param {number} [maxTs] Filter items before this Unix timestamp
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getTrades(limit?: number, cursor?: string, ticker?: string, minTs?: number, maxTs?: number, options?: RawAxiosRequestConfig): AxiosPromise<GetTradesResponse>;
};
/**
* MarketApi - object-oriented interface
*/
export declare class MarketApi extends BaseAPI {
/**
* Endpoint for retrieving candlestick data for multiple markets. - Accepts up to 100 market tickers per request - Returns up to 10,000 candlesticks total across all markets - Returns candlesticks grouped by market_id - Optionally includes a synthetic initial candlestick for price continuity (see `include_latest_before_start` parameter)
* @summary Batch Get Market Candlesticks
* @param {string} marketTickers Comma-separated list of market tickers (maximum 100)
* @param {number} startTs Start timestamp in Unix seconds
* @param {number} endTs End timestamp in Unix seconds
* @param {number} periodInterval Candlestick period interval in minutes
* @param {boolean} [includeLatestBeforeStart] If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by: 1. Finding the most recent real candlestick before start_ts 2. Projecting it forward to the first period boundary (calculated as the next period interval after start_ts) 3. Setting all OHLC prices to null, and `previous_price` to the close price from the real candlestick
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
batchGetMarketCandlesticks(marketTickers: string, startTs: number, endTs: number, periodInterval: number, includeLatestBeforeStart?: boolean, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<BatchGetMarketCandlesticksResponse, any, {}>>;
/**
* Endpoint for getting data about a specific market by its ticker. A market represents a specific binary outcome within an event that users can trade on (e.g., \"Will candidate X win?\"). Markets have yes/no positions, current prices, volume, and settlement rules.
* @summary Get Market
* @param {string} ticker Market ticker
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarket(ticker: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetMarketResponse, any, {}>>;
/**
* Time period length of each candlestick in minutes. Valid values: 1 (1 minute), 60 (1 hour), 1440 (1 day). Candlesticks for markets that settled before the historical cutoff are only available via `GET /historical/markets/{ticker}/candlesticks`. See [Historical Data](https://kalshi.com/docs/getting_started/historical_data) for details.
* @summary Get Market Candlesticks
* @param {string} seriesTicker Series ticker - the series that contains the target market
* @param {string} ticker Market ticker - unique identifier for the specific market
* @param {number} startTs Start timestamp (Unix timestamp). Candlesticks will include those ending on or after this time.
* @param {number} endTs End timestamp (Unix timestamp). Candlesticks will include those ending on or before this time.
* @param {GetMarketCandlesticksPeriodIntervalEnum} periodInterval Time period length of each candlestick in minutes. Valid values are 1 (1 minute), 60 (1 hour), or 1440 (1 day).
* @param {boolean} [includeLatestBeforeStart] If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by: 1. Finding the most recent real candlestick before start_ts 2. Projecting it forward to the first period boundary (calculated as the next period interval after start_ts) 3. Setting all OHLC prices to null, and `previous_price` to the close price from the real candlestick
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketCandlesticks(seriesTicker: string, ticker: string, startTs: number, endTs: number, periodInterval: GetMarketCandlesticksPeriodIntervalEnum, includeLatestBeforeStart?: boolean, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetMarketCandlesticksResponse, any, {}>>;
/**
* Endpoint for getting the current order book for a specific market. The order book shows all active bid orders for both yes and no sides of a binary market. It returns yes bids and no bids only (no asks are returned). This is because in binary markets, a bid for yes at price X is equivalent to an ask for no at price (100-X). For example, a yes bid at 7¢ is the same as a no ask at 93¢, with identical contract sizes. Each side shows price levels with their corresponding quantities and order counts, organized from best to worst prices.
* @summary Get Market Orderbook
* @param {string} ticker Market ticker
* @param {number} [depth] Depth of the orderbook to retrieve (0 or negative means all levels, 1-100 for specific depth)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketOrderbook(ticker: string, depth?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetMarketOrderbookResponse, any, {}>>;
/**
* Endpoint for getting the current order books for multiple markets in a single request. The order book shows all active bid orders for both yes and no sides of a binary market. It returns yes bids and no bids only (no asks are returned). This is because in binary markets, a bid for yes at price X is equivalent to an ask for no at price (100-X). For example, a yes bid at 7¢ is the same as a no ask at 93¢, with identical contract sizes. Each side shows price levels with their corresponding quantities and order counts, organized from best to worst prices. Returns one orderbook per requested market ticker.
* @summary Get Multiple Market Orderbooks
* @param {Array<string>} tickers List of market tickers to fetch orderbooks for
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarketOrderbooks(tickers: Array<string>, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetMarketOrderbooksResponse, any, {}>>;
/**
* Filter by market status. Possible values: `unopened`, `open`, `closed`, `settled`. Leave empty to return markets with any status. - Only one `status` filter may be supplied at a time. - Timestamp filters will be mutually exclusive from other timestamp filters and certain status filters. | Compatible Timestamp Filters | Additional Status Filters| Extra Notes | |------------------------------|--------------------------|-------------| | min_created_ts, max_created_ts | `unopened`, `open`, *empty* | | | min_close_ts, max_close_ts | `closed`, *empty* | | | min_settled_ts, max_settled_ts | `settled`, *empty* | | | min_updated_ts | *empty* | Incompatible with all filters besides `mve_filter=exclude` | Markets that settled before the historical cutoff are only available via `GET /historical/markets`. See [Historical Data](https://kalshi.com/docs/getting_started/historical_data) for details.
* @summary Get Markets
* @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 1000.
* @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
* @param {string} [eventTicker] Event ticker to filter by. Only a single event ticker is supported.
* @param {string} [seriesTicker] Filter by series ticker
* @param {number} [minCreatedTs] Filter items that created after this Unix timestamp
* @param {number} [maxCreatedTs] Filter items that created before this Unix timestamp
* @param {number} [minUpdatedTs] Return markets with metadata updated later than this Unix timestamp. Tracks non-trading changes only. Incompatible with any other filters.
* @param {number} [maxCloseTs] Filter items that close before this Unix timestamp
* @param {number} [minCloseTs] Filter items that close after this Unix timestamp
* @param {number} [minSettledTs] Filter items that settled after this Unix timestamp
* @param {number} [maxSettledTs] Filter items that settled before this Unix timestamp
* @param {GetMarketsStatusEnum} [status] Filter by market status. Leave empty to return markets with any status.
* @param {string} [tickers] Filter by specific market tickers. Comma-separated list of market tickers to retrieve.
* @param {GetMarketsMveFilterEnum} [mveFilter] Filter by multivariate events (combos). \'only\' returns only multivariate events, \'exclude\' excludes multivariate events.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMarkets(limit?: number, cursor?: string, eventTicker?: string, seriesTicker?: string, minCreatedTs?: number, maxCreatedTs?: number, minUpdatedTs?: number, maxCloseTs?: number, minCloseTs?: number, minSettledTs?: number, maxSettledTs?: number, status?: GetMarketsStatusEnum, tickers?: string, mveFilter?: GetMarketsMveFilterEnum, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetMarketsResponse, any, {}>>;
/**
* Endpoint for getting data about a specific series by its ticker. A series represents a template for recurring events that follow the same format and rules (e.g., \"Monthly Jobs Report\", \"Weekly Initial Jobless Claims\", \"Daily Weather in NYC\"). Series define the structure, settlement sources, and metadata that will be applied to each recurring event instance within that series.
* @summary Get Series
* @param {string} seriesTicker The ticker of the series to retrieve
* @param {boolean} [includeVolume] If true, includes the total volume traded across all events in this series.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSeries(seriesTicker: string, includeVolume?: boolean, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetSeriesResponse, any, {}>>;
/**
* Endpoint for getting data about multiple series with specified filters. A series represents a template for recurring events that follow the same format and rules (e.g., \"Monthly Jobs Report\", \"Weekly Initial Jobless Claims\", \"Daily Weather in NYC\"). This endpoint allows you to browse and discover available series templates by category.
* @summary Get Series List
* @param {string} [category]
* @param {string} [tags]
* @param {boolean} [includeProductMetadata]
* @param {boolean} [includeVolume] If true, includes the total volume traded across all events in each series.
* @param {number} [minUpdatedTs] Filter series with metadata updated after this Unix timestamp (in seconds). Use this to efficiently poll for changes.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getSeriesList(category?: string, tags?: string, includeProductMetadata?: boolean, includeVolume?: boolean, minUpdatedTs?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetSeriesListResponse, any, {}>>;
/**
* Endpoint for getting all trades for all markets. A trade represents a completed transaction between two users on a specific market. Each trade includes the market ticker, price, quantity, and timestamp information. This endpoint returns a paginated response. Use the \'limit\' parameter to control page size (1-1000, defaults to 100). The response includes a \'cursor\' field - pass this value in the \'cursor\' parameter of your next request to get the next page. An empty cursor indicates no more pages are available.
* @summary Get Trades
* @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 1000.
* @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
* @param {string} [ticker] Filter by market t