Agara

Get settled PnL history

GET/trade/v1/portfolio/pnl/history

Authorization

personal_access_token portfolio:read
AuthorizationBearer <token>

Personal access token issued from the web app's Settings → API tokens page. Send as Authorization: Bearer agt_….

In: header

Scope: portfolio:read

Query Parameters

from*string

Inclusive RFC 3339 range start.

Formatdate-time
to*string

Inclusive RFC 3339 range end.

Formatdate-time
limit?integer

Maximum completed buckets; defaults to 672 and cannot exceed 2880.

Range0 <= value

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/trade/v1/portfolio/pnl/history?from=2019-08-24T14%3A15%3A22Z&to=2019-08-24T14%3A15%3A22Z"
{  "end": {    "bucket_at": "2019-08-24T14:15:22Z",    "chain_id": 0,    "classification_version": 0,    "collateral_micro": "string",    "cumulative_inflow_micro": "string",    "cumulative_outflow_micro": "string",    "custody_through_block": 0,    "custody_through_block_hash": "string",    "custody_through_block_time": "2019-08-24T14:15:22Z",    "lifetime_pnl_micro": "string",    "mark_captured_at": "2019-08-24T14:15:22Z",    "mark_run_id": "0449856b-20b9-47d9-a9ce-f431a68a8886",    "position_count": 0,    "positions_value_micro": "string",    "wallet_universe_generation": 0  },  "from": "2019-08-24T14:15:22Z",  "has_more": true,  "lifetime_pnl_change_micro": "string",  "points": [    {      "bucket_at": "2019-08-24T14:15:22Z",      "chain_id": 0,      "classification_version": 0,      "collateral_micro": "string",      "cumulative_inflow_micro": "string",      "cumulative_outflow_micro": "string",      "custody_through_block": 0,      "custody_through_block_hash": "string",      "custody_through_block_time": "2019-08-24T14:15:22Z",      "lifetime_pnl_micro": "string",      "mark_captured_at": "2019-08-24T14:15:22Z",      "mark_run_id": "0449856b-20b9-47d9-a9ce-f431a68a8886",      "position_count": 0,      "positions_value_micro": "string",      "wallet_universe_generation": 0    }  ],  "start": {    "bucket_at": "2019-08-24T14:15:22Z",    "chain_id": 0,    "classification_version": 0,    "collateral_micro": "string",    "cumulative_inflow_micro": "string",    "cumulative_outflow_micro": "string",    "custody_through_block": 0,    "custody_through_block_hash": "string",    "custody_through_block_time": "2019-08-24T14:15:22Z",    "lifetime_pnl_micro": "string",    "mark_captured_at": "2019-08-24T14:15:22Z",    "mark_run_id": "0449856b-20b9-47d9-a9ce-f431a68a8886",    "position_count": 0,    "positions_value_micro": "string",    "wallet_universe_generation": 0  },  "to": "2019-08-24T14:15:22Z"}