Skip to main content
GET
/
api
/
trading-history
/
{window}
Get Trading History Window
curl --request GET \
  --url https://backend-global.gains.trade/api/trading-history/{window}
[
  {}
]

Endpoint

GET /api/trading-history/{window} Returns all trades for a recent time window.

Parameters

ParameterLocationRequiredTypeDescription
windowpathYesstringTime window: 24h, 48h, or 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?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

Time window: 24h, 48h, or 72h.

Example:

"24h"

Query Parameters

chainId
integer
required

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

Example:

42161

Response

Successful response