For the complete documentation index, see llms.txt. This page is also available as Markdown.

pnl

Get account PnL chart

get
/api/v1/pnl
Query parameters
bystring · enumRequired

Field used to identify the requested record.

Possible values:
valuestringRequired

Identifier corresponding to the selected by field.

resolutionstring · enumRequired

1h covers the last 10 days; 1d covers data since 2025-01-01 Allowed values: 1h, 1d.

Possible values:
start_timestampinteger · int64 · max: 5000000000000Required

Inclusive start of the requested time range, as a Unix timestamp in milliseconds. These history endpoints also accept Unix seconds.

end_timestampinteger · int64 · max: 5000000000000Required

End of the requested time range, as a Unix timestamp in milliseconds. These history endpoints also accept Unix seconds.

count_backinteger · int64Required

Backward-window sizing hint when start_timestamp is 0. An explicit start/end range takes precedence; this is not a strict limit on response length.

ignore_transfersbooleanOptional

Exclude deposits, withdrawals and transfers from the PnL calculation when true.

Default: false
Header parameters
authorizationstringOptional

Auth token in the Authorization header.

Responses
200

A successful response.

application/json
codeinteger · int32RequiredExample: 200
messagestringOptional
resolutionstringRequiredExample: 15m
get/api/v1/pnl
GET /api/v1/pnl?by=index&value=text&resolution=1h&start_timestamp=1&end_timestamp=1&count_back=1 HTTP/1.1
Host: mainnet.zklighter.elliot.ai
Accept: */*
{
  "code": 200,
  "message": "text",
  "resolution": "15m",
  "pnl": [
    {
      "timestamp": 1640995200,
      "trade_pnl": 12,
      "inflow": 12,
      "outflow": 12,
      "pool_pnl": 12,
      "pool_inflow": 12,
      "pool_outflow": 12,
      "pool_total_shares": 12,
      "spot_inflow": 12,
      "spot_outflow": 12,
      "staked_lit": 12,
      "staking_inflow": 12,
      "staking_outflow": 12,
      "staking_pnl": 12,
      "trade_spot_pnl": 12,
      "volume": 12
    }
  ]
}

Last updated

Was this helpful?