# 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 and reverse stock splits (Rounded to first decimal places).

### 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.
> - 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.
> - Stock price adjustments are supported only for stock splits and reverse stock splits. Please note that some corporate actions are not supported.

## 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)                                                                                                 |

\*1 The item has been adjusted to take into account past divisions, etc.\
\*2 The item is available only for Premium plan users.

### 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
        }
    ],
    "pagination_key": "value1.value2."
}
```
