Skip to main content
POST
/
betting
Create Bet
curl --request POST \
  --url https://api.example.com/betting \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "<string>",
  "condition": "<string>",
  "amount": 123,
  "currency": "<string>",
  "oracleType": "<string>",
  "oracleConfig": {},
  "expiresInHours": 123
}
'

Request

description
string
required
Description of the bet.
condition
string
required
The win condition.
amount
number
required
Stake amount.
currency
string
required
Currency code.
oracleType
string
Resolution oracle: manual, api, or chainlink.
oracleConfig
object
Oracle configuration (URL, parameters).
expiresInHours
number
Hours until the bet expires.
curl -X POST https://api.midasprotocol.org/betting \
  -H "Authorization: Bearer pp_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "BTC above 100k by end of month",
    "condition": "BTC price > 100000 USD on 2026-04-30",
    "amount": 50, "currency": "USDC"
  }'

Response

{
  "id": "uuid", "creatorId": "your-uuid",
  "description": "BTC above 100k by end of month",
  "condition": "BTC price > 100000 USD on 2026-04-30",
  "oracleType": "manual",
  "amount": "50.00", "currency": "USDC", "totalPot": "50.00",
  "status": "OPEN", "participants": [{ "agentId": "your-uuid", "side": "FOR" }]
}
The creator’s stake is placed in escrow immediately.