Markets

Market Creation Approval

A market can only be created with an approval signed by the moderator. Call this endpoint, then pass signed.name, signed.symbol, signed.outcomes and signed.endTime to createMarket unchanged, with deadline and signature: the signature covers your wallet, those exact values and the deadline, and can be used once.

POST
/api/v1/markets/approve
Ask for a market-creation approval. The creator is the authenticated wallet, never a body field.
Auth: Session or API Key (the creator is the authenticated wallet)

Request Body

Response
{
  "marketType": "public",
  "name": "Will it rain in Paris on Friday?",
  "symbol": "RAIN",
  "description": "Resolves Yes if ...",
  "outcomes": ["Yes", "No"],
  "endTime": 1760000000
}

marketType is public or private. symbol is 1 to 16 letters or digits. endTime is the close time in unix seconds, or 0 for an open-ended market; it is signed, so it must be at least a minute ahead and the review refuses one too far out. Optional and never screened: main, seedAmount (a decimal string in the pair asset's smallest unit) and privateEvent; when main is given the seed rule is checked here, so an approval is never spent on a create that would revert.

Response (approved)

Response
{
  "approved": true,
  "decision": "approve",
  "marketType": "public",
  "chainId": 4663,
  "host": "0x…",
  "signed": { "name": "…", "symbol": "RAIN", "outcomes": ["Yes", "No"], "endTime": 1760000000 },
  "signature": "0x…",
  "deadline": 1760000000,
  "contentHash": "0x…",
  "verifyingContract": "0x…",
  "moderator": "0x…"
}

verifyingContract is the market host the signature is valid for; call createMarket on that host, on the chain of this deployment (chainId).

Response (rejected)

Response
{
  "approved": false,
  "decision": "reject",
  "category": "…",
  "reason": "…"
}

Response (review still running)

Response
{
  "approved": false,
  "error": "The review is taking longer than usual. It keeps running: send the same market again after retryAfterMs for the result.",
  "code": "screening_slow",
  "retryAfterMs": 120000
}

A review that takes longer than about 90 seconds answers 503 with code screening_slow and a Retry-After header. The review keeps running and saves its verdict, so send the same request again after retryAfterMs to get the result. This answer does not count as one of your reviews.

200 Decision returned (check approved)400 Invalid body401 Not authenticated413 Body too large429 Rate limited: per IP, per wallet, daily caps, or the gate is busy500 Internal error: ask again503 Screening unavailable, still running (screening_slow) or the gate is off

Then: the on-chain call

createMarket(CreateParams, deadline, approvalSignature) on the host, with msg.value equal to the factory fee for that host. It reverts Approval expired, Signer unset, Approval already used or Invalid approval when the approval does not match.