/** * Kalshi Trade API Manual Endpoints * Manually defined OpenAPI spec for endpoints being migrated to spec-first approach * * The version of the OpenAPI document: 3.36.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 { AmendOrderV2Request } from '../models'; import type { AmendOrderV2Response } from '../models'; import type { BatchCancelOrdersV2Request } from '../models'; import type { BatchCancelOrdersV2Response } from '../models'; import type { BatchCreateOrdersV2Request } from '../models'; import type { BatchCreateOrdersV2Response } from '../models'; import type { CancelOrderV2Response } from '../models'; import type { CreateOrderV2Request } from '../models'; import type { CreateOrderV2Response } from '../models'; import type { DecreaseOrderV2Request } from '../models'; import type { DecreaseOrderV2Response } from '../models'; import type { GetOrderQueuePositionResponse } from '../models'; import type { GetOrderQueuePositionsResponse } from '../models'; import type { GetOrderResponse } from '../models'; import type { GetOrdersResponse } from '../models'; /** * OrdersApi - axios parameter creator */ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration) => { /** * Endpoint for amending the price, max fillable count, and/or expiration time of an existing event-market order. The request `count` is the updated total/max fillable count, equal to already filled count plus desired resting remaining count. This behavior matches the v1 amend endpoints; only the request/response shape differs. * @summary Amend Order (V2) * @param {string} orderId Order ID * @param {AmendOrderV2Request} amendOrderV2Request * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {*} [options] Override http request option. * @throws {RequiredError} */ amendOrderV2: (orderId: string, amendOrderV2Request: AmendOrderV2Request, subaccount?: number, options?: RawAxiosRequestConfig) => Promise; /** * Endpoint for cancelling a batch of event-market orders using the V2 response shape. To auto-route a cancellation, provide its `market_ticker` and omit `exchange_index` or set it to `-1`. The maximum batch size scales with your tier\'s write budget — see [Rate Limits and Tiers](/getting_started/rate_limits). * @summary Batch Cancel Orders (V2) * @param {BatchCancelOrdersV2Request} batchCancelOrdersV2Request * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCancelOrdersV2: (batchCancelOrdersV2Request: BatchCancelOrdersV2Request, options?: RawAxiosRequestConfig) => Promise; /** * Endpoint for submitting a batch of event-market orders using the V2 request/response shape. The maximum batch size scales with your tier\'s write budget — see [Rate Limits and Tiers](/getting_started/rate_limits). * @summary Batch Create Orders (V2) * @param {BatchCreateOrdersV2Request} batchCreateOrdersV2Request * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCreateOrdersV2: (batchCreateOrdersV2Request: BatchCreateOrdersV2Request, options?: RawAxiosRequestConfig) => Promise; /** * Cancels all resting event-market orders for the authenticated Direct member across every exchange shard. If `subaccount` is omitted, matching orders may come from any subaccount. If it is provided, only orders for that subaccount are eligible. Newly placed orders may also be cancelled during the minute after the request. * @summary Cancel All Orders * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelAllOrders: (subaccount?: number, options?: RawAxiosRequestConfig) => Promise; /** * Endpoint for cancelling event-market orders using the V2 response shape. To auto-route the cancellation, provide `market_ticker` and omit `exchange_index` or set it to `-1`. Returns `{order_id, client_order_id, reduced_by}` rather than a full order object. * @summary Cancel Order (V2) * @param {string} orderId Order ID * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {number} [exchangeIndex] Exchange shard index. If omitted, auto-routes when market_ticker is provided; otherwise defaults to 0. Use -1 to require auto-routing. The market_ticker parameter is required for auto-routing. * @param {string} [marketTicker] Market ticker. Required for auto-routing when exchange_index is omitted or -1. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelOrderV2: (orderId: string, subaccount?: number, exchangeIndex?: number, marketTicker?: string, options?: RawAxiosRequestConfig) => Promise; /** * Endpoint for submitting event-market orders using the V2 request/response shape (single-book `bid`/`ask` side and fixed-point dollar prices). The legacy `/portfolio/orders` endpoint will be deprecated no earlier than May 6, 2026 — clients should migrate to this path. * @summary Create Order (V2) * @param {CreateOrderV2Request} createOrderV2Request * @param {*} [options] Override http request option. * @throws {RequiredError} */ createOrderV2: (createOrderV2Request: CreateOrderV2Request, options?: RawAxiosRequestConfig) => Promise; /** * Endpoint for decreasing the remaining count of an existing event-market order using the V2 request/response shape. Exactly one of `reduce_by` or `reduce_to` must be provided. * @summary Decrease Order (V2) * @param {string} orderId Order ID * @param {DecreaseOrderV2Request} decreaseOrderV2Request * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {*} [options] Override http request option. * @throws {RequiredError} */ decreaseOrderV2: (orderId: string, decreaseOrderV2Request: DecreaseOrderV2Request, subaccount?: number, options?: RawAxiosRequestConfig) => Promise; /** * Endpoint for getting a single order. * @summary Get Order * @param {string} orderId Order ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrder: (orderId: string, options?: RawAxiosRequestConfig) => Promise; /** * Endpoint for getting an order\'s queue position in the order book. This represents the amount of orders that need to be matched before this order receives a partial or full match. Queue position is determined using a price-time priority. * @summary Get Order Queue Position * @param {string} orderId Order ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrderQueuePosition: (orderId: string, options?: RawAxiosRequestConfig) => Promise; /** * Endpoint for getting queue positions for all resting orders. Queue position represents the number of contracts that need to be matched before an order receives a partial or full match, determined using price-time priority. * @summary Get Queue Positions for Orders * @param {string} [marketTickers] Comma-separated list of market tickers to filter by * @param {string} [eventTicker] Event ticker to filter by * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrderQueuePositions: (marketTickers?: string, eventTicker?: string, subaccount?: number, options?: RawAxiosRequestConfig) => Promise; /** * Restricts the response to orders that have a certain status: resting, canceled, or executed. Orders that have been canceled or fully executed before the historical cutoff are only available via `GET /historical/orders`. Resting orders will always be available through this endpoint. See [Historical Data](https://docs.kalshi.com/getting_started/historical_data) for details. * @summary Get Orders * @param {string} [ticker] Filter by market ticker * @param {string} [eventTicker] Event tickers to filter by, as a comma-separated list (maximum 100). Events with no markets return no orders. * @param {number} [minTs] Filter items after this Unix timestamp * @param {number} [maxTs] Filter items before this Unix timestamp * @param {string} [status] Filter by status. Possible values depend on the endpoint. * @param {number} [limit] Number of results per page. Defaults to 100. * @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 {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts. * @param {number} [exchangeIndex] Filter results by exchange shard. Omit to return results from all exchange shards. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrders: (ticker?: string, eventTicker?: string, minTs?: number, maxTs?: number, status?: string, limit?: number, cursor?: string, subaccount?: number, exchangeIndex?: number, options?: RawAxiosRequestConfig) => Promise; }; /** * OrdersApi - functional programming interface */ export declare const OrdersApiFp: (configuration?: Configuration) => { /** * Endpoint for amending the price, max fillable count, and/or expiration time of an existing event-market order. The request `count` is the updated total/max fillable count, equal to already filled count plus desired resting remaining count. This behavior matches the v1 amend endpoints; only the request/response shape differs. * @summary Amend Order (V2) * @param {string} orderId Order ID * @param {AmendOrderV2Request} amendOrderV2Request * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {*} [options] Override http request option. * @throws {RequiredError} */ amendOrderV2(orderId: string, amendOrderV2Request: AmendOrderV2Request, subaccount?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Endpoint for cancelling a batch of event-market orders using the V2 response shape. To auto-route a cancellation, provide its `market_ticker` and omit `exchange_index` or set it to `-1`. The maximum batch size scales with your tier\'s write budget — see [Rate Limits and Tiers](/getting_started/rate_limits). * @summary Batch Cancel Orders (V2) * @param {BatchCancelOrdersV2Request} batchCancelOrdersV2Request * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCancelOrdersV2(batchCancelOrdersV2Request: BatchCancelOrdersV2Request, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Endpoint for submitting a batch of event-market orders using the V2 request/response shape. The maximum batch size scales with your tier\'s write budget — see [Rate Limits and Tiers](/getting_started/rate_limits). * @summary Batch Create Orders (V2) * @param {BatchCreateOrdersV2Request} batchCreateOrdersV2Request * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCreateOrdersV2(batchCreateOrdersV2Request: BatchCreateOrdersV2Request, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Cancels all resting event-market orders for the authenticated Direct member across every exchange shard. If `subaccount` is omitted, matching orders may come from any subaccount. If it is provided, only orders for that subaccount are eligible. Newly placed orders may also be cancelled during the minute after the request. * @summary Cancel All Orders * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelAllOrders(subaccount?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Endpoint for cancelling event-market orders using the V2 response shape. To auto-route the cancellation, provide `market_ticker` and omit `exchange_index` or set it to `-1`. Returns `{order_id, client_order_id, reduced_by}` rather than a full order object. * @summary Cancel Order (V2) * @param {string} orderId Order ID * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {number} [exchangeIndex] Exchange shard index. If omitted, auto-routes when market_ticker is provided; otherwise defaults to 0. Use -1 to require auto-routing. The market_ticker parameter is required for auto-routing. * @param {string} [marketTicker] Market ticker. Required for auto-routing when exchange_index is omitted or -1. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelOrderV2(orderId: string, subaccount?: number, exchangeIndex?: number, marketTicker?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Endpoint for submitting event-market orders using the V2 request/response shape (single-book `bid`/`ask` side and fixed-point dollar prices). The legacy `/portfolio/orders` endpoint will be deprecated no earlier than May 6, 2026 — clients should migrate to this path. * @summary Create Order (V2) * @param {CreateOrderV2Request} createOrderV2Request * @param {*} [options] Override http request option. * @throws {RequiredError} */ createOrderV2(createOrderV2Request: CreateOrderV2Request, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Endpoint for decreasing the remaining count of an existing event-market order using the V2 request/response shape. Exactly one of `reduce_by` or `reduce_to` must be provided. * @summary Decrease Order (V2) * @param {string} orderId Order ID * @param {DecreaseOrderV2Request} decreaseOrderV2Request * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {*} [options] Override http request option. * @throws {RequiredError} */ decreaseOrderV2(orderId: string, decreaseOrderV2Request: DecreaseOrderV2Request, subaccount?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Endpoint for getting a single order. * @summary Get Order * @param {string} orderId Order ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrder(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Endpoint for getting an order\'s queue position in the order book. This represents the amount of orders that need to be matched before this order receives a partial or full match. Queue position is determined using a price-time priority. * @summary Get Order Queue Position * @param {string} orderId Order ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrderQueuePosition(orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Endpoint for getting queue positions for all resting orders. Queue position represents the number of contracts that need to be matched before an order receives a partial or full match, determined using price-time priority. * @summary Get Queue Positions for Orders * @param {string} [marketTickers] Comma-separated list of market tickers to filter by * @param {string} [eventTicker] Event ticker to filter by * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrderQueuePositions(marketTickers?: string, eventTicker?: string, subaccount?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Restricts the response to orders that have a certain status: resting, canceled, or executed. Orders that have been canceled or fully executed before the historical cutoff are only available via `GET /historical/orders`. Resting orders will always be available through this endpoint. See [Historical Data](https://docs.kalshi.com/getting_started/historical_data) for details. * @summary Get Orders * @param {string} [ticker] Filter by market ticker * @param {string} [eventTicker] Event tickers to filter by, as a comma-separated list (maximum 100). Events with no markets return no orders. * @param {number} [minTs] Filter items after this Unix timestamp * @param {number} [maxTs] Filter items before this Unix timestamp * @param {string} [status] Filter by status. Possible values depend on the endpoint. * @param {number} [limit] Number of results per page. Defaults to 100. * @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 {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts. * @param {number} [exchangeIndex] Filter results by exchange shard. Omit to return results from all exchange shards. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrders(ticker?: string, eventTicker?: string, minTs?: number, maxTs?: number, status?: string, limit?: number, cursor?: string, subaccount?: number, exchangeIndex?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * OrdersApi - factory interface */ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Endpoint for amending the price, max fillable count, and/or expiration time of an existing event-market order. The request `count` is the updated total/max fillable count, equal to already filled count plus desired resting remaining count. This behavior matches the v1 amend endpoints; only the request/response shape differs. * @summary Amend Order (V2) * @param {string} orderId Order ID * @param {AmendOrderV2Request} amendOrderV2Request * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {*} [options] Override http request option. * @throws {RequiredError} */ amendOrderV2(orderId: string, amendOrderV2Request: AmendOrderV2Request, subaccount?: number, options?: RawAxiosRequestConfig): AxiosPromise; /** * Endpoint for cancelling a batch of event-market orders using the V2 response shape. To auto-route a cancellation, provide its `market_ticker` and omit `exchange_index` or set it to `-1`. The maximum batch size scales with your tier\'s write budget — see [Rate Limits and Tiers](/getting_started/rate_limits). * @summary Batch Cancel Orders (V2) * @param {BatchCancelOrdersV2Request} batchCancelOrdersV2Request * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCancelOrdersV2(batchCancelOrdersV2Request: BatchCancelOrdersV2Request, options?: RawAxiosRequestConfig): AxiosPromise; /** * Endpoint for submitting a batch of event-market orders using the V2 request/response shape. The maximum batch size scales with your tier\'s write budget — see [Rate Limits and Tiers](/getting_started/rate_limits). * @summary Batch Create Orders (V2) * @param {BatchCreateOrdersV2Request} batchCreateOrdersV2Request * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCreateOrdersV2(batchCreateOrdersV2Request: BatchCreateOrdersV2Request, options?: RawAxiosRequestConfig): AxiosPromise; /** * Cancels all resting event-market orders for the authenticated Direct member across every exchange shard. If `subaccount` is omitted, matching orders may come from any subaccount. If it is provided, only orders for that subaccount are eligible. Newly placed orders may also be cancelled during the minute after the request. * @summary Cancel All Orders * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelAllOrders(subaccount?: number, options?: RawAxiosRequestConfig): AxiosPromise; /** * Endpoint for cancelling event-market orders using the V2 response shape. To auto-route the cancellation, provide `market_ticker` and omit `exchange_index` or set it to `-1`. Returns `{order_id, client_order_id, reduced_by}` rather than a full order object. * @summary Cancel Order (V2) * @param {string} orderId Order ID * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {number} [exchangeIndex] Exchange shard index. If omitted, auto-routes when market_ticker is provided; otherwise defaults to 0. Use -1 to require auto-routing. The market_ticker parameter is required for auto-routing. * @param {string} [marketTicker] Market ticker. Required for auto-routing when exchange_index is omitted or -1. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelOrderV2(orderId: string, subaccount?: number, exchangeIndex?: number, marketTicker?: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Endpoint for submitting event-market orders using the V2 request/response shape (single-book `bid`/`ask` side and fixed-point dollar prices). The legacy `/portfolio/orders` endpoint will be deprecated no earlier than May 6, 2026 — clients should migrate to this path. * @summary Create Order (V2) * @param {CreateOrderV2Request} createOrderV2Request * @param {*} [options] Override http request option. * @throws {RequiredError} */ createOrderV2(createOrderV2Request: CreateOrderV2Request, options?: RawAxiosRequestConfig): AxiosPromise; /** * Endpoint for decreasing the remaining count of an existing event-market order using the V2 request/response shape. Exactly one of `reduce_by` or `reduce_to` must be provided. * @summary Decrease Order (V2) * @param {string} orderId Order ID * @param {DecreaseOrderV2Request} decreaseOrderV2Request * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {*} [options] Override http request option. * @throws {RequiredError} */ decreaseOrderV2(orderId: string, decreaseOrderV2Request: DecreaseOrderV2Request, subaccount?: number, options?: RawAxiosRequestConfig): AxiosPromise; /** * Endpoint for getting a single order. * @summary Get Order * @param {string} orderId Order ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrder(orderId: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Endpoint for getting an order\'s queue position in the order book. This represents the amount of orders that need to be matched before this order receives a partial or full match. Queue position is determined using a price-time priority. * @summary Get Order Queue Position * @param {string} orderId Order ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrderQueuePosition(orderId: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Endpoint for getting queue positions for all resting orders. Queue position represents the number of contracts that need to be matched before an order receives a partial or full match, determined using price-time priority. * @summary Get Queue Positions for Orders * @param {string} [marketTickers] Comma-separated list of market tickers to filter by * @param {string} [eventTicker] Event ticker to filter by * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrderQueuePositions(marketTickers?: string, eventTicker?: string, subaccount?: number, options?: RawAxiosRequestConfig): AxiosPromise; /** * Restricts the response to orders that have a certain status: resting, canceled, or executed. Orders that have been canceled or fully executed before the historical cutoff are only available via `GET /historical/orders`. Resting orders will always be available through this endpoint. See [Historical Data](https://docs.kalshi.com/getting_started/historical_data) for details. * @summary Get Orders * @param {string} [ticker] Filter by market ticker * @param {string} [eventTicker] Event tickers to filter by, as a comma-separated list (maximum 100). Events with no markets return no orders. * @param {number} [minTs] Filter items after this Unix timestamp * @param {number} [maxTs] Filter items before this Unix timestamp * @param {string} [status] Filter by status. Possible values depend on the endpoint. * @param {number} [limit] Number of results per page. Defaults to 100. * @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 {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts. * @param {number} [exchangeIndex] Filter results by exchange shard. Omit to return results from all exchange shards. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrders(ticker?: string, eventTicker?: string, minTs?: number, maxTs?: number, status?: string, limit?: number, cursor?: string, subaccount?: number, exchangeIndex?: number, options?: RawAxiosRequestConfig): AxiosPromise; }; /** * OrdersApi - object-oriented interface */ export declare class OrdersApi extends BaseAPI { /** * Endpoint for amending the price, max fillable count, and/or expiration time of an existing event-market order. The request `count` is the updated total/max fillable count, equal to already filled count plus desired resting remaining count. This behavior matches the v1 amend endpoints; only the request/response shape differs. * @summary Amend Order (V2) * @param {string} orderId Order ID * @param {AmendOrderV2Request} amendOrderV2Request * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {*} [options] Override http request option. * @throws {RequiredError} */ amendOrderV2(orderId: string, amendOrderV2Request: AmendOrderV2Request, subaccount?: number, options?: RawAxiosRequestConfig): Promise>; /** * Endpoint for cancelling a batch of event-market orders using the V2 response shape. To auto-route a cancellation, provide its `market_ticker` and omit `exchange_index` or set it to `-1`. The maximum batch size scales with your tier\'s write budget — see [Rate Limits and Tiers](/getting_started/rate_limits). * @summary Batch Cancel Orders (V2) * @param {BatchCancelOrdersV2Request} batchCancelOrdersV2Request * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCancelOrdersV2(batchCancelOrdersV2Request: BatchCancelOrdersV2Request, options?: RawAxiosRequestConfig): Promise>; /** * Endpoint for submitting a batch of event-market orders using the V2 request/response shape. The maximum batch size scales with your tier\'s write budget — see [Rate Limits and Tiers](/getting_started/rate_limits). * @summary Batch Create Orders (V2) * @param {BatchCreateOrdersV2Request} batchCreateOrdersV2Request * @param {*} [options] Override http request option. * @throws {RequiredError} */ batchCreateOrdersV2(batchCreateOrdersV2Request: BatchCreateOrdersV2Request, options?: RawAxiosRequestConfig): Promise>; /** * Cancels all resting event-market orders for the authenticated Direct member across every exchange shard. If `subaccount` is omitted, matching orders may come from any subaccount. If it is provided, only orders for that subaccount are eligible. Newly placed orders may also be cancelled during the minute after the request. * @summary Cancel All Orders * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelAllOrders(subaccount?: number, options?: RawAxiosRequestConfig): Promise>; /** * Endpoint for cancelling event-market orders using the V2 response shape. To auto-route the cancellation, provide `market_ticker` and omit `exchange_index` or set it to `-1`. Returns `{order_id, client_order_id, reduced_by}` rather than a full order object. * @summary Cancel Order (V2) * @param {string} orderId Order ID * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {number} [exchangeIndex] Exchange shard index. If omitted, auto-routes when market_ticker is provided; otherwise defaults to 0. Use -1 to require auto-routing. The market_ticker parameter is required for auto-routing. * @param {string} [marketTicker] Market ticker. Required for auto-routing when exchange_index is omitted or -1. * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelOrderV2(orderId: string, subaccount?: number, exchangeIndex?: number, marketTicker?: string, options?: RawAxiosRequestConfig): Promise>; /** * Endpoint for submitting event-market orders using the V2 request/response shape (single-book `bid`/`ask` side and fixed-point dollar prices). The legacy `/portfolio/orders` endpoint will be deprecated no earlier than May 6, 2026 — clients should migrate to this path. * @summary Create Order (V2) * @param {CreateOrderV2Request} createOrderV2Request * @param {*} [options] Override http request option. * @throws {RequiredError} */ createOrderV2(createOrderV2Request: CreateOrderV2Request, options?: RawAxiosRequestConfig): Promise>; /** * Endpoint for decreasing the remaining count of an existing event-market order using the V2 request/response shape. Exactly one of `reduce_by` or `reduce_to` must be provided. * @summary Decrease Order (V2) * @param {string} orderId Order ID * @param {DecreaseOrderV2Request} decreaseOrderV2Request * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {*} [options] Override http request option. * @throws {RequiredError} */ decreaseOrderV2(orderId: string, decreaseOrderV2Request: DecreaseOrderV2Request, subaccount?: number, options?: RawAxiosRequestConfig): Promise>; /** * Endpoint for getting a single order. * @summary Get Order * @param {string} orderId Order ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrder(orderId: string, options?: RawAxiosRequestConfig): Promise>; /** * Endpoint for getting an order\'s queue position in the order book. This represents the amount of orders that need to be matched before this order receives a partial or full match. Queue position is determined using a price-time priority. * @summary Get Order Queue Position * @param {string} orderId Order ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrderQueuePosition(orderId: string, options?: RawAxiosRequestConfig): Promise>; /** * Endpoint for getting queue positions for all resting orders. Queue position represents the number of contracts that need to be matched before an order receives a partial or full match, determined using price-time priority. * @summary Get Queue Positions for Orders * @param {string} [marketTickers] Comma-separated list of market tickers to filter by * @param {string} [eventTicker] Event ticker to filter by * @param {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrderQueuePositions(marketTickers?: string, eventTicker?: string, subaccount?: number, options?: RawAxiosRequestConfig): Promise>; /** * Restricts the response to orders that have a certain status: resting, canceled, or executed. Orders that have been canceled or fully executed before the historical cutoff are only available via `GET /historical/orders`. Resting orders will always be available through this endpoint. See [Historical Data](https://docs.kalshi.com/getting_started/historical_data) for details. * @summary Get Orders * @param {string} [ticker] Filter by market ticker * @param {string} [eventTicker] Event tickers to filter by, as a comma-separated list (maximum 100). Events with no markets return no orders. * @param {number} [minTs] Filter items after this Unix timestamp * @param {number} [maxTs] Filter items before this Unix timestamp * @param {string} [status] Filter by status. Possible values depend on the endpoint. * @param {number} [limit] Number of results per page. Defaults to 100. * @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 {number} [subaccount] Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts. * @param {number} [exchangeIndex] Filter results by exchange shard. Omit to return results from all exchange shards. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOrders(ticker?: string, eventTicker?: string, minTs?: number, maxTs?: number, status?: string, limit?: number, cursor?: string, subaccount?: number, exchangeIndex?: number, options?: RawAxiosRequestConfig): Promise>; }