POST /api/v1/market/create-market
Auth required: Yes (Admin)
Creates a new prediction market on-chain. This endpoint is restricted to admin accounts. It deploys a new market contract via the factory, initializes the APMM pool, and creates option tokens.
This is an admin-only endpoint. Regular user accounts will receive a 403 error.
Request Body
Market question (e.g., “Will BTC exceed $100k by March 2026?”).
Detailed description and resolution criteria.
Resolution rules — what data source is used and how the market resolves.
Array of option labels (minimum 2). Each option becomes a tradeable token. Option label (e.g., “Yes”, “No”).
Optional icon for the option.
Category to place the market in.
Tags for discoverability.
ISO 8601 timestamp for when the market stops accepting trades.
Collateral token address (e.g., USDC).
Initial liquidity to seed the APMM pool (in base token units).
Signed ERC-4337 UserOperation for the on-chain deployment transaction.
Example Request
curl -X POST "https://api-staging.promethex.market/api/v1/market/create-market" \
-H "Authorization: Bearer $ADMIN_JWT " \
-H "Content-Type: application/json" \
-d '{
"title": "Will ETH reach $5000 by Q2 2026?",
"description": "Resolves Yes if ETH/USD exceeds $5000...",
"rules": "Resolution source: CoinGecko ETH/USD price...",
"options": [
{ "title": "Yes" },
{ "title": "No" }
],
"categoryId": "1",
"tags": ["crypto", "ethereum"],
"endTime": "2026-06-30T00:00:00Z",
"baseTokenAddress": "0xUSDC...",
"initialLiquidity": "50000000000",
"userOperation": { ... }
}'
Response
{
"code" : 0 ,
"data" : {
"marketAddress" : "0xNewMarket...1234" ,
"opHash" : "0xabcdef..." ,
"options" : [
{
"optionAddress" : "0xOption1...aaaa" ,
"title" : "Yes"
},
{
"optionAddress" : "0xOption2...bbbb" ,
"title" : "No"
}
]
}
}
Newly deployed market contract address.
UserOperation hash to track the deployment transaction.
Created option tokens with their on-chain addresses.
Market Creation Flow
Admin PrometheX API Blockchain
│ │ │
├── POST /create-market ─► │ │
│ ├── Submit UserOp ──────► │
│ │ ├── Deploy market contract
│ │ ├── Create option tokens
│ │ ├── Initialize APMM pool
│ │ ◄── Tx confirmed ──── │
│ ◄── { marketAddress } ─ │ │
After creation, the market is in running status. It will appear in the public market list immediately after the on-chain transaction confirms.