🔌API Reference
Comprehensive REST and WebSocket APIs for integrating with 0QP protocol.
Base URLs
Production
REST API:
https://api.0qp.finance/v1WebSocket:
wss://ws.0qp.finance/v1GraphQL:
https://graph.0qp.finance/v1
Testnet
REST API:
https://testnet-api.0qp.finance/v1WebSocket:
wss://testnet-ws.0qp.finance/v1
Authentication
API Key Authentication
# Include API key in header
curl -H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
https://api.0qp.finance/v1/trading/pairsRate Limits
Public Data
100 requests
1 minute
Private Trading
50 requests
1 minute
WebSocket
10 connections
Per IP
Trading Endpoints
Get Trading Pairs
Get Order Book
Response:
Create order
Request:
Response:
Staking Endpoints Get Staking Info
Response:
Stake Tokens
Request:
Get User Staking
AI Strategy Endpoints Get Recommendations
Response:
Execute Strategy
Request:
WebSocket API Connection
Subscribe to Price Updates
Subscribe to Order Updates
SDKs and Libraries JavaScript/TypeScript SDK
Python SDK
Error Handling Error Response Format
Common Error Codes
Common Error Codes
1001
Invalid API key
Check authentication
1002
Rate limit exceeded
Slow down requests
2001
Insufficient balance
Add funds to wallet
2002
Invalid symbol
Check trading pair
3001
AI service unavailable
Try again later
GraphQL API Endpoint
Example Query
Integration Examples Simple Trading Bot
Last updated