Skip to main content

Copier Graph

The //user/copier/graph/:copierID endpoint returns time-series graph data for a specific copier bot over a given period and data type(s). This is typically used to plot ROI, PnL, or balance trends for visual analysis.

Graph calculations are based on the last period days of data (not a sliding window), with a maximum of 180 days to limit data volume.

All timestamps are in UTC. Calculations start at 00:00:00 and end at 23:59:59 each day.

Method

GET /user/copier/graph/:copierID

  • :copierID — the unique identifier of the copier whose graph data is to be fetched.

Query Parameters

  • period — Time window for the graph. Allowed values: 1, 7, 30, 90, 180 (in days). Defaults to 30.
  • type — Comma-separated data type(s) to graph. Allowed values: roi, pnl, aum, balance. Accepts one or two values (e.g. roi or roi,balance). Defaults to roi,pnl.

Response

Single type:

{
"status": 200,
"data": {
"graph": [
{
"day": "2025-05-07T00:00:00Z",
"value": "47.73"
}
],
"period": 30,
"value_type": "balance"
}
}

Two types:

{
"status": 200,
"data": {
"graph": [
{
"day": "2025-05-10T00:00:00Z",
"value": "0.36",
"sec_value": "47.86"
}
],
"period": 7,
"value_type": "roi",
"sec_value_type": "balance"
}
}

Fields Explained

graph (array)

Each object represents a daily data point.

  • day: Date in ISO 8601 format (UTC).
  • value: Metric value for the primary type.
  • sec_value (optional): Metric value for the secondary type, only present if two types were requested.

period

  • Number of days covered by the graph. Matches the period query parameter.

value_type

  • The primary metric type returned.

sec_value_type (optional)

  • The secondary metric type, only present if a second type was requested.