kalshi-typescript
v3.9.0
Published
OpenAPI client for kalshi-typescript
Downloads
14,146
Maintainers
Readme
[email protected]
This generator creates TypeScript/JavaScript client that utilizes axios. The generated Node module can be used in the following environments:
Environment
- Node.js
- Webpack
- Browserify
Language level
- ES5 - you must have a Promises/A+ library installed
- ES6
Module system
- CommonJS
- ES6 module system
It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via package.json. (Reference)
Building
To build and compile the typescript sources to javascript use:
npm install
npm run buildPublishing
First build the package then run npm publish
Consuming
navigate to the folder of your consuming project and run one of the following commands.
published:
npm install [email protected] --saveunPublished (not recommended):
npm install PATH_TO_GENERATED_PACKAGE --saveDocumentation for API Endpoints
All URIs are relative to https://api.elections.kalshi.com/trade-api/v2
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- AccountApi | getAccountApiLimits | GET /account/limits | Get Account API Limits ApiKeysApi | createApiKey | POST /api_keys | Create API Key ApiKeysApi | deleteApiKey | DELETE /api_keys/{api_key} | Delete API Key ApiKeysApi | generateApiKey | POST /api_keys/generate | Generate API Key ApiKeysApi | getApiKeys | GET /api_keys | Get API Keys CommunicationsApi | acceptQuote | PUT /communications/quotes/{quote_id}/accept | Accept Quote CommunicationsApi | confirmQuote | PUT /communications/quotes/{quote_id}/confirm | Confirm Quote CommunicationsApi | createQuote | POST /communications/quotes | Create Quote CommunicationsApi | createRFQ | POST /communications/rfqs | Create RFQ CommunicationsApi | deleteQuote | DELETE /communications/quotes/{quote_id} | Delete Quote CommunicationsApi | deleteRFQ | DELETE /communications/rfqs/{rfq_id} | Delete RFQ CommunicationsApi | getCommunicationsID | GET /communications/id | Get Communications ID CommunicationsApi | getQuote | GET /communications/quotes/{quote_id} | Get Quote CommunicationsApi | getQuotes | GET /communications/quotes | Get Quotes CommunicationsApi | getRFQ | GET /communications/rfqs/{rfq_id} | Get RFQ CommunicationsApi | getRFQs | GET /communications/rfqs | Get RFQs EventsApi | getEvent | GET /events/{event_ticker} | Get Event EventsApi | getEventForecastPercentilesHistory | GET /series/{series_ticker}/events/{ticker}/forecast_percentile_history | Get Event Forecast Percentile History EventsApi | getEventMetadata | GET /events/{event_ticker}/metadata | Get Event Metadata EventsApi | getEvents | GET /events | Get Events EventsApi | getMarketCandlesticksByEvent | GET /series/{series_ticker}/events/{ticker}/candlesticks | Get Event Candlesticks EventsApi | getMultivariateEvents | GET /events/multivariate | Get Multivariate Events ExchangeApi | getExchangeAnnouncements | GET /exchange/announcements | Get Exchange Announcements ExchangeApi | getExchangeSchedule | GET /exchange/schedule | Get Exchange Schedule ExchangeApi | getExchangeStatus | GET /exchange/status | Get Exchange Status ExchangeApi | getSeriesFeeChanges | GET /series/fee_changes | Get Series Fee Changes ExchangeApi | getUserDataTimestamp | GET /exchange/user_data_timestamp | Get User Data Timestamp FcmApi | getFCMOrders | GET /fcm/orders | Get FCM Orders FcmApi | getFCMPositions | GET /fcm/positions | Get FCM Positions HistoricalApi | getFillsHistorical | GET /historical/fills | Get Historical Fills HistoricalApi | getHistoricalCutoff | GET /historical/cutoff | Get Historical Cutoff Timestamps HistoricalApi | getHistoricalMarket | GET /historical/markets/{ticker} | Get Historical Market HistoricalApi | getHistoricalMarkets | GET /historical/markets | Get Historical Markets HistoricalApi | getHistoricalOrders | GET /historical/orders | Get Historical Orders HistoricalApi | getMarketCandlesticksHistorical | GET /historical/markets/{ticker}/candlesticks | Get Historical Market Candlesticks HistoricalApi | getTradesHistorical | GET /historical/trades | Get Historical Trades IncentiveProgramsApi | getIncentivePrograms | GET /incentive_programs | Get Incentives LiveDataApi | getLiveData | GET /live_data/{type}/milestone/{milestone_id} | Get Live Data LiveDataApi | getLiveDatas | GET /live_data/batch | Get Multiple Live Data MarketApi | batchGetMarketCandlesticks | GET /markets/candlesticks | Batch Get Market Candlesticks MarketApi | getMarket | GET /markets/{ticker} | Get Market MarketApi | getMarketCandlesticks | GET /series/{series_ticker}/markets/{ticker}/candlesticks | Get Market Candlesticks MarketApi | getMarketOrderbook | GET /markets/{ticker}/orderbook | Get Market Orderbook MarketApi | getMarkets | GET /markets | Get Markets MarketApi | getSeries | GET /series/{series_ticker} | Get Series MarketApi | getSeriesList | GET /series | Get Series List MarketApi | getTrades | GET /markets/trades | Get Trades MilestoneApi | getMilestone | GET /milestones/{milestone_id} | Get Milestone MilestoneApi | getMilestones | GET /milestones | Get Milestones MultivariateApi | createMarketInMultivariateEventCollection | POST /multivariate_event_collections/{collection_ticker} | Create Market In Multivariate Event Collection MultivariateApi | getMultivariateEventCollection | GET /multivariate_event_collections/{collection_ticker} | Get Multivariate Event Collection MultivariateApi | getMultivariateEventCollectionLookupHistory | GET /multivariate_event_collections/{collection_ticker}/lookup | Get Multivariate Event Collection Lookup History MultivariateApi | getMultivariateEventCollections | GET /multivariate_event_collections | Get Multivariate Event Collections MultivariateApi | lookupTickersForMarketInMultivariateEventCollection | PUT /multivariate_event_collections/{collection_ticker}/lookup | Lookup Tickers For Market In Multivariate Event Collection OrderGroupsApi | createOrderGroup | POST /portfolio/order_groups/create | Create Order Group OrderGroupsApi | deleteOrderGroup | DELETE /portfolio/order_groups/{order_group_id} | Delete Order Group OrderGroupsApi | getOrderGroup | GET /portfolio/order_groups/{order_group_id} | Get Order Group OrderGroupsApi | getOrderGroups | GET /portfolio/order_groups | Get Order Groups OrderGroupsApi | resetOrderGroup | PUT /portfolio/order_groups/{order_group_id}/reset | Reset Order Group OrderGroupsApi | triggerOrderGroup | PUT /portfolio/order_groups/{order_group_id}/trigger | Trigger Order Group OrderGroupsApi | updateOrderGroupLimit | PUT /portfolio/order_groups/{order_group_id}/limit | Update Order Group Limit OrdersApi | amendOrder | POST /portfolio/orders/{order_id}/amend | Amend Order OrdersApi | batchCancelOrders | DELETE /portfolio/orders/batched | Batch Cancel Orders OrdersApi | batchCreateOrders | POST /portfolio/orders/batched | Batch Create Orders OrdersApi | cancelOrder | DELETE /portfolio/orders/{order_id} | Cancel Order OrdersApi | createOrder | POST /portfolio/orders | Create Order OrdersApi | decreaseOrder | POST /portfolio/orders/{order_id}/decrease | Decrease Order OrdersApi | getOrder | GET /portfolio/orders/{order_id} | Get Order OrdersApi | getOrderQueuePosition | GET /portfolio/orders/{order_id}/queue_position | Get Order Queue Position OrdersApi | getOrderQueuePositions | GET /portfolio/orders/queue_positions | Get Queue Positions for Orders OrdersApi | getOrders | GET /portfolio/orders | Get Orders PortfolioApi | applySubaccountTransfer | POST /portfolio/subaccounts/transfer | Transfer Between Subaccounts PortfolioApi | createSubaccount | POST /portfolio/subaccounts | Create Subaccount PortfolioApi | getBalance | GET /portfolio/balance | Get Balance PortfolioApi | getFills | GET /portfolio/fills | Get Fills PortfolioApi | getPortfolioRestingOrderTotalValue | GET /portfolio/summary/total_resting_order_value | Get Total Resting Order Value PortfolioApi | getPositions | GET /portfolio/positions | Get Positions PortfolioApi | getSettlements | GET /portfolio/settlements | Get Settlements PortfolioApi | getSubaccountBalances | GET /portfolio/subaccounts/balances | Get All Subaccount Balances PortfolioApi | getSubaccountNetting | GET /portfolio/subaccounts/netting | Get Subaccount Netting PortfolioApi | getSubaccountTransfers | GET /portfolio/subaccounts/transfers | Get Subaccount Transfers PortfolioApi | updateSubaccountNetting | PUT /portfolio/subaccounts/netting | Update Subaccount Netting SearchApi | getFiltersForSports | GET /search/filters_by_sport | Get Filters for Sports SearchApi | getTagsForSeriesCategories | GET /search/tags_by_categories | Get Tags for Series Categories StructuredTargetsApi | getStructuredTarget | GET /structured_targets/{structured_target_id} | Get Structured Target StructuredTargetsApi | getStructuredTargets | GET /structured_targets | Get Structured Targets
Documentation For Models
- AcceptQuoteRequest
- AmendOrderRequest
- AmendOrderResponse
- Announcement
- ApiKey
- ApplySubaccountTransferRequest
- AssociatedEvent
- BatchCancelOrdersIndividualResponse
- BatchCancelOrdersRequest
- BatchCancelOrdersRequestOrder
- BatchCancelOrdersResponse
- BatchCreateOrdersIndividualResponse
- BatchCreateOrdersRequest
- BatchCreateOrdersResponse
- BatchGetMarketCandlesticksResponse
- BidAskDistribution
- BidAskDistributionHistorical
- CancelOrderResponse
- CreateApiKeyRequest
- CreateApiKeyResponse
- CreateMarketInMultivariateEventCollectionRequest
- CreateMarketInMultivariateEventCollectionResponse
- CreateOrderGroupRequest
- CreateOrderGroupResponse
- CreateOrderRequest
- CreateOrderResponse
- CreateQuoteRequest
- CreateQuoteResponse
- CreateRFQRequest
- CreateRFQResponse
- CreateSubaccountResponse
- DailySchedule
- DecreaseOrderRequest
- DecreaseOrderResponse
- ErrorResponse
- EventData
- EventPosition
- ExchangeInstance
- ExchangeStatus
- Fill
- ForecastPercentilesPoint
- GenerateApiKeyRequest
- GenerateApiKeyResponse
- GetAccountApiLimitsResponse
- GetApiKeysResponse
- GetBalanceResponse
- GetCommunicationsIDResponse
- GetEventCandlesticksResponse
- GetEventForecastPercentilesHistoryResponse
- GetEventMetadataResponse
- GetEventResponse
- GetEventsResponse
- GetExchangeAnnouncementsResponse
- GetExchangeScheduleResponse
- GetFillsResponse
- GetFiltersBySportsResponse
- GetHistoricalCutoffResponse
- GetIncentiveProgramsResponse
- GetLiveDataResponse
- GetLiveDatasResponse
- GetMarketCandlesticksHistoricalResponse
- GetMarketCandlesticksResponse
- GetMarketOrderbookResponse
- GetMarketResponse
- GetMarketsResponse
- GetMilestoneResponse
- GetMilestonesResponse
- GetMultivariateEventCollectionLookupHistoryResponse
- GetMultivariateEventCollectionResponse
- GetMultivariateEventCollectionsResponse
- GetMultivariateEventsResponse
- GetOrderGroupResponse
- GetOrderGroupsResponse
- GetOrderQueuePositionResponse
- GetOrderQueuePositionsResponse
- GetOrderResponse
- GetOrdersResponse
- GetPortfolioRestingOrderTotalValueResponse
- GetPositionsResponse
- GetQuoteResponse
- GetQuotesResponse
- GetRFQResponse
- GetRFQsResponse
- GetSeriesFeeChangesResponse
- GetSeriesListResponse
- GetSeriesResponse
- GetSettlementsResponse
- GetStructuredTargetResponse
- GetStructuredTargetsResponse
- GetSubaccountBalancesResponse
- GetSubaccountNettingResponse
- GetSubaccountTransfersResponse
- GetTagsForSeriesCategoriesResponse
- GetTradesResponse
- GetUserDataTimestampResponse
- IncentiveProgram
- IntraExchangeInstanceTransferRequest
- IntraExchangeInstanceTransferResponse
- LiveData
- LookupPoint
- LookupTickersForMarketInMultivariateEventCollectionRequest
- LookupTickersForMarketInMultivariateEventCollectionResponse
- MaintenanceWindow
- Market
- MarketCandlestick
- MarketCandlestickHistorical
- MarketCandlesticksResponse
- MarketMetadata
- MarketPosition
- Milestone
- MultivariateEventCollection
- MveSelectedLeg
- Order
- OrderGroup
- OrderQueuePosition
- OrderStatus
- OrderbookCountFp
- PercentilePoint
- PriceDistribution
- PriceDistributionHistorical
- PriceRange
- Quote
- RFQ
- Schedule
- ScopeList
- SelfTradePreventionType
- Series
- SeriesFeeChange
- Settlement
- SettlementSource
- SportFilterDetails
- StructuredTarget
- SubaccountBalance
- SubaccountNettingConfig
- SubaccountTransfer
- TickerPair
- Trade
- UpdateOrderGroupLimitRequest
- UpdateSubaccountNettingRequest
- WeeklySchedule
Documentation For Authorization
Authentication schemes defined for the API:
kalshiAccessKey
- Type: API key
- API key parameter name: KALSHI-ACCESS-KEY
- Location: HTTP header
kalshiAccessSignature
- Type: API key
- API key parameter name: KALSHI-ACCESS-SIGNATURE
- Location: HTTP header
kalshiAccessTimestamp
- Type: API key
- API key parameter name: KALSHI-ACCESS-TIMESTAMP
- Location: HTTP header
