UNPKG

kalshi-typescript

Version:
457 lines (456 loc) 24.7 kB
/** * 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 { AcceptQuoteRequest } from '../models'; import type { CreateQuoteRequest } from '../models'; import type { CreateQuoteResponse } from '../models'; import type { CreateRFQRequest } from '../models'; import type { CreateRFQResponse } from '../models'; import type { GetCommunicationsIDResponse } from '../models'; import type { GetQuoteResponse } from '../models'; import type { GetQuotesResponse } from '../models'; import type { GetRFQResponse } from '../models'; import type { GetRFQsResponse } from '../models'; /** * CommunicationsApi - axios parameter creator */ export declare const CommunicationsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Endpoint for accepting a quote. This will require the quoter to confirm * @summary Accept Quote * @param {string} quoteId Quote ID * @param {AcceptQuoteRequest} acceptQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ acceptQuote: (quoteId: string, acceptQuoteRequest: AcceptQuoteRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for confirming a quote. This will start a timer for order execution * @summary Confirm Quote * @param {string} quoteId Quote ID * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ confirmQuote: (quoteId: string, body?: object, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for creating a quote in response to an RFQ * @summary Create Quote * @param {CreateQuoteRequest} createQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createQuote: (createQuoteRequest: CreateQuoteRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time. * @summary Create RFQ * @param {CreateRFQRequest} createRFQRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRFQ: (createRFQRequest: CreateRFQRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for deleting a quote, which means it can no longer be accepted. * @summary Delete Quote * @param {string} quoteId Quote ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteQuote: (quoteId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for deleting an RFQ by ID * @summary Delete RFQ * @param {string} rfqId RFQ ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRFQ: (rfqId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for getting the communications ID of the logged-in user. * @summary Get Communications ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCommunicationsID: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for getting a particular quote * @summary Get Quote * @param {string} quoteId Quote ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuote: (quoteId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for getting quotes * @summary Get Quotes * @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} [marketTicker] Filter by market ticker * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 500. * @param {string} [status] Filter quotes by status * @param {string} [quoteCreatorUserId] Filter quotes by quote creator user ID * @param {string} [rfqCreatorUserId] Filter quotes by RFQ creator user ID * @param {string} [rfqCreatorSubtraderId] Filter quotes by RFQ creator subtrader ID (FCM members only) * @param {string} [rfqId] Filter quotes by RFQ ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuotes: (cursor?: string, eventTicker?: string, marketTicker?: string, limit?: number, status?: string, quoteCreatorUserId?: string, rfqCreatorUserId?: string, rfqCreatorSubtraderId?: string, rfqId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for getting a single RFQ by id * @summary Get RFQ * @param {string} rfqId RFQ ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQ: (rfqId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for getting RFQs * @summary Get RFQs * @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} [marketTicker] Filter by market ticker * @param {number} [subaccount] Subaccount number (0 for primary, 1-32 for subaccounts). If omitted, defaults to all subaccounts. * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100. * @param {string} [status] Filter RFQs by status * @param {string} [creatorUserId] Filter RFQs by creator user ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQs: (cursor?: string, eventTicker?: string, marketTicker?: string, subaccount?: number, limit?: number, status?: string, creatorUserId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; }; /** * CommunicationsApi - functional programming interface */ export declare const CommunicationsApiFp: (configuration?: Configuration) => { /** * Endpoint for accepting a quote. This will require the quoter to confirm * @summary Accept Quote * @param {string} quoteId Quote ID * @param {AcceptQuoteRequest} acceptQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ acceptQuote(quoteId: string, acceptQuoteRequest: AcceptQuoteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; /** * Endpoint for confirming a quote. This will start a timer for order execution * @summary Confirm Quote * @param {string} quoteId Quote ID * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ confirmQuote(quoteId: string, body?: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; /** * Endpoint for creating a quote in response to an RFQ * @summary Create Quote * @param {CreateQuoteRequest} createQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createQuote(createQuoteRequest: CreateQuoteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateQuoteResponse>>; /** * Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time. * @summary Create RFQ * @param {CreateRFQRequest} createRFQRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRFQ(createRFQRequest: CreateRFQRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateRFQResponse>>; /** * Endpoint for deleting a quote, which means it can no longer be accepted. * @summary Delete Quote * @param {string} quoteId Quote ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteQuote(quoteId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; /** * Endpoint for deleting an RFQ by ID * @summary Delete RFQ * @param {string} rfqId RFQ ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRFQ(rfqId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; /** * Endpoint for getting the communications ID of the logged-in user. * @summary Get Communications ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCommunicationsID(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCommunicationsIDResponse>>; /** * Endpoint for getting a particular quote * @summary Get Quote * @param {string} quoteId Quote ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuote(quoteId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetQuoteResponse>>; /** * Endpoint for getting quotes * @summary Get Quotes * @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} [marketTicker] Filter by market ticker * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 500. * @param {string} [status] Filter quotes by status * @param {string} [quoteCreatorUserId] Filter quotes by quote creator user ID * @param {string} [rfqCreatorUserId] Filter quotes by RFQ creator user ID * @param {string} [rfqCreatorSubtraderId] Filter quotes by RFQ creator subtrader ID (FCM members only) * @param {string} [rfqId] Filter quotes by RFQ ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuotes(cursor?: string, eventTicker?: string, marketTicker?: string, limit?: number, status?: string, quoteCreatorUserId?: string, rfqCreatorUserId?: string, rfqCreatorSubtraderId?: string, rfqId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetQuotesResponse>>; /** * Endpoint for getting a single RFQ by id * @summary Get RFQ * @param {string} rfqId RFQ ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQ(rfqId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetRFQResponse>>; /** * Endpoint for getting RFQs * @summary Get RFQs * @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} [marketTicker] Filter by market ticker * @param {number} [subaccount] Subaccount number (0 for primary, 1-32 for subaccounts). If omitted, defaults to all subaccounts. * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100. * @param {string} [status] Filter RFQs by status * @param {string} [creatorUserId] Filter RFQs by creator user ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQs(cursor?: string, eventTicker?: string, marketTicker?: string, subaccount?: number, limit?: number, status?: string, creatorUserId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetRFQsResponse>>; }; /** * CommunicationsApi - factory interface */ export declare const CommunicationsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Endpoint for accepting a quote. This will require the quoter to confirm * @summary Accept Quote * @param {string} quoteId Quote ID * @param {AcceptQuoteRequest} acceptQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ acceptQuote(quoteId: string, acceptQuoteRequest: AcceptQuoteRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>; /** * Endpoint for confirming a quote. This will start a timer for order execution * @summary Confirm Quote * @param {string} quoteId Quote ID * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ confirmQuote(quoteId: string, body?: object, options?: RawAxiosRequestConfig): AxiosPromise<void>; /** * Endpoint for creating a quote in response to an RFQ * @summary Create Quote * @param {CreateQuoteRequest} createQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createQuote(createQuoteRequest: CreateQuoteRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateQuoteResponse>; /** * Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time. * @summary Create RFQ * @param {CreateRFQRequest} createRFQRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRFQ(createRFQRequest: CreateRFQRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateRFQResponse>; /** * Endpoint for deleting a quote, which means it can no longer be accepted. * @summary Delete Quote * @param {string} quoteId Quote ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteQuote(quoteId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>; /** * Endpoint for deleting an RFQ by ID * @summary Delete RFQ * @param {string} rfqId RFQ ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRFQ(rfqId: string, options?: RawAxiosRequestConfig): AxiosPromise<void>; /** * Endpoint for getting the communications ID of the logged-in user. * @summary Get Communications ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCommunicationsID(options?: RawAxiosRequestConfig): AxiosPromise<GetCommunicationsIDResponse>; /** * Endpoint for getting a particular quote * @summary Get Quote * @param {string} quoteId Quote ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuote(quoteId: string, options?: RawAxiosRequestConfig): AxiosPromise<GetQuoteResponse>; /** * Endpoint for getting quotes * @summary Get Quotes * @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} [marketTicker] Filter by market ticker * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 500. * @param {string} [status] Filter quotes by status * @param {string} [quoteCreatorUserId] Filter quotes by quote creator user ID * @param {string} [rfqCreatorUserId] Filter quotes by RFQ creator user ID * @param {string} [rfqCreatorSubtraderId] Filter quotes by RFQ creator subtrader ID (FCM members only) * @param {string} [rfqId] Filter quotes by RFQ ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuotes(cursor?: string, eventTicker?: string, marketTicker?: string, limit?: number, status?: string, quoteCreatorUserId?: string, rfqCreatorUserId?: string, rfqCreatorSubtraderId?: string, rfqId?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetQuotesResponse>; /** * Endpoint for getting a single RFQ by id * @summary Get RFQ * @param {string} rfqId RFQ ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQ(rfqId: string, options?: RawAxiosRequestConfig): AxiosPromise<GetRFQResponse>; /** * Endpoint for getting RFQs * @summary Get RFQs * @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} [marketTicker] Filter by market ticker * @param {number} [subaccount] Subaccount number (0 for primary, 1-32 for subaccounts). If omitted, defaults to all subaccounts. * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100. * @param {string} [status] Filter RFQs by status * @param {string} [creatorUserId] Filter RFQs by creator user ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQs(cursor?: string, eventTicker?: string, marketTicker?: string, subaccount?: number, limit?: number, status?: string, creatorUserId?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetRFQsResponse>; }; /** * CommunicationsApi - object-oriented interface */ export declare class CommunicationsApi extends BaseAPI { /** * Endpoint for accepting a quote. This will require the quoter to confirm * @summary Accept Quote * @param {string} quoteId Quote ID * @param {AcceptQuoteRequest} acceptQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ acceptQuote(quoteId: string, acceptQuoteRequest: AcceptQuoteRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>; /** * Endpoint for confirming a quote. This will start a timer for order execution * @summary Confirm Quote * @param {string} quoteId Quote ID * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ confirmQuote(quoteId: string, body?: object, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>; /** * Endpoint for creating a quote in response to an RFQ * @summary Create Quote * @param {CreateQuoteRequest} createQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createQuote(createQuoteRequest: CreateQuoteRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateQuoteResponse, any, {}>>; /** * Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time. * @summary Create RFQ * @param {CreateRFQRequest} createRFQRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRFQ(createRFQRequest: CreateRFQRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateRFQResponse, any, {}>>; /** * Endpoint for deleting a quote, which means it can no longer be accepted. * @summary Delete Quote * @param {string} quoteId Quote ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteQuote(quoteId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>; /** * Endpoint for deleting an RFQ by ID * @summary Delete RFQ * @param {string} rfqId RFQ ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRFQ(rfqId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>; /** * Endpoint for getting the communications ID of the logged-in user. * @summary Get Communications ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCommunicationsID(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetCommunicationsIDResponse, any, {}>>; /** * Endpoint for getting a particular quote * @summary Get Quote * @param {string} quoteId Quote ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuote(quoteId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetQuoteResponse, any, {}>>; /** * Endpoint for getting quotes * @summary Get Quotes * @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} [marketTicker] Filter by market ticker * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 500. * @param {string} [status] Filter quotes by status * @param {string} [quoteCreatorUserId] Filter quotes by quote creator user ID * @param {string} [rfqCreatorUserId] Filter quotes by RFQ creator user ID * @param {string} [rfqCreatorSubtraderId] Filter quotes by RFQ creator subtrader ID (FCM members only) * @param {string} [rfqId] Filter quotes by RFQ ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuotes(cursor?: string, eventTicker?: string, marketTicker?: string, limit?: number, status?: string, quoteCreatorUserId?: string, rfqCreatorUserId?: string, rfqCreatorSubtraderId?: string, rfqId?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetQuotesResponse, any, {}>>; /** * Endpoint for getting a single RFQ by id * @summary Get RFQ * @param {string} rfqId RFQ ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQ(rfqId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetRFQResponse, any, {}>>; /** * Endpoint for getting RFQs * @summary Get RFQs * @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} [marketTicker] Filter by market ticker * @param {number} [subaccount] Subaccount number (0 for primary, 1-32 for subaccounts). If omitted, defaults to all subaccounts. * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100. * @param {string} [status] Filter RFQs by status * @param {string} [creatorUserId] Filter RFQs by creator user ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQs(cursor?: string, eventTicker?: string, marketTicker?: string, subaccount?: number, limit?: number, status?: string, creatorUserId?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetRFQsResponse, any, {}>>; }