# Stock Prices (OHLC) (/equities/bars/daily)

`GET`    /v2/equities/bars/daily

## Overview

You can get information about stock price.\
Stock price consists before and after adjustment of stock splits, reverse stock splits, etc. (Rounded to first decimal places).

> **Warning**
>
> **Market capitalization (`MktCap`) is scheduled to be removed from this API.**\
> Please use `MktCap` in the [Valuation Indicators API](/en/spec/eq-valuation) instead. Market capitalization in that API uses a share count that excludes treasury shares, so its value may not match market capitalization in this API, which uses a share count that includes them.\
> We will announce the removal date on this page and in the [Release Notes](/en/spec/release) once it has been decided.

### Attention

> **Info**
>
> - Open, High, Low, Close, the volume of trade and the amount of purchase for the issue on the day when there is no trade volume (no sale) are recorded as Null.
> - Stocks that are not listed on the TSE (including issue listed only on the other exchanges) are not included in the data.
> - Delisted issues can also be retrieved by specifying a date or period within their listing period.
> - The data for Oct. 1st, 2020 are the OHLC, trading volume, and trading value in Null because trading was halted all day due to the failure of the equity trading system, arrowhead.
> - Daily prices can be obtained for all plans, but morning/afternoon session prices are available only for Premium plan.
> - For plans other than Premium, the morning/afternoon session items are not returned as Null; the keys themselves are not included in the response.
> - Stock price adjustments are supported for stock splits, reverse stock splits, and rights issues. Please note that some other corporate actions are not supported.
> - For rights issues, trading volume (`Vo`/`AdjVo`, etc.) is not adjusted.
> - Rights issues for foreign stocks and issues listed on TOKYO PRO Market are excluded from price adjustment (`AdjFactor = 1`).

## Get daily stock prices

`GET` `https://api.jquants.com/v2/equities/bars/daily`

In your request message, either "code" or "date" must be specified.

### Parameter and Response

In your request message, either "code" or "date" must be specified.\
Combination of parameter in the request and results are as below.

- code: ✓, date: –, from /to: – → All historical stock prices of a specific issue.

- code: ✓, date: ✓, from /to: – → Stock prices of a specific issue for the specific date

- code: ✓, date: –, from /to: ✓ → Stock prices of a specific issue for the specified period

- code: –, date: ✓, from /to: – → All listed issue prices for the specific date.

### Requests

### Headers

| Parameter | Type   | Required | Description |
| --------- | ------ | -------- | ----------- |
| x-api-key | string | Required | API Key     |

### Query Parameters

> **Note**
>
> Either **code** or **date** must be specified.

| Parameter       | Type   | Required | Description                                                                                                                                                                                  |
| --------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| code            | string | Optional | Issue code (e.g. 27800 or 2780) If a 4-character issue code is specified, only the data of common stock will be obtained for the issue on which both common and preferred stocks are listed. |
| date            | string | Optional | Date of data when "from" and "to" are not specified (e.g. 20210907 or 2021-09-07)                                                                                                            |
| from            | string | Optional | Starting point of data period (e.g. 20210901 or 2021-09-01)                                                                                                                                  |
| to              | string | Optional | End point of data period (e.g. 20210907 or 2021-09-07)                                                                                                                                       |
| pagination\_key | string | Optional | The primary key of the first item that this operation will evaluate. Use the value that was returned for pagination\_key in the previous operation.                                          |

### Sample Code

/v2/equities/bars/daily

**cURL**

```bash
curl -G https://api.jquants.com/v2/equities/bars/daily \
-H "x-api-key: {{apiKey}}" \
-d code="{{code}}" \
-d date="{{date}}"
```

**JavaScript**

```javascript
import axios from 'axios'

const client = axios.create({
  baseURL: 'https://api.jquants.com',
  headers: { 'x-api-key': '{{apiKey}}' },
})

await client.get('/v2/equities/bars/daily', {
  params: {
    code: '{{code}}',
    date: '{{date}}',
  },
})
```

**Python**

```python
import requests

headers = {"x-api-key": "{{apiKey}}"}
resp = requests.get(
    "https://api.jquants.com/v2/equities/bars/daily",
    params={"code": "{{code}}", "date": "{{date}}"},
    headers=headers,
)
print(resp.json())
```

### Responses

### Data Item

| Parameter | Type   | Required | Description                                                                                                                                                 |
| --------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Date      | string | Required | Date (YYYY-MM-DD)                                                                                                                                           |
| Code      | string | Required | Issue code                                                                                                                                                  |
| O         | number | Required | Open Price (before adjustment)                                                                                                                              |
| H         | number | Required | High price (before adjustment)                                                                                                                              |
| L         | number | Required | Low price (before adjustment)                                                                                                                               |
| C         | number | Required | Close price (before adjustment)                                                                                                                             |
| UL        | string | Required | Flag of hitting the upper price limit of the day (0: Other than hitting the upper price limit, 1: Hitting the upper price limit)                            |
| LL        | string | Required | Flag of hitting the lower price limit of the day (0: Other than hitting the lower price limit, 1: Hitting the lower price limit)                            |
| Vo        | number | Required | Trading volume (before adjustment)                                                                                                                          |
| Va        | number | Required | Trading value                                                                                                                                               |
| AdjFactor | number | Required | Adjustment factor (In the case of a two-for-one stock split, "0.5" will be set in the record on the ex-rights date.)                                        |
| AdjO      | number | Required | Adjusted open price (\*1)                                                                                                                                   |
| AdjH      | number | Required | Adjusted high price (\*1)                                                                                                                                   |
| AdjL      | number | Required | Adjusted low price (\*1)                                                                                                                                    |
| AdjC      | number | Required | Adjusted close price (\*1)                                                                                                                                  |
| AdjVo     | number | Required | Adjusted volume (\*1)                                                                                                                                       |
| MO        | number | Required | Open price of the morning session (before adjustment) (\*2)                                                                                                 |
| MH        | number | Required | High price of the morning session (before adjustment) (\*2)                                                                                                 |
| ML        | number | Required | Low price of the morning session (before adjustment) (\*2)                                                                                                  |
| MC        | number | Required | Close price of the morning session (before adjustment) (\*2)                                                                                                |
| MUL       | string | Required | Flag of hitting the upper price limit of the day in morning session (0: Other than hitting the upper price limit, 1: Hitting the upper price limit) (\*2)   |
| MLL       | string | Required | Flag of hitting the lower price limit of the day in morning session (0: Other than hitting the lower price limit, 1: Hitting the lower price limit) (\*2)   |
| MVo       | number | Required | Trading volume of the morning session (before adjustment) (\*2)                                                                                             |
| MVa       | number | Required | Trading value of the morning session (\*2)                                                                                                                  |
| MAdjO     | number | Required | Adjusted open price of the morning session (\*1, \*2)                                                                                                       |
| MAdjH     | number | Required | Adjusted high price of the morning session (\*1, \*2)                                                                                                       |
| MAdjL     | number | Required | Adjusted low price of the morning session (\*1, \*2)                                                                                                        |
| MAdjC     | number | Required | Adjusted close price of the morning session (\*1, \*2)                                                                                                      |
| MAdjVo    | number | Required | Adjusted trading volume of the morning session (\*1, \*2)                                                                                                   |
| AO        | number | Required | Open price of the afternoon session (before adjustment) (\*2)                                                                                               |
| AH        | number | Required | High price of the afternoon session (before adjustment) (\*2)                                                                                               |
| AL        | number | Required | Low price of the afternoon session (before adjustment) (\*2)                                                                                                |
| AC        | number | Required | Close price of the afternoon session (before adjustment) (\*2)                                                                                              |
| AUL       | string | Required | Flag of hitting the upper price limit of the day in afternoon session (0: Other than hitting the upper price limit, 1: Hitting the upper price limit) (\*2) |
| ALL       | string | Required | Flag of hitting the lower price limit of the day in afternoon session (0: Other than hitting the lower price limit, 1: Hitting the lower price limit) (\*2) |
| AVo       | number | Required | Trading volume of the afternoon session (before adjustment) (\*2)                                                                                           |
| AVa       | number | Required | Trading value of the afternoon session (\*2)                                                                                                                |
| AAdjO     | number | Required | Adjusted open price of the afternoon session (\*1, \*2)                                                                                                     |
| AAdjH     | number | Required | Adjusted high price of the afternoon session (\*1, \*2)                                                                                                     |
| AAdjL     | number | Required | Adjusted low price of the afternoon session (\*1, \*2)                                                                                                      |
| AAdjC     | number | Required | Adjusted close price of the afternoon session (\*1, \*2)                                                                                                    |
| AAdjVo    | number | Required | Adjusted trading volume of the afternoon session (\*1, \*2)                                                                                                 |
| MktCap    | number | Required | Market capitalization (in millions of JPY) (\*3)                                                                                                            |
| ExRT      | string | Required | Ex-rights type (1: Stock split, 2: Reverse stock split, 3: Rights issue. Bonus share allotment is included in "1: Stock split".) (\*4)                      |

\*1 The item has been adjusted to take into account past divisions, etc.\
\*2 The item is available only for Premium plan users (for plans other than Premium, the key itself is not included in the response).\
\*3 Market capitalization is calculated as "close price (before adjustment) × number of listed shares" and recorded in millions of JPY (rounded to the nearest million).\
・Market capitalization also reflects corporate actions such as stock splits and reverse stock splits.\
・ETFs, ETNs, etc. are recorded as Null.\
・Days with no trading are recorded as Null.\
\*4 Null is recorded on days with no applicable corporate action on the ex-rights date.

### Response Sample

```bash {{ title: "200:OK" }}
{
    "data": [
        {
            "Date": "2023-03-24",
            "Code": "86970",
            "O": 2047.0,
            "H": 2069.0,
            "L": 2035.0,
            "C": 2045.0,
            "UL": "0",
            "LL": "0",
            "Vo": 2202500.0,
            "Va": 4507051850.0,
            "AdjFactor": 1.0,
            "AdjO": 2047.0,
            "AdjH": 2069.0,
            "AdjL": 2035.0,
            "AdjC": 2045.0,
            "AdjVo": 2202500.0,
            "MO": 2047.0,
            "MH": 2069.0,
            "ML": 2040.0,
            "MC": 2045.5,
            "MUL": "0",
            "MLL": "0",
            "MVo": 1121200.0,
            "MVa": 2297525850.0,
            "MAdjO": 2047.0,
            "MAdjH": 2069.0,
            "MAdjL": 2040.0,
            "MAdjC": 2045.5,
            "MAdjVo": 1121200.0,
            "AO": 2047.0,
            "AH": 2047.0,
            "AL": 2035.0,
            "AC": 2045.0,
            "AUL": "0",
            "ALL": "0",
            "AVo": 1081300.0,
            "AVa": 2209526000.0,
            "AAdjO": 2047.0,
            "AAdjH": 2047.0,
            "AAdjL": 2035.0,
            "AAdjC": 2045.0,
            "AAdjVo": 1081300.0,
            "MktCap": 1083850.0,
            "ExRT": null
        }
    ],
    "pagination_key": "value1.value2."
}
```
