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.
# US realized P&L
longbridge profit-analysis realized
# Filter by stock
longbridge profit-analysis realized --category stockSDK Links
Parameters
SDK method parameters.
| Name | Type | Required | Description |
|---|---|---|---|
| currency | string | YES | Settlement currency, e.g. USD |
| category | string | NO | Asset 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
| Status | Description | Schema |
|---|---|---|
| 200 | Success | USRealizedPL |
| 400 | Bad request | None |
Schemas
USRealizedPL
| Name | Type | Required | Description |
|---|---|---|---|
| realized_pl_list | USRealizedPLEntry[] | true | P&L breakdown by asset category |
USRealizedPLEntry
| Name | Type | Required | Description |
|---|---|---|---|
| category | int | true | Asset category: 1=stock, 2=option, 3=crypto |
| currency | string | true | Currency code (e.g. USD) |
| metrics | USRealizedPLMetric[] | true | P&L metrics by time period |
USRealizedPLMetric
| Name | Type | Required | Description |
|---|---|---|---|
| amount | string | true | Realized P&L amount |
| period | int | true | Time period |
| rate | string | true | Return rate (%) |