Why Migrate?
Dome API is being sunset. Parsec offers a unified prediction market API with significant advantages:- 5 exchanges in one API — Polymarket, Kalshi, Opinion, Limitless, and Predict.fun through a single interface
- Unified order routing — Place orders across exchanges with one endpoint
- Managed wallets — No need to manage your own keys
- Real-time WebSocket feeds — Low-latency orderbook and trade streams
- Builder program — Build apps on top of Parsec with user management, fee sharing, and QPS pools
- CTF operations — Split, merge, and redeem conditional tokens
Quick Start
1. Run the automatic migration tool
2. Install the Parsec SDK
3. Set your API key
4. Review TODOs
Search your codebase forTODO(dome-to-parsec) comments and resolve each one. Common items:
- Converting
token_idtoparsec_idformat (polymarket:TOKEN_ID) - WebSocket subscription model changes
- Response shape differences
Automatic Migration Tool
Thedome-to-parsec CLI handles the mechanical parts of migration:
- Import statements and package names
DomeClientconstructor toParsecAPI- Method chains (e.g.
dome.polymarket.markets.getMarkets()toclient.markets.list()) - Parameter names (
token_idtoparsec_id,pagination_keytocursor) - Status values (
'open'to'active')
parsec_idformat conversion (requires{exchange}:{native_id}format)- WebSocket migration (different subscription model)
- Response shape differences
wallet.getPnL()— not exposed in Parsecsports.*— not available in ParsecbinancePrices.*/chainlinkPrices.*— not in Parsec scope
Endpoint Mapping
Market Data
| Dome Endpoint | Parsec Equivalent | Notes |
|---|---|---|
dome.polymarket.markets.getMarkets({...}) | client.markets.list({ exchanges: ['polymarket'] }) | Parsec supports filtering by multiple exchanges |
dome.kalshi.markets.getMarkets({...}) | client.markets.list({ exchanges: ['kalshi'] }) | Same unified endpoint |
dome.polymarket.markets.getMarketPrice({ token_id }) | client.price.retrieve({ parsec_id: 'polymarket:TOKEN_ID' }) | Use parsec_id format |
dome.kalshi.markets.getMarketPrice({ ticker }) | client.price.retrieve({ parsec_id: 'kalshi:TICKER' }) | Use parsec_id format |
dome.polymarket.events.list({...}) | client.events.list({ exchanges: ['polymarket'] }) |
Orderbook & Trades
| Dome Endpoint | Parsec Equivalent | Notes |
|---|---|---|
dome.polymarket.orderbook.getHistory({...}) | client.orderbook.retrieve({ parsec_id, start_ts, end_ts }) | Historical mode via start_ts |
dome.polymarket.trades.getHistory({...}) | client.trades.list({ parsec_id }) | |
dome.polymarket.candlesticks.get({...}) | client.price.retrieve({ parsec_id, interval }) | Pass interval param |
Orders & Account
| Dome Endpoint | Parsec Equivalent | Notes |
|---|---|---|
dome.polymarket.placeOrder({...}) | client.orders.create({ exchange: 'polymarket', ... }) | |
dome.polymarket.positions.get({...}) | client.positions.list({ exchange: 'polymarket' }) | |
dome.polymarket.wallet.get({...}) | client.wallet.retrieve() | |
dome.polymarket.activity.get({...}) | client.account.user_activity({ address }) | Different response shape |
SDK Migration Examples
Market Data
Placing Orders
WebSocket
Parameter Mapping
| Dome Parameter | Parsec Parameter | Notes |
|---|---|---|
token_id | parsec_id | Format: polymarket:{token_id} |
ticker | parsec_id | Format: kalshi:{ticker} |
condition_id | parsec_id | Format: polymarket:{condition_id} |
status: 'open' | status: 'active' | Automatic transform |
pagination_key | cursor | Automatic transform |
limit | limit | Same |
start_ts | start_ts | Same (unix seconds) |
end_ts | end_ts | Same (unix seconds) |
Key Differences
Unified parsec_id
Dome uses exchange-specific identifiers (token_id for Polymarket, ticker for Kalshi). Parsec uses a unified parsec_id format:
polymarket:abc123def(Polymarket token ID)kalshi:KXBTC-24MAR14(Kalshi ticker)opinion:12345(Opinion market ID)
Unified Endpoints
Dome namespaces endpoints by exchange (dome.polymarket.markets.*, dome.kalshi.markets.*). Parsec uses unified endpoints with an exchange filter:
Authentication
| Dome | Parsec | |
|---|---|---|
| Header | X-Dome-Api-Key | Authorization: Bearer PARSEC_API_KEY |
| Env var | DOME_API_KEY | PARSEC_API_KEY |
| SDK | new DomeClient({ apiKey }) | new ParsecAPI({ apiKey }) (reads PARSEC_API_KEY from env by default) |
Features Only in Parsec
These capabilities are available in Parsec but have no Dome equivalent:- Multi-exchange support — 5 exchanges (Polymarket, Kalshi, Opinion, Limitless, Predict.fun)
- Cross-exchange market discovery — Search across all exchanges at once
- Execution price estimation — Preview fill price before placing orders
- CTF operations — Split, merge, and redeem conditional tokens
- Managed wallets — Parsec manages keys and signing
- Builder program — Create users, manage QPS pools, earn fee revenue
Dome Features Not in Parsec
These Dome features do not have Parsec equivalents:| Feature | Status |
|---|---|
P&L analysis (wallet.getPnL) | Not available |
| Binance price feeds | Not in scope |
| Chainlink price feeds | Not in scope |
| Sports matching | Not available |
| WS subscribe by wallet address | Parsec subscribes by market |