Install
Initialize the Client
PMX_PROGRAM_ID is exported as a constant so you don’t need to hardcode it.
Environment Setup
A typical.env for a bot or backend:
Sign and Submit Helper
Every SDK transaction builder returns an unsignedTransaction. You sign locally and submit:
What’s Included
| Export | Purpose |
|---|---|
ParimutuelClient | Main class — reads, quotes, and transaction builders |
quoteBuy, quoteSell | Pure quote functions (no RPC needed) |
getImpliedOdds | Calculate current odds from reserves |
| PDA helpers | Derive on-chain account addresses |
toRawUsdc, fromRawUsdc | Convert between USDC floats and raw integers |
| Error classes | Typed errors for clean error handling |
| Type interfaces | MarketData, WalletPosition, ListMarketsFilter, CreateMarketFullResult, and more |
Next Steps
SDK Quickstart
Read a market and place a trade in 10 lines
Full Reference
Every method, type, and constant
