Skip to Content

US Realized P&L

Longbridge US Accounts

This method is only available for US data-center accounts.

Get realized profit and loss for a US account, broken down by asset category.

CLI
# US realized P&L
longbridge profit-analysis realized
# Filter by stock
longbridge profit-analysis realized --category stock

Parameters

SDK method parameters.

NameTypeRequiredDescription
currencystringYESSettlement currency, e.g. USD
categorystringNOAsset category: ALL | STOCK | OPTION | CRYPTO (default: ALL)

Request Example

Response

Response Example

json
{
  "realized_pl_list": [
    {
      "category": 1,
      "currency": "USD",
      "metrics": [
        {"amount": "1250.50", "period": 1, "rate": "0.0312"}
      ]
    },
    {
      "category": 3,
      "currency": "USD",
      "metrics": [
        {"amount": "-85.20", "period": 1, "rate": "-0.0215"}
      ]
    }
  ]
}

Response Status

StatusDescriptionSchema
200SuccessUSRealizedPL
400Bad requestNone

Schemas

USRealizedPL

NameTypeRequiredDescription
realized_pl_listUSRealizedPLEntry[]trueP&L breakdown by asset category

USRealizedPLEntry

NameTypeRequiredDescription
categoryinttrueAsset category: 1=stock, 2=option, 3=crypto
currencystringtrueCurrency code (e.g. USD)
metricsUSRealizedPLMetric[]trueP&L metrics by time period

USRealizedPLMetric

NameTypeRequiredDescription
amountstringtrueRealized P&L amount
periodinttrueTime period
ratestringtrueReturn rate (%)