按市場盈虧分析
獲取按市場分組的盈虧分析(美股、港股、A 股、新加坡股)。
SDK Links
Parameters
SDK 方法參數。
| Name | Type | Required | Description |
|---|---|---|---|
| start_date | string | 否 | 分析開始日期,格式 YYYY-MM-DD |
| end_date | string | 否 | 分析結束日期,格式 YYYY-MM-DD |
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 | 成功 | ProfitAnalysisByMarketResponse |
| 400 | 請求錯誤 | 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 | 市場代碼 |
| ∟ name | string | false | Stock name |
| ∟ profit | string | false | Profit/loss for this stock |

