UNPKG

kalshi-typescript

Version:

Official TypeScript SDK for the Kalshi API

164 lines (163 loc) 10.4 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.6.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 { CreateApiKeyRequest } from '../models'; import type { CreateApiKeyResponse } from '../models'; import type { GenerateApiKeyRequest } from '../models'; import type { GenerateApiKeyResponse } from '../models'; import type { GetApiKeysResponse } from '../models'; /** * ApiKeysApi - axios parameter creator */ export declare const ApiKeysApiAxiosParamCreator: (configuration?: Configuration) => { /** * Endpoint for creating a new API key with a user-provided public key. This endpoint allows users with Premier or Market Maker API usage levels to create API keys by providing their own RSA public key. The platform will use this public key to verify signatures on API requests. * @summary Create API Key * @param {CreateApiKeyRequest} createApiKeyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createApiKey: (createApiKeyRequest: CreateApiKeyRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for deleting an existing API key. This endpoint permanently deletes an API key. Once deleted, the key can no longer be used for authentication. This action cannot be undone. * @summary Delete API Key * @param {string} apiKey API key ID to delete * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteApiKey: (apiKey: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for generating a new API key with an automatically created key pair. This endpoint generates both a public and private RSA key pair. The public key is stored on the platform, while the private key is returned to the user and must be stored securely. The private key cannot be retrieved again. * @summary Generate API Key * @param {GenerateApiKeyRequest} generateApiKeyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ generateApiKey: (generateApiKeyRequest: GenerateApiKeyRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Endpoint for retrieving all API keys associated with the authenticated user. API keys allow programmatic access to the platform without requiring username/password authentication. Each key has a unique identifier and name. * @summary Get API Keys * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApiKeys: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>; }; /** * ApiKeysApi - functional programming interface */ export declare const ApiKeysApiFp: (configuration?: Configuration) => { /** * Endpoint for creating a new API key with a user-provided public key. This endpoint allows users with Premier or Market Maker API usage levels to create API keys by providing their own RSA public key. The platform will use this public key to verify signatures on API requests. * @summary Create API Key * @param {CreateApiKeyRequest} createApiKeyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createApiKey(createApiKeyRequest: CreateApiKeyRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateApiKeyResponse>>; /** * Endpoint for deleting an existing API key. This endpoint permanently deletes an API key. Once deleted, the key can no longer be used for authentication. This action cannot be undone. * @summary Delete API Key * @param {string} apiKey API key ID to delete * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteApiKey(apiKey: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; /** * Endpoint for generating a new API key with an automatically created key pair. This endpoint generates both a public and private RSA key pair. The public key is stored on the platform, while the private key is returned to the user and must be stored securely. The private key cannot be retrieved again. * @summary Generate API Key * @param {GenerateApiKeyRequest} generateApiKeyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ generateApiKey(generateApiKeyRequest: GenerateApiKeyRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenerateApiKeyResponse>>; /** * Endpoint for retrieving all API keys associated with the authenticated user. API keys allow programmatic access to the platform without requiring username/password authentication. Each key has a unique identifier and name. * @summary Get API Keys * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApiKeys(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetApiKeysResponse>>; }; /** * ApiKeysApi - factory interface */ export declare const ApiKeysApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Endpoint for creating a new API key with a user-provided public key. This endpoint allows users with Premier or Market Maker API usage levels to create API keys by providing their own RSA public key. The platform will use this public key to verify signatures on API requests. * @summary Create API Key * @param {CreateApiKeyRequest} createApiKeyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createApiKey(createApiKeyRequest: CreateApiKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateApiKeyResponse>; /** * Endpoint for deleting an existing API key. This endpoint permanently deletes an API key. Once deleted, the key can no longer be used for authentication. This action cannot be undone. * @summary Delete API Key * @param {string} apiKey API key ID to delete * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteApiKey(apiKey: string, options?: RawAxiosRequestConfig): AxiosPromise<void>; /** * Endpoint for generating a new API key with an automatically created key pair. This endpoint generates both a public and private RSA key pair. The public key is stored on the platform, while the private key is returned to the user and must be stored securely. The private key cannot be retrieved again. * @summary Generate API Key * @param {GenerateApiKeyRequest} generateApiKeyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ generateApiKey(generateApiKeyRequest: GenerateApiKeyRequest, options?: RawAxiosRequestConfig): AxiosPromise<GenerateApiKeyResponse>; /** * Endpoint for retrieving all API keys associated with the authenticated user. API keys allow programmatic access to the platform without requiring username/password authentication. Each key has a unique identifier and name. * @summary Get API Keys * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApiKeys(options?: RawAxiosRequestConfig): AxiosPromise<GetApiKeysResponse>; }; /** * ApiKeysApi - object-oriented interface */ export declare class ApiKeysApi extends BaseAPI { /** * Endpoint for creating a new API key with a user-provided public key. This endpoint allows users with Premier or Market Maker API usage levels to create API keys by providing their own RSA public key. The platform will use this public key to verify signatures on API requests. * @summary Create API Key * @param {CreateApiKeyRequest} createApiKeyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createApiKey(createApiKeyRequest: CreateApiKeyRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateApiKeyResponse, any, {}>>; /** * Endpoint for deleting an existing API key. This endpoint permanently deletes an API key. Once deleted, the key can no longer be used for authentication. This action cannot be undone. * @summary Delete API Key * @param {string} apiKey API key ID to delete * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteApiKey(apiKey: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>; /** * Endpoint for generating a new API key with an automatically created key pair. This endpoint generates both a public and private RSA key pair. The public key is stored on the platform, while the private key is returned to the user and must be stored securely. The private key cannot be retrieved again. * @summary Generate API Key * @param {GenerateApiKeyRequest} generateApiKeyRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ generateApiKey(generateApiKeyRequest: GenerateApiKeyRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GenerateApiKeyResponse, any, {}>>; /** * Endpoint for retrieving all API keys associated with the authenticated user. API keys allow programmatic access to the platform without requiring username/password authentication. Each key has a unique identifier and name. * @summary Get API Keys * @param {*} [options] Override http request option. * @throws {RequiredError} */ getApiKeys(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetApiKeysResponse, any, {}>>; }