Account

Profit Analysis Summary

GEThttps://openapi.longbridge.com/v1/portfolio/profit-analysis-summary

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=.

Get a P&L summary for the account including total asset, total P&L, and yield metrics.

>_ CLI
longbridge profit-analysis
longbridge profit-analysis --start 2026-01-01

Request

Query parameters

NameTypeRequiredDescription
start_datestringOptionalAnalysis start date in `YYYY-MM-DD` format
end_datestringOptionalAnalysis end date in `YYYY-MM-DD` format

Response

Response properties

NameTypeRequiredDescription
updated_atstringOptionalLast update timestamp
sum_profitstringOptionalTotal profit/loss
sum_profit_ratestringOptionalTotal profit/loss rate
profitsobjectOptionalProfit breakdown by category
└ stockstringOptionalBasic stock information
└ fundstringOptionalFund flag/amount.
└ mmfstringOptionalMaintenance-margin factor.
└ otherstringOptionalOther value/count.
└ summary_infoobject[]OptionalSummary information.
└ ∟ profit_maxstringOptionalMaximum profit amount.
└ ∟ loss_maxstringOptionalMaximum loss amount.
└ ∟ profit_max_namestringOptionalName of the max-profit security.
└ ∟ loss_max_namestringOptionalName of the max-loss security.
└ ∟ asset_typestringOptionalElement type of this group (holdings / regional / asset class / industry)
└ ipo_subscriptionintegerOptionalIPO subscription count.
└ ipo_hitintegerOptionalIPO allotment (hit) count.
└ cumulative_transaction_amountstringOptionalCumulative transaction amount.
└ cryptostringOptionalCrypto flag.
└ trade_order_numstringOptionalNumber of trade orders.
└ trade_stock_numstringOptionalNumber of traded stocks.
is_tradedbooleanOptionalWhether any trades exist
currencystringOptionalCurrency
total_simple_earning_yieldstringOptionalTotal simple earning yield.
total_time_earning_yieldstringOptionalTotal time-weighted earning yield.
invest_amountstringOptionalTotal invested amount
initial_asset_valuestringOptionalInitial asset value
ending_asset_valuestringOptionalEnding asset value
current_total_assetstringOptionalCurrent total asset value
start_timestringOptionalPeriod start timestamp
end_timestringOptionalPeriod end timestamp
trade_update_timestringOptionalTrade data update time.
updated_datestringOptionalLast update date
start_datestringOptionalPeriod start date
end_datestringOptionalPeriod end date
trade_update_datestringOptionalTrade data update date.
trade_stock_numstringOptionalNumber of traded stocks.

Response JSON example

{
  "code": 0,
  "message": "success",
  "data": {
    "summary": {
      "currency": "USD",
      "sum_profit": "62905.97",
      "sum_profit_rate": "0.6128",
      "invest_amount": "102659.74",
      "current_total_asset": "165565.71",
      "initial_asset_value": "0.00",
      "ending_asset_value": "165565.71",
      "is_traded": true,
      "start_date": "2025-10-17",
      "start_time": "1760659200",
      "end_date": "2026-05-14",
      "end_time": "1778731947",
      "profits": {
        "stock": "66370.84",
        "crypto": "0",
        "fund": null,
        "ipo": null,
        "mmf": null,
        "other": null,
        "cumulative_transaction_amount": "1244920.28"
      }
    },
    "sublist": {
      "start": "2025-10-17",
      "start_date": "2025-10-17",
      "end": "2026-05-14",
      "end_date": "2026-05-14",
      "updated_at": "1778731947",
      "updated_date": "2026-05-14",
      "items": [
        {
          "symbol": "AAPL.US",
          "name": "Apple",
          "market": "US",
          "currency": "USD",
          "profit": "100.00",
          "profit_rate": "0.05",
          "holding_period": "180",
          "clearance_times": 0,
          "is_holding": true,
          "item_type": "Stock",
          "isin": "",
          "security_code": "AAPL",
          "underlying_profit": "100.00",
          "derivatives_profit": "0.00",
          "order_profit": null
        }
      ]
    }
  }
}

Error code

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