Skip to main content
GET
/
api
/
trading-history
/
{window}
/
stats
Get Trading History Stats
curl --request GET \
  --url https://backend-global.gains.trade/api/trading-history/{window}/stats
{
  "totalVolume": 123,
  "totalTrades": 123,
  "updatedAt": 123
}

Endpoint

GET /api/trading-history/{window}/stats Returns precomputed trading stats for a recent time window.

Parameters

ParameterLocationRequiredTypeDescription
windowpathYesstringSupported values: 24h, 48h, 72h.
chainIdqueryYesintegerBlockchain chain ID. Common values: 42161 Arbitrum, 8453 Base, 137 Polygon.

Usage Example

curl -X GET "https://backend-global.gains.trade/api/trading-history/24h/stats?chainId=42161"

Response Structure

The generated API panel lists the response schema for status codes: 200, 400, 500. Error responses generally return an error or message field.

Path Parameters

window
string
required

Supported values: 24h, 48h, 72h.

Example:

"24h"

Query Parameters

chainId
integer
required

Blockchain chain ID. Common values: 42161 Arbitrum, 8453 Base, 137 Polygon.

Example:

42161

Response

Successful response

totalVolume
number
totalTrades
integer
updatedAt
integer