---
title: Bulk Historical Candles
sidebar_position: 7
---

Get bulk historical candle data for stocks. This endpoint returns bulk daily candle data for multiple stocks. Unlike the standard candles endpoint, this endpoint returns a single daily for each symbol provided.

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

## Endpoint
```
https://api.marketdata.app/v1/stocks/bulkcandles/{resolution}/
```
#### Method
```
GET
```
## Request Example

<Tabs>
<TabItem value="HTTP" label="HTTP" default>

**GET** [https://api.marketdata.app/v1/stocks/bulkcandles/D/?symbols=AAPL,META,MSFT](https://api.marketdata.app/v1/stocks/bulkcandles/D/?symbols=AAPL,META,MSFT)

</TabItem>
<TabItem value="NodeJS" label="NodeJS">

```js title="app.js"
fetch(
  "https://api.marketdata.app/v1/stocks/bulkcandles/D/?symbols=AAPL,META,MSFT"
)
  .then((res) => {
    console.log(res);
  })
  .catch((err) => {
    console.log(err);
  });
```

</TabItem>
<TabItem value="Python" label="Python">

```python title="app.py"
import requests

url = "https://api.marketdata.app/v1/stocks/bulkcandles/D/?symbols=AAPL,META,MSFT"
response = requests.request("GET", url)

print(response.text)
```

</TabItem>
<TabItem value="Go" label="Go">

```go title="bulkStockCandles.go"

import (
  "fmt"

  api "github.com/MarketDataApp/sdk-go"
)

func ExampleBulkStockCandlesRequest_get() {
	symbols := []string{"AAPL", "META", "MSFT"}
	candles, err := BulkStockCandles().Resolution("D").Symbols(symbols).Get()
	if err != nil {
		fmt.Print(err)
		return
	}
  
	for _, candle := range candles {
		fmt.Println(candle)
	}
}

```
</TabItem>
</Tabs>

## Response Example

```json
{
  "s": "ok",
  "symbol": ["AAPL", "META", "MSFT"],
  "o": [196.16, 345.58, 371.49],
  "h": [196.95, 353.6, 373.26],
  "l": [195.89, 345.12, 369.84],
  "c": [196.94, 350.36, 373.26],
  "v": [40714051, 17729362, 20593658],
  "t": [1703048400,1703048400,1703048400]
}
```

## Request Parameters

<Tabs>
<TabItem value="required" label="Required" default>

- **resolution** `string`
  The duration of each candle. Only daily candles are supported at this time.

  - Daily Resolutions: (`daily`, `D`, `1D`)

- **symbols** `string`
  The ticker symbols to return in the response, separated by commas. The symbols parameter may be omitted if the `snapshot` parameter is set to `true`.

</TabItem>
<TabItem value="Optional" label="Optional">

- **snapshot** `boolean`
  Returns candles for all available symbols for the date indicated. The `symbols` parameter can be omitted if `snapshot` is set to true.

- **date** `date`
  The date of the candles to be returned. If no date is specified, during market hours the candles returned will be from the current session. If the market is closed the candles will be from the most recent session. Accepted date inputs: `ISO 8601`, `unix`, `spreadsheet`.

- **adjustsplits** `boolean`
  Adjust historical data for for historical splits and reverse splits. Market Data uses the CRSP methodology for adjustment.
  Daily candles default: `true`.

</TabItem>
</Tabs>

## Response Attributes

<Tabs>
<TabItem value="Success" label="Success" default>

- **s** `string`

  Will always be `ok` when there is data for the candles requested.

- **symbol** `string`

  The ticker symbol of the stock.

- **o** `array[number]`

  Open price.

- **h** `array[number]`

  High price.

- **l** `array[number]`

  Low price.

- **c** `array[number]`

  Close price.

- **v** `array[number]`

  Volume.

- **t** `array[number]`

  Candle time (Unix timestamp, Exchange Timezone). Daily candles are returned at 00:00:00 without times.

</TabItem>
<TabItem value="NoData" label="No Data">

- **s** `string`

  Status will be `no_data` if no candles are found for the request.

</TabItem>
<TabItem value="Error" label="Error">

- **s** `string`

  Status will be `error` if the request produces an error response.

- **errmsg** `string`

  An error message.

</TabItem>
</Tabs>

## Usage Information

### Data Availability

**Real-time data is not available for this endpoint under any plan or entitlement.** The type of candle data you receive depends on your user type and UTP entitlement. This may include 15-minute delayed candles or historical candles (1 day old), depending on the plan or access level.

| User Type | UTP Entitlement | Candle Type |
|-----------|----------------|-------------|
| Non-Professional | ✅ | 15-min delayed |
| Non-Professional | ❌ | Historical (1 day old) |
| Professional | Any | Historical (1 day old) |
| Unknown | Any | Historical (1 day old) |


:::info What are entitlements?
Entitlements are permissions granted by exchanges that allow access to their data. To get 15-minute delayed candles, non-professional users need to sign the [UTP agreement](/account/entitlements). [Learn more about entitlements](/account/entitlements).
:::

### Pricing

The cost of using the bulk candles API endpoint is 1 credit per symbol returned in the response.

| Data Type     | Cost Basis                | Credits Required per Unit |
|--------------------|---------------------------|---------------------------|
| 15-minute Delayed Data    | Per symbol         | 1 credit                  |
| Historical Data    | Per symbol         | 1 credit                  |
| Real-Time Data     | Not available         | N/A                  |
