Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions sdks/typescript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/


import { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, GeminiTitan, Hyperliquid, SuiBets, Suibets, Rain, Hunch, Mock } from "./pmxt/client.js";
import { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, Polymarket_us, GeminiTitan, Hyperliquid, SuiBets, Suibets, Rain, Hunch, Mock } from "./pmxt/client.js";
import { Router } from "./pmxt/router.js";
import { ServerManager } from "./pmxt/server-manager.js";
import { FeedClient } from "./pmxt/feed-client.js";
Expand All @@ -28,7 +28,7 @@ import * as errors from "./pmxt/errors.js";

export const __version__ = "2.17.1";

export { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, GeminiTitan, Hyperliquid, SuiBets, Suibets, Rain, Hunch, Mock, PolymarketOptions } from "./pmxt/client.js";
export { Exchange, Polymarket, Kalshi, KalshiDemo, Limitless, Myriad, Probable, Baozi, Opinion, Metaculus, Smarkets, PolymarketUS, Polymarket_us, GeminiTitan, Hyperliquid, SuiBets, Suibets, Rain, Hunch, Mock, PolymarketOptions } from "./pmxt/client.js";
export type { ExchangeOptions, SuiBetsOptions } from "./pmxt/client.js";
export { FeedClient } from "./pmxt/feed-client.js";
export type { Ticker, Tickers, OHLCV, Market as FeedMarket, OracleRound, FeedClientOptions } from "./pmxt/feed-client.js";
Expand Down Expand Up @@ -97,6 +97,7 @@ const pmxt = {
Metaculus,
Smarkets,
PolymarketUS,
Polymarket_us,
GeminiTitan,
Hyperliquid,
SuiBets,
Expand Down
3 changes: 3 additions & 0 deletions sdks/typescript/pmxt/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3484,6 +3484,9 @@ export class PolymarketUS extends Exchange {
}
}

// Backwards-compatible snake_case alias matching the Python SDK export.
export const Polymarket_us = PolymarketUS;

/**
* Gemini Titan exchange client.
*
Expand Down
11 changes: 11 additions & 0 deletions sdks/typescript/tests/public-exports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,15 @@ describe('public exports', () => {
const client = new pmxt.FeedClient('chainlink');
expect(client).toBeInstanceOf(DirectFeedClient);
});

it('exports Polymarket_us as an alias of PolymarketUS', () => {
expect(pmxt.Polymarket_us).toBe(pmxt.PolymarketUS);
expect(pmxt.default.Polymarket_us).toBe(pmxt.PolymarketUS);
});

it('constructs Polymarket_us with the canonical exchange name', () => {
const exchange = new pmxt.Polymarket_us({ autoStartServer: false });
expect(exchange).toBeInstanceOf(pmxt.PolymarketUS);
expect(exchange.exchangeName).toBe('polymarket_us');
});
});
Loading