Base URL
| Environment | Base URL |
|---|---|
| Staging | https://api-staging.promethex.market |
| Production | https://api.promethex.market |
/api/v1/ prefix.
Authentication
PrometheX uses Privy JWT tokens. Include the token in theAuthorization header for authenticated endpoints:
Response Format
Every response follows this envelope:0 for success, non-zero for errors. See Error Codes.Machine-readable error key (e.g.,
PARAM, NOT_FOUND). Empty on success.Human-readable message.
Response payload. Varies by endpoint.
null on error.Success Example
Error Example
Error Code Ranges
| Range | Category | Description |
|---|---|---|
110100–110199 | Client | Bad request, missing params, not found |
110200–110299 | Server | Internal errors, database, cache |
110300–110399 | Third-party | External service failures |
Pagination
List endpoints acceptpage (1-indexed) and pageSize query parameters:
Page number, starting from 1.
Items per page. Maximum
50.totalCount field for calculating total pages.
Base Token Filter
Most market endpoints accept an optionalbaseTokenAddress query parameter to filter by the collateral token (e.g., USDC vs Points):
HTTP Methods
| Method | Usage |
|---|---|
GET | Read operations — markets, users, positions, prices |
POST | Write operations — trading, profile updates, SSE connections |
CORS
All origins are allowed. Supported methods:GET, POST, OPTIONS.
Rate Limiting
The API uses BBR-based adaptive rate limiting. If you receive error code110103 (PLEASE_WAIT), back off and retry with exponential delay. See Rate Limits for details.
Endpoint Map
| Section | Endpoints | Auth | Description |
|---|---|---|---|
| Markets | 8+ | Mixed | List, search, and query market data |
| Trading | 4 | Yes | Buy, sell, claim, and view positions |
| Liquidity | 2 | Yes | Add and remove liquidity |
| Resolution | 2 | Yes | Settle markets, check status |
| Real-time | 3 | Yes | SSE event streaming |
| Users | 5 | Mostly | Login, profile, notifications |
| Community | 4 | Mixed | Posts, comments |

