Profit Analysis by Market
Get P&L breakdown grouped by market (US, HK, CN, SG).
SDK Links
Parameters
SDK method parameters.
| Name | Type | Required | Description |
|---|---|---|---|
| start_date | string | NO | Analysis start date in YYYY-MM-DD format |
| end_date | string | NO | Analysis end date in YYYY-MM-DD format |
Request Example
Response
Response Example
json
{
"code": 0,
"message": "success",
"data": {
"has_more": false,
"profit": "-16325.26",
"stock_items": [
{
"code": "AAPL",
"market": "US",
"name": "Apple",
"profit": "100.00"
}
]
}
}Response Status
| Status | Description | Schema |
|---|---|---|
| 200 | Success | ProfitAnalysisByMarketResponse |
| 400 | Bad request | None |
Schemas
ProfitAnalysisByMarketResponse
| Name | Type | Required | Description |
|---|---|---|---|
| has_more | boolean | false | Whether there are more pages |
| profit | string | false | Total profit/loss |
| stock_items | object[] | false | P&L breakdown by stock |
| ∟ code | string | false | Stock code |
| ∟ market | string | false | Market code |
| ∟ name | string | false | Stock name |
| ∟ profit | string | false | Profit/loss for this stock |

