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

Authorizations

Authorization
string
header
required

Public API key passed as Bearer token

Body

application/json
questionId
string
required

32-byte hex hash

Pattern: ^0x[a-fA-F0-9]{64}$
Example:

"0x1111111111111111111111111111111111111111111111111111111111111111"

Response

Created market

marketId
string
required

32-byte hex hash

Pattern: ^0x[a-fA-F0-9]{64}$
Example:

"0x1111111111111111111111111111111111111111111111111111111111111111"

txHash
string
required

32-byte hex hash

Pattern: ^0x[a-fA-F0-9]{64}$
Example:

"0x1111111111111111111111111111111111111111111111111111111111111111"