/** * 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 { CreateFCMPositionTransferRequest } from '../models'; import type { CreateFCMPositionTransferResponse } from '../models'; import type { CreateFCMSubtraderRequest } from '../models'; import type { CreateFCMSubtraderResponse } from '../models'; import type { GetFCMEventContractDailyCapResponse } from '../models'; import type { GetFCMSubtraderBlockedCategoriesResponse } from '../models'; import type { GetFcmFillsResponse } from '../models'; import type { GetOrdersResponse } from '../models'; import type { GetPositionsResponse } from '../models'; import type { ListFCMSubtradersResponse } from '../models'; import type { UpdateFCMEventContractDailyCapRequest } from '../models'; import type { UpdateFCMSubtraderBlockedCategoriesRequest } from '../models'; import type { UpdateFCMSubtraderBlockedCategoriesResponse } from '../models'; /** * FcmApi - axios parameter creator */ export declare const FcmApiAxiosParamCreator: (configuration?: Configuration) => { /** * Endpoint for FCM members to move a position in one market from one of their subtraders into a subtrader under their FCM\'s error account. **This endpoint must be enabled for your FCM by Kalshi.** Kalshi enables it by configuring the error account that receives transferred positions and gives you that account\'s user id, which prefixes `target_subtrader_id`. Contact Kalshi to enable it; until then, requests return 400. - The destination is always your FCM\'s error account. `target_subtrader_id` picks the subtrader under it, which is created on first use. - Each request moves one market for one source subtrader. To move many positions, send one request per subtrader and market. - The transfer is booked like a trade at `price_centicents`, which is always the YES price, even when moving NO. No fee is charged and no fill is created. For YES, the error account pays the price per contract; for NO, it pays $1 minus the price per contract. The FCM receives the same amount. Use 0 for YES or 10000 for NO to move no cash. These amounts assume the source holds the side being moved and the target subtrader holds no opposite position in that market; otherwise the positions net like a trade and the balance changes differ. - The source\'s current position is not checked. A request for more than the source holds, or with the opposite sign, flips or grows the source\'s position. - Requests are not idempotent. After a timeout or 5xx, check the position before retrying. - The market must be open, neither account may be blocked, and the error account must have enough available balance on the market\'s exchange index to pay for the transfer. Otherwise the request returns 409. **Example: moving YES.** A customer subtrader holds 10 YES contracts. Send `position_centicount` 1000 and `price_centicents` 4500 (YES at 45 cents): - The customer subtrader goes from 10 YES to 0, and the error account subtrader from 0 to 10 YES. - The error account pays 10 x $0.45 = $4.50 and the FCM receives $4.50. - Sending `price_centicents` 0 instead moves the position with no cash. **Example: moving NO.** A customer subtrader holds 5 NO contracts. Send `position_centicount` -500 and `price_centicents` 7000 (YES at 70 cents, so NO at 30 cents): - The customer subtrader goes from 5 NO to 0, and the error account subtrader from 0 to 5 NO. - The error account pays 5 x $0.30 = $1.50 and the FCM receives $1.50. - Sending `price_centicents` 10000 instead moves the position with no cash. Sending 0 makes the error account pay the full $1 per contract ($5.00). * @summary Create FCM Position Transfer * @param {CreateFCMPositionTransferRequest} createFCMPositionTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createFCMPositionTransfer: (createFCMPositionTransferRequest: CreateFCMPositionTransferRequest, options?: RawAxiosRequestConfig) => Promise; /** * Endpoint for FCM members to create a subtrader on the event-contract exchange. The subtrader is registered on every exchange shard that knows the FCM; a shard provisioned later registers it lazily on the subtrader\'s first order there. Re-creating an existing subtrader returns 409. * @summary Create FCM Subtrader * @param {CreateFCMSubtraderRequest} createFCMSubtraderRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createFCMSubtrader: (createFCMSubtraderRequest: CreateFCMSubtraderRequest, options?: RawAxiosRequestConfig) => Promise; /** * Removes the event-contract daily premium cap for an FCM member\'s subtrader. Removal closes the subtrader to new orders on cap-reservation sessions — every subtrader-bound API key — until a cap is set again. It does not stop orders your own unbound sessions submit on the subtrader\'s behalf; to stop the account entirely, block subtrader trading. * @summary Delete FCM Subtrader Event Contract Daily Cap * @param {string} subtraderId The subtrader whose daily cap should be removed. Must belong to the requesting FCM. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteFCMEventContractDailyCap: (subtraderId: string, options?: RawAxiosRequestConfig) => Promise; /** * Returns the event-contract daily premium cap configured for an FCM member\'s subtrader, together with its live utilization. Executed utilization is the net premium deployed by fills today (sells and settlements credit back); resting and pending utilization reserve open and in-flight orders at their full worst-case cost plus fees. Executed utilization resets at midnight New York time on the returned cap date; resting and pending reservations persist for as long as their orders remain open, including across the reset. Returns 404 when the subtrader has no cap configured — in that state every order placed through the subtrader\'s bound API keys is rejected. API keys bound to a single FCM subtrader may also call this endpoint: `subtrader_id` may be omitted and defaults to the key\'s bound subtrader, and if supplied it must equal the bound subtrader or the request is rejected. * @summary Get FCM Subtrader Event Contract Daily Cap * @param {string} [subtraderId] The subtrader whose daily cap should be returned. Must belong to the requesting FCM. Required unless the API key is bound to a subtrader, in which case it defaults to the bound subtrader when omitted and must equal it when supplied. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMEventContractDailyCap: (subtraderId?: string, options?: RawAxiosRequestConfig) => Promise; /** * Returns fills across the authenticated FCM\'s subtraders. Requires FCM member access. * @summary Get FCM Fills * @param {number} [minTs] Filter items after this Unix timestamp * @param {number} [maxTs] Filter items before this Unix timestamp * @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 {*} [options] Override http request option. * @throws {RequiredError} */ getFCMFills: (minTs?: number, maxTs?: number, cursor?: string, options?: RawAxiosRequestConfig) => Promise; /** * Endpoint for FCM members to get orders for their subtraders. This endpoint requires FCM member access level. At least one of `subtrader_id` or `client_order_ids` is required; supplying both returns only the orders matching both filters. API keys bound to a single FCM subtrader may also call this endpoint: `subtrader_id` may be omitted and defaults to the key\'s bound subtrader, and if supplied it must equal the bound subtrader or the request is rejected. * @summary Get FCM Orders * @param {string} [subtraderId] Restricts the response to orders for a specific subtrader (FCM members only). Required unless client_order_ids is supplied. For an API key bound to a subtrader, defaults to the bound subtrader when omitted and must equal it when supplied. * @param {string} [clientOrderIds] Client order IDs to filter by, as a comma-separated list (maximum 100). Only orders created within the last 24 hours are searched, and a min_ts earlier than that is raised to 24 hours ago. Client order IDs are only unique within a subtrader among live and recent orders, so a single ID can match orders across subtraders or across time. Required unless subtrader_id is supplied. * @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} [ticker] Filter by market ticker * @param {number} [minTs] Restricts the response to orders after a timestamp, formatted as a Unix Timestamp * @param {number} [maxTs] Restricts the response to orders before a timestamp, formatted as a Unix Timestamp * @param {GetFCMOrdersStatusEnum} [status] Restricts the response to orders that have a certain status * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100 * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMOrders: (subtraderId?: string, clientOrderIds?: string, cursor?: string, eventTicker?: string, ticker?: string, minTs?: number, maxTs?: number, status?: GetFCMOrdersStatusEnum, limit?: number, options?: RawAxiosRequestConfig) => Promise; /** * Endpoint for FCM members to get market positions filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering positions by subtrader ID. API keys bound to a single FCM subtrader may also call this endpoint: `subtrader_id` may be omitted and defaults to the key\'s bound subtrader, and if supplied it must equal the bound subtrader or the request is rejected. * @summary Get FCM Positions * @param {string} [subtraderId] Restricts the response to positions for a specific subtrader (FCM members only). Required unless the API key is bound to a subtrader, in which case it defaults to the bound subtrader when omitted and must equal it when supplied. * @param {string} [ticker] Ticker of desired positions * @param {string} [eventTicker] Event ticker of desired positions * @param {string} [countFilter] Restricts the positions to those with any of following fields with non-zero values, as a comma separated list * @param {GetFCMPositionsSettlementStatusEnum} [settlementStatus] Settlement status of the markets to return. Defaults to unsettled * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100 * @param {string} [cursor] The Cursor represents a pointer to the next page of records in the pagination * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMPositions: (subtraderId?: string, ticker?: string, eventTicker?: string, countFilter?: string, settlementStatus?: GetFCMPositionsSettlementStatusEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) => Promise; /** * Returns the event categories an FCM member has blocked for one of its subtraders. The subtrader must belong to the requesting FCM. A subtrader with no blocks returns an empty list. * @summary Get FCM Subtrader Blocked Categories * @param {string} subtraderId The subtrader whose blocked categories should be returned. Must belong to the requesting FCM. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMSubtraderBlockedCategories: (subtraderId: string, options?: RawAxiosRequestConfig) => Promise; /** * Lists the authenticated FCM\'s event-contract subtraders, including accounts with no trades. Exchange metadata is asynchronous, so newly created accounts may not appear immediately. Trading block status includes firm-wide and Kalshi restrictions; fcm_trading_blocked identifies the FCM\'s own per-subtrader restriction. * @summary List FCM Subtraders * @param {*} [options] Override http request option. * @throws {RequiredError} */ listFCMSubtraders: (options?: RawAxiosRequestConfig) => Promise; /** * Sets the event-contract daily premium cap for an FCM member\'s subtrader. The cap bounds the subtrader\'s net premium at risk per trading day. It is enforced on cap-reservation sessions — which every subtrader-bound API key uses — and is mandatory there: a subtrader with no cap cannot trade through its bound keys. Cap changes take effect immediately; existing resting orders are never cancelled by a cap change. * @summary Update FCM Subtrader Event Contract Daily Cap * @param {UpdateFCMEventContractDailyCapRequest} updateFCMEventContractDailyCapRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateFCMEventContractDailyCap: (updateFCMEventContractDailyCapRequest: UpdateFCMEventContractDailyCapRequest, options?: RawAxiosRequestConfig) => Promise; /** * Adds one event category to, or removes one from, the set an FCM member has blocked for one of its subtraders. The subtrader must belong to the requesting FCM. Blocks apply prospectively: new orders the subtrader places through its bound API credentials are rejected in markets whose event belongs to a blocked category, while orders already resting are not cancelled. Returns the subtrader\'s full resulting blocked set. * @summary Update FCM Subtrader Blocked Categories * @param {UpdateFCMSubtraderBlockedCategoriesRequest} updateFCMSubtraderBlockedCategoriesRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateFCMSubtraderBlockedCategories: (updateFCMSubtraderBlockedCategoriesRequest: UpdateFCMSubtraderBlockedCategoriesRequest, options?: RawAxiosRequestConfig) => Promise; }; /** * FcmApi - functional programming interface */ export declare const FcmApiFp: (configuration?: Configuration) => { /** * Endpoint for FCM members to move a position in one market from one of their subtraders into a subtrader under their FCM\'s error account. **This endpoint must be enabled for your FCM by Kalshi.** Kalshi enables it by configuring the error account that receives transferred positions and gives you that account\'s user id, which prefixes `target_subtrader_id`. Contact Kalshi to enable it; until then, requests return 400. - The destination is always your FCM\'s error account. `target_subtrader_id` picks the subtrader under it, which is created on first use. - Each request moves one market for one source subtrader. To move many positions, send one request per subtrader and market. - The transfer is booked like a trade at `price_centicents`, which is always the YES price, even when moving NO. No fee is charged and no fill is created. For YES, the error account pays the price per contract; for NO, it pays $1 minus the price per contract. The FCM receives the same amount. Use 0 for YES or 10000 for NO to move no cash. These amounts assume the source holds the side being moved and the target subtrader holds no opposite position in that market; otherwise the positions net like a trade and the balance changes differ. - The source\'s current position is not checked. A request for more than the source holds, or with the opposite sign, flips or grows the source\'s position. - Requests are not idempotent. After a timeout or 5xx, check the position before retrying. - The market must be open, neither account may be blocked, and the error account must have enough available balance on the market\'s exchange index to pay for the transfer. Otherwise the request returns 409. **Example: moving YES.** A customer subtrader holds 10 YES contracts. Send `position_centicount` 1000 and `price_centicents` 4500 (YES at 45 cents): - The customer subtrader goes from 10 YES to 0, and the error account subtrader from 0 to 10 YES. - The error account pays 10 x $0.45 = $4.50 and the FCM receives $4.50. - Sending `price_centicents` 0 instead moves the position with no cash. **Example: moving NO.** A customer subtrader holds 5 NO contracts. Send `position_centicount` -500 and `price_centicents` 7000 (YES at 70 cents, so NO at 30 cents): - The customer subtrader goes from 5 NO to 0, and the error account subtrader from 0 to 5 NO. - The error account pays 5 x $0.30 = $1.50 and the FCM receives $1.50. - Sending `price_centicents` 10000 instead moves the position with no cash. Sending 0 makes the error account pay the full $1 per contract ($5.00). * @summary Create FCM Position Transfer * @param {CreateFCMPositionTransferRequest} createFCMPositionTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createFCMPositionTransfer(createFCMPositionTransferRequest: CreateFCMPositionTransferRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Endpoint for FCM members to create a subtrader on the event-contract exchange. The subtrader is registered on every exchange shard that knows the FCM; a shard provisioned later registers it lazily on the subtrader\'s first order there. Re-creating an existing subtrader returns 409. * @summary Create FCM Subtrader * @param {CreateFCMSubtraderRequest} createFCMSubtraderRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createFCMSubtrader(createFCMSubtraderRequest: CreateFCMSubtraderRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Removes the event-contract daily premium cap for an FCM member\'s subtrader. Removal closes the subtrader to new orders on cap-reservation sessions — every subtrader-bound API key — until a cap is set again. It does not stop orders your own unbound sessions submit on the subtrader\'s behalf; to stop the account entirely, block subtrader trading. * @summary Delete FCM Subtrader Event Contract Daily Cap * @param {string} subtraderId The subtrader whose daily cap should be removed. Must belong to the requesting FCM. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteFCMEventContractDailyCap(subtraderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Returns the event-contract daily premium cap configured for an FCM member\'s subtrader, together with its live utilization. Executed utilization is the net premium deployed by fills today (sells and settlements credit back); resting and pending utilization reserve open and in-flight orders at their full worst-case cost plus fees. Executed utilization resets at midnight New York time on the returned cap date; resting and pending reservations persist for as long as their orders remain open, including across the reset. Returns 404 when the subtrader has no cap configured — in that state every order placed through the subtrader\'s bound API keys is rejected. API keys bound to a single FCM subtrader may also call this endpoint: `subtrader_id` may be omitted and defaults to the key\'s bound subtrader, and if supplied it must equal the bound subtrader or the request is rejected. * @summary Get FCM Subtrader Event Contract Daily Cap * @param {string} [subtraderId] The subtrader whose daily cap should be returned. Must belong to the requesting FCM. Required unless the API key is bound to a subtrader, in which case it defaults to the bound subtrader when omitted and must equal it when supplied. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMEventContractDailyCap(subtraderId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Returns fills across the authenticated FCM\'s subtraders. Requires FCM member access. * @summary Get FCM Fills * @param {number} [minTs] Filter items after this Unix timestamp * @param {number} [maxTs] Filter items before this Unix timestamp * @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 {*} [options] Override http request option. * @throws {RequiredError} */ getFCMFills(minTs?: number, maxTs?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Endpoint for FCM members to get orders for their subtraders. This endpoint requires FCM member access level. At least one of `subtrader_id` or `client_order_ids` is required; supplying both returns only the orders matching both filters. API keys bound to a single FCM subtrader may also call this endpoint: `subtrader_id` may be omitted and defaults to the key\'s bound subtrader, and if supplied it must equal the bound subtrader or the request is rejected. * @summary Get FCM Orders * @param {string} [subtraderId] Restricts the response to orders for a specific subtrader (FCM members only). Required unless client_order_ids is supplied. For an API key bound to a subtrader, defaults to the bound subtrader when omitted and must equal it when supplied. * @param {string} [clientOrderIds] Client order IDs to filter by, as a comma-separated list (maximum 100). Only orders created within the last 24 hours are searched, and a min_ts earlier than that is raised to 24 hours ago. Client order IDs are only unique within a subtrader among live and recent orders, so a single ID can match orders across subtraders or across time. Required unless subtrader_id is supplied. * @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} [ticker] Filter by market ticker * @param {number} [minTs] Restricts the response to orders after a timestamp, formatted as a Unix Timestamp * @param {number} [maxTs] Restricts the response to orders before a timestamp, formatted as a Unix Timestamp * @param {GetFCMOrdersStatusEnum} [status] Restricts the response to orders that have a certain status * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100 * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMOrders(subtraderId?: string, clientOrderIds?: string, cursor?: string, eventTicker?: string, ticker?: string, minTs?: number, maxTs?: number, status?: GetFCMOrdersStatusEnum, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Endpoint for FCM members to get market positions filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering positions by subtrader ID. API keys bound to a single FCM subtrader may also call this endpoint: `subtrader_id` may be omitted and defaults to the key\'s bound subtrader, and if supplied it must equal the bound subtrader or the request is rejected. * @summary Get FCM Positions * @param {string} [subtraderId] Restricts the response to positions for a specific subtrader (FCM members only). Required unless the API key is bound to a subtrader, in which case it defaults to the bound subtrader when omitted and must equal it when supplied. * @param {string} [ticker] Ticker of desired positions * @param {string} [eventTicker] Event ticker of desired positions * @param {string} [countFilter] Restricts the positions to those with any of following fields with non-zero values, as a comma separated list * @param {GetFCMPositionsSettlementStatusEnum} [settlementStatus] Settlement status of the markets to return. Defaults to unsettled * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100 * @param {string} [cursor] The Cursor represents a pointer to the next page of records in the pagination * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMPositions(subtraderId?: string, ticker?: string, eventTicker?: string, countFilter?: string, settlementStatus?: GetFCMPositionsSettlementStatusEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Returns the event categories an FCM member has blocked for one of its subtraders. The subtrader must belong to the requesting FCM. A subtrader with no blocks returns an empty list. * @summary Get FCM Subtrader Blocked Categories * @param {string} subtraderId The subtrader whose blocked categories should be returned. Must belong to the requesting FCM. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMSubtraderBlockedCategories(subtraderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Lists the authenticated FCM\'s event-contract subtraders, including accounts with no trades. Exchange metadata is asynchronous, so newly created accounts may not appear immediately. Trading block status includes firm-wide and Kalshi restrictions; fcm_trading_blocked identifies the FCM\'s own per-subtrader restriction. * @summary List FCM Subtraders * @param {*} [options] Override http request option. * @throws {RequiredError} */ listFCMSubtraders(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Sets the event-contract daily premium cap for an FCM member\'s subtrader. The cap bounds the subtrader\'s net premium at risk per trading day. It is enforced on cap-reservation sessions — which every subtrader-bound API key uses — and is mandatory there: a subtrader with no cap cannot trade through its bound keys. Cap changes take effect immediately; existing resting orders are never cancelled by a cap change. * @summary Update FCM Subtrader Event Contract Daily Cap * @param {UpdateFCMEventContractDailyCapRequest} updateFCMEventContractDailyCapRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateFCMEventContractDailyCap(updateFCMEventContractDailyCapRequest: UpdateFCMEventContractDailyCapRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Adds one event category to, or removes one from, the set an FCM member has blocked for one of its subtraders. The subtrader must belong to the requesting FCM. Blocks apply prospectively: new orders the subtrader places through its bound API credentials are rejected in markets whose event belongs to a blocked category, while orders already resting are not cancelled. Returns the subtrader\'s full resulting blocked set. * @summary Update FCM Subtrader Blocked Categories * @param {UpdateFCMSubtraderBlockedCategoriesRequest} updateFCMSubtraderBlockedCategoriesRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateFCMSubtraderBlockedCategories(updateFCMSubtraderBlockedCategoriesRequest: UpdateFCMSubtraderBlockedCategoriesRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * FcmApi - factory interface */ export declare const FcmApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Endpoint for FCM members to move a position in one market from one of their subtraders into a subtrader under their FCM\'s error account. **This endpoint must be enabled for your FCM by Kalshi.** Kalshi enables it by configuring the error account that receives transferred positions and gives you that account\'s user id, which prefixes `target_subtrader_id`. Contact Kalshi to enable it; until then, requests return 400. - The destination is always your FCM\'s error account. `target_subtrader_id` picks the subtrader under it, which is created on first use. - Each request moves one market for one source subtrader. To move many positions, send one request per subtrader and market. - The transfer is booked like a trade at `price_centicents`, which is always the YES price, even when moving NO. No fee is charged and no fill is created. For YES, the error account pays the price per contract; for NO, it pays $1 minus the price per contract. The FCM receives the same amount. Use 0 for YES or 10000 for NO to move no cash. These amounts assume the source holds the side being moved and the target subtrader holds no opposite position in that market; otherwise the positions net like a trade and the balance changes differ. - The source\'s current position is not checked. A request for more than the source holds, or with the opposite sign, flips or grows the source\'s position. - Requests are not idempotent. After a timeout or 5xx, check the position before retrying. - The market must be open, neither account may be blocked, and the error account must have enough available balance on the market\'s exchange index to pay for the transfer. Otherwise the request returns 409. **Example: moving YES.** A customer subtrader holds 10 YES contracts. Send `position_centicount` 1000 and `price_centicents` 4500 (YES at 45 cents): - The customer subtrader goes from 10 YES to 0, and the error account subtrader from 0 to 10 YES. - The error account pays 10 x $0.45 = $4.50 and the FCM receives $4.50. - Sending `price_centicents` 0 instead moves the position with no cash. **Example: moving NO.** A customer subtrader holds 5 NO contracts. Send `position_centicount` -500 and `price_centicents` 7000 (YES at 70 cents, so NO at 30 cents): - The customer subtrader goes from 5 NO to 0, and the error account subtrader from 0 to 5 NO. - The error account pays 5 x $0.30 = $1.50 and the FCM receives $1.50. - Sending `price_centicents` 10000 instead moves the position with no cash. Sending 0 makes the error account pay the full $1 per contract ($5.00). * @summary Create FCM Position Transfer * @param {CreateFCMPositionTransferRequest} createFCMPositionTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createFCMPositionTransfer(createFCMPositionTransferRequest: CreateFCMPositionTransferRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Endpoint for FCM members to create a subtrader on the event-contract exchange. The subtrader is registered on every exchange shard that knows the FCM; a shard provisioned later registers it lazily on the subtrader\'s first order there. Re-creating an existing subtrader returns 409. * @summary Create FCM Subtrader * @param {CreateFCMSubtraderRequest} createFCMSubtraderRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createFCMSubtrader(createFCMSubtraderRequest: CreateFCMSubtraderRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Removes the event-contract daily premium cap for an FCM member\'s subtrader. Removal closes the subtrader to new orders on cap-reservation sessions — every subtrader-bound API key — until a cap is set again. It does not stop orders your own unbound sessions submit on the subtrader\'s behalf; to stop the account entirely, block subtrader trading. * @summary Delete FCM Subtrader Event Contract Daily Cap * @param {string} subtraderId The subtrader whose daily cap should be removed. Must belong to the requesting FCM. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteFCMEventContractDailyCap(subtraderId: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Returns the event-contract daily premium cap configured for an FCM member\'s subtrader, together with its live utilization. Executed utilization is the net premium deployed by fills today (sells and settlements credit back); resting and pending utilization reserve open and in-flight orders at their full worst-case cost plus fees. Executed utilization resets at midnight New York time on the returned cap date; resting and pending reservations persist for as long as their orders remain open, including across the reset. Returns 404 when the subtrader has no cap configured — in that state every order placed through the subtrader\'s bound API keys is rejected. API keys bound to a single FCM subtrader may also call this endpoint: `subtrader_id` may be omitted and defaults to the key\'s bound subtrader, and if supplied it must equal the bound subtrader or the request is rejected. * @summary Get FCM Subtrader Event Contract Daily Cap * @param {string} [subtraderId] The subtrader whose daily cap should be returned. Must belong to the requesting FCM. Required unless the API key is bound to a subtrader, in which case it defaults to the bound subtrader when omitted and must equal it when supplied. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMEventContractDailyCap(subtraderId?: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Returns fills across the authenticated FCM\'s subtraders. Requires FCM member access. * @summary Get FCM Fills * @param {number} [minTs] Filter items after this Unix timestamp * @param {number} [maxTs] Filter items before this Unix timestamp * @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 {*} [options] Override http request option. * @throws {RequiredError} */ getFCMFills(minTs?: number, maxTs?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Endpoint for FCM members to get orders for their subtraders. This endpoint requires FCM member access level. At least one of `subtrader_id` or `client_order_ids` is required; supplying both returns only the orders matching both filters. API keys bound to a single FCM subtrader may also call this endpoint: `subtrader_id` may be omitted and defaults to the key\'s bound subtrader, and if supplied it must equal the bound subtrader or the request is rejected. * @summary Get FCM Orders * @param {string} [subtraderId] Restricts the response to orders for a specific subtrader (FCM members only). Required unless client_order_ids is supplied. For an API key bound to a subtrader, defaults to the bound subtrader when omitted and must equal it when supplied. * @param {string} [clientOrderIds] Client order IDs to filter by, as a comma-separated list (maximum 100). Only orders created within the last 24 hours are searched, and a min_ts earlier than that is raised to 24 hours ago. Client order IDs are only unique within a subtrader among live and recent orders, so a single ID can match orders across subtraders or across time. Required unless subtrader_id is supplied. * @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} [ticker] Filter by market ticker * @param {number} [minTs] Restricts the response to orders after a timestamp, formatted as a Unix Timestamp * @param {number} [maxTs] Restricts the response to orders before a timestamp, formatted as a Unix Timestamp * @param {GetFCMOrdersStatusEnum} [status] Restricts the response to orders that have a certain status * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100 * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMOrders(subtraderId?: string, clientOrderIds?: string, cursor?: string, eventTicker?: string, ticker?: string, minTs?: number, maxTs?: number, status?: GetFCMOrdersStatusEnum, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise; /** * Endpoint for FCM members to get market positions filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering positions by subtrader ID. API keys bound to a single FCM subtrader may also call this endpoint: `subtrader_id` may be omitted and defaults to the key\'s bound subtrader, and if supplied it must equal the bound subtrader or the request is rejected. * @summary Get FCM Positions * @param {string} [subtraderId] Restricts the response to positions for a specific subtrader (FCM members only). Required unless the API key is bound to a subtrader, in which case it defaults to the bound subtrader when omitted and must equal it when supplied. * @param {string} [ticker] Ticker of desired positions * @param {string} [eventTicker] Event ticker of desired positions * @param {string} [countFilter] Restricts the positions to those with any of following fields with non-zero values, as a comma separated list * @param {GetFCMPositionsSettlementStatusEnum} [settlementStatus] Settlement status of the markets to return. Defaults to unsettled * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100 * @param {string} [cursor] The Cursor represents a pointer to the next page of records in the pagination * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMPositions(subtraderId?: string, ticker?: string, eventTicker?: string, countFilter?: string, settlementStatus?: GetFCMPositionsSettlementStatusEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Returns the event categories an FCM member has blocked for one of its subtraders. The subtrader must belong to the requesting FCM. A subtrader with no blocks returns an empty list. * @summary Get FCM Subtrader Blocked Categories * @param {string} subtraderId The subtrader whose blocked categories should be returned. Must belong to the requesting FCM. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMSubtraderBlockedCategories(subtraderId: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Lists the authenticated FCM\'s event-contract subtraders, including accounts with no trades. Exchange metadata is asynchronous, so newly created accounts may not appear immediately. Trading block status includes firm-wide and Kalshi restrictions; fcm_trading_blocked identifies the FCM\'s own per-subtrader restriction. * @summary List FCM Subtraders * @param {*} [options] Override http request option. * @throws {RequiredError} */ listFCMSubtraders(options?: RawAxiosRequestConfig): AxiosPromise; /** * Sets the event-contract daily premium cap for an FCM member\'s subtrader. The cap bounds the subtrader\'s net premium at risk per trading day. It is enforced on cap-reservation sessions — which every subtrader-bound API key uses — and is mandatory there: a subtrader with no cap cannot trade through its bound keys. Cap changes take effect immediately; existing resting orders are never cancelled by a cap change. * @summary Update FCM Subtrader Event Contract Daily Cap * @param {UpdateFCMEventContractDailyCapRequest} updateFCMEventContractDailyCapRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateFCMEventContractDailyCap(updateFCMEventContractDailyCapRequest: UpdateFCMEventContractDailyCapRequest, options?: RawAxiosRequestConfig): AxiosPromise; /** * Adds one event category to, or removes one from, the set an FCM member has blocked for one of its subtraders. The subtrader must belong to the requesting FCM. Blocks apply prospectively: new orders the subtrader places through its bound API credentials are rejected in markets whose event belongs to a blocked category, while orders already resting are not cancelled. Returns the subtrader\'s full resulting blocked set. * @summary Update FCM Subtrader Blocked Categories * @param {UpdateFCMSubtraderBlockedCategoriesRequest} updateFCMSubtraderBlockedCategoriesRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateFCMSubtraderBlockedCategories(updateFCMSubtraderBlockedCategoriesRequest: UpdateFCMSubtraderBlockedCategoriesRequest, options?: RawAxiosRequestConfig): AxiosPromise; }; /** * FcmApi - object-oriented interface */ export declare class FcmApi extends BaseAPI { /** * Endpoint for FCM members to move a position in one market from one of their subtraders into a subtrader under their FCM\'s error account. **This endpoint must be enabled for your FCM by Kalshi.** Kalshi enables it by configuring the error account that receives transferred positions and gives you that account\'s user id, which prefixes `target_subtrader_id`. Contact Kalshi to enable it; until then, requests return 400. - The destination is always your FCM\'s error account. `target_subtrader_id` picks the subtrader under it, which is created on first use. - Each request moves one market for one source subtrader. To move many positions, send one request per subtrader and market. - The transfer is booked like a trade at `price_centicents`, which is always the YES price, even when moving NO. No fee is charged and no fill is created. For YES, the error account pays the price per contract; for NO, it pays $1 minus the price per contract. The FCM receives the same amount. Use 0 for YES or 10000 for NO to move no cash. These amounts assume the source holds the side being moved and the target subtrader holds no opposite position in that market; otherwise the positions net like a trade and the balance changes differ. - The source\'s current position is not checked. A request for more than the source holds, or with the opposite sign, flips or grows the source\'s position. - Requests are not idempotent. After a timeout or 5xx, check the position before retrying. - The market must be open, neither account may be blocked, and the error account must have enough available balance on the market\'s exchange index to pay for the transfer. Otherwise the request returns 409. **Example: moving YES.** A customer subtrader holds 10 YES contracts. Send `position_centicount` 1000 and `price_centicents` 4500 (YES at 45 cents): - The customer subtrader goes from 10 YES to 0, and the error account subtrader from 0 to 10 YES. - The error account pays 10 x $0.45 = $4.50 and the FCM receives $4.50. - Sending `price_centicents` 0 instead moves the position with no cash. **Example: moving NO.** A customer subtrader holds 5 NO contracts. Send `position_centicount` -500 and `price_centicents` 7000 (YES at 70 cents, so NO at 30 cents): - The customer subtrader goes from 5 NO to 0, and the error account subtrader from 0 to 5 NO. - The error account pays 5 x $0.30 = $1.50 and the FCM receives $1.50. - Sending `price_centicents` 10000 instead moves the position with no cash. Sending 0 makes the error account pay the full $1 per contract ($5.00). * @summary Create FCM Position Transfer * @param {CreateFCMPositionTransferRequest} createFCMPositionTransferRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createFCMPositionTransfer(createFCMPositionTransferRequest: CreateFCMPositionTransferRequest, options?: RawAxiosRequestConfig): Promise>; /** * Endpoint for FCM members to create a subtrader on the event-contract exchange. The subtrader is registered on every exchange shard that knows the FCM; a shard provisioned later registers it lazily on the subtrader\'s first order there. Re-creating an existing subtrader returns 409. * @summary Create FCM Subtrader * @param {CreateFCMSubtraderRequest} createFCMSubtraderRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createFCMSubtrader(createFCMSubtraderRequest: CreateFCMSubtraderRequest, options?: RawAxiosRequestConfig): Promise>; /** * Removes the event-contract daily premium cap for an FCM member\'s subtrader. Removal closes the subtrader to new orders on cap-reservation sessions — every subtrader-bound API key — until a cap is set again. It does not stop orders your own unbound sessions submit on the subtrader\'s behalf; to stop the account entirely, block subtrader trading. * @summary Delete FCM Subtrader Event Contract Daily Cap * @param {string} subtraderId The subtrader whose daily cap should be removed. Must belong to the requesting FCM. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteFCMEventContractDailyCap(subtraderId: string, options?: RawAxiosRequestConfig): Promise>; /** * Returns the event-contract daily premium cap configured for an FCM member\'s subtrader, together with its live utilization. Executed utilization is the net premium deployed by fills today (sells and settlements credit back); resting and pending utilization reserve open and in-flight orders at their full worst-case cost plus fees. Executed utilization resets at midnight New York time on the returned cap date; resting and pending reservations persist for as long as their orders remain open, including across the reset. Returns 404 when the subtrader has no cap configured — in that state every order placed through the subtrader\'s bound API keys is rejected. API keys bound to a single FCM subtrader may also call this endpoint: `subtrader_id` may be omitted and defaults to the key\'s bound subtrader, and if supplied it must equal the bound subtrader or the request is rejected. * @summary Get FCM Subtrader Event Contract Daily Cap * @param {string} [subtraderId] The subtrader whose daily cap should be returned. Must belong to the requesting FCM. Required unless the API key is bound to a subtrader, in which case it defaults to the bound subtrader when omitted and must equal it when supplied. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMEventContractDailyCap(subtraderId?: string, options?: RawAxiosRequestConfig): Promise>; /** * Returns fills across the authenticated FCM\'s subtraders. Requires FCM member access. * @summary Get FCM Fills * @param {number} [minTs] Filter items after this Unix timestamp * @param {number} [maxTs] Filter items before this Unix timestamp * @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 {*} [options] Override http request option. * @throws {RequiredError} */ getFCMFills(minTs?: number, maxTs?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise>; /** * Endpoint for FCM members to get orders for their subtraders. This endpoint requires FCM member access level. At least one of `subtrader_id` or `client_order_ids` is required; supplying both returns only the orders matching both filters. API keys bound to a single FCM subtrader may also call this endpoint: `subtrader_id` may be omitted and defaults to the key\'s bound subtrader, and if supplied it must equal the bound subtrader or the request is rejected. * @summary Get FCM Orders * @param {string} [subtraderId] Restricts the response to orders for a specific subtrader (FCM members only). Required unless client_order_ids is supplied. For an API key bound to a subtrader, defaults to the bound subtrader when omitted and must equal it when supplied. * @param {string} [clientOrderIds] Client order IDs to filter by, as a comma-separated list (maximum 100). Only orders created within the last 24 hours are searched, and a min_ts earlier than that is raised to 24 hours ago. Client order IDs are only unique within a subtrader among live and recent orders, so a single ID can match orders across subtraders or across time. Required unless subtrader_id is supplied. * @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} [ticker] Filter by market ticker * @param {number} [minTs] Restricts the response to orders after a timestamp, formatted as a Unix Timestamp * @param {number} [maxTs] Restricts the response to orders before a timestamp, formatted as a Unix Timestamp * @param {GetFCMOrdersStatusEnum} [status] Restricts the response to orders that have a certain status * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100 * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMOrders(subtraderId?: string, clientOrderIds?: string, cursor?: string, eventTicker?: string, ticker?: string, minTs?: number, maxTs?: number, status?: GetFCMOrdersStatusEnum, limit?: number, options?: RawAxiosRequestConfig): Promise>; /** * Endpoint for FCM members to get market positions filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering positions by subtrader ID. API keys bound to a single FCM subtrader may also call this endpoint: `subtrader_id` may be omitted and defaults to the key\'s bound subtrader, and if supplied it must equal the bound subtrader or the request is rejected. * @summary Get FCM Positions * @param {string} [subtraderId] Restricts the response to positions for a specific subtrader (FCM members only). Required unless the API key is bound to a subtrader, in which case it defaults to the bound subtrader when omitted and must equal it when supplied. * @param {string} [ticker] Ticker of desired positions * @param {string} [eventTicker] Event ticker of desired positions * @param {string} [countFilter] Restricts the positions to those with any of following fields with non-zero values, as a comma separated list * @param {GetFCMPositionsSettlementStatusEnum} [settlementStatus] Settlement status of the markets to return. Defaults to unsettled * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100 * @param {string} [cursor] The Cursor represents a pointer to the next page of records in the pagination * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMPositions(subtraderId?: string, ticker?: string, eventTicker?: string, countFilter?: string, settlementStatus?: GetFCMPositionsSettlementStatusEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise>; /** * Returns the event categories an FCM member has blocked for one of its subtraders. The subtrader must belong to the requesting FCM. A subtrader with no blocks returns an empty list. * @summary Get FCM Subtrader Blocked Categories * @param {string} subtraderId The subtrader whose blocked categories should be returned. Must belong to the requesting FCM. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getFCMSubtraderBlockedCategories(subtraderId: string, options?: RawAxiosRequestConfig): Promise>; /** * Lists the authenticated FCM\'s event-contract subtraders, including accounts with no trades. Exchange metadata is asynchronous, so newly created accounts may not appear immediately. Trading block status includes firm-wide and Kalshi restrictions; fcm_trading_blocked identifies the FCM\'s own per-subtrader restriction. * @summary List FCM Subtraders * @param {*} [options] Override http request option. * @throws {RequiredError} */ listFCMSubtraders(options?: RawAxiosRequestConfig): Promise>; /** * Sets the event-contract daily premium cap for an FCM member\'s subtrader. The cap bounds the subtrader\'s net premium at risk per trading day. It is enforced on cap-reservation sessions — which every subtrader-bound API key uses — and is mandatory there: a subtrader with no cap cannot trade through its bound keys. Cap changes take effect immediately; existing resting orders are never cancelled by a cap change. * @summary Update FCM Subtrader Event Contract Daily Cap * @param {UpdateFCMEventContractDailyCapRequest} updateFCMEventContractDailyCapRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateFCMEventContractDailyCap(updateFCMEventContractDailyCapRequest: UpdateFCMEventContractDailyCapRequest, options?: RawAxiosRequestConfig): Promise>; /** * Adds one event category to, or removes one from, the set an FCM member has blocked for one of its subtraders. The subtrader must belong to the requesting FCM. Blocks apply prospectively: new orders the subtrader places through its bound API credentials are rejected in markets whose event belongs to a blocked category, while orders already resting are not cancelled. Returns the subtrader\'s full resulting blocked set. * @summary Update FCM Subtrader Blocked Categories * @param {UpdateFCMSubtraderBlockedCategoriesRequest} updateFCMSubtraderBlockedCategoriesRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateFCMSubtraderBlockedCategories(updateFCMSubtraderBlockedCategoriesRequest: UpdateFCMSubtraderBlockedCategoriesRequest, options?: RawAxiosRequestConfig): Promise>; } export declare const GetFCMOrdersStatusEnum: { readonly Resting: "resting"; readonly Canceled: "canceled"; readonly Executed: "executed"; }; export type GetFCMOrdersStatusEnum = typeof GetFCMOrdersStatusEnum[keyof typeof GetFCMOrdersStatusEnum]; export declare const GetFCMPositionsSettlementStatusEnum: { readonly All: "all"; readonly Unsettled: "unsettled"; readonly Settled: "settled"; }; export type GetFCMPositionsSettlementStatusEnum = typeof GetFCMPositionsSettlementStatusEnum[keyof typeof GetFCMPositionsSettlementStatusEnum];