DomeAPI is shutting down. Transition to pmxt today with our unified API and automated migration tools.
Automatic codemod to migrate DomeAPI code to pmxt. Supports both TypeScript/JavaScript and Python.
DomeAPI is being sunset. This tool helps you automatically migrate your codebase to pmxt, which supports both Polymarket and Kalshi with a unified API.
npm install -g dome-to-pmxt
# or
npx dome-to-pmxt
# Transform a single file
dome-to-pmxt ./src/my-file.ts
# Transform a directory (recursively)
dome-to-pmxt ./src
# Transform both TS and Python files in a project
dome-to-pmxt ./
.ts, .tsx, .js, .jsx, .mjs, .cjs.pynode_modules, .git, dist, build, __pycache__, .venv, venv, .next, coverage
@dome-api/sdk → pmxtjsnew DomeClient({...}) → new pmxt.Polymarket()dome.polymarket.markets.getMarkets() → poly.fetchMarkets()pagination_key → offset, token_id → outcomeId, status: 'open' → status: 'active'start_ts, end_ts → start, end (with TODOs for manual adjustment)Same transforms for Python imports and method calls.
The codemod adds /* TODO(dome-to-pmxt): ... */ comments (JS) or # TODO(dome-to-pmxt): ... (Python) where semantic changes require manual review:
{markets: [...]}, pmxt returns arrays directlygetMarketPrice() returning a price object; pmxt prices are in market.outcomes[i].pricepagination_key), pmxt uses offset-based (offset)Date objectsSee ../../docs/MIGRATE_FROM_DOMEAPI.md for detailed migration guide and examples.
Before (DomeAPI):
import { DomeClient } from '@dome-api/sdk';
const dome = new DomeClient({ apiKey: 'your-key' });
async function main() {
const markets = await dome.polymarket.markets.getMarkets({
status: 'open',
limit: 10
});
console.log(markets.markets.length);
}
After running codemod:
import pmxt from 'pmxtjs';
const dome = /* TODO(dome-to-pmxt): new pmxt.Polymarket() or new pmxt.Kalshi() */ new pmxt.Polymarket();
async function main() {
const markets = await poly.fetchMarkets({
status: 'active',
limit: 10
});
console.log(markets.length); // TODO: pmxt returns array directly
}
TODO(dome-to-pmxt) commentsTODO(dome-to-pmxt) comments and fix thempmxt: npm install pmxtjs (or pip install pmxt)MIT
Need help with your migration?
Join our Discord