Account

DCA Statistics

GEThttps://openapi.longbridge.com/v1/dailycoins/statistic

Authorization

Signed mode: every request is signed with your App Key/Secret. Header set:

NameTypeRequiredDescription
Authorizationstring · headerRequiredThe account Access Token from the OpenAPI dashboard — passed as the raw token (no Bearer prefix) and included in the signature calculation.
X-Api-Keystring · headerRequiredYour App Key.
X-Timestampstring · headerRequiredRequest timestamp in seconds (Unix epoch).
X-Api-Signaturestring · headerRequiredHMAC-SHA256 signature. Format: HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=.

Longbridge HK / SG accounts only

This method is available to Longbridge HK / SG accounts only. It works with any supported symbol, including US stocks.

Get DCA statistics summary including total invested amount and profit/loss.

>_ CLI
longbridge dca stats

Request

Query parameters

NameTypeRequiredDescription
symbolstringOptionalFilter statistics by security symbol.

Response

Response properties

NameTypeRequiredDescription
active_countstringOptionalNumber of active plans
finished_countstringOptionalNumber of finished plans
suspended_countstringOptionalNumber of suspended plans
rest_daysstringOptionalDays until next investment
total_amountstringOptionalTotal invested amount
total_profitstringOptionalTotal profit/loss
nearest_plansobject[]OptionalNearest upcoming DCA plans (same structure as DcaPlan)

Response JSON example

{
  "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"
      }
    ]
  }
}

Error code

See the Error Codes page for the full list of error codes.