The portfolio history API returns the timeseries data for equity and profit loss information of the account.
Known Issue with Portfolio History Calculations
We have received feedback and are aware issues regarding data calculated with Portfolio History API which could lead to incorrect values for
equity
,profit_loss
, andprofit_loss_pct
.Please validate results for Portfolio History API and make sure values are consistent for your use case.
We will be revamping Portfolio History API soon and will be updated in the documentation accordingly.
Sample Portfolio History
{
"timestamp": [1580826600000, 1580827500000, 1580828400000],
"equity": [27423.73, 27408.19, 27515.97],
"profit_loss": [11.8, -3.74, 104.04],
"profit_loss_pct": [0.000430469507254688, -0.0001364369455197062, 0.0037954277571845543],
"base_value": 27411.93,
"timeframe": "15Min"
}
Properties
Attribute | Type | Description |
---|---|---|
timestamp | Array of epoch int (in seconds) | Time of each data element, left-labeled (the beginning of time window) |
equity | Array of numbers | Equity value of the account in dollar amount as of the end of each time window |
profit_loss | Array of numbers | The profit/loss in dollars from the base value |
profit_loss_pct | Array of numbers | The profit/loss in percentage from the base value |
base_value | number | Basis in dollar of the profit loss calculation |
timeframe | string | Time window size of each data element |