Skip to main content
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.
This doc walks through creating a buy order to open a position in a prediction market. You’ll learn how to construct the order request, sign the returned transaction, and submit it to the Solana network.

Prerequisite

Before opening a position, ensure you have:
API REFERENCEFor the complete endpoint specification, see the Create Order API Reference.

Create Buy Order

Use POST /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:
  1. Deserialize the base64 transaction
  2. Sign it with your wallet
  3. Submit to the Solana network

Checking Order Status

After submitting, the order enters the keeper network for matching and execution. Use GET /orders/status/{orderPubkey} to check the fill status.
Order Flow
  1. Create Order: You sign a transaction that creates an order account on-chain - this transaction only opens an order account and does not guarantee that the order will be filled.
  2. Keeper Fills: Jupiter’s keeper network matches your order with the underlying prediction market
  3. Position Updated: Once filled, your position account reflects the new contracts
  4. Order Closed: The order account is closed after completion
Polling immediately after submitting the transaction might return a pending status or a no order history found error. Wait for a few slots before polling again.
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