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

# Account Settings

> Leverage and fee-tier changes on the account WebSocket stream.

Keep displayed leverage settings and fee tiers current using the shared
[account subscription](https://docs.bulk.trade/api-reference/ws-account.md). These messages share the
account stream with other events; this reference does not create a separate
subscription or a network-side settings filter. Dispatch by `data.type`.

## Handling settings updates

* `leverageUpdate` supplies a `leverage` array of symbol and leverage pairs.
  Apply each entry to the corresponding symbol's leverage setting. This is a
  settings update, not a fill or a position-size change.
* `feeTierUpdate` supplies a `feeTiers` array with the applicable `symbol`
  scope, rolling volume, tier index and threshold, maker and taker rates in
  basis points, and the rolling window length in days. The `global` symbol
  identifies a global fee-tier entry.

Fee-tier updates use `ts` in nanoseconds. The leverage-update payload has no
timestamp field in this schema; do not require a common timestamp key across
both message types. Preserve integer precision when decoding `ts`.


## AsyncAPI

````yaml api-reference/asyncapi.yaml account-settings
id: account-settings
title: Account settings
description: >-
  Public read-only account subscription; no signature. This channel is a
  documentation view of selected messages, not a network-side event filter.
  Every view sends the same account subscription and the live connection can
  receive all account event types. Wait for accountSnapshot before treating
  account state as ready. Snapshot replaces state; identify positions by symbol
  and isoPubkey and subscribe to subaccounts separately. No replay cursor. Save
  the acknowledged topic for unsubscribe. Unsubscribe using the acknowledged
  topic; see [Connection Management](/api-reference/ws-connection#unsubscribe).
servers:
  - id: mainnet
    protocol: wss
    host: mainnet-ws1.bulk.trade
    bindings: []
    variables: []
  - id: testnet
    protocol: wss
    host: exchange-ws1.bulk.trade
    bindings: []
    variables: []
address: /
parameters: []
bindings: []
operations:
  - &ref_1
    id: account-settingsSubscribe
    title: Subscribe
    type: receive
    messages:
      - &ref_3
        id: subscribe
        contentType: application/json
        payload:
          - name: Subscribe
            description: >-
              Schema defaults on this request are playground example prefills,
              not omitted-field defaults accepted by the network endpoint.
            type: object
            properties:
              - name: method
                type: string
                enumValues:
                  - subscribe
                required: true
              - name: subscription
                type: array
                description: >-
                  Playground form template only. Paste an account public key
                  into user before sending; the blank value is not a valid
                  account and no account is preselected.
                required: true
                properties:
                  - name: type
                    type: string
                    enumValues:
                      - account
                    required: true
                  - name: user
                    type: oneOf
                    description: >-
                      Paste the account public key to observe. No account is
                      preselected.
                    required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            method:
              type: string
              enum:
                - subscribe
              default: subscribe
              x-parser-schema-id: <anonymous-schema-312>
            subscription:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - account
                    default: account
                    x-parser-schema-id: <anonymous-schema-315>
                  user:
                    oneOf:
                      - type: string
                        description: Account public key in base58.
                        x-parser-schema-id: <anonymous-schema-317>
                      - type: array
                        minItems: 1
                        items:
                          type: string
                          x-parser-schema-id: <anonymous-schema-319>
                        x-parser-schema-id: <anonymous-schema-318>
                    description: >-
                      Paste the account public key to observe. No account is
                      preselected.
                    x-parser-schema-id: <anonymous-schema-316>
                required:
                  - type
                  - user
                x-parser-schema-id: <anonymous-schema-314>
              minItems: 1
              default:
                - type: account
                  user: ''
              description: >-
                Playground form template only. Paste an account public key into
                user before sending; the blank value is not a valid account and
                no account is preselected.
              x-parser-schema-id: <anonymous-schema-313>
          required:
            - method
            - subscription
          x-parser-schema-id: <anonymous-schema-311>
        title: Subscribe
        description: >-
          Schema defaults on this request are playground example prefills, not
          omitted-field defaults accepted by the network endpoint.
        example: |-
          {
            "method": "subscribe",
            "subscription": [
              {
                "type": "account",
                "user": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe
    bindings: []
    extensions: &ref_0
      - id: x-parser-unique-object-id
        value: account-settings
  - &ref_2
    id: account-settingsEvents
    title: Receive events
    type: send
    messages:
      - &ref_4
        id: leverageUpdate
        contentType: application/json
        payload:
          - name: Leverage update
            description: Network-published leverageUpdate
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - account
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: type
                    type: string
                    enumValues:
                      - leverageUpdate
                    required: true
                  - name: leverage
                    type: array
                    required: false
                    properties:
                      - name: symbol
                        type: string
                        required: false
                      - name: leverage
                        type: number
                        required: false
              - name: topic
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - account
              x-parser-schema-id: <anonymous-schema-576>
            data:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - leverageUpdate
                  x-parser-schema-id: <anonymous-schema-578>
                leverage:
                  type: array
                  items:
                    type: object
                    properties:
                      symbol:
                        type: string
                        x-parser-schema-id: <anonymous-schema-581>
                      leverage:
                        type: number
                        x-parser-schema-id: <anonymous-schema-582>
                    x-parser-schema-id: <anonymous-schema-580>
                  x-parser-schema-id: <anonymous-schema-579>
              required:
                - type
              x-parser-schema-id: <anonymous-schema-577>
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-583>
          required:
            - type
            - data
            - topic
          x-parser-schema-id: <anonymous-schema-575>
        title: Leverage update
        description: Network-published leverageUpdate
        example: |-
          {
            "type": "account",
            "data": {
              "type": "leverageUpdate",
              "leverage": [
                {
                  "symbol": "BTC-USD",
                  "leverage": 5
                }
              ]
            },
            "topic": "account.FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: leverageUpdate
      - &ref_5
        id: feeTierUpdate
        contentType: application/json
        payload:
          - name: Fee tier update
            description: Network-published feeTierUpdate
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - account
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: type
                    type: string
                    enumValues:
                      - feeTierUpdate
                    required: true
                  - name: feeTiers
                    type: array
                    required: false
                    properties:
                      - name: symbol
                        type: string
                        required: false
                      - name: rollingVolume
                        type: number
                        required: false
                      - name: tierIndex
                        type: number
                        required: false
                      - name: tierThreshold
                        type: number
                        required: false
                      - name: makerBps
                        type: number
                        required: false
                      - name: takerBps
                        type: number
                        required: false
                      - name: windowDays
                        type: number
                        required: false
                  - name: ts
                    type: number
                    required: false
              - name: topic
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - account
              x-parser-schema-id: <anonymous-schema-585>
            data:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - feeTierUpdate
                  x-parser-schema-id: <anonymous-schema-587>
                feeTiers:
                  type: array
                  items:
                    type: object
                    properties:
                      symbol:
                        type: string
                        x-parser-schema-id: <anonymous-schema-590>
                      rollingVolume:
                        type: number
                        x-parser-schema-id: <anonymous-schema-591>
                      tierIndex:
                        type: number
                        x-parser-schema-id: <anonymous-schema-592>
                      tierThreshold:
                        type: number
                        x-parser-schema-id: <anonymous-schema-593>
                      makerBps:
                        type: number
                        x-parser-schema-id: <anonymous-schema-594>
                      takerBps:
                        type: number
                        x-parser-schema-id: <anonymous-schema-595>
                      windowDays:
                        type: number
                        x-parser-schema-id: <anonymous-schema-596>
                    x-parser-schema-id: <anonymous-schema-589>
                  x-parser-schema-id: <anonymous-schema-588>
                ts:
                  type: number
                  x-parser-schema-id: <anonymous-schema-597>
              required:
                - type
              x-parser-schema-id: <anonymous-schema-586>
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-598>
          required:
            - type
            - data
            - topic
          x-parser-schema-id: <anonymous-schema-584>
        title: Fee tier update
        description: Network-published feeTierUpdate
        example: |-
          {
            "type": "account",
            "data": {
              "type": "feeTierUpdate",
              "feeTiers": [
                {
                  "symbol": "global",
                  "rollingVolume": 1260000,
                  "tierIndex": 1,
                  "tierThreshold": 1000000,
                  "makerBps": 1.8,
                  "takerBps": 3.3,
                  "windowDays": 14
                }
              ],
              "ts": 1775550000123456800
            },
            "topic": "account.FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: feeTierUpdate
      - &ref_6
        id: subscribed
        contentType: application/json
        payload:
          - name: Subscribed
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - subscriptionResponse
                required: true
              - name: topics
                type: array
                required: false
                properties:
                  - name: item
                    type: string
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - subscriptionResponse
              x-parser-schema-id: <anonymous-schema-418>
            topics:
              type: array
              items:
                type: string
                x-parser-schema-id: <anonymous-schema-420>
              x-parser-schema-id: <anonymous-schema-419>
          required:
            - type
          x-parser-schema-id: <anonymous-schema-417>
        title: Subscribed
        example: |-
          {
            "type": "subscriptionResponse",
            "topics": [
              "account.FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribed
      - &ref_7
        id: unsubscribed
        contentType: application/json
        payload:
          - name: Unsubscribed
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - unsubscribeResponse
                required: true
              - name: topic
                type: string
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              enum:
                - unsubscribeResponse
              x-parser-schema-id: <anonymous-schema-422>
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-423>
          required:
            - type
          x-parser-schema-id: <anonymous-schema-421>
        title: Unsubscribed
        example: |-
          {
            "type": "unsubscribeResponse",
            "topic": "account.FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: unsubscribed
    bindings: []
    extensions: *ref_0
sendOperations:
  - *ref_1
receiveOperations:
  - *ref_2
sendMessages:
  - *ref_3
receiveMessages:
  - *ref_4
  - *ref_5
  - *ref_6
  - *ref_7
extensions:
  - id: x-parser-unique-object-id
    value: account-settings
securitySchemes: []

````

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