> ## Documentation Index
> Fetch the complete documentation index at: https://readme.amana-dev.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get candles spanning the last N trading days

> Returns candles within the most recent N distinct trading days up to the given timestamp. Weekends and market holidays are automatically excluded. Use this when the user asks about 'the last 3 trading days' or 'this week's price action'.



## OpenAPI

````yaml /openapi-readme.json get /trading/chart/{ticker}/trading-days/{resolution}/{count}/{dt}
openapi: 3.1.0
info:
  title: Amana API
  version: 1.0.0
  description: API documentation for Amana platform
servers:
  - url: https://gateway.amana.io
    description: Amana app
security: []
tags:
  - name: onboarding
    description: Endpoints related to user onboarding, KYC processes, and account setup.
  - name: auth
    description: Endpoints for user authentication, token management, and session handling.
  - name: trading
    description: >-
      Endpoints related to trading operations, account management, and market
      data retrieval.
  - name: charting
    description: >-
      Endpoints for retrieving historical price data, technical indicators, and
      other charting-related information.
  - name: uaepass
    description: Endpoints for UAE Pass authentication and identity verification.
  - name: alerts
  - name: cms
  - name: dw
  - name: events
  - name: geo-location
  - name: high-leverage
  - name: kyc
  - name: mt
  - name: nafath
  - name: payments
  - name: promo-codes
  - name: smart-money
  - name: support
  - name: symbols
  - name: trading-accounts
  - name: transactions
  - name: user
  - name: watchlists
paths:
  /trading/chart/{ticker}/trading-days/{resolution}/{count}/{dt}:
    get:
      tags:
        - trading
      summary: Get candles spanning the last N trading days
      description: >-
        Returns candles within the most recent N distinct trading days up to the
        given timestamp. Weekends and market holidays are automatically
        excluded. Use this when the user asks about 'the last 3 trading days' or
        'this week's price action'.
      operationId: getCandlesByTradingDays
      parameters:
        - schema:
            type: string
          in: path
          name: ticker
          required: true
          description: Trading symbol, for example XAUUSD, EURUSD, or BTCUSD.
        - schema:
            type: integer
          in: path
          name: resolution
          required: true
          description: >-
            Candle size in seconds, must be a multiple of 60. Common values: 60
            (1 min), 3600 (1 H), 86400 (1 D).
        - schema:
            type: integer
          in: path
          name: count
          required: true
          description: >-
            Number of trading days to include. For example, 5 returns the last 5
            trading days of candles.
        - schema:
            type: string
          in: path
          name: dt
          required: true
          description: >-
            ISO-8601 upper-bound timestamp, for example
            2025-06-01T00:00:00.000Z. Use the current datetime for the most
            recent data.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        time:
                          type: integer
                          description: Candle close time as Unix seconds.
                        open:
                          type: number
                          description: Opening price.
                        high:
                          type: number
                          description: Highest price in the period.
                        low:
                          type: number
                          description: Lowest price in the period.
                        close:
                          type: number
                          description: Closing price.
                        volume:
                          type: number
                          description: Trade volume.
                      required:
                        - time
                        - open
                        - high
                        - low
                        - close
                      additionalProperties: false
                    description: Candles in ascending time order.
                  immutable:
                    type: boolean
                    description: True when the right edge is finalized and safe to cache.
                  no_more:
                    type: boolean
                    description: >-
                      True when no further historical data exists beyond this
                      range.
                required:
                  - data
                  - immutable
                additionalProperties: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token obtained from authentication endpoints

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.