# List Stock Historical Bars

Retrieves the recent N bars of data based on stock symbols, time granularity, and type. Supports historical bars of various granularities like M1, M5, etc. Currently, daily bars (D) and above only provide forward-adjusted bars; minute bars provide unadjusted bars.

# OpenAPI definition

```json
{
  "info": {
    "title": "Webull Open API Reference",
    "description": "application.yml\\ncom\\ni18n\\nMETA-INF\\nstatic\\n\\r\\n",
    "contact": {
      "name": "",
      "url": "",
      "email": ""
    },
    "version": "2.0",
    "x-logo": {
      "url": "static/png/logo.png"
    }
  },
  "servers": [
    {
      "url": "https://hk-co-branding-openapi.uat.webullbroker.com"
    }
  ],
  "path": "/market-data/stocks/bars/list",
  "method": "post",
  "tags": [
    "Market Data"
  ],
  "description": "Retrieves the recent N bars of data based on stock symbols, time granularity, and type. Supports historical bars of various granularities like M1, M5, etc. Currently, daily bars (D) and above only provide forward-adjusted bars; minute bars provide unadjusted bars.",
  "operationId": "queryBatchBarsUsingPOST",
  "parameters": [
    {
      "name": "access_token",
      "in": "header",
      "description": "User's authenticated token.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "reqid",
      "in": "header",
      "description": "The unique ID for this request. Suggest using UUID.",
      "schema": {
        "type": "string"
      },
      "example": "2e46d5a4-bef9-4507-8cda-98f85d2f770c"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "required": [
            "category_symbols"
          ],
          "type": "object",
          "properties": {
            "category_symbols": {
              "type": "array",
              "description": "List of security symbols by category; maximum 100 symbols per query.",
              "items": {
                "required": [
                  "category",
                  "symbols"
                ],
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string",
                    "description": "Security type. Category values are as shown in the enum.",
                    "example": "US_STOCK",
                    "enum": [
                      "US_STOCK"
                    ]
                  },
                  "symbols": {
                    "type": "array",
                    "description": "List of security symbols, supports JSON array format.",
                    "example": [
                      "AAPL",
                      "GOOG"
                    ],
                    "items": {
                      "type": "string",
                      "description": "List of security symbols, supports JSON array format.",
                      "example": "[\"AAPL\",\"GOOG\"]"
                    }
                  }
                },
                "description": "List of security symbols by security type",
                "title": "MultiCategory"
              }
            },
            "count": {
              "type": "string",
              "description": "1-1200（M1：1-1650）",
              "example": "200"
            },
            "trading_sessions": {
              "type": "string",
              "description": "Specify trading session(s). Multiple sessions separated by \",\".",
              "example": "PRE,RTH,ATH,OVN"
            },
            "interval": {
              "type": "string",
              "description": "Bar time granularity:M1, M5, M15, M30, M60, M120, M240, D, W, M, Y",
              "example": "M1"
            },
            "last_time": {
              "type": "string",
              "description": "Last time of pre page. Example: 1763555670"
            },
            "real_time_required": {
              "type": "boolean",
              "description": "Return the latest trading data, default is true;\\n false: Pulls only the completed bars from the previous period at the nearest whole hour at the time of request.\\n true: The returned data includes the latest market data.",
              "example": false
            }
          },
          "title": "StockChartsRequests"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "instrument_id",
              "result",
              "special_times",
              "times"
            ],
            "type": "object",
            "properties": {
              "symbol": {
                "type": "string",
                "description": "symbol",
                "example": "AAPL"
              },
              "result": {
                "type": "array",
                "description": "k-line data",
                "items": {
                  "required": [
                    "close",
                    "high",
                    "low",
                    "open",
                    "time",
                    "trading_sessions",
                    "volume"
                  ],
                  "type": "object",
                  "properties": {
                    "time": {
                      "type": "string",
                      "description": "Bar timestamp, Unix timestamp format.",
                      "example": "2021-12-28T09:00:09.945+0000"
                    },
                    "open": {
                      "type": "string",
                      "description": "Open price",
                      "example": "150.25"
                    },
                    "close": {
                      "type": "string",
                      "description": "Close price",
                      "example": "152.3"
                    },
                    "high": {
                      "type": "string",
                      "description": "High price",
                      "example": "153.15"
                    },
                    "low": {
                      "type": "string",
                      "description": "Low price",
                      "example": "149.8"
                    },
                    "volume": {
                      "type": "string",
                      "description": "Volume",
                      "example": "1250000"
                    },
                    "trading_sessions": {
                      "type": "string",
                      "description": "Trading session, e.g., RTH (Regular Trading Hours), PRE (Pre-market).",
                      "example": "RTH"
                    }
                  },
                  "description": "Single K-line price record",
                  "title": "PriceRecord"
                }
              },
              "times": {
                "type": "array",
                "description": "exchange trading hours",
                "items": {
                  "required": [
                    "end",
                    "start",
                    "trading_session"
                  ],
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "string",
                      "description": "exchange start time",
                      "example": "09:30:00"
                    },
                    "end": {
                      "type": "string",
                      "description": "exchange end time",
                      "example": "16:00:00"
                    },
                    "trading_session": {
                      "type": "string",
                      "description": "Trading session, e.g., RTH (Regular Trading Hours), PRE (Pre-market).",
                      "example": "RTH"
                    }
                  },
                  "description": "exchange trading hours",
                  "title": "ExchangeTimesVo"
                }
              },
              "instrument_id": {
                "type": "string",
                "description": "instrument_id",
                "example": "913256135"
              },
              "special_times": {
                "type": "array",
                "description": "Special Trading Hours at the Exchange",
                "items": {
                  "required": [
                    "end",
                    "start",
                    "trading_session"
                  ],
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "integer",
                      "description": "exchange start time",
                      "format": "int64"
                    },
                    "end": {
                      "type": "integer",
                      "description": "exchange end time",
                      "format": "int64"
                    },
                    "trading_session": {
                      "type": "string",
                      "description": "Trading session, e.g., RTH (Regular Trading Hours), PRE (Pre-market).",
                      "example": "RTH"
                    }
                  },
                  "description": "Special Trading Hours at the Exchange",
                  "title": "SpecialExchangeTimesVo"
                }
              }
            },
            "title": "StockChartsResponseVo"
          }
        }
      }
    }
  },
  "jsonRequestBodyExample": {
    "category_symbols": [
      {
        "category": "US_STOCK",
        "symbols": [
          "AAPL",
          "GOOG"
        ]
      }
    ],
    "count": "200",
    "trading_sessions": "PRE,RTH,ATH,OVN",
    "interval": "M1",
    "last_time": "string",
    "real_time_required": false
  },
  "postman": {
    "name": "List Stock Historical Bars",
    "description": {
      "content": "Retrieves the recent N bars of data based on stock symbols, time granularity, and type. Supports historical bars of various granularities like M1, M5, etc. Currently, daily bars (D) and above only provide forward-adjusted bars; minute bars provide unadjusted bars.",
      "type": "text/plain"
    },
    "url": {
      "path": [
        "market-data",
        "stocks",
        "bars",
        "list"
      ],
      "host": [
        "{{baseUrl}}"
      ],
      "query": [],
      "variable": []
    },
    "header": [
      {
        "disabled": false,
        "description": {
          "content": "(Required) User's authenticated token.",
          "type": "text/plain"
        },
        "key": "access_token",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "The unique ID for this request. Suggest using UUID.",
          "type": "text/plain"
        },
        "key": "reqid",
        "value": ""
      },
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "method": "POST",
    "body": {
      "mode": "raw",
      "raw": "",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    }
  }
}
```
