DCA Statistics
Get DCA statistics summary including total invested amount and profit/loss.
SDK Links
Python | longbridge.openapi.DCAContext.stats |
Rust | longbridge::dca::DCAContext#stats |
Go | DCAContext.Stats |
Node.js | DCAContext#stats |
Java | DCAContext.getStats |
C++ | longbridge::dca::DCAContext::stats |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbol | string | NO | Filter by symbol |
Request Example
Response
Response Example
json
{
"code": 0,
"message": "success",
"data": {
"active_count": "2",
"finished_count": "1",
"suspended_count": "0",
"rest_days": "3",
"total_amount": "5400",
"total_profit": "120.50",
"nearest_plans": [
{
"plan_id": "1239402174908207104",
"symbol": "AAPL.US",
"stock_name": "Apple Inc.",
"market": "US",
"status": "Active",
"per_invest_amount": "100",
"invest_frequency": "Monthly",
"invest_day_of_month": "15",
"next_trd_date": "1778853600",
"cum_amount": "0",
"cum_profit": "0"
}
]
}
}Response Status
| Status | Description | Schema |
|---|---|---|
| 200 | Success | DcaStats |
| 400 | Bad request | None |
Schemas
DcaStatsResponse
| Name | Type | Required | Description |
|---|---|---|---|
| active_count | string | false | Number of active plans |
| finished_count | string | false | Number of finished plans |
| suspended_count | string | false | Number of suspended plans |
| rest_days | string | false | Days until next investment |
| total_amount | string | false | Total invested amount |
| total_profit | string | false | Total profit/loss |
| nearest_plans | object[] | false | Nearest upcoming DCA plans (same structure as DcaPlan) |
nearest_plansitems use the sameDcaPlanstructure as List DCA Plans.

