/* tslint:disable */ /* eslint-disable */ /** * 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 globalAxios from 'axios'; // URLSearchParams not necessarily used // @ts-ignore import { URL, URLSearchParams } from 'url'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore import type { AcceptBlockTradeProposalRequest } from '../models'; // @ts-ignore import type { AcceptQuoteRequest } from '../models'; // @ts-ignore import type { CreateQuoteRequest } from '../models'; // @ts-ignore import type { CreateQuoteResponse } from '../models'; // @ts-ignore import type { CreateRFQRequest } from '../models'; // @ts-ignore import type { CreateRFQResponse } from '../models'; // @ts-ignore import type { ErrorResponse } from '../models'; // @ts-ignore import type { GetBlockTradeProposalsResponse } from '../models'; // @ts-ignore import type { GetCommunicationsIDResponse } from '../models'; // @ts-ignore import type { GetQuoteResponse } from '../models'; // @ts-ignore import type { GetQuotesResponse } from '../models'; // @ts-ignore import type { GetRFQResponse } from '../models'; // @ts-ignore import type { GetRFQsResponse } from '../models'; // @ts-ignore import type { ProposeBlockTradeRequest } from '../models'; // @ts-ignore import type { ProposeBlockTradeResponse } from '../models'; // @ts-ignore import type { UserFilter } from '../models'; /** * CommunicationsApi - axios parameter creator */ export const CommunicationsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Endpoint for accepting a block trade proposal. The caller accepts as whichever side it is named on, and may book that side onto any of its own subaccounts, including one the proposal did not name. Without a subaccount, the side keeps the one the proposal named. A side that has already accepted may accept again to move to another subaccount until the trade executes. * @summary Accept Block Trade Proposal * @param {string} blockTradeProposalId Block trade proposal ID * @param {AcceptBlockTradeProposalRequest} [acceptBlockTradeProposalRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ acceptBlockTradeProposal: async (blockTradeProposalId: string, acceptBlockTradeProposalRequest?: AcceptBlockTradeProposalRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'blockTradeProposalId' is not null or undefined assertParamExists('acceptBlockTradeProposal', 'blockTradeProposalId', blockTradeProposalId) const localVarPath = `/communications/block-trade-proposals/{block_trade_proposal_id}/accept` .replace(`{${"block_trade_proposal_id"}}`, encodeURIComponent(String(blockTradeProposalId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(acceptBlockTradeProposalRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * DEPRECATED: Use PUT /communications/rfqs/{rfq_id}/quotes/{quote_id}/accept instead. * @summary Accept Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {AcceptQuoteRequest} acceptQuoteRequest * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ acceptQuote: async (quoteId: string, acceptQuoteRequest: AcceptQuoteRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'quoteId' is not null or undefined assertParamExists('acceptQuote', 'quoteId', quoteId) // verify required parameter 'acceptQuoteRequest' is not null or undefined assertParamExists('acceptQuote', 'acceptQuoteRequest', acceptQuoteRequest) const localVarPath = `/communications/quotes/{quote_id}/accept` .replace(`{${"quote_id"}}`, encodeURIComponent(String(quoteId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(acceptQuoteRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Endpoint for accepting a quote scoped to its RFQ. This will require the quoter to confirm. The quote that fills can be another maker\'s quote at the same price; see [RFQs](/getting_started/rfqs#flow). * @summary Accept RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {AcceptQuoteRequest} acceptQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ acceptRFQQuote: async (rfqId: string, quoteId: string, acceptQuoteRequest: AcceptQuoteRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'rfqId' is not null or undefined assertParamExists('acceptRFQQuote', 'rfqId', rfqId) // verify required parameter 'quoteId' is not null or undefined assertParamExists('acceptRFQQuote', 'quoteId', quoteId) // verify required parameter 'acceptQuoteRequest' is not null or undefined assertParamExists('acceptRFQQuote', 'acceptQuoteRequest', acceptQuoteRequest) const localVarPath = `/communications/rfqs/{rfq_id}/quotes/{quote_id}/accept` .replace(`{${"rfq_id"}}`, encodeURIComponent(String(rfqId))) .replace(`{${"quote_id"}}`, encodeURIComponent(String(quoteId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(acceptQuoteRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Endpoint for cancelling a pending block trade proposal. Only the proposer can cancel it. * @summary Cancel Block Trade Proposal * @param {string} blockTradeProposalId Block trade proposal ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelBlockTradeProposal: async (blockTradeProposalId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'blockTradeProposalId' is not null or undefined assertParamExists('cancelBlockTradeProposal', 'blockTradeProposalId', blockTradeProposalId) const localVarPath = `/communications/block-trade-proposals/{block_trade_proposal_id}` .replace(`{${"block_trade_proposal_id"}}`, encodeURIComponent(String(blockTradeProposalId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * DEPRECATED: Use PUT /communications/rfqs/{rfq_id}/quotes/{quote_id}/confirm instead. Endpoint for confirming a quote. This will start a timer for order execution. * @summary Confirm Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {object} [body] * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ confirmQuote: async (quoteId: string, body?: object, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'quoteId' is not null or undefined assertParamExists('confirmQuote', 'quoteId', quoteId) const localVarPath = `/communications/quotes/{quote_id}/confirm` .replace(`{${"quote_id"}}`, encodeURIComponent(String(quoteId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Endpoint for confirming a quote scoped to its RFQ. This will start a timer for order execution. * @summary Confirm RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ confirmRFQQuote: async (rfqId: string, quoteId: string, body?: object, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'rfqId' is not null or undefined assertParamExists('confirmRFQQuote', 'rfqId', rfqId) // verify required parameter 'quoteId' is not null or undefined assertParamExists('confirmRFQQuote', 'quoteId', quoteId) const localVarPath = `/communications/rfqs/{rfq_id}/quotes/{quote_id}/confirm` .replace(`{${"rfq_id"}}`, encodeURIComponent(String(rfqId))) .replace(`{${"quote_id"}}`, encodeURIComponent(String(quoteId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * 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: async (createQuoteRequest: CreateQuoteRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'createQuoteRequest' is not null or undefined assertParamExists('createQuote', 'createQuoteRequest', createQuoteRequest) const localVarPath = `/communications/quotes`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createQuoteRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time. Creating one more returns 429 with code `open_rfq_limit_exceeded`; unlike request-rate limiting, retrying does not help until some of your RFQs close or expire. An RFQ on a market that is not open returns 400 with code `rfq_market_not_open`. * @summary Create RFQ * @param {CreateRFQRequest} createRFQRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRFQ: async (createRFQRequest: CreateRFQRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'createRFQRequest' is not null or undefined assertParamExists('createRFQ', 'createRFQRequest', createRFQRequest) const localVarPath = `/communications/rfqs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(createRFQRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * DEPRECATED: Use DELETE /communications/rfqs/{rfq_id}/quotes/{quote_id} instead. Endpoint for deleting a quote, which means it can no longer be accepted. * @summary Delete Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ deleteQuote: async (quoteId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'quoteId' is not null or undefined assertParamExists('deleteQuote', 'quoteId', quoteId) const localVarPath = `/communications/quotes/{quote_id}` .replace(`{${"quote_id"}}`, encodeURIComponent(String(quoteId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Endpoint for deleting an RFQ by ID * @summary Delete RFQ * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRFQ: async (rfqId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'rfqId' is not null or undefined assertParamExists('deleteRFQ', 'rfqId', rfqId) const localVarPath = `/communications/rfqs/{rfq_id}` .replace(`{${"rfq_id"}}`, encodeURIComponent(String(rfqId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Endpoint for deleting a quote scoped to its RFQ, which means it can no longer be accepted. * @summary Delete RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRFQQuote: async (rfqId: string, quoteId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'rfqId' is not null or undefined assertParamExists('deleteRFQQuote', 'rfqId', rfqId) // verify required parameter 'quoteId' is not null or undefined assertParamExists('deleteRFQQuote', 'quoteId', quoteId) const localVarPath = `/communications/rfqs/{rfq_id}/quotes/{quote_id}` .replace(`{${"rfq_id"}}`, encodeURIComponent(String(rfqId))) .replace(`{${"quote_id"}}`, encodeURIComponent(String(quoteId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Endpoint for getting block trade proposals visible to the authenticated user. * @summary Get Block Trade Proposals * @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} [marketTicker] Filter by market ticker * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100. * @param {string} [status] Filter block trade proposals by status * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlockTradeProposals: async (cursor?: string, marketTicker?: string, limit?: number, status?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/communications/block-trade-proposals`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) if (cursor !== undefined) { localVarQueryParameter['cursor'] = cursor; } if (marketTicker !== undefined) { localVarQueryParameter['market_ticker'] = marketTicker; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (status !== undefined) { localVarQueryParameter['status'] = status; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Endpoint for getting the communications ID of the logged-in user. * @summary Get Communications ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ getCommunicationsID: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/communications/id`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * DEPRECATED: Use GET /communications/rfqs/{rfq_id}/quotes/{quote_id} instead. Endpoint for getting a particular quote. * @summary Get Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ getQuote: async (quoteId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'quoteId' is not null or undefined assertParamExists('getQuote', 'quoteId', quoteId) const localVarPath = `/communications/quotes/{quote_id}` .replace(`{${"quote_id"}}`, encodeURIComponent(String(quoteId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * List quotes. The rfq_id filter requires an RFQ UUID. With rfq_id, quotes are sorted on the RFQ\'s main side (no for a target-cost RFQ, yes otherwise): the best price first, then the earliest place in line at that price. Pass pagination cursors back unchanged; malformed RFQ IDs or cursors return HTTP 400. * @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 {number} [minTs] Restricts the response to quotes last updated after a timestamp, formatted as a Unix Timestamp * @param {number} [maxTs] Restricts the response to quotes last updated before a timestamp, formatted as a Unix Timestamp * @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 {UserFilter} [userFilter] Filter for quotes created by the authenticated user. * @param {UserFilter} [rfqUserFilter] Filter for quotes responding to RFQs created by the authenticated user. * @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 UUID. Pass the RFQ ID unchanged; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuotes: async (cursor?: string, minTs?: number, maxTs?: number, limit?: number, status?: string, quoteCreatorUserId?: string, userFilter?: UserFilter, rfqUserFilter?: UserFilter, rfqCreatorUserId?: string, rfqCreatorSubtraderId?: string, rfqId?: string, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/communications/quotes`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) if (cursor !== undefined) { localVarQueryParameter['cursor'] = cursor; } if (minTs !== undefined) { localVarQueryParameter['min_ts'] = minTs; } if (maxTs !== undefined) { localVarQueryParameter['max_ts'] = maxTs; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (status !== undefined) { localVarQueryParameter['status'] = status; } if (quoteCreatorUserId !== undefined) { localVarQueryParameter['quote_creator_user_id'] = quoteCreatorUserId; } if (userFilter !== undefined) { localVarQueryParameter['user_filter'] = userFilter; } if (rfqUserFilter !== undefined) { localVarQueryParameter['rfq_user_filter'] = rfqUserFilter; } if (rfqCreatorUserId !== undefined) { localVarQueryParameter['rfq_creator_user_id'] = rfqCreatorUserId; } if (rfqCreatorSubtraderId !== undefined) { localVarQueryParameter['rfq_creator_subtrader_id'] = rfqCreatorSubtraderId; } if (rfqId !== undefined) { localVarQueryParameter['rfq_id'] = rfqId; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Endpoint for getting a single RFQ by id * @summary Get RFQ * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQ: async (rfqId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'rfqId' is not null or undefined assertParamExists('getRFQ', 'rfqId', rfqId) const localVarPath = `/communications/rfqs/{rfq_id}` .replace(`{${"rfq_id"}}`, encodeURIComponent(String(rfqId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Endpoint for getting a particular quote scoped to its RFQ. * @summary Get RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQQuote: async (rfqId: string, quoteId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'rfqId' is not null or undefined assertParamExists('getRFQQuote', 'rfqId', rfqId) // verify required parameter 'quoteId' is not null or undefined assertParamExists('getRFQQuote', 'quoteId', quoteId) const localVarPath = `/communications/rfqs/{rfq_id}/quotes/{quote_id}` .replace(`{${"rfq_id"}}`, encodeURIComponent(String(rfqId))) .replace(`{${"quote_id"}}`, encodeURIComponent(String(quoteId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * List RFQs. Pass pagination cursors back unchanged. A malformed cursor or invalid creator_user_id UUID returns HTTP 400. Use user_filter=self to filter by the authenticated user. * @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-63 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 UUID. Use user_filter=self for the authenticated user. * @param {UserFilter} [userFilter] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQs: async (cursor?: string, eventTicker?: string, marketTicker?: string, subaccount?: number, limit?: number, status?: string, creatorUserId?: string, userFilter?: UserFilter, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/communications/rfqs`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) if (cursor !== undefined) { localVarQueryParameter['cursor'] = cursor; } if (eventTicker !== undefined) { localVarQueryParameter['event_ticker'] = eventTicker; } if (marketTicker !== undefined) { localVarQueryParameter['market_ticker'] = marketTicker; } if (subaccount !== undefined) { localVarQueryParameter['subaccount'] = subaccount; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (status !== undefined) { localVarQueryParameter['status'] = status; } if (creatorUserId !== undefined) { localVarQueryParameter['creator_user_id'] = creatorUserId; } if (userFilter !== undefined) { localVarQueryParameter['user_filter'] = userFilter; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Endpoint for creating a block trade proposal. * @summary Propose Block Trade * @param {ProposeBlockTradeRequest} proposeBlockTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ proposeBlockTrade: async (proposeBlockTradeRequest: ProposeBlockTradeRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'proposeBlockTradeRequest' is not null or undefined assertParamExists('proposeBlockTrade', 'proposeBlockTradeRequest', proposeBlockTradeRequest) const localVarPath = `/communications/block-trade-proposals`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(proposeBlockTradeRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Endpoint for rejecting a pending block trade proposal. Either counterparty can reject it, but not the proposer, which cancels it instead. * @summary Reject Block Trade Proposal * @param {string} blockTradeProposalId Block trade proposal ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ rejectBlockTradeProposal: async (blockTradeProposalId: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'blockTradeProposalId' is not null or undefined assertParamExists('rejectBlockTradeProposal', 'blockTradeProposalId', blockTradeProposalId) const localVarPath = `/communications/block-trade-proposals/{block_trade_proposal_id}/reject` .replace(`{${"block_trade_proposal_id"}}`, encodeURIComponent(String(blockTradeProposalId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication kalshiAccessSignature required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-SIGNATURE", configuration) // authentication kalshiAccessKey required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-KEY", configuration) // authentication kalshiAccessTimestamp required await setApiKeyToObject(localVarHeaderParameter, "KALSHI-ACCESS-TIMESTAMP", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * CommunicationsApi - functional programming interface */ export const CommunicationsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = CommunicationsApiAxiosParamCreator(configuration) return { /** * Endpoint for accepting a block trade proposal. The caller accepts as whichever side it is named on, and may book that side onto any of its own subaccounts, including one the proposal did not name. Without a subaccount, the side keeps the one the proposal named. A side that has already accepted may accept again to move to another subaccount until the trade executes. * @summary Accept Block Trade Proposal * @param {string} blockTradeProposalId Block trade proposal ID * @param {AcceptBlockTradeProposalRequest} [acceptBlockTradeProposalRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async acceptBlockTradeProposal(blockTradeProposalId: string, acceptBlockTradeProposalRequest?: AcceptBlockTradeProposalRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.acceptBlockTradeProposal(blockTradeProposalId, acceptBlockTradeProposalRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * DEPRECATED: Use PUT /communications/rfqs/{rfq_id}/quotes/{quote_id}/accept instead. * @summary Accept Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {AcceptQuoteRequest} acceptQuoteRequest * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ async acceptQuote(quoteId: string, acceptQuoteRequest: AcceptQuoteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.acceptQuote(quoteId, acceptQuoteRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for accepting a quote scoped to its RFQ. This will require the quoter to confirm. The quote that fills can be another maker\'s quote at the same price; see [RFQs](/getting_started/rfqs#flow). * @summary Accept RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {AcceptQuoteRequest} acceptQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async acceptRFQQuote(rfqId: string, quoteId: string, acceptQuoteRequest: AcceptQuoteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.acceptRFQQuote(rfqId, quoteId, acceptQuoteRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for cancelling a pending block trade proposal. Only the proposer can cancel it. * @summary Cancel Block Trade Proposal * @param {string} blockTradeProposalId Block trade proposal ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ async cancelBlockTradeProposal(blockTradeProposalId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.cancelBlockTradeProposal(blockTradeProposalId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * DEPRECATED: Use PUT /communications/rfqs/{rfq_id}/quotes/{quote_id}/confirm instead. Endpoint for confirming a quote. This will start a timer for order execution. * @summary Confirm Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {object} [body] * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ async confirmQuote(quoteId: string, body?: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.confirmQuote(quoteId, body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for confirming a quote scoped to its RFQ. This will start a timer for order execution. * @summary Confirm RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async confirmRFQQuote(rfqId: string, quoteId: string, body?: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.confirmRFQQuote(rfqId, quoteId, body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for creating a quote in response to an RFQ * @summary Create Quote * @param {CreateQuoteRequest} createQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createQuote(createQuoteRequest: CreateQuoteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createQuote(createQuoteRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time. Creating one more returns 429 with code `open_rfq_limit_exceeded`; unlike request-rate limiting, retrying does not help until some of your RFQs close or expire. An RFQ on a market that is not open returns 400 with code `rfq_market_not_open`. * @summary Create RFQ * @param {CreateRFQRequest} createRFQRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async createRFQ(createRFQRequest: CreateRFQRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.createRFQ(createRFQRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * DEPRECATED: Use DELETE /communications/rfqs/{rfq_id}/quotes/{quote_id} instead. Endpoint for deleting a quote, which means it can no longer be accepted. * @summary Delete Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ async deleteQuote(quoteId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteQuote(quoteId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for deleting an RFQ by ID * @summary Delete RFQ * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteRFQ(rfqId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRFQ(rfqId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for deleting a quote scoped to its RFQ, which means it can no longer be accepted. * @summary Delete RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteRFQQuote(rfqId: string, quoteId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteRFQQuote(rfqId, quoteId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for getting block trade proposals visible to the authenticated user. * @summary Get Block Trade Proposals * @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} [marketTicker] Filter by market ticker * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100. * @param {string} [status] Filter block trade proposals by status * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getBlockTradeProposals(cursor?: string, marketTicker?: string, limit?: number, status?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getBlockTradeProposals(cursor, marketTicker, limit, status, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for getting the communications ID of the logged-in user. * @summary Get Communications ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getCommunicationsID(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getCommunicationsID(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * DEPRECATED: Use GET /communications/rfqs/{rfq_id}/quotes/{quote_id} instead. Endpoint for getting a particular quote. * @summary Get Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ async getQuote(quoteId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getQuote(quoteId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * List quotes. The rfq_id filter requires an RFQ UUID. With rfq_id, quotes are sorted on the RFQ\'s main side (no for a target-cost RFQ, yes otherwise): the best price first, then the earliest place in line at that price. Pass pagination cursors back unchanged; malformed RFQ IDs or cursors return HTTP 400. * @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 {number} [minTs] Restricts the response to quotes last updated after a timestamp, formatted as a Unix Timestamp * @param {number} [maxTs] Restricts the response to quotes last updated before a timestamp, formatted as a Unix Timestamp * @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 {UserFilter} [userFilter] Filter for quotes created by the authenticated user. * @param {UserFilter} [rfqUserFilter] Filter for quotes responding to RFQs created by the authenticated user. * @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 UUID. Pass the RFQ ID unchanged; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getQuotes(cursor?: string, minTs?: number, maxTs?: number, limit?: number, status?: string, quoteCreatorUserId?: string, userFilter?: UserFilter, rfqUserFilter?: UserFilter, rfqCreatorUserId?: string, rfqCreatorSubtraderId?: string, rfqId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getQuotes(cursor, minTs, maxTs, limit, status, quoteCreatorUserId, userFilter, rfqUserFilter, rfqCreatorUserId, rfqCreatorSubtraderId, rfqId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for getting a single RFQ by id * @summary Get RFQ * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getRFQ(rfqId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getRFQ(rfqId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for getting a particular quote scoped to its RFQ. * @summary Get RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getRFQQuote(rfqId: string, quoteId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getRFQQuote(rfqId, quoteId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * List RFQs. Pass pagination cursors back unchanged. A malformed cursor or invalid creator_user_id UUID returns HTTP 400. Use user_filter=self to filter by the authenticated user. * @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-63 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 UUID. Use user_filter=self for the authenticated user. * @param {UserFilter} [userFilter] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getRFQs(cursor?: string, eventTicker?: string, marketTicker?: string, subaccount?: number, limit?: number, status?: string, creatorUserId?: string, userFilter?: UserFilter, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.getRFQs(cursor, eventTicker, marketTicker, subaccount, limit, status, creatorUserId, userFilter, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for creating a block trade proposal. * @summary Propose Block Trade * @param {ProposeBlockTradeRequest} proposeBlockTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async proposeBlockTrade(proposeBlockTradeRequest: ProposeBlockTradeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.proposeBlockTrade(proposeBlockTradeRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Endpoint for rejecting a pending block trade proposal. Either counterparty can reject it, but not the proposer, which cancels it instead. * @summary Reject Block Trade Proposal * @param {string} blockTradeProposalId Block trade proposal ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ async rejectBlockTradeProposal(blockTradeProposalId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.rejectBlockTradeProposal(blockTradeProposalId, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath: string | undefined = undefined; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * CommunicationsApi - factory interface */ export const CommunicationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = CommunicationsApiFp(configuration) return { /** * Endpoint for accepting a block trade proposal. The caller accepts as whichever side it is named on, and may book that side onto any of its own subaccounts, including one the proposal did not name. Without a subaccount, the side keeps the one the proposal named. A side that has already accepted may accept again to move to another subaccount until the trade executes. * @summary Accept Block Trade Proposal * @param {string} blockTradeProposalId Block trade proposal ID * @param {AcceptBlockTradeProposalRequest} [acceptBlockTradeProposalRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ acceptBlockTradeProposal(blockTradeProposalId: string, acceptBlockTradeProposalRequest?: AcceptBlockTradeProposalRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.acceptBlockTradeProposal(blockTradeProposalId, acceptBlockTradeProposalRequest, options).then((request) => request(axios, basePath)); }, /** * DEPRECATED: Use PUT /communications/rfqs/{rfq_id}/quotes/{quote_id}/accept instead. * @summary Accept Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {AcceptQuoteRequest} acceptQuoteRequest * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ acceptQuote(quoteId: string, acceptQuoteRequest: AcceptQuoteRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.acceptQuote(quoteId, acceptQuoteRequest, options).then((request) => request(axios, basePath)); }, /** * Endpoint for accepting a quote scoped to its RFQ. This will require the quoter to confirm. The quote that fills can be another maker\'s quote at the same price; see [RFQs](/getting_started/rfqs#flow). * @summary Accept RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {AcceptQuoteRequest} acceptQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ acceptRFQQuote(rfqId: string, quoteId: string, acceptQuoteRequest: AcceptQuoteRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.acceptRFQQuote(rfqId, quoteId, acceptQuoteRequest, options).then((request) => request(axios, basePath)); }, /** * Endpoint for cancelling a pending block trade proposal. Only the proposer can cancel it. * @summary Cancel Block Trade Proposal * @param {string} blockTradeProposalId Block trade proposal ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ cancelBlockTradeProposal(blockTradeProposalId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.cancelBlockTradeProposal(blockTradeProposalId, options).then((request) => request(axios, basePath)); }, /** * DEPRECATED: Use PUT /communications/rfqs/{rfq_id}/quotes/{quote_id}/confirm instead. Endpoint for confirming a quote. This will start a timer for order execution. * @summary Confirm Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {object} [body] * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ confirmQuote(quoteId: string, body?: object, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.confirmQuote(quoteId, body, options).then((request) => request(axios, basePath)); }, /** * Endpoint for confirming a quote scoped to its RFQ. This will start a timer for order execution. * @summary Confirm RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ confirmRFQQuote(rfqId: string, quoteId: string, body?: object, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.confirmRFQQuote(rfqId, quoteId, body, options).then((request) => request(axios, basePath)); }, /** * 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 { return localVarFp.createQuote(createQuoteRequest, options).then((request) => request(axios, basePath)); }, /** * Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time. Creating one more returns 429 with code `open_rfq_limit_exceeded`; unlike request-rate limiting, retrying does not help until some of your RFQs close or expire. An RFQ on a market that is not open returns 400 with code `rfq_market_not_open`. * @summary Create RFQ * @param {CreateRFQRequest} createRFQRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRFQ(createRFQRequest: CreateRFQRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.createRFQ(createRFQRequest, options).then((request) => request(axios, basePath)); }, /** * DEPRECATED: Use DELETE /communications/rfqs/{rfq_id}/quotes/{quote_id} instead. Endpoint for deleting a quote, which means it can no longer be accepted. * @summary Delete Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ deleteQuote(quoteId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteQuote(quoteId, options).then((request) => request(axios, basePath)); }, /** * Endpoint for deleting an RFQ by ID * @summary Delete RFQ * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRFQ(rfqId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteRFQ(rfqId, options).then((request) => request(axios, basePath)); }, /** * Endpoint for deleting a quote scoped to its RFQ, which means it can no longer be accepted. * @summary Delete RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRFQQuote(rfqId: string, quoteId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.deleteRFQQuote(rfqId, quoteId, options).then((request) => request(axios, basePath)); }, /** * Endpoint for getting block trade proposals visible to the authenticated user. * @summary Get Block Trade Proposals * @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} [marketTicker] Filter by market ticker * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100. * @param {string} [status] Filter block trade proposals by status * @param {*} [options] Override http request option. * @throws {RequiredError} */ getBlockTradeProposals(cursor?: string, marketTicker?: string, limit?: number, status?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getBlockTradeProposals(cursor, marketTicker, limit, status, options).then((request) => request(axios, basePath)); }, /** * 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 { return localVarFp.getCommunicationsID(options).then((request) => request(axios, basePath)); }, /** * DEPRECATED: Use GET /communications/rfqs/{rfq_id}/quotes/{quote_id} instead. Endpoint for getting a particular quote. * @summary Get Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ getQuote(quoteId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getQuote(quoteId, options).then((request) => request(axios, basePath)); }, /** * List quotes. The rfq_id filter requires an RFQ UUID. With rfq_id, quotes are sorted on the RFQ\'s main side (no for a target-cost RFQ, yes otherwise): the best price first, then the earliest place in line at that price. Pass pagination cursors back unchanged; malformed RFQ IDs or cursors return HTTP 400. * @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 {number} [minTs] Restricts the response to quotes last updated after a timestamp, formatted as a Unix Timestamp * @param {number} [maxTs] Restricts the response to quotes last updated before a timestamp, formatted as a Unix Timestamp * @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 {UserFilter} [userFilter] Filter for quotes created by the authenticated user. * @param {UserFilter} [rfqUserFilter] Filter for quotes responding to RFQs created by the authenticated user. * @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 UUID. Pass the RFQ ID unchanged; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getQuotes(cursor?: string, minTs?: number, maxTs?: number, limit?: number, status?: string, quoteCreatorUserId?: string, userFilter?: UserFilter, rfqUserFilter?: UserFilter, rfqCreatorUserId?: string, rfqCreatorSubtraderId?: string, rfqId?: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getQuotes(cursor, minTs, maxTs, limit, status, quoteCreatorUserId, userFilter, rfqUserFilter, rfqCreatorUserId, rfqCreatorSubtraderId, rfqId, options).then((request) => request(axios, basePath)); }, /** * Endpoint for getting a single RFQ by id * @summary Get RFQ * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQ(rfqId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getRFQ(rfqId, options).then((request) => request(axios, basePath)); }, /** * Endpoint for getting a particular quote scoped to its RFQ. * @summary Get RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQQuote(rfqId: string, quoteId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getRFQQuote(rfqId, quoteId, options).then((request) => request(axios, basePath)); }, /** * List RFQs. Pass pagination cursors back unchanged. A malformed cursor or invalid creator_user_id UUID returns HTTP 400. Use user_filter=self to filter by the authenticated user. * @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-63 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 UUID. Use user_filter=self for the authenticated user. * @param {UserFilter} [userFilter] * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRFQs(cursor?: string, eventTicker?: string, marketTicker?: string, subaccount?: number, limit?: number, status?: string, creatorUserId?: string, userFilter?: UserFilter, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.getRFQs(cursor, eventTicker, marketTicker, subaccount, limit, status, creatorUserId, userFilter, options).then((request) => request(axios, basePath)); }, /** * Endpoint for creating a block trade proposal. * @summary Propose Block Trade * @param {ProposeBlockTradeRequest} proposeBlockTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ proposeBlockTrade(proposeBlockTradeRequest: ProposeBlockTradeRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.proposeBlockTrade(proposeBlockTradeRequest, options).then((request) => request(axios, basePath)); }, /** * Endpoint for rejecting a pending block trade proposal. Either counterparty can reject it, but not the proposer, which cancels it instead. * @summary Reject Block Trade Proposal * @param {string} blockTradeProposalId Block trade proposal ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ rejectBlockTradeProposal(blockTradeProposalId: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.rejectBlockTradeProposal(blockTradeProposalId, options).then((request) => request(axios, basePath)); }, }; }; /** * CommunicationsApi - object-oriented interface */ export class CommunicationsApi extends BaseAPI { /** * Endpoint for accepting a block trade proposal. The caller accepts as whichever side it is named on, and may book that side onto any of its own subaccounts, including one the proposal did not name. Without a subaccount, the side keeps the one the proposal named. A side that has already accepted may accept again to move to another subaccount until the trade executes. * @summary Accept Block Trade Proposal * @param {string} blockTradeProposalId Block trade proposal ID * @param {AcceptBlockTradeProposalRequest} [acceptBlockTradeProposalRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ public acceptBlockTradeProposal(blockTradeProposalId: string, acceptBlockTradeProposalRequest?: AcceptBlockTradeProposalRequest, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).acceptBlockTradeProposal(blockTradeProposalId, acceptBlockTradeProposalRequest, options).then((request) => request(this.axios, this.basePath)); } /** * DEPRECATED: Use PUT /communications/rfqs/{rfq_id}/quotes/{quote_id}/accept instead. * @summary Accept Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {AcceptQuoteRequest} acceptQuoteRequest * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ public acceptQuote(quoteId: string, acceptQuoteRequest: AcceptQuoteRequest, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).acceptQuote(quoteId, acceptQuoteRequest, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for accepting a quote scoped to its RFQ. This will require the quoter to confirm. The quote that fills can be another maker\'s quote at the same price; see [RFQs](/getting_started/rfqs#flow). * @summary Accept RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {AcceptQuoteRequest} acceptQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ public acceptRFQQuote(rfqId: string, quoteId: string, acceptQuoteRequest: AcceptQuoteRequest, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).acceptRFQQuote(rfqId, quoteId, acceptQuoteRequest, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for cancelling a pending block trade proposal. Only the proposer can cancel it. * @summary Cancel Block Trade Proposal * @param {string} blockTradeProposalId Block trade proposal ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ public cancelBlockTradeProposal(blockTradeProposalId: string, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).cancelBlockTradeProposal(blockTradeProposalId, options).then((request) => request(this.axios, this.basePath)); } /** * DEPRECATED: Use PUT /communications/rfqs/{rfq_id}/quotes/{quote_id}/confirm instead. Endpoint for confirming a quote. This will start a timer for order execution. * @summary Confirm Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {object} [body] * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ public confirmQuote(quoteId: string, body?: object, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).confirmQuote(quoteId, body, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for confirming a quote scoped to its RFQ. This will start a timer for order execution. * @summary Confirm RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ public confirmRFQQuote(rfqId: string, quoteId: string, body?: object, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).confirmRFQQuote(rfqId, quoteId, body, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for creating a quote in response to an RFQ * @summary Create Quote * @param {CreateQuoteRequest} createQuoteRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ public createQuote(createQuoteRequest: CreateQuoteRequest, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).createQuote(createQuoteRequest, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time. Creating one more returns 429 with code `open_rfq_limit_exceeded`; unlike request-rate limiting, retrying does not help until some of your RFQs close or expire. An RFQ on a market that is not open returns 400 with code `rfq_market_not_open`. * @summary Create RFQ * @param {CreateRFQRequest} createRFQRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ public createRFQ(createRFQRequest: CreateRFQRequest, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).createRFQ(createRFQRequest, options).then((request) => request(this.axios, this.basePath)); } /** * DEPRECATED: Use DELETE /communications/rfqs/{rfq_id}/quotes/{quote_id} instead. Endpoint for deleting a quote, which means it can no longer be accepted. * @summary Delete Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ public deleteQuote(quoteId: string, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).deleteQuote(quoteId, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for deleting an RFQ by ID * @summary Delete RFQ * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public deleteRFQ(rfqId: string, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).deleteRFQ(rfqId, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for deleting a quote scoped to its RFQ, which means it can no longer be accepted. * @summary Delete RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public deleteRFQQuote(rfqId: string, quoteId: string, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).deleteRFQQuote(rfqId, quoteId, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for getting block trade proposals visible to the authenticated user. * @summary Get Block Trade Proposals * @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} [marketTicker] Filter by market ticker * @param {number} [limit] Parameter to specify the number of results per page. Defaults to 100. * @param {string} [status] Filter block trade proposals by status * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getBlockTradeProposals(cursor?: string, marketTicker?: string, limit?: number, status?: string, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).getBlockTradeProposals(cursor, marketTicker, limit, status, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for getting the communications ID of the logged-in user. * @summary Get Communications ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getCommunicationsID(options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).getCommunicationsID(options).then((request) => request(this.axios, this.basePath)); } /** * DEPRECATED: Use GET /communications/rfqs/{rfq_id}/quotes/{quote_id} instead. Endpoint for getting a particular quote. * @summary Get Quote * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @deprecated * @throws {RequiredError} */ public getQuote(quoteId: string, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).getQuote(quoteId, options).then((request) => request(this.axios, this.basePath)); } /** * List quotes. The rfq_id filter requires an RFQ UUID. With rfq_id, quotes are sorted on the RFQ\'s main side (no for a target-cost RFQ, yes otherwise): the best price first, then the earliest place in line at that price. Pass pagination cursors back unchanged; malformed RFQ IDs or cursors return HTTP 400. * @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 {number} [minTs] Restricts the response to quotes last updated after a timestamp, formatted as a Unix Timestamp * @param {number} [maxTs] Restricts the response to quotes last updated before a timestamp, formatted as a Unix Timestamp * @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 {UserFilter} [userFilter] Filter for quotes created by the authenticated user. * @param {UserFilter} [rfqUserFilter] Filter for quotes responding to RFQs created by the authenticated user. * @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 UUID. Pass the RFQ ID unchanged; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getQuotes(cursor?: string, minTs?: number, maxTs?: number, limit?: number, status?: string, quoteCreatorUserId?: string, userFilter?: UserFilter, rfqUserFilter?: UserFilter, rfqCreatorUserId?: string, rfqCreatorSubtraderId?: string, rfqId?: string, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).getQuotes(cursor, minTs, maxTs, limit, status, quoteCreatorUserId, userFilter, rfqUserFilter, rfqCreatorUserId, rfqCreatorSubtraderId, rfqId, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for getting a single RFQ by id * @summary Get RFQ * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getRFQ(rfqId: string, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).getRFQ(rfqId, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for getting a particular quote scoped to its RFQ. * @summary Get RFQ Quote * @param {string} rfqId RFQ UUID returned when the RFQ was created. Pass it unchanged; malformed IDs return HTTP 400. * @param {string} quoteId Quote UUID. Pass the ID exactly as received when the quote was created; malformed IDs return HTTP 400. * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getRFQQuote(rfqId: string, quoteId: string, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).getRFQQuote(rfqId, quoteId, options).then((request) => request(this.axios, this.basePath)); } /** * List RFQs. Pass pagination cursors back unchanged. A malformed cursor or invalid creator_user_id UUID returns HTTP 400. Use user_filter=self to filter by the authenticated user. * @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-63 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 UUID. Use user_filter=self for the authenticated user. * @param {UserFilter} [userFilter] * @param {*} [options] Override http request option. * @throws {RequiredError} */ public getRFQs(cursor?: string, eventTicker?: string, marketTicker?: string, subaccount?: number, limit?: number, status?: string, creatorUserId?: string, userFilter?: UserFilter, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).getRFQs(cursor, eventTicker, marketTicker, subaccount, limit, status, creatorUserId, userFilter, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for creating a block trade proposal. * @summary Propose Block Trade * @param {ProposeBlockTradeRequest} proposeBlockTradeRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ public proposeBlockTrade(proposeBlockTradeRequest: ProposeBlockTradeRequest, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).proposeBlockTrade(proposeBlockTradeRequest, options).then((request) => request(this.axios, this.basePath)); } /** * Endpoint for rejecting a pending block trade proposal. Either counterparty can reject it, but not the proposer, which cancels it instead. * @summary Reject Block Trade Proposal * @param {string} blockTradeProposalId Block trade proposal ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ public rejectBlockTradeProposal(blockTradeProposalId: string, options?: RawAxiosRequestConfig) { return CommunicationsApiFp(this.configuration).rejectBlockTradeProposal(blockTradeProposalId, options).then((request) => request(this.axios, this.basePath)); } }