npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kalshi-sdk

v0.0.13

Published

A public TypeScript SDK for Kalshi (https://kalshi.com/)

Readme

kalshi-sdk

An unofficial typescript client for https://kalshi.com/.

Currently only implements the Markets APIs:

To install

yarn add kalshi-sdk or npm install kalshi-sdk

To use the client, you will need an API key and API Key ID from Kalshi.

To instnatiate the client, you can either do so by providing a path to your .pem file or by supplying the key directly:

Via a .pem file

const kalshiClient = KalshiClient.fromFile(filePath, KALSHI_API_ID_HERE);

or via the key directly:

const kalshiClient = KalshiClient.fromKey(key, KALSHI_API_ID_HERE);

Using the Client

To use the client, you can invoke any of the market commands:

const market = await kalshiClient.markets.getMarket("KXEURUSDH-25FEB1416-T1.04899");

Currently supports the market, exchange, and collections APIs. (Websockets & Portfolio to come).

The current supported interface for the market types are:

getEvents(eventsRequest?: KalshiEventsRequest): Promise<KalshiEvent[]>;
getEvent(eventTicker: string, with_nested_markets: boolean): Promise<KalshiEvent>;
getMarkets(marketsRequest?: KalshiMarketsRequest): Promise<KalshiMarket[]>;
getMarket(marketTicker: string): Promise<KalshiMarket>;
getTrades(tradeRequest?: KalshiTradesRequest): Promise<KalshiTrade[]>;
getMarketOrderBook(marketTicker: string): Promise<KalshiOrderBook>;
getSeries(seriesTicker: string): Promise<KalshiSeries>;
getMarketCandlesticks(ticker: string,seriesTicker: string, candleStickRequest: KalshiCandlestickRequest): Promise<KalshiCandlestick[]>;
createKalshiOrder(orderRequest: KalshiOrderRequest): Promise<KalshiOrderResponse>;
cancelKalshiOrder(orderId: string): Promise<KalshiCancelResponse>;

For exchange:

getExchangeAnnouncment(): Promise<KalshiExchangeAnnouncement[]>
getExchangeSchedule(): Promise<KalshiExchangeSchedule>
getExchangeStatus(): Promise<KalshiExchangeStatus>

usage of client:

const market = await kalshiClient.exchange.getExchangeStatus();

For collections:

getMultivariateEventCollections(params?: KalshiMultivariateEventCollectionsRequest): Promise<KalshiMultivariateEventCollection[]>
getMultivariateEventCollection(collectionTicker: string): Promise<KalshiMultivariateEventCollection>
createMarketInMultivariateEventCollection(collectionTicker: string, selectedMarkets: KalshiSelectedMarket[]): Promise<KalshiEventMarket>
getMultivariateEventCollectionLookupHistory(collectionTicker: string, lookbackSeconds?: number): Promise<KalshiLookupPoint[]>
lookupTickersForMarketInMultivariateEventCollection(collectionTicker: string, selectedMarkets: KalshiSelectedMarket[]): Promise<KalshiEventMarket>

usage of client:

const market = await kalshiClient.collections.getMultivariateEventCollections();