curl -X POST https://api.pmx.trade/v2/markets/create \ -H "Content-Type: application/json" \ -d '{ "wallet": "7xKXabc123...", "title": "BTC above $95000 by Mar 1 12:00 UTC", "description": "Will BTC be above $95,000 at the resolution time?", "yesTicker": "YES", "noTicker": "NO", "resolutionTime": 1735689600, "seedAmount": 25, "tradeFeeBps": 200 }'
{ "success": true, "data": { "transaction": "AQAAAAAAA...base64...", "marketId": 42, "message": "Sign this transaction and submit to Solana to create the market. Then call /markets/confirm." }}
Create Market
Build an unsigned transaction to create a new prediction market.
POST
/
v2
/
markets
/
create
curl -X POST https://api.pmx.trade/v2/markets/create \ -H "Content-Type: application/json" \ -d '{ "wallet": "7xKXabc123...", "title": "BTC above $95000 by Mar 1 12:00 UTC", "description": "Will BTC be above $95,000 at the resolution time?", "yesTicker": "YES", "noTicker": "NO", "resolutionTime": 1735689600, "seedAmount": 25, "tradeFeeBps": 200 }'
{ "success": true, "data": { "transaction": "AQAAAAAAA...base64...", "marketId": 42, "message": "Sign this transaction and submit to Solana to create the market. Then call /markets/confirm." }}
Returns an unsigned Solana transaction that the caller must sign locally and submit to the network. The API never holds private keys.
Unix timestamp (seconds) for when the market can be resolved. Must be a valid timestamp after year 2001 and before year ~2096. The API rejects 0, negative values, and unreasonably far-future timestamps.
USDC amount to seed the AMM reserves. Pass 0 for Pool mode (no selling, proportional payout). For AMM mode the minimum is 1 USDC (1,000,000 raw units).
Human-readable instruction including next-step reminder to call /v2/markets/:id/init-mints.
curl -X POST https://api.pmx.trade/v2/markets/create \ -H "Content-Type: application/json" \ -d '{ "wallet": "7xKXabc123...", "title": "BTC above $95000 by Mar 1 12:00 UTC", "description": "Will BTC be above $95,000 at the resolution time?", "yesTicker": "YES", "noTicker": "NO", "resolutionTime": 1735689600, "seedAmount": 25, "tradeFeeBps": 200 }'
{ "success": true, "data": { "transaction": "AQAAAAAAA...base64...", "marketId": 42, "message": "Sign this transaction and submit to Solana to create the market. Then call /markets/confirm." }}
The yesTicker and noTicker define the two outcomes for the market. Traders will use these ticker names when buying, selling, or redeeming — for example, "side": "UP" instead of "side": "YES".
The resolutionTime must be a valid Unix timestamp (seconds since epoch). Passing 0, a negative number, or a timestamp before year 2001 will be rejected with a 400 error.