kalshi-typescript
Version:
OpenAPI client for kalshi-typescript
165 lines (164 loc) • 12.8 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 { GetOrdersResponse } from '../models';
import type { GetPositionsResponse } from '../models';
/**
* FcmApi - axios parameter creator
*/
export declare const FcmApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Endpoint for FCM members to get orders filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering orders by subtrader ID.
* @summary Get FCM Orders
* @param {string} subtraderId Restricts the response to orders for a specific subtrader (FCM members only)
* @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, cursor?: string, eventTicker?: string, ticker?: string, minTs?: number, maxTs?: number, status?: GetFCMOrdersStatusEnum, limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* 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.
* @summary Get FCM Positions
* @param {string} subtraderId Restricts the response to positions for a specific subtrader (FCM members only)
* @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<RequestArgs>;
};
/**
* FcmApi - functional programming interface
*/
export declare const FcmApiFp: (configuration?: Configuration) => {
/**
* Endpoint for FCM members to get orders filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering orders by subtrader ID.
* @summary Get FCM Orders
* @param {string} subtraderId Restricts the response to orders for a specific subtrader (FCM members only)
* @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, cursor?: string, eventTicker?: string, ticker?: string, minTs?: number, maxTs?: number, status?: GetFCMOrdersStatusEnum, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetOrdersResponse>>;
/**
* 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.
* @summary Get FCM Positions
* @param {string} subtraderId Restricts the response to positions for a specific subtrader (FCM members only)
* @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<GetPositionsResponse>>;
};
/**
* FcmApi - factory interface
*/
export declare const FcmApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Endpoint for FCM members to get orders filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering orders by subtrader ID.
* @summary Get FCM Orders
* @param {string} subtraderId Restricts the response to orders for a specific subtrader (FCM members only)
* @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, cursor?: string, eventTicker?: string, ticker?: string, minTs?: number, maxTs?: number, status?: GetFCMOrdersStatusEnum, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<GetOrdersResponse>;
/**
* 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.
* @summary Get FCM Positions
* @param {string} subtraderId Restricts the response to positions for a specific subtrader (FCM members only)
* @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<GetPositionsResponse>;
};
/**
* FcmApi - object-oriented interface
*/
export declare class FcmApi extends BaseAPI {
/**
* Endpoint for FCM members to get orders filtered by subtrader ID. This endpoint requires FCM member access level and allows filtering orders by subtrader ID.
* @summary Get FCM Orders
* @param {string} subtraderId Restricts the response to orders for a specific subtrader (FCM members only)
* @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, cursor?: string, eventTicker?: string, ticker?: string, minTs?: number, maxTs?: number, status?: GetFCMOrdersStatusEnum, limit?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetOrdersResponse, any, {}>>;
/**
* 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.
* @summary Get FCM Positions
* @param {string} subtraderId Restricts the response to positions for a specific subtrader (FCM members only)
* @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<import("axios").AxiosResponse<GetPositionsResponse, any, {}>>;
}
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];