> ## Documentation Index
> Fetch the complete documentation index at: https://kraken-sandbox.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Trade Volume

> Returns 30 day USD trading volume and resulting fee schedule for any asset pair(s) provided. Fees will not be included if `pair` is not specified as Kraken fees differ by asset pair.
Note: If an asset pair is on a maker/taker fee schedule, the taker side is given in `fees` and maker side in `fees_maker`. For pairs not on maker/taker, they will only be given in `fees`.

**API Key Permissions Required:** `Funds permissions - Query`




## OpenAPI

````yaml /openapi/spot-rest.yaml post /private/TradeVolume
openapi: 3.0.0
info:
  title: REST API
  version: 1.1.0
  description: ''
servers:
  - url: https://api.kraken.com/0
    description: Production Server
security:
  - API-Key: []
    API-Sign: []
tags:
  - name: Market Data
  - name: Account Data
  - name: Trading
  - name: Funding
  - name: Subaccounts
    description: >-
      Subaccounts are currently only available to institutional clients. Please
      contact your Account Manager for more details.
  - name: Earn
    description: >
      The earn API allows interacting with all of Kraken's yield generating
      products. It replaces the old `/staking` part of the API.


      The different available earn products are represented by earn strategies.
      This corresponds to the legacy `Staking/Assets`. `Stake`/`Unstake` are
      replaced by `Allocate`/`Deallocate`.


      ### Overview of the available endpoints under `/Earn`:


      - `Strategies` - list all earn strategies for which you are eligible or
      have a balance.

      - `Allocations` - lists the balance in your earn account for each
      strategy. Requires the `Query Funds` API key permission.

      - `Allocate`/`Deallocate` - allocate/deallocate to an earn strategy
      through an async operation. Requires the `Earn Funds` API key permission.

      - `AllocateStatus`/`DeallocateStatus` - verifies the state of the last
      allocation/deallocation. Requires the `Earn Funds` or `Query Funds` API
      key permission.


      ### Example usage:


      ### Determine which funds are earning rewards:


      1. Call `Strategies` to obtain information about the relevant strategy.
      The `lock_type` field shows whether bonding/unbonding funds are earning
      yield. The relevant fields are `bonding_rewards`/`unbonding_rewards`.

      2. Call `Allocations` for the relevant strategy. From the previous step,
      for strategies where bonding/unbonding does not earn yield, substract
      these balances from `amount_allocated.total` to determine which balances
      are currently earning.


      ### Get allocatable balance:


      Call `/0/private/BalanceEx`, subtract `hold_trading` amount. Remaining
      balance is available for allocation to a strategy.


      ### Geo restrictions:


      Some earn strategies are not available in all geographic regions.
      `Strategies` will return only strategies available to the caller.
  - name: Transparency
paths:
  /private/TradeVolume:
    post:
      tags:
        - Account Data
      summary: Get Trade Volume
      description: >
        Returns 30 day USD trading volume and resulting fee schedule for any
        asset pair(s) provided. Fees will not be included if `pair` is not
        specified as Kraken fees differ by asset pair.

        Note: If an asset pair is on a maker/taker fee schedule, the taker side
        is given in `fees` and maker side in `fees_maker`. For pairs not on
        maker/taker, they will only be given in `fees`.


        **API Key Permissions Required:** `Funds permissions - Query`
      operationId: getTradeVolume
      requestBody:
        $ref: '#/components/requestBodies/volume'
      responses:
        '200':
          description: Trade Volume retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/volume'
                example:
                  error: []
                  result:
                    currency: ZUSD
                    volume: '200709587.4223'
                    fees:
                      XXBTZUSD:
                        fee: '0.1000'
                        min_fee: '0.1000'
                        max_fee: '0.2600'
                        next_fee: null
                        next_volume: null
                        tier_volume: '10000000.0000'
                    fees_maker:
                      XXBTZUSD:
                        fee: '0.0000'
                        min_fee: '0.0000'
                        max_fee: '0.1600'
                        next_fee: null
                        next_volume: null
                        tier_volume: '10000000.0000'
components:
  requestBodies:
    volume:
      required: true
      content:
        application/json:
          schema:
            title: Get Trade Volume
            required:
              - nonce
            type: object
            properties:
              nonce:
                $ref: '#/components/schemas/nonce'
              pair:
                description: >-
                  Comma delimited list of asset pairs to get fee info on
                  (optional, but required if any fee info is desired)
                type: string
              rebase_multiplier:
                $ref: '#/components/schemas/rebase_multiplier'
            example:
              nonce: 1695828490
              pair: XXBT/ZUSD, XETH/ZEUR
  schemas:
    volume:
      type: object
      properties:
        result:
          title: TradeVolume
          description: Trade Volume
          type: object
          properties:
            currency:
              description: Fee volume currency (will always be USD)
              type: string
            asset_class:
              description: Asset class the fee volume applies to
              type: string
            volume:
              description: >-
                Current fee discount volume (in USD, breakdown by subaccount if
                applicable and logged in to master account)
              type: string
            fees:
              description: >-
                Taker fees that will be applied for each `pair` included in the
                request. Default `None` if `pair` is not requested.
              type: object
              additionalProperties:
                $ref: '#/components/schemas/fees'
                x-additionalPropertiesName: pair
            fees_maker:
              description: >-
                Maker fees that will be applied for this each `pair` included in
                the request. Default `None` if `pair` is not requested.
              type: object
              additionalProperties:
                $ref: '#/components/schemas/fees'
                x-additionalPropertiesName: pair
        error:
          $ref: '#/components/schemas/error'
    nonce:
      description: Nonce used in construction of `API-Sign` header
      type: integer
      format: int64
    rebase_multiplier:
      type: string
      enum:
        - rebased
        - base
      default: rebased
      nullable: true
      description: |
        Optional parameter for viewing xstocks data. 
        - `rebased`: Display in terms of underlying equity.
        - `base`: Display in terms of SPV tokens.
    fees:
      title: FeeTierInfo
      description: Fee Tier Info
      type: object
      properties:
        fee:
          description: Current fee (in percent)
          type: string
        min_fee:
          description: minimum fee for pair (if not fixed fee)
          type: string
        max_fee:
          description: maximum fee for pair (if not fixed fee)
          type: string
        next_fee:
          description: >-
            next tier's fee for pair (if not fixed fee,  null if at lowest fee
            tier)
          type: string
          nullable: true
        tier_volume:
          description: >-
            volume level of current tier (if not fixed fee. null if at lowest
            fee tier)
          type: string
          nullable: true
        next_volume:
          description: >-
            volume level of next tier (if not fixed fee. null if at lowest fee
            tier)
          type: string
          nullable: true
    error:
      type: array
      items:
        description: Kraken API error
        type: string
        example: EGeneral:Invalid arguments
  securitySchemes:
    API-Key:
      type: apiKey
      description: The "API-Key" header should contain your API key.
      name: API-Key
      in: header
    API-Sign:
      type: apiKey
      description: >-
        Authenticated requests should be signed with the "API-Sign" header,
        using a signature generated with your private key, nonce, encoded
        payload, and URI path.
      name: API-Sign
      in: header

````