Introduction
Welcome to the Opinix Trade API documentation. The Opinix Trade API provides programmatic access to create trading events, place orders, and retrieve market data for real-time opinion trading.Base URL
All API requests should be made to:Authentication
Future authentication will use JWT tokens passed in theAuthorization header:
Request Format
All requests should be made with the following headers:Response Format
Success Response
All successful API responses follow this structure:Always
true for successful responsesHTTP status code (e.g., 200, 201)
Human-readable success message
Optional additional data returned by the endpoint
Example Success Response
Error Response
All error responses follow this structure:Always
false for error responsesHTTP error code (400, 401, 404, 422, 500, etc.)
Error name describing the type of error
Detailed error message
Example Error Response
Error Codes
The API uses standard HTTP status codes:| Code | Name | Description |
|---|---|---|
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Authentication required or failed |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource not found |
| 408 | Request Timeout | Request took too long to process |
| 409 | Conflict | Resource conflict (e.g., duplicate event) |
| 422 | Unprocessable Entity | Validation error |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server-side error |
| 502 | Network Error | Network connectivity issue |
| 503 | Service Unavailable | Service temporarily unavailable |
| 504 | Gateway Timeout | Gateway timeout |
Rate Limiting
Rate limiting is not currently enforced but will be implemented in production.
API Endpoints
The API is organized into the following resource groups:Events
Create and manage trading events
Orders
Place and manage trading orders
WebSocket
Real-time market data via WebSocket
SDK Support
You can use any HTTP client to interact with the API. Examples below show usage with cURL, JavaScript fetch, and TypeScript.
Quick Start Example
Need Help?
If you have questions or need assistance:- Check out the Events API documentation
- Explore Orders API documentation
- Learn about WebSocket API for real-time data
- Review code examples in each endpoint documentation