美股夜盤
GET/api/v1.0/quote/rank/us-overnight美股夜盤(24 小時 / 524)漲跌幅榜。按夜盤漲跌幅排序,返回夜盤價/漲跌幅/漲跌額/成交額量,以及正股收盤價與日內漲跌。 篩選與分頁同 quote.rank.us_pre_market。
請求參數
| 參數 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
sort_dir | string | 查詢 | 否 | 排序方向。DESCENDING=領漲(默認)/ ASCENDING=領跌 |
page_flag | string | 查詢 | 否 | 翻頁標記。首頁不傳或傳空串;下一頁回傳上一頁響應 pagination.page_flag。只有 pagination.completed 為 true 時停止 |
page_size | int | 查詢 | 否 | 返回條數,默認 10,最大 200 |
price_filter | string | 查詢 | 否 | 價格篩選,取值同 quote.rank.us_pre_market |
market_cap_min | number | 查詢 | 否 | 最小市值(元),不傳不限制 |
market_cap_max | number | 查詢 | 否 | 最大市值(元),不傳不限制 |
pe_min | number | 查詢 | 否 | 最小市盈率,不傳不限制 |
pe_max | number | 查詢 | 否 | 最大市盈率,不傳不限制 |
請求示例
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/rank/us-overnight' \
-H 'Authorization: Bearer <AccessToken>' | jq響應參數
| 參數 | 類型 | 說明 |
|---|---|---|
data.items | object[] | |
data.items[].code | string | 標的代碼,例: US.AAPL |
data.items[].name | string | 標的名稱 |
data.items[].overnight_price | string | 夜盤價 |
data.items[].overnight_change_ratio | string | 夜盤漲跌幅(百分數) |
data.items[].overnight_change_amount | string | 夜盤漲跌額 |
data.items[].overnight_turnover | string | 夜盤成交額 |
data.items[].overnight_volume | string | 夜盤成交量 |
data.items[].close_price | string | 正股收盤價(常規時段最新價) |
data.items[].change_ratio | string | 正股日內漲跌幅(百分數) |
data.items[].change_amount | string | 正股日內漲跌額 |
pagination.total | int | |
pagination.completed | bool | 是否已到末頁。只有 true 時停止翻頁 |
pagination.page_flag | string | 下一頁標記。completed 為 false 時回傳為下一次請求的 page_flag;末頁為空串 |
錯誤碼
| ret_code | error.code | 說明 |
|---|---|---|
| 0 | — | 成功 |
| -3 | invalid_parameter | 參數不合法 |
| -8 | unsupported | 不支持 |
| -10 | no_data | 沒有數據 |
響應示例
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"items": [
{
"code": "US.AAPL",
"name": "example",
"overnight_price": "example",
"overnight_change_ratio": "example",
"overnight_change_amount": "example",
"overnight_turnover": "example",
"overnight_volume": "example",
"close_price": "example",
"change_ratio": "example",
"change_amount": "example"
}
]
},
"pagination": {
"page_flag": "",
"completed": true,
"total": 0
}
}