Complete documentation for accessing Gothix AI platform data and services
All API endpoints are prefixed with the base URL above. Replace your-bot-server-ip
with your actual bot server IP address.
Update the API configuration in your JavaScript:
const API_CONFIG = {
baseUrl: 'http://YOUR_BOT_SERVER_IP:3001/api',
endpoints: {
platformStats: '/platform/stats',
activeTrades: '/trades/active',
recentTrades: '/trades/recent',
participants: '/participants/stats',
tradingPairs: '/trading-pairs',
performance: '/performance/daily',
health: '/system/health'
}
};
Retrieve comprehensive platform statistics including user counts, trading metrics, and financial data.
Field | Type | Description |
---|---|---|
platform.totalUsers | number | Total number of registered users |
platform.activeTraders | number | Users with trading enabled |
platform.tradingPairs | number | Number of active trading pairs |
platform.totalVolume | string | Formatted total trading volume |
trading.totalTrades | number | Total number of pool trades |
trading.successRate | number | Success rate percentage |
{
"platform": {
"totalUsers": 1247,
"activeTraders": 834,
"tradingPairs": 10,
"totalVolume": "2.4M",
"totalVolumeRaw": 2400000
},
"trading": {
"totalTrades": 3892,
"todayTrades": 45,
"successRate": 72,
"activeNetworks": 3
},
"financial": {
"totalDeposits": "1.8M",
"totalWithdrawals": "1.2M",
"depositCount": 2341,
"withdrawalCount": 1567,
"totalTransactions": 3908
},
"uptime": {
"status": "online",
"availability": "99.9%",
"lastUpdate": "2024-12-19T10:30:00.000Z"
}
}
Get currently active pool trades with participant information.
{
"count": 2,
"trades": [
{
"id": 156,
"pair": "BTC/USDT",
"type": "LONG",
"entryPrice": 43250.50,
"amount": 12500.00,
"leverage": 10,
"participants": 23,
"participantsList": [
{
"name": "John D.",
"amount": 500.00
}
],
"openedAt": "2024-12-19T09:15:00.000Z",
"scheduledCloseTime": "2024-12-19T10:45:00.000Z",
"targetProfitPercentage": 1.8,
"status": "OPEN"
}
]
}
Retrieve recently completed trades with profit/loss information.
Parameter | Type | Default | Description |
---|---|---|---|
limit | number | 10 | Number of trades to return (max 50) |
{
"count": 5,
"trades": [
{
"id": 155,
"pair": "ETH/USDT",
"type": "SHORT",
"entryPrice": 2340.75,
"exitPrice": 2298.50,
"amount": 8750.00,
"profit": 157.50,
"profitPercentage": 1.8,
"leverage": 15,
"participants": 18,
"openedAt": "2024-12-19T08:30:00.000Z",
"closedAt": "2024-12-19T09:15:00.000Z",
"duration": 45,
"isWin": true,
"status": "CLOSED"
}
]
}
Get detailed statistics about trading participants and performance.
{
"totalParticipations": 5678,
"uniqueParticipants": 834,
"activeParticipants": 45,
"topPerformers": [
{
"name": "Anonymous",
"profit": 245.80,
"amount": 1000.00
}
]
}
List all available trading pairs with trade counts.
{
"count": 10,
"pairs": [
{
"id": 1,
"symbol": "BTC/USDT",
"name": "Bitcoin / Tether",
"active": true,
"totalTrades": 892
},
{
"id": 2,
"symbol": "ETH/USDT",
"name": "Ethereum / Tether",
"active": true,
"totalTrades": 743
}
]
}
Get daily performance metrics for the specified time period.
Parameter | Type | Default | Description |
---|---|---|---|
days | number | 7 | Number of days to retrieve (max 30) |
{
"period": "7 days",
"data": [
{
"date": "2024-12-19",
"totalTrades": 45,
"completedTrades": 42,
"totalVolume": 125000,
"totalProfit": 75.6,
"successRate": 74,
"averageProfit": 1.8
}
]
}
Check the overall health and status of the trading system.
{
"status": "healthy",
"timestamp": "2024-12-19T10:30:00.000Z",
"uptime": 2547891,
"database": "connected",
"recentActivity": 45,
"settings": {
"winPercentage": "70",
"dailyTarget": "3",
"poolTradePercentage": "10"
}
}
All API endpoints return appropriate HTTP status codes and error messages.
Status Code | Description |
---|---|
200 | Success - Request completed successfully |
404 | Not Found - API endpoint not found |
500 | Internal Server Error - Server-side error occurred |
{
"error": "Failed to retrieve platform statistics",
"timestamp": "2024-12-19T10:30:00.000Z"
}