> ## 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 Snapshot

> Read current margin, positions, open orders, and account settings.

Read current margin, positions, open orders, and account settings. This is an unsigned `POST /account` query with
`type: "fullAccount"`, not a separate endpoint.

## Query target

Use a master or sub-account public key. Positions and orders include attached isolated-account rows; separate sub-accounts require their own query.

Unprefixed `margin` values are account-local. Optional `agg*` values include the account and its isolated accounts, excluding separate sub-accounts. Do not add local values to aggregate totals. Use `transferableBalance`, not `availableMargin`, for current transfer capacity; execution rechecks risk.


## OpenAPI

````yaml api-reference/account/openapi-snapshot.yaml POST /account
openapi: 3.0.3
info:
  title: Bulk Trade API - Account Snapshot
  version: 1.0.0
servers:
  - url: https://mainnet-api1.bulk.trade/api/v1
    description: Mainnet
  - url: https://exchange-api.bulk.trade/api/v1
    description: Testnet
security: []
paths:
  /account:
    post:
      summary: Account Snapshot
      description: >-
        Read current margin, positions, open orders, and account settings. No
        signature required. Use a master or sub-account public key. Positions
        and orders include attached isolated-account rows; separate sub-accounts
        require their own query.
      operationId: queryAccountFullAccount
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - type
                - user
              properties:
                type:
                  type: string
                  enum:
                    - fullAccount
                  default: fullAccount
                user:
                  type: string
                  description: >-
                    Paste the account public key (base58). No account is
                    selected for you.
            example:
              type: fullAccount
              user: ''
      responses:
        '200':
          description: >-
            Current account state in externally tagged array rows; illustrative
            example, not live data for the supplied account
          content:
            application/json:
              example:
                - fullAccount:
                    kind: MasterEOA
                    margin:
                      totalMargin: 1000
                      availableMargin: 1000
                      executionImpact: 0
                      transferableBalance: 1000
                      marginUsed: 0
                      marginBufferRate: 0.05
                      bufferedMargin: 0
                      notional: 0
                      realizedPnl: 0
                      unrealizedPnl: 0
                      fees: 0
                      funding: 0
                    positions: []
                    openOrders: []
                    leverageSettings: []
              schema:
                type: array
                items:
                  type: object
                  additionalProperties: false
                  required:
                    - fullAccount
                  properties:
                    fullAccount:
                      type: object
                      description: >-
                        Complete account state with account tree, margin,
                        positions, orders, and leverage settings
                      properties:
                        kind:
                          type: string
                          description: Account kind
                        parent:
                          type: string
                          nullable: true
                          description: Parent account pubkey, omitted on master responses
                        name:
                          type: string
                          nullable: true
                          description: >
                            Sub-account display name. Present on responses where
                            `kind: "SubAccount"`

                            (i.e. when the sub-account pubkey was passed as
                            `user`); null on master responses.
                        subAccounts:
                          type: array
                          description: >
                            Child sub-accounts owned by this master (empty for
                            non-master kinds).

                            The list contains pubkeys only; query a sub-account
                            directly with `type: "fullAccount"`

                            (HTTP) or subscribe to its account stream (WS) to
                            see its `name`.
                          items:
                            type: object
                            required:
                              - pubkey
                            properties:
                              pubkey:
                                type: string
                                description: Sub-account pubkey (base58)
                        authorizedAgentWallets:
                          type: array
                          description: >
                            Agent wallets registered on this account that may
                            sign on its behalf.

                            Agents registered on a master are also authorized to
                            sign for any of the master's sub-accounts.
                            Sub-accounts can additionally register their own
                            agents independently.
                          items:
                            type: string
                        builderCodeApprovals:
                          type: array
                          description: >-
                            Approved builder-code recipients for this account.
                            Builder codes are builder-code fees on the wire.
                          items:
                            type: object
                            properties:
                              recipient:
                                type: string
                                description: >-
                                  Approved builder-code recipient public key
                                  (base58)
                              maxFee:
                                type: integer
                                format: int32
                                minimum: 1
                                maximum: 15
                                description: >-
                                  Maximum approved builder-code fee in basis
                                  points
                        margin:
                          type: object
                          description: >-
                            Account-local margin and PnL; optional agg-prefixed
                            fields include attached isolated accounts, not
                            separate sub-accounts
                          properties:
                            totalMargin:
                              type: number
                              description: Account-local margin balance
                            availableMargin:
                              type: number
                              description: >-
                                Account-local totalMargin minus marginUsed; not
                                the transferable balance
                            executionImpact:
                              type: number
                              description: >-
                                Non-positive difference between impacted and
                                unrealized PnL
                            transferableBalance:
                              type: number
                              description: >-
                                Account-local balance eligible for transfer
                                under risk constraints; re-evaluated when a
                                transfer executes
                            marginUsed:
                              type: number
                              description: Total maintenance margin requirement
                            marginBufferRate:
                              type: number
                              description: >-
                                Configured additional margin buffer as a decimal
                                fraction
                            bufferedMargin:
                              type: number
                              description: marginUsed multiplied by (1 + marginBufferRate)
                            notional:
                              type: number
                              description: Total position notional value
                            realizedPnl:
                              type: number
                              description: Total realized profit/loss
                            unrealizedPnl:
                              type: number
                              description: Total unrealized profit/loss
                            fees:
                              type: number
                              description: Total fees paid
                            funding:
                              type: number
                              description: Total funding payments
                            aggTotalMargin:
                              type: number
                              description: >-
                                Parent-plus-isolated margin; omitted without
                                attached isolated owners
                            aggAvailableMargin:
                              type: number
                              description: >-
                                Parent-plus-isolated margin minus maintenance
                                margin
                            aggExecutionImpact:
                              type: number
                              description: >-
                                Non-positive difference between aggregate
                                impacted and unrealized PnL
                            aggTransferableBalance:
                              type: number
                              description: >-
                                Sum of parent-plus-isolated transferable
                                balances; not a promise that the parent can
                                directly withdraw isolated collateral
                            aggMarginUsed:
                              type: number
                              description: Parent-plus-isolated maintenance margin
                            aggBufferedMargin:
                              type: number
                              description: >-
                                Aggregate maintenance margin multiplied by (1 +
                                marginBufferRate)
                            aggNotional:
                              type: number
                              description: Parent-plus-isolated position notional
                            aggRealizedPnl:
                              type: number
                              description: Parent-plus-isolated realized PnL
                            aggUnrealizedPnl:
                              type: number
                              description: Parent-plus-isolated unrealized PnL
                            aggFees:
                              type: number
                              description: Parent-plus-isolated reported fees
                            aggFunding:
                              type: number
                              description: Parent-plus-isolated reported funding
                        reserve:
                          type: object
                          description: >-
                            Per-symbol liquidation reserve tuples [reserve in
                            basis points, execution-impact reserve factor]
                          additionalProperties:
                            type: array
                            minItems: 2
                            maxItems: 2
                            items:
                              type: number
                        positions:
                          type: array
                          description: >-
                            Open positions with full risk metrics. For
                            master/sub accounts, includes per-instrument
                            isolated-account rows (`iso=true`).
                          items:
                            type: object
                            properties:
                              symbol:
                                type: string
                                description: Market symbol
                              size:
                                type: number
                                description: Position size (negative=short, positive=long)
                              price:
                                type: number
                                description: Volume-weighted average entry price
                              fairPrice:
                                type: number
                                description: Current fair/mark price
                              notional:
                                type: number
                                description: Position notional value
                              realizedPnl:
                                type: number
                                description: Realized profit/loss
                              unrealizedPnl:
                                type: number
                                description: Unrealized profit/loss at current fair price
                              impact:
                                type: number
                                description: >-
                                  Estimated closeout execution impact for the
                                  position
                              leverage:
                                type: number
                                description: Effective leverage
                              liquidationPrice:
                                type: number
                                description: Estimated liquidation price
                              fees:
                                type: number
                                description: Fees paid on this position
                              funding:
                                type: number
                                description: Funding payments for this position
                              maintenanceMargin:
                                type: number
                                description: Maintenance margin requirement
                              reserve:
                                type: array
                                minItems: 2
                                maxItems: 2
                                description: >-
                                  [minimum liquidation reserve in basis points,
                                  additional execution-impact reserve factor]
                                items:
                                  type: number
                              worstCaseMaintenanceMargin:
                                type: number
                                description: >-
                                  Standalone maintenance margin in the adverse
                                  extreme regime
                              lambda:
                                type: number
                                description: Risk lambda parameter
                              riskAllocation:
                                type: number
                                description: Fraction of portfolio risk allocated
                              iso:
                                type: boolean
                                description: >-
                                  `true` if this row belongs to a per-instrument
                                  isolated account, otherwise `false`
                              isoPubkey:
                                type: string
                                nullable: true
                                description: >-
                                  Present only when `iso=true`; base58 pubkey of
                                  the isolated account. Supports internal margin
                                  transfers and paginated history queries, but
                                  not a direct transaction account or
                                  current-state query target.
                              protection:
                                allOf:
                                  - type: object
                                    properties:
                                      orders:
                                        type: array
                                        description: >-
                                          Protective order references attached to
                                          this position
                                        items:
                                          type: object
                                          properties:
                                            orderId:
                                              type: string
                                              description: Protective order ID (base58)
                                            orderType:
                                              type: string
                                              enum:
                                                - stop
                                                - takeProfit
                                                - range
                                                - trigger
                                                - trailing
                                              description: Conditional root order type
                                            trigger:
                                              allOf:
                                                - 274bedde-2383-472c-8768-9a101d2845d4
                                              nullable: true
                                              description: >-
                                                Conditional trigger metadata for this
                                                protective order
                                nullable: true
                                description: >-
                                  Optional attached reduce-only protective
                                  orders for this symbol
                        openOrders:
                          type: array
                          description: >-
                            Resting live orders, including conditional orders
                            parked in conditional books. For master/sub
                            accounts, includes per-instrument isolated-account
                            rows (`iso=true`).
                          items:
                            type: object
                            description: Order status and details
                            properties:
                              symbol:
                                type: string
                                description: Market symbol
                              orderId:
                                type: string
                                description: Order ID (base58) - use for cancellation
                              price:
                                type: number
                                description: >-
                                  Order price (for conditional roots this is
                                  projected from trigger threshold when direct
                                  price is not set)
                              originalSize:
                                type: number
                                description: >-
                                  Original order size (signed; negative values
                                  indicate sell-side intent)
                              size:
                                type: number
                                description: >-
                                  Remaining size (signed; negative values
                                  indicate sell-side intent; `trigger` baskets
                                  use `0` because they are action containers,
                                  not direct sized orders)
                              filledSize:
                                type: number
                                description: Filled size
                              vwap:
                                type: number
                                description: >-
                                  Volume-weighted average fill price (0 if no
                                  fills)
                              maker:
                                type: boolean
                                description: true if order is maker (resting on book)
                              reduceOnly:
                                type: boolean
                                description: true if reduce-only order
                              orderType:
                                type: string
                                enum:
                                  - limit
                                  - market
                                  - stop
                                  - takeProfit
                                  - range
                                  - trigger
                                  - trailing
                                description: Inferred order type for snapshots/open-orders
                              trigger:
                                allOf:
                                  - type: object
                                    required:
                                      - px
                                    properties:
                                      isAbove:
                                        type: boolean
                                        description: >-
                                          Optional trigger direction when encoded;
                                          omitted when unavailable
                                      px:
                                        type: number
                                        description: Trigger threshold price
                                      lim:
                                        type: number
                                        description: >-
                                          Optional post-trigger limit price;
                                          omitted for market execution
                                      oco:
                                        type: string
                                        description: Optional linked OCO sibling order ID
                                      pxHi:
                                        type: number
                                        description: >-
                                          Optional upper trigger threshold for
                                          range/OCO
                                      limHi:
                                        type: number
                                        description: >-
                                          Optional upper post-trigger limit for
                                          range/OCO
                                      trb:
                                        type: integer
                                        format: uint32
                                        description: >-
                                          Trailing distance in bps (trailing
                                          orders only)
                                      stb:
                                        type: integer
                                        format: uint32
                                        description: >-
                                          Favorable reset step in bps (trailing
                                          orders only)
                                nullable: true
                                description: >-
                                  Trigger metadata for conditional/trigger
                                  orders, otherwise `null`
                              tif:
                                type: string
                                enum:
                                  - gtc
                                  - ioc
                                  - postOnly
                                  - postOnlySlide
                                  - postOnlyJoin
                                description: Time in force
                              status:
                                type: string
                                enum:
                                  - pending
                                  - placed
                                  - resting
                                  - working
                                  - modified
                                  - filled
                                  - partiallyFilled
                                  - cancelled
                                  - cancelledRiskLimit
                                  - cancelledSelfCrossing
                                  - cancelledReduceOnly
                                  - cancelledIoc
                                  - rejectedInvalid
                                  - rejectedRiskLimit
                                  - rejectedCrossing
                                  - rejectedDuplicate
                                  - triggered
                                  - siblingCancelled
                                  - triggerFailed
                                description: Order status
                              timestamp:
                                type: integer
                                format: int64
                                description: Order placement time (nanoseconds)
                              iso:
                                type: boolean
                                description: >-
                                  `true` if this row belongs to a per-instrument
                                  isolated account, otherwise `false`
                        pendingOnFill:
                          type: array
                          description: >-
                            Registered on-fill plans waiting for parent order
                            fill
                          items:
                            type: object
                            properties:
                              parentOrderId:
                                type: string
                                description: >-
                                  Parent resting order ID that activates these
                                  actions on first fill
                              actions:
                                type: array
                                description: >-
                                  Consequent actions executed when parent order
                                  first fills
                                items:
                                  type: object
                        feeTiers:
                          type: array
                          description: >-
                            Effective fee tier snapshot rows for global and
                            instrument scopes
                          items:
                            type: object
                            properties:
                              symbol:
                                type: string
                                description: Scope symbol (`global` or market symbol)
                              rollingVolume:
                                type: number
                              tierIndex:
                                type: integer
                                format: int32
                              tierThreshold:
                                type: number
                              makerBps:
                                type: number
                              takerBps:
                                type: number
                              windowDays:
                                type: integer
                                format: int32
                        leverageSettings:
                          type: array
                          description: Per-symbol leverage settings
                          items:
                            type: object
                            properties:
                              symbol:
                                type: string
                                description: Market symbol
                              leverage:
                                type: number
                                description: Maximum leverage (1.0 to 50.0)
                        lockedAmounts:
                          type: array
                          description: >-
                            Margin locked while a transfer or withdrawal is in
                            progress; omitted when empty
                          items:
                            type: object
                            description: Per-transfer or withdrawal margin lock
                            properties:
                              hash:
                                type: string
                                description: Transfer or withdrawal action hash (base58)
                              symbol:
                                type: string
                                description: Locked instrument symbol, for example USDC
                              amount:
                                type: number
                                description: Locked amount in instrument units
                              lockedAt:
                                type: integer
                                format: int64
                                description: Nanosecond timestamp when margin was locked
        '404':
          description: >-
            The current-state account or history scope was not found. History
            requests return the structured error envelope when a JSON body is
            present.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        enum:
                          - INVALID_HISTORY_QUERY
                          - INVALID_HISTORY_LIMIT
                          - INVALID_SLOT_RANGE
                          - CURSOR_INVALID
                          - ACCOUNT_NOT_FOUND
                          - HISTORY_NOT_COVERED
                          - CURSOR_EXPIRED
                          - HISTORY_STATE_NOT_READY
                          - HISTORY_BUSY
                          - HISTORY_STORAGE_ERROR
                      message:
                        type: string
        '408':
          description: >-
            Response timeout (60 seconds for orders, 5 seconds for current-state
            snapshot requests). An order may still execute; reconcile before
            submitting a replacement.
        '422':
          description: Unsupported query type or malformed current-state account body
          content:
            text/plain:
              schema:
                type: string
        '429':
          description: >-
            Request or action rate limit reached. Back off before retrying; the
            body may be plain text or empty.
        '500':
          description: >-
            Current-state request failure or history storage/decoding failure.
            History requests return the structured error envelope when a JSON
            body is present.
          content:
            application/json:
              schema:
                $ref: 3e38b6dd-5a72-45b7-8102-d3dd0b8158ce
        '503':
          description: >-
            History state is not ready, bounded read capacity is saturated, or
            the API is locked
          content:
            application/json:
              schema:
                oneOf:
                  - 7a7832fb-2438-44b2-b917-4b7896425a77
                  - type: object
                    required:
                      - code
                      - error
                    properties:
                      code:
                        type: string
                        enum:
                          - API_LOCKED
                      error:
                        type: string
      security: []

````

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