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

# Set fee priority

> Order the assets a trading account's fees are taken from first. Fees walk the list in order, then the quote and the other stablecoins by liquidation priority; whatever is left is owed as quote debt. A volatile asset pays fees only when listed, at its oracle price, in the asset itself; a listed asset without a fresh price is skipped. At most 8 distinct entries, each the quote or a listed Active collateral asset; an empty list restores the default order. Applies to fills after it.



## OpenAPI

````yaml /v2/api-reference/openapi.json put /api/v1/account/fee-priority
openapi: 3.1.0
info:
  title: ekiden-gateway
  description: >-
    API Gateway and WebSocket proxy based on Axum and Utoipa, handling auth,
    rate limiting, and connection buffering.
  license:
    name: ''
  version: 0.1.1
servers:
  - url: https://api.dev.ekiden.fi/
    description: Production (Canton Mainnet)
security: []
paths:
  /api/v1/account/fee-priority:
    put:
      tags:
        - Account
      summary: Set fee priority
      description: >-
        Order the assets a trading account's fees are taken from first. Fees
        walk the list in order, then the quote and the other stablecoins by
        liquidation priority; whatever is left is owed as quote debt. A volatile
        asset pays fees only when listed, at its oracle price, in the asset
        itself; a listed asset without a fresh price is skipped. At most 8
        distinct entries, each the quote or a listed Active collateral asset; an
        empty list restores the default order. Applies to fills after it.
      operationId: set_fee_priority
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetFeePriorityRequest'
        required: true
      responses:
        '200':
          description: Fee priority set
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetFeeAssetResponse'
        '400':
          description: >-
            An asset is unknown, not Active or listed twice, or more than 8 are
            listed
      security:
        - bearer_auth: []
components:
  schemas:
    SetFeePriorityRequest:
      type: object
      description: The assets trading fees are taken from first, in order.
      required:
        - sub_account_address
        - asset_ids
      properties:
        asset_ids:
          type: array
          items:
            type: integer
            format: int32
            minimum: 0
          description: >-
            At most 8 distinct ids, each the quote or a listed Active collateral
            asset

            (`GET /collateral/assets`), stablecoin or volatile. Empty restores
            the default order.
          example:
            - 3
            - 1
            - 2
        sub_account_address:
          type: string
    SetFeeAssetResponse:
      type: object
      required:
        - success
        - time
      properties:
        success:
          type: boolean
        time:
          type: string
          format: date-time
          example: '1672531200000'
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````

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