Skip to main content
POST
/
markets
/
create
Create a market
curl --request POST \
  --url https://api-testnet.context.markets/v2/markets/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "questionId": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
'
{
  "marketId": "<string>",
  "txHash": "<string>"
}

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Body

application/json

Question to create a market for

questionId
string
required

Question ID (hex hash) from a completed question submission

Example:

"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"

Response

Market created (or already existed)

marketId
string
required

On-chain market ID (hex)

txHash
string
required

Transaction hash of the market creation