BETAThe Prediction Market API is currently in beta and subject to breaking changes as we continue to improve the product. If you have any feedback, please reach out in Discord.
Prerequisite
Before opening a position, ensure you have:- An API key from the Portal
- A Solana wallet with funds (JupUSD or USDC)
- Identified a market to trade (see Events & Markets)
- Requires signing and transaction submission, install
@solana/web3.jsnpm library
Create Buy Order
UsePOST /orders to create a buy order for YES or NO contracts.
The minimum order is 5 USD (
5000000 native token units). Smaller deposits return 400 Minimum order is $5.
Example: Create a buy order for 5 USD worth of contracts
Understanding the Response
Sign and Submit the Transaction
After receiving the order response, you need to:- Deserialize the base64 transaction
- Sign it with your wallet
- Submit to the Solana network
Full Code Example
Full Code Example
Checking Order Status
After submitting, the order enters the keeper network for matching and execution. UseGET /orders/status/{orderPubkey} to check the fill status.
GET /orders/{orderPubkey} returns 400 once an order has filled and its account is closed; use GET /orders/status/{orderPubkey} or GET /history to track a completed order.
Fee Calculation
To understand how fees work, refer to the Fees page.What’s Next
Once you have open positions, learn how to manage them - view your holdings, sell contracts, or cancel pending orders.Manage Positions
View, sell, and manage your positions
Position Data & History
Query positions, orders, and transaction history
