# Fees

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/account/fees:
    get:
      summary: Fees
      deprecated: false
      description: >-
        Current fees for the account. Traded volume is combined across the main
        account and all its subaccounts, so every account of the same account
        holder gets the same fee tier.

        There are separate fee bands for each product type (`SPOT` and
        `FUTURES`).


        **Required API scope:** any valid API key.
      tags:
        - One Trading Public REST API/Trading
      parameters: []
      responses:
        '200':
          x-apidog-name: Success
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  account_id:
                    type: string
                    format: uuid
                    description: >-
                      The account id the fees have been requested for. Note,
                      fees are calculated and applied across all accounts.
                  running_volumes:
                    type: array
                    items:
                      $ref: '#/components/schemas/FeeRunningVolume'
                    description: The current traded volumes for each product type
                  active_fee_tiers:
                    type: array
                    items:
                      $ref: '#/components/schemas/FeeActiveTier'
                    description: >-
                      The fee tier for each product type which is active for the
                      account.
                x-apidog-orders:
                  - account_id
                  - running_volumes
                  - active_fee_tiers
                required:
                  - account_id
                  - running_volumes
                  - active_fee_tiers
                x-apidog-ignore-properties: []
              example:
                account_id: 726288e6-a463-4f88-9068-024ae8f97a34
                running_volumes:
                  - fee_group_id: SPOT
                    volume: 349.68
                    currency: EUR
                  - fee_group_id: FUTURES
                    volume: 149.31
                    currency: EUR
                active_fee_tiers:
                  - fee_group_id: SPOT
                    volume: 0
                    maker_fee: '0.1000'
                    taker_fee: '0.2000'
                  - fee_group_id: FUTURES
                    volume: 0
                    maker_fee: '0.1000'
                    taker_fee: '0.2000'
          headers: {}
        '401':
          description: >-
            Unauthorized. The token was accepted by the gateway but rejected by
            the endpoint: `UNAUTHORIZED`, or `INVALID_REQUEST_SIGNATURE` when
            the API key requires signed requests and the signature is missing or
            invalid.
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                '2':
                  summary: Unauthorized
                  value:
                    error: UNAUTHORIZED
                    error_message: Unauthorized access
                '3':
                  summary: Invalid signature
                  value:
                    error: INVALID_REQUEST_SIGNATURE
                    error_message: The request signature is missing or invalid
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: >-
            Forbidden. Either the gateway rejected the token
            (`{"message":"Forbidden"}`), or the endpoint denied the request,
            e.g. `PERMISSION_DENIED` (API key lacks the required scope, or
            account not permitted) or `EXCHANGE_ACCOUNT_NOT_PROVISIONED`.
          content:
            application/json:
              schema:
                oneOf:
                  - *ref_0
                  - $ref: '#/components/schemas/GatewayError'
              examples:
                '4':
                  summary: Gateway
                  value:
                    message: Forbidden
                '5':
                  summary: Permission denied
                  value:
                    error: PERMISSION_DENIED
                    error_message: Permission denied
                '6':
                  summary: Not provisioned
                  value:
                    error: EXCHANGE_ACCOUNT_NOT_PROVISIONED
                    error_message: >-
                      The account is authenticated but has no exchange account
                      yet
          headers: {}
          x-apidog-name: Forbidden
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema: *ref_0
              example:
                error: SERVER_ERROR
                error_message: An internal server error occurred
          headers: {}
          x-apidog-name: Server Error
      security: []
      x-apidog-folder: One Trading Public REST API/Trading
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/349694/apis/api-3612090-run
components:
  schemas:
    FeeActiveTier:
      type: object
      properties:
        fee_group_id:
          type: string
          description: The ID of the fee group for this volume information
          enum:
            - SPOT
            - FUTURES
        volume:
          type: number
          description: The volume at which this fee tier became active
        maker_fee:
          type: string
          description: >-
            The percentage fee when a trade is executed as MAKER, as a string
            with 4 decimal places (e.g. `"0.1000"` is 0.1%).
        taker_fee:
          type: string
          description: >-
            The percentage fee when a trade is executed as TAKER, as a string
            with 4 decimal places (e.g. `"0.2000"` is 0.2%).
        custom:
          type: boolean
          const: true
          description: >-
            Present, and always `true`, when custom fee rates apply to the
            account. `maker_fee` and `taker_fee` then show the custom rates
            rather than the tier's.
      x-apidog-orders:
        - fee_group_id
        - volume
        - maker_fee
        - taker_fee
        - custom
      required:
        - fee_group_id
        - volume
        - maker_fee
        - taker_fee
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    FeeRunningVolume:
      type: object
      properties:
        fee_group_id:
          type: string
          description: The ID of the fee group for this volume information
          enum:
            - SPOT
            - FUTURES
        volume:
          type: number
          description: >-
            The volume traded for this particular product type, rounded to 2
            decimal places.
        currency:
          type: string
          description: The currency representing the volume traded (always `EUR`).
      x-apidog-orders:
        - fee_group_id
        - volume
        - currency
      required:
        - fee_group_id
        - volume
        - currency
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    ErrorResponse:
      type: object
      description: >-
        Error body. `error` is a machine-readable code (e.g.
        `INVALID_INSTRUMENT_CODE`) on most endpoints; a few older endpoints
        return a human-readable message in `error` instead and omit
        `error_message`.
      properties:
        error:
          type: string
          description: Error code (or, on older endpoints, a human-readable message).
        error_message:
          type: string
          description: >-
            Human-readable detail. Present on endpoints that return an error
            code in `error`.
      required:
        - error
      x-apidog-orders:
        - error
        - error_message
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    GatewayError:
      type: object
      description: >-
        Returned by the API gateway itself when the bearer token is missing,
        invalid, expired or revoked, or the calling IP is not on the API key's
        allowlist.
      properties:
        message:
          type: string
          enum:
            - Forbidden
            - Unauthorized
      required:
        - message
      x-apidog-orders:
        - message
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
  securitySchemes:
    bearerAuth:
      type: bearer
      scheme: bearer
      description: >-
        API key issued to the account holder, sent as `Authorization: Bearer
        <token>`. The key must hold the `SUBACCOUNT_TRANSFER` scope.
    bearer:
      type: bearer
      scheme: bearer
servers:
  - url: https://api.onetrading.com/fast
    description: Production Env
security: []

```