# Get pool candles

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://api.g.alchemy.com/trading/v1/{apiKey}/pools/{network}/{poolAddress}/candles

**Private preview:** Paths, parameters, response fields, and tier names are provisional.

**Compute units:** 400 (proposed; pending validation).

Support for more networks is planned. Candles use Unix seconds UTC and USD decimal strings. Intervals without trades are omitted by default.

Read tokenAddress on each candle to identify the token priced in USD.

Reference: https://www.alchemy.com/docs/data/trading-api/endpoints/pools/get-pool-candles

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes |  |
| network | enum | Yes | Supported networks for this operation during private preview. |
| poolAddress | string | Yes |  |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| interval | enum | Yes | Candle interval. Empty intervals are omitted by default. |
| from | string | Yes | Start of the requested UTC time range. Boundary inclusion is pending. |
| to | string | Yes | End of the requested UTC time range. Boundary inclusion is pending. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url 'https://api.g.alchemy.com/trading/v1/docs-demo/pools/eth-mainnet/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/candles?interval=1m&from=string&to=string'
```

### JavaScript

```javascript
const options = {method: 'GET'};

fetch('https://api.g.alchemy.com/trading/v1/docs-demo/pools/eth-mainnet/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/candles?interval=1m&from=string&to=string', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.g.alchemy.com/trading/v1/docs-demo/pools/eth-mainnet/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/candles?interval=1m&from=string&to=string"

response = requests.get(url)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.g.alchemy.com/trading/v1/docs-demo/pools/eth-mainnet/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/candles?interval=1m&from=string&to=string"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.get("https://api.g.alchemy.com/trading/v1/docs-demo/pools/eth-mainnet/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/candles?interval=1m&from=string&to=string")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://api.g.alchemy.com/trading/v1/docs-demo/pools/eth-mainnet/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/candles?interval=1m&from=string&to=string");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /{apiKey}/pools/{network}/{poolAddress}/candles
method: GET
operation:
  summary: Get pool candles
  operationId: get-pool-candles
  tags:
    - Pools
  x-shape-pending: true
  description: |-
    **Private preview:** Paths, parameters, response fields, and tier names are provisional.

    **Compute units:** 400 (proposed; pending validation).

    Support for more networks is planned. Candles use Unix seconds UTC and USD decimal strings. Intervals without trades are omitted by default.

    Read tokenAddress on each candle to identify the token priced in USD.
  parameters:
    - name: apiKey
      in: path
      required: true
      schema:
        type: string
        default: docs-demo
        description: For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup)
    - name: network
      in: path
      required: true
      description: Supported networks for this operation during private preview.
      schema:
        x-shape-pending: true
        type: string
        enum:
          - eth-mainnet
          - base-mainnet
          - arb-mainnet
          - bnb-mainnet
          - solana-mainnet
    - name: poolAddress
      in: path
      required: true
      schema:
        type: string
        description: Pool address or pool identifier.
        x-shape-pending: true
      example: '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640'
    - name: interval
      in: query
      required: true
      schema:
        type: string
        enum:
          - 1m
          - 5m
          - 15m
          - 1h
          - 4h
          - 1d
        x-shape-pending: true
      description: Candle interval. Empty intervals are omitted by default.
    - name: from
      in: query
      required: true
      schema:
        type: string
        format: date-time
        x-shape-pending: true
      description: Start of the requested UTC time range. Boundary inclusion is pending.
    - name: to
      in: query
      required: true
      schema:
        type: string
        format: date-time
        x-shape-pending: true
      description: End of the requested UTC time range. Boundary inclusion is pending.
  responses:
    '200':
      description: Successful response.
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  type: object
                  properties:
                    network:
                      description: Alchemy network slug.
                      x-shape-pending: true
                      type: string
                      enum:
                        - eth-mainnet
                        - base-mainnet
                        - arb-mainnet
                        - bnb-mainnet
                        - solana-mainnet
                        - opt-mainnet
                        - matic-mainnet
                        - avax-mainnet
                        - linea-mainnet
                        - hyperliquid-mainnet
                        - robinhood-mainnet
                        - arc-mainnet
                        - tempo-mainnet
                    timestamp:
                      type: integer
                      description: Start of the candle interval, in Unix seconds UTC.
                      x-shape-pending: true
                    open:
                      type:
                        - string
                        - 'null'
                      pattern: ^-?[0-9]+(\.[0-9]+)?$
                      description: Opening price in USD. Decimal string; null means unknown.
                      x-shape-pending: true
                    high:
                      type:
                        - string
                        - 'null'
                      pattern: ^-?[0-9]+(\.[0-9]+)?$
                      description: Highest price in USD. Decimal string; null means unknown.
                      x-shape-pending: true
                    low:
                      type:
                        - string
                        - 'null'
                      pattern: ^-?[0-9]+(\.[0-9]+)?$
                      description: Lowest price in USD. Decimal string; null means unknown.
                      x-shape-pending: true
                    close:
                      type:
                        - string
                        - 'null'
                      pattern: ^-?[0-9]+(\.[0-9]+)?$
                      description: Closing price in USD. Decimal string; null means unknown.
                      x-shape-pending: true
                    volumeUsd:
                      type:
                        - string
                        - 'null'
                      pattern: ^-?[0-9]+(\.[0-9]+)?$
                      description: Trading volume during the interval in USD. Decimal string; null means unknown.
                      x-shape-pending: true
                    tokenAddress:
                      type: string
                      description: Token address that defines price and trade direction in this row.
                      x-shape-pending: true
                  required:
                    - network
                    - timestamp
                    - open
                    - high
                    - low
                    - close
                    - volumeUsd
                    - tokenAddress
                x-shape-pending: true
            required:
              - data
    '400':
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    description: Detailed error message.
                    x-shape-pending: true
                required:
                  - message
                x-shape-pending: true
            required:
              - error
          example:
            error:
              message: Invalid request parameters.
    '401':
      description: Invalid API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    description: Detailed error message.
                    x-shape-pending: true
                required:
                  - message
                x-shape-pending: true
            required:
              - error
          example:
            error:
              message: Invalid API key.
    '429':
      description: Request limit reached. Retry with backoff.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    description: Detailed error message.
                    x-shape-pending: true
                required:
                  - message
                x-shape-pending: true
            required:
              - error
          example:
            error:
              message: Request limit reached. Retry with backoff.
    '503':
      description: Data temporarily unavailable. Retry with backoff.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    description: Detailed error message.
                    x-shape-pending: true
                required:
                  - message
                x-shape-pending: true
            required:
              - error
          example:
            error:
              message: Data temporarily unavailable. Retry with backoff.
```
