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

# Token custody detail

> One token's custody, by symbol, asset UUID or contract address.



## OpenAPI

````yaml /proto-openapi/api/openapi.yaml get /api/v1/analytics/tokens/{token}
openapi: 3.0.3
info:
  title: Monaco Protocol API
  description: REST API for the Monaco Protocol hybrid CLOB exchange.
  version: 1.0.0
servers:
  - url: https://apimonaco.xyz
    description: Production (Sei mainnet)
security: []
tags:
  - name: AccountsService
  - name: AnalyticsService
  - name: ApplicationsService
  - name: AuthService
  - name: BuildercodeRewardsService
  - name: ComplianceService
  - name: CopyTradingService
  - name: DelegatedAgentsService
  - name: FaucetService
  - name: FeesService
  - name: HealthService
  - name: ManagedMarketsService
    description: |-
      Wallet-authenticated maker assignments. The signed session must match both
       configured maker user and application. Owner IDs are process fences, never auth.
       Only wallet sessions are supported; delegated-agent sessions receive 403.
  - name: MarginAccountsService
    description: |-
      Current public isolated-margin semantics:
       - a user has one parent margin account per application scope
       - opening orders create or reuse isolated position buckets under that parent
       - parent account creation is handled internally by margin workflows
  - name: MarketService
  - name: OrderbookService
  - name: OrdersService
  - name: PositionsService
    description: |-
      Current public isolated-margin semantics:
       - positions link to a parent margin account and, when applicable, a bucket id
       - opening orders create or reuse isolated position buckets under the parent
       - users can open another isolated position by reusing the parent account with a different market bucket
  - name: PulseService
  - name: RfqService
  - name: SweeperService
  - name: TraderCodeService
  - name: TradesService
  - name: WithdrawalsService
paths:
  /api/v1/analytics/tokens/{token}:
    get:
      tags:
        - AnalyticsService
        - Analytics
      summary: Token custody detail
      description: One token's custody, by symbol, asset UUID or contract address.
      operationId: get_token_custody
      parameters:
        - name: token
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTokenCustodyResponse'
        '404':
          description: No token answers to this symbol, UUID or address
        '429':
          description: Public read rate limit exceeded for this client
        '500':
          description: Internal server error
components:
  schemas:
    GetTokenCustodyResponse:
      type: object
      properties:
        token:
          $ref: '#/components/schemas/TokenCustody'
    TokenCustody:
      type: object
      properties:
        assetId:
          type: string
          description: Asset UUID; null for a token with custody flow but no listed asset
          format: uuid
          nullable: true
        symbol:
          example: USDC
          type: string
          description: Asset symbol; null when unlisted
          nullable: true
        name:
          example: USD Coin
          type: string
          description: Asset name; null when unlisted
          nullable: true
        decimals:
          example: 6
          type: integer
          description: Token decimals; null when unlisted
          format: uint32
          nullable: true
        iconUrl:
          type: string
          description: Asset icon URL; null when unlisted
          nullable: true
        contractAddress:
          example: '0x23e459c24c4925ba89205c400dceca7abc11723d'
          type: string
          description: Token contract address, lowercase
          nullable: true
        depositedRaw:
          example: '536172601000000'
          type: string
          description: Deposits since the explorer's history starts, in raw token units
          nullable: true
        withdrawnRaw:
          example: '1000000'
          type: string
          description: >-
            Withdrawals initiated since the explorer's history starts, in raw
            token units
          nullable: true
        depositsCount:
          example: 1200
          type: integer
          description: Deposits of the token
          format: int64
          minimum: 0
          nullable: true
        withdrawalsCount:
          example: 310
          type: integer
          description: Initiated withdrawals of the token
          format: int64
          minimum: 0
          nullable: true
        custodyRaw:
          example: '536172600000000'
          type: string
          description: >-
            openingRaw plus deposits less initiated withdrawals, in raw token
            units; null when not positive (never zero: a token held in no amount
            and one not indexed are different facts)
          nullable: true
        pendingWithdrawalsRaw:
          example: '250000000'
          type: string
          description: >-
            Withdrawals initiated but not yet executed on-chain, in raw token
            units; still physically in the vault
          nullable: true
        referencePriceUsd:
          example: '1'
          type: string
          description: >-
            USD price the custody is valued at: 1 for USDC, null for every other
            token
          nullable: true
        custodyUsd:
          example: '536172600'
          type: string
          description: >-
            custodyRaw in USD at referencePriceUsd; null without a price or a
            positive custody
          nullable: true
        countsTowardTvl:
          example: true
          type: boolean
          description: Whether custodyUsd is summed into tvlUsd (USDC only)
          nullable: true
        openingRaw:
          example: '924746312510000'
          type: string
          description: >-
            What the vault held before the explorer's history starts, in raw
            token units: 0 where the history starts at the exchange's first
            event, the measured balance carried in where it starts later
          nullable: true
      description: >-
        What the vault holds of one token. Amounts are raw token units. Custody
        is openingRaw plus depositedRaw less withdrawnRaw. Withdrawals count
        when initiated; the vault's physical balance is custodyRaw plus
        pendingWithdrawalsRaw. Custody is folded from the trade and transfer
        stream into the aux database while pendingWithdrawalsRaw is read from
        core, so the two can disagree briefly while the fold lags.

````

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