Candlestick Pattern Screener
GET/api/v1.0/quote/kline-shape/stocksScreen stocks currently matching a specific K-line pattern (shape_type), K-line period (daily / 60-min), and market. Returns: code, name, current price, pre_close, selected_time, selected_price, and total_market_cap.
Request
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
shape_type | int | query | yes | Pattern type ID (1~10 bullish patterns; 1001~1010 bearish patterns) |
market | string | query | no | Market filter, default US |
ktype | int | query | no | K-line period: 2=Daily (default) / 9=60-minute |
sort_field | string | query | no | Sort field, default SELECTED_TIME |
sort_dir | string | query | no | Sort direction, default DESCENDING |
page_size | int | query | no | Page size, default 20, max 100 |
page_flag | string | query | no | Pagination cursor; omit on first page, pass back pagination.page_flag |
Example
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/kline-shape/stocks?shape_type=1&market=1&ktype=1' \
-H 'Authorization: Bearer <AccessToken>' | jqResponse
| Field | Type | Description |
|---|---|---|
data.items | object[] | |
data.items[].code | string | Stock symbol |
data.items[].name | string | Stock name |
data.items[].price | number | Current price |
data.items[].pre_close | number | Previous close price |
data.items[].selected_time | integer | Pattern selection timestamp in milliseconds |
data.items[].selected_price | number | Price when selected |
data.items[].total_market_cap | string | Total market cap |
pagination.total | string | Total matching stocks |
pagination.completed | string | True when this is the last page |
pagination.page_flag | string | Next page cursor |
Errors
| ret_code | error.code | Description |
|---|---|---|
| 0 | — | Success |
| -3 | invalid_parameter | Missing or invalid parameter |
| -7 | invalid_symbol | Unknown symbol |
| -8 | unsupported | Market or product is not supported |
| -9 | permission_denied | Missing permission |
| -10 | no_data | No data |
| -11 | rate_limited | Too many requests |
Sample
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"items": [
{
"code": "example",
"name": "example",
"price": "example",
"pre_close": "example",
"selected_time": 0,
"selected_price": "example"
}
]
},
"pagination": {
"total": 1,
"completed": true,
"page_flag": ""
}
}