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

# Get ticker statistics

> Returns rolling statistics for `24h`, `1d`, `7d`, `30d`, `180d`, or `360d`. The `24h` and `1d` paths are aliases. Price and volume fields use the selected window; best bid and best ask always use the existing current order-book lookup and are not historical extrema. Responses can be cached for one second, so use the returned `to` as calculation time.



## OpenAPI

````yaml /openapi/openapi.json get /partner/exchange/ticker/{interval}
openapi: 3.1.0
info:
  title: Stabyl API
  description: >-
    REST API for approved Stabyl accounts to automate exchange, wallet, and
    non-production simulation workflows.
  contact:
    name: Stabyl Support
    email: support@stabyl.com
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.stabyl.com/v1
    description: Production
  - url: https://api-staging.stabyl.com/v1
    description: Staging
security: []
tags:
  - name: Exchange
    description: Trading market data and order management for account automation.
  - name: Wallets
    description: >-
      Supported routes, deposit destinations, balances, transactions, and saved
      recipients.
  - name: Webhooks
    description: >-
      Outbound event delivery configuration and eventually consistent delivery
      history. Verify Standard Webhooks webhook-id, webhook-timestamp, and
      webhook-signature headers against the unchanged raw request body before
      parsing JSON.
  - name: Simulation
    description: Non-production endpoints for testing integration behavior.
paths:
  /partner/exchange/ticker/{interval}:
    get:
      tags:
        - Exchange
      summary: Get ticker statistics
      description: >-
        Returns rolling statistics for `24h`, `1d`, `7d`, `30d`, `180d`, or
        `360d`. The `24h` and `1d` paths are aliases. Price and volume fields
        use the selected window; best bid and best ask always use the existing
        current order-book lookup and are not historical extrema. Responses can
        be cached for one second, so use the returned `to` as calculation time.
      operationId: get_partner_exchange_ticker_interval
      parameters:
        - name: interval
          in: path
          description: Rolling statistics interval. `24h` and `1d` are equivalent aliases.
          required: true
          schema:
            $ref: '#/components/schemas/TickerInterval'
          example: 7d
        - name: pair_id
          in: query
          description: >-
            Trading pair identifier returned by `GET /partner/exchange/markets`,
            for example `USD/NGN`.
          required: false
          schema:
            type:
              - string
              - 'null'
          example: USD/NGN
      responses:
        '200':
          description: Ticker statistics for the selected interval
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/TickerResponse'
                  status:
                    type: string
                    enum:
                      - success
              example:
                data:
                  from: '2026-05-17T12:00:00Z'
                  interval: 7d
                  tickers:
                    - best_ask: '1651.00'
                      best_bid: '1649.00'
                      high: '1660.00'
                      last: '1650.00'
                      low: '1635.00'
                      open: '1640.00'
                      pair_id: USD/NGN
                      price_change: '10.00'
                      price_change_pct: 0.61
                      timestamp: '2026-05-24T12:00:00Z'
                      trade_count: 1250
                      volume: '10000.00'
                      volume_quote: '16500000.00'
                  to: '2026-05-24T12:00:00Z'
                status: success
        '400':
          description: Unsupported interval or trading pair
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: VALIDATION_FAILED
                      message:
                        type: string
                        example: invalid request parameters
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: VALIDATION_FAILED
                  message: invalid request parameters
                status: error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: UNAUTHORIZED
                      message:
                        type: string
                        example: missing X-Api-Key header
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: UNAUTHORIZED
                  message: missing X-Api-Key header
                status: error
      security:
        - api_key: []
components:
  schemas:
    TickerInterval:
      type: string
      description: Supported rolling ticker statistics interval.
      enum:
        - 24h
        - 1d
        - 7d
        - 30d
        - 180d
        - 360d
    TickerResponse:
      type: object
      description: >-
        Ticker response containing rolling statistics for one or more markets
        and the exact calculation window.
      required:
        - interval
        - from
        - to
        - tickers
      properties:
        from:
          type: string
          format: date-time
          description: Inclusive beginning of the rolling statistics window.
        interval:
          type: string
          description: Requested interval. `24h` and `1d` are equivalent aliases.
          example: 7d
        tickers:
          type: array
          items:
            $ref: '#/components/schemas/Ticker'
          description: One ticker per returned market, ordered by `pair_id`.
        to:
          type: string
          format: date-time
          description: Exclusive end and calculation time of the statistics window.
    Ticker:
      type: object
      description: >-
        Rolling market statistics plus the current best bid and best ask for a
        trading pair.
      required:
        - pair_id
        - volume
        - volume_quote
        - trade_count
        - timestamp
      properties:
        best_ask:
          type:
            - string
            - 'null'
          description: >-
            Current best ask from the existing live order-book lookup. It is not
            a

            historical minimum within the selected interval.
          example: '1650.50'
        best_bid:
          type:
            - string
            - 'null'
          description: >-
            Current best bid from the existing live order-book lookup. It is not
            a

            historical maximum within the selected interval.
          example: '1649.50'
        high:
          type:
            - string
            - 'null'
          description: Highest execution price in the selected interval.
          example: '1660.00'
        last:
          type:
            - string
            - 'null'
          description: Last traded price
          example: '1650.00'
        low:
          type:
            - string
            - 'null'
          description: Lowest execution price in the selected interval.
          example: '1635.00'
        open:
          type:
            - string
            - 'null'
          description: Price of the first execution in the selected interval.
          example: '1640.00'
        pair_id:
          type: string
          description: Trading pair identifier
          example: USD/NGN
        price_change:
          type:
            - string
            - 'null'
          description: Absolute price change
          example: '10.00'
        price_change_pct:
          type:
            - number
            - 'null'
          format: double
          description: Percentage price change
          example: 0.61
        timestamp:
          type: string
          format: date-time
          description: Same calculation timestamp as the response-level `to` value.
        trade_count:
          type: integer
          format: int64
          description: Number of executions in the selected interval.
          example: 1250
        volume:
          type: string
          description: Executed volume in the pair's base currency during the interval.
          example: '50000.00'
        volume_quote:
          type: string
          description: Executed notional in the pair's quote currency during the interval.
          example: '82500000.00'
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API credential. Withdrawal quote and submit operations additionally
        require the documented Ed25519 timestamp, nonce, and signature headers.
      x-default: sb_test_your_key

````