Base URL
Authentication
All requests require an API key in theX-API-Key header.
Endpoints
Markets
| Method | Endpoint | Description |
|---|---|---|
| GET | /markets | List all markets |
| GET | /markets/search | Search by keyword |
| GET | /markets/:slug | Get market details |
| POST | /markets | Create new market |
Trading
| Method | Endpoint | Description |
|---|---|---|
| POST | /markets/:slug/trade/buy | Buy shares |
| POST | /markets/:slug/trade/sell | Sell shares |
Claims
| Method | Endpoint | Description |
|---|---|---|
| GET | /markets/:slug/claim | Get claim info |
| POST | /markets/:slug/claim | Execute claim |
X.402 Payment Flow
Write operations (create, buy) use the X.402 protocol:HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Invalid request |
| 401 | Unauthorized |
| 402 | Payment required |
| 404 | Not found |
| 429 | Rate limited |
| 500 | Server error |
