Development: http://localhost:10001
Production: https://api.yourdomain.com
Most endpoints require JWT authentication. Include the token in the Authorization header:
Authorization: Bearer <your-jwt-token>
GET /api/healthResponse:
{
"status": "healthy",
"timestamp": "2025-10-02T10:00:00.000Z",
"uptime": 3600,
"environment": "production",
"version": "0.1.0",
"services": {
"api": "healthy",
"database": "healthy",
"rpc_providers": "healthy",
"websocket": "healthy"
}
}GET /api/v1/wallets/listQuery Parameters:
page(number, optional): Page number (default: 1)limit(number, optional): Items per page (default: 50)group(string, optional): Filter by group name
Response:
{
"success": true,
"data": {
"wallets": [
{
"address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"label": "Main Wallet",
"group": "Trading",
"balance": "1.5 BNB",
"tier": "standard",
"createdAt": "2025-10-01T12:00:00.000Z"
}
],
"total": 100,
"page": 1,
"limit": 50,
"totalPages": 2
}
}POST /api/v1/wallets/generateRequest Body:
{
"count": 10,
"config": {
"label": "Trading Wallet",
"group": "Main Group",
"tier": "standard"
}
}Response:
{
"success": true,
"data": {
"wallets": [
{
"address": "0x...",
"privateKey": "0x...",
"label": "Trading Wallet-1",
"group": "Main Group"
}
],
"count": 10
}
}POST /api/v1/wallets/importRequest Body:
{
"privateKeys": ["0x...", "0x..."],
"config": {
"labels": ["Wallet 1", "Wallet 2"],
"group": "Imported"
}
}POST /api/v1/wallets/import-csvRequest Body: (multipart/form-data)
file: CSV file with columns: address, privateKey, label, group
GET /api/v1/wallets/exportQuery Parameters:
format(string): 'csv' or 'json' (default: 'csv')group(string, optional): Export specific group only
Response: CSV or JSON file download
POST /api/v1/wallets/batch-transferRequest Body:
{
"type": "one-to-many",
"fromAddresses": ["0x..."],
"toAddresses": ["0x...", "0x...", "0x..."],
"amount": "0.1",
"tokenAddress": "BNB"
}Types:
one-to-one: Single sender to single receiverone-to-many: Single sender to multiple receiversmany-to-many: Multiple senders to multiple receivers (round-robin)
POST /api/trading/quoteRequest Body:
{
"tokenIn": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
"tokenOut": "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82",
"amountIn": "1000000000000000000",
"slippage": 0.5
}Response:
{
"success": true,
"data": {
"amountOut": "450000000000000000",
"priceImpact": "0.12",
"route": ["WBNB", "CAKE"],
"gasEstimate": "150000"
}
}POST /api/trading/executeRequest Body:
{
"walletAddress": "0x...",
"tokenIn": "0x...",
"tokenOut": "0x...",
"amountIn": "1000000000000000000",
"slippage": 0.5,
"deadline": 300
}POST /api/trading/batchRequest Body:
{
"trades": [
{
"walletAddress": "0x...",
"tokenIn": "0x...",
"tokenOut": "0x...",
"amountIn": "1000000000000000000"
}
],
"config": {
"strategy": "parallel",
"maxConcurrent": 5,
"delayMs": 1000
}
}GET /api/dashboard/overviewResponse:
{
"success": true,
"data": {
"system": {
"status": "healthy",
"uptimeSeconds": 86400,
"version": "0.1.0",
"environment": "production"
},
"wallets": {
"total": 100,
"totalBalance": "1500.5 BNB"
},
"trading": {
"totalTrades24h": 250,
"pnl24h": "+125.50",
"volume24h": "50000.00",
"successRate": "94.5%"
}
}
}GET /api/dashboard/statusResponse:
{
"success": true,
"data": {
"overall": "healthy",
"components": {
"api_server": {
"status": "healthy",
"responseTime": 45
},
"database": {
"status": "healthy",
"connected": true
},
"rpc_provider": {
"status": "healthy",
"latency": 120
},
"websocket": {
"status": "healthy",
"connections": 5
}
},
"uptimeSeconds": 86400
}
}GET /api/alertsResponse:
{
"success": true,
"data": [
{
"id": "alert-123",
"type": "warning",
"title": "High RPC Latency",
"message": "RPC latency exceeds 2000ms",
"severity": "medium",
"timestamp": "2025-10-02T10:00:00.000Z"
}
]
}GET /api/monitoring/logsQuery Parameters:
page(number): Page numberlimit(number): Items per pagelevel(string): Filter by level (info, warn, error)search(string): Search in messages
const ws = new WebSocket('ws://localhost:10002/ws');
ws.onopen = () => {
// Subscribe to channels
ws.send(JSON.stringify({
type: 'subscribe',
data: { channels: ['metrics', 'trades', 'system'] }
}));
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('Received:', data);
};metrics: Real-time system metricstrades: Trade updatessystem: System status updatesalerts: Alert notifications
All error responses follow this format:
{
"success": false,
"error": "Error message",
"code": "ERROR_CODE",
"details": {}
}INVALID_REQUEST: Invalid request parametersUNAUTHORIZED: Authentication requiredFORBIDDEN: Insufficient permissionsNOT_FOUND: Resource not foundRATE_LIMIT_EXCEEDED: Too many requestsINTERNAL_ERROR: Server error
- Default: 100 requests per minute per IP
- Trading endpoints: 50 requests per minute
- Auth endpoints: 20 requests per minute
Rate limit headers are included in responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1696248000
- Use pagination for list endpoints
- Implement retry logic with exponential backoff
- Cache responses when appropriate
- Use WebSocket for real-time updates instead of polling
- Handle errors gracefully and log for debugging
- Secure your JWT tokens - never expose in client-side code
- Validate inputs before sending requests
- Monitor rate limits to avoid being throttled
const axios = require('axios');
const api = axios.create({
baseURL: 'http://localhost:10001',
headers: {
'Authorization': `Bearer ${process.env.JWT_TOKEN}`
}
});
// Get wallets
const wallets = await api.get('/api/v1/wallets/list');
// Execute trade
const trade = await api.post('/api/trading/execute', {
walletAddress: '0x...',
tokenIn: '0x...',
tokenOut: '0x...',
amountIn: '1000000000000000000'
});import requests
headers = {
'Authorization': f'Bearer {os.environ["JWT_TOKEN"]}'
}
# Get system health
response = requests.get(
'http://localhost:10001/api/health',
headers=headers
)
print(response.json())For API support, please:
- Check the GitHub Issues
- Read the Documentation
- Contact: support@yourdomain.com