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

# Read a coherent private instant-trading account snapshot.

> Composes sequencer-authoritative orders/holds/settlements, wallet+node-authoritative balances, and an indexer repeatable-read projection. The path wallet must match the authenticated session; a developer key never substitutes for user authority and additionally needs account:read when present.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/users/{address}/account
openapi: 3.1.0
info:
  title: Aura API
  description: >-
    Public REST API for Aura, prediction markets on Alephium.


    This API exposes the app read model: markets, live instant order books,

    orders, fills, vault state, oracle and governance. Non-trading

    build-tx endpoints return unsigned transactions for the client to

    sign with its own wallet.


    Interactive reference: https://docs.aura.markets/api-reference/introduction


    ## Discovery


    Built for integrators, not for lazy implementers:


    - **Faceted lists.** Every list endpoint accepts `?facets=true`
      and returns category, tag, and status counts in the same response,
      so a UI can render filter chips without a second request.
    - **Cursor pagination.** Stable across inserts and fast at depth.
      Offset paging via `?page=` is still supported for compat.
    - **Rich filters.** `?q=`, `?category=`, `?tags=`, `?status=`,
      `?creator=`, and `?minVolume=` on `/v1/markets`. Tag matching is
      AND, so all listed tags must be present.
    - **Sortable.** `?sort=created-at|volume|best-bid-yes|recently-traded`
      with `?order=asc|desc`. Use `/v1/trending` for the composite-score sort.
    - **Field projection.** `?fields=id,question,bestBidYes` trims the
      wire weight for thin clients.
    - **Unified search.** `/v1/search?q=` matches strictly first, then
      falls back to typo-tolerant matching when nothing hits. The result
      type is a discriminated union, so adding events or users later is
      non-breaking.
    - **Transparent trending.** `/v1/trending` returns the full algorithm
      and per-market component scores so the ranking is auditable.
    - **Categories and tags as first-class.** `/v1/categories` and
      `/v1/tags` enumerate the taxonomy with market counts.

    ## Authentication


    Aura uses wallet-bound account sessions delivered as an HttpOnly

    cookie. Sign in by signing a one-time challenge with your wallet:


    ```

    POST /v1/auth/challenge   { "address": "..." }

    POST /v1/auth/session     { "address": "...", "publicKey": "...",
    "signature": "...", "keyType": "gl-secp256k1" }

    ```


    The `session` call sets the `aura_session` cookie and returns a CSRF

    token; send it back in the `x-csrf-token` header on every mutating

    request. Every token is checked against durable revocation state.

    `POST /v1/auth/logout` revokes the presented cookie or bearer session;

    cookie callers include the same CSRF header.


    Reads are accessible anonymously with low IP-based rate limits;

    write endpoints (`/v1/tx/*`, social writes) require a valid session.


    ## Rate limits


    | Tier      | Reads (req/min) | Writes (req/min) |

    |-----------|----------------:|-----------------:|

    | Anonymous | 60 per IP | 10 per IP |

    | Signed-in | 600 per wallet | 60 per wallet |


    Standard `RateLimit-*` response headers are returned on every

    request (IETF `draft-ietf-httpapi-ratelimit-headers`).


    ## Write endpoints


    Aura never returns raw keys, signing grants, or transaction/intent

    signatures. Embedded-wallet keys are usable only inside the measured

    enclave. Endpoints under `/v1/tx/*` return an *unsigned* transaction

    for an independently controlled wallet to sign and submit.


    Builder trading endpoints require two independent credentials: a scoped

    developer key identifies and rate-limits the integration, while a

    user-created restricted trading authorization permits only its bounded

    place/cancel policy. Aura signs and submits inside custody; the builder

    receives a receipt, never a reusable signature.


    A typical on-chain lifecycle flow:


    1. `POST /v1/tx/vault/{address}/deposit` → server returns
       `{ unsignedTx, gasEstimate, ... }`.
    2. Wallet signs `unsignedTx`.

    3. Wallet submits the signed tx to any Alephium node.
  version: 0.1.0
  license:
    name: MIT
  contact:
    name: Aura
    url: https://docs.aura.markets
servers:
  - url: /
    description: this server
security:
  - SessionCookie: []
  - SessionBearer: []
  - {}
tags:
  - name: Health
    description: Liveness + version info.
  - name: Auth
    description: Wallet account sessions (sign in, sign out).
  - name: Developer keys
    description: Create, rotate, revoke, and audit scoped builder identities.
  - name: Protocol
    description: Canonical chain, contract, trading, fee, and realtime configuration.
  - name: Transactions
    description: >-
      Reconcile Alephium transaction state with Aura indexing and recovery
      state.
  - name: Platform
    description: Site-wide banner settings and aggregate platform stats.
  - name: Realtime
    description: Server-Sent Events stream for live market and account updates.
  - name: Webhooks
    description: >-
      Durable HMAC-signed delivery of public and explicitly authorized private
      events.
  - name: Markets
    description: Browse and look up prediction markets.
  - name: Categories
    description: Top-level market taxonomy with counts.
  - name: Tags
    description: Free-form market tags with counts.
  - name: Events
    description: Linked-market groups (multi-leg events).
  - name: Search
    description: Full-text + fuzzy search across markets.
  - name: Orderbook
    description: Live order book + recent fills.
  - name: Trading
    description: Secure builder order placement, cancellation, and dead-man controls.
  - name: Trading receipts
    description: Public keys for verifying sequencer receipts.
  - name: Prices
    description: Latest prices and historical price series.
  - name: Positions
    description: Open share positions for the signed-in wallet.
  - name: Funding
    description: >-
      Wallet-authorized native funding balances, deposits, history, and
      withdrawal construction.
  - name: Parlays
    description: Parlay pool capacity, leg correlation checks, and clearance.
  - name: Vault
    description: AURA token vault. Build unsigned deposit / unlock / withdraw txs.
  - name: Disputes
    description: Optimistic oracle disputes. Read-side state and votes.
  - name: Oracle votes
    description: Build unsigned oracle txs (submit / dispute / commit / reveal).
  - name: Voting
    description: Governance proposals + voting period state.
  - name: Vote
    description: Build unsigned governance vote tx.
  - name: Proposals
    description: Validate + build market-proposal txs (single-leg, linked, parlay).
  - name: Rewards
    description: Liquidity reward programs, per-wallet accruals, and market sponsorships.
  - name: Earnings
    description: >-
      Unified creator, maker, referral, treasury, and builder attribution
      accounting.
  - name: Referrals
    description: Referral summaries and payout history.
  - name: Users
    description: Wallet-scoped reads. Profile, positions, orders, parlays.
  - name: Account actions
    description: Aggregated "what does this wallet need to do" views.
  - name: Account
    description: Watchlist and notification management for the signed-in wallet.
  - name: Leaderboard
    description: Top traders by composite score.
  - name: Account
    description: Watchlist and notification state for the signed-in wallet.
externalDocs:
  description: Full Aura documentation (guides + interactive API reference)
  url: https://docs.aura.markets
paths:
  /v1/users/{address}/account:
    get:
      tags:
        - Account
      summary: Read a coherent private instant-trading account snapshot.
      description: >-
        Composes sequencer-authoritative orders/holds/settlements,
        wallet+node-authoritative balances, and an indexer repeatable-read
        projection. The path wallet must match the authenticated session; a
        developer key never substitutes for user authority and additionally
        needs account:read when present.
      parameters:
        - schema:
            type: string
            minLength: 30
            maxLength: 80
            pattern: ^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz:]+$
          in: path
          name: address
          required: true
          description: Alephium address (base58, optional `:N` group suffix).
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  account:
                    type: string
                    minLength: 30
                    maxLength: 80
                    pattern: >-
                      ^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz:]+$
                    description: Alephium address (base58, optional `:N` group suffix).
                  snapshot:
                    type: object
                    properties:
                      generatedAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      streamCursor:
                        type: string
                      sequencer:
                        type: object
                        properties:
                          authority:
                            type: string
                            enum:
                              - sequencer
                          asOf:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          accountVersion:
                            type: string
                            pattern: ^(0|[1-9][0-9]*)$
                            description: >-
                              Exact token base-unit quantity encoded as
                              canonical JSON string.
                          cursor:
                            type: string
                        required:
                          - authority
                          - asOf
                          - accountVersion
                          - cursor
                        additionalProperties: false
                      wallet:
                        type: object
                        properties:
                          authority:
                            type: string
                            enum:
                              - wallet-svc+alephium-node
                          asOf:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                        required:
                          - authority
                          - asOf
                        additionalProperties: false
                      indexer:
                        type: object
                        properties:
                          authority:
                            type: string
                            enum:
                              - main-rds-indexer-projection
                          asOf:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          consistency:
                            type: string
                            enum:
                              - repeatable-read
                        required:
                          - authority
                          - asOf
                          - consistency
                        additionalProperties: false
                    required:
                      - generatedAt
                      - streamCursor
                      - sequencer
                      - wallet
                      - indexer
                    additionalProperties: false
                  collateral:
                    type: object
                    properties:
                      unit:
                        type: string
                        enum:
                          - collateral_base_units
                      rawOnChainBalance:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      spendable:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      buyCollateralHolds:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      matchedBuyObligations:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      pendingJitDeposits:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      pendingOutflows:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      custodyOperationActive:
                        type: boolean
                      tokenId:
                        type: string
                        pattern: ^[0-9a-f]{64}$
                    required:
                      - unit
                      - rawOnChainBalance
                      - spendable
                      - buyCollateralHolds
                      - matchedBuyObligations
                      - pendingJitDeposits
                      - pendingOutflows
                      - custodyOperationActive
                      - tokenId
                    additionalProperties: false
                  positionReservations:
                    type: object
                    properties:
                      unit:
                        type: string
                        enum:
                          - share_base_units
                      openSellHolds:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      matchedSellObligations:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                    required:
                      - unit
                      - openSellHolds
                      - matchedSellObligations
                    additionalProperties: false
                  orders:
                    type: object
                    properties:
                      authority:
                        type: string
                        enum:
                          - sequencer
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            orderId:
                              type: string
                              pattern: ^[0-9a-f]{64}$
                            marketId:
                              type: string
                              pattern: ^[0-9a-f]{64}$
                            outcome:
                              type: string
                              enum:
                                - 'yes'
                                - 'no'
                            side:
                              type: string
                              enum:
                                - buy
                                - sell
                            orderType:
                              type: string
                              enum:
                                - gtc_limit
                                - ioc_market
                            priceTick:
                              type: integer
                              minimum: 0
                              maximum: 1000
                              description: >-
                                Price as integer ticks of 0.001 (0=No,
                                1000=Yes).
                            quantityBaseUnits:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            openQuantityBaseUnits:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            matchedPendingQuantityBaseUnits:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            settledQuantityBaseUnits:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            cancelledQuantityBaseUnits:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            unwoundQuantityBaseUnits:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            status:
                              type: string
                              enum:
                                - open
                                - cancelled
                                - expired
                                - filled
                            fundingState:
                              type: string
                              enum:
                                - pending
                                - final
                                - failed
                            clientOrderId:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            acceptedSequence:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            acceptedAtMs:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Unix timestamp in milliseconds, encoded exactly
                                as text.
                            expiryMs:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Unix timestamp in milliseconds, encoded exactly
                                as text.
                            attribution:
                              type: object
                              properties:
                                version:
                                  type: string
                                  pattern: ^(0|[1-9][0-9]*)$
                                  description: >-
                                    Exact token base-unit quantity encoded as
                                    canonical JSON string.
                                source:
                                  type: string
                                  enum:
                                    - first_party
                                    - third_party
                                builderCode:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - version
                                - source
                                - builderCode
                              additionalProperties: false
                          required:
                            - orderId
                            - marketId
                            - outcome
                            - side
                            - orderType
                            - priceTick
                            - quantityBaseUnits
                            - openQuantityBaseUnits
                            - matchedPendingQuantityBaseUnits
                            - settledQuantityBaseUnits
                            - cancelledQuantityBaseUnits
                            - unwoundQuantityBaseUnits
                            - status
                            - fundingState
                            - clientOrderId
                            - acceptedSequence
                            - acceptedAtMs
                            - expiryMs
                            - attribution
                          additionalProperties: false
                      truncated:
                        type: boolean
                      nextCursor:
                        anyOf:
                          - type: string
                            pattern: ^(0|[1-9][0-9]*)$
                            description: >-
                              Exact token base-unit quantity encoded as
                              canonical JSON string.
                          - type: 'null'
                      continuation:
                        type: string
                        enum:
                          - /v1/users/{address}/orders?status=all
                    required:
                      - authority
                      - items
                      - truncated
                      - nextCursor
                      - continuation
                    additionalProperties: false
                  holds:
                    type: object
                    properties:
                      authority:
                        type: string
                        enum:
                          - sequencer
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            holdId:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            orderId:
                              type: string
                              pattern: ^[0-9a-f]{64}$
                            kind:
                              type: string
                              enum:
                                - collateral
                                - sell
                                - obligation
                            source:
                              anyOf:
                                - type: string
                                - type: 'null'
                            amountBaseUnits:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            matchId:
                              anyOf:
                                - type: string
                                  pattern: ^(0|[1-9][0-9]*)$
                                  description: >-
                                    Exact token base-unit quantity encoded as
                                    canonical JSON string.
                                - type: 'null'
                            allocatedSequence:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                          required:
                            - holdId
                            - orderId
                            - kind
                            - source
                            - amountBaseUnits
                            - matchId
                            - allocatedSequence
                          additionalProperties: false
                      truncated:
                        type: boolean
                      nextHoldId:
                        anyOf:
                          - type: string
                            pattern: ^(0|[1-9][0-9]*)$
                            description: >-
                              Exact token base-unit quantity encoded as
                              canonical JSON string.
                          - type: 'null'
                    required:
                      - authority
                      - items
                      - truncated
                      - nextHoldId
                    additionalProperties: false
                  pendingSettlements:
                    type: object
                    properties:
                      authority:
                        type: string
                        enum:
                          - sequencer
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            matchId:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            orderId:
                              type: string
                              pattern: ^[0-9a-f]{64}$
                            marketId:
                              type: string
                              pattern: ^[0-9a-f]{64}$
                            role:
                              type: string
                              enum:
                                - maker
                                - taker
                            fillQuantityBaseUnits:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            state:
                              type: string
                            batchJobId:
                              anyOf:
                                - type: string
                                  pattern: ^(0|[1-9][0-9]*)$
                                  description: >-
                                    Exact token base-unit quantity encoded as
                                    canonical JSON string.
                                - type: 'null'
                            batchState:
                              anyOf:
                                - type: string
                                - type: 'null'
                            transactionId:
                              anyOf:
                                - type: string
                                - type: 'null'
                            blockHash:
                              anyOf:
                                - type: string
                                - type: 'null'
                            confirmationDepth:
                              anyOf:
                                - type: string
                                  pattern: ^(0|[1-9][0-9]*)$
                                  description: >-
                                    Exact token base-unit quantity encoded as
                                    canonical JSON string.
                                - type: 'null'
                            attribution:
                              type: object
                              properties:
                                version:
                                  type: string
                                  pattern: ^(0|[1-9][0-9]*)$
                                  description: >-
                                    Exact token base-unit quantity encoded as
                                    canonical JSON string.
                                source:
                                  type: string
                                  enum:
                                    - first_party
                                    - third_party
                                builderCode:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - version
                                - source
                                - builderCode
                              additionalProperties: false
                          required:
                            - matchId
                            - orderId
                            - marketId
                            - role
                            - fillQuantityBaseUnits
                            - state
                            - batchJobId
                            - batchState
                            - transactionId
                            - blockHash
                            - confirmationDepth
                            - attribution
                          additionalProperties: false
                      truncated:
                        type: boolean
                      nextMatchId:
                        anyOf:
                          - type: string
                            pattern: ^(0|[1-9][0-9]*)$
                            description: >-
                              Exact token base-unit quantity encoded as
                              canonical JSON string.
                          - type: 'null'
                    required:
                      - authority
                      - items
                      - truncated
                      - nextMatchId
                    additionalProperties: false
                  deadManSwitch:
                    anyOf:
                      - type: object
                        properties:
                          status:
                            type: string
                            enum:
                              - armed
                              - disarmed
                              - triggered
                          generation:
                            type: string
                            pattern: ^(0|[1-9][0-9]*)$
                            description: >-
                              Exact token base-unit quantity encoded as
                              canonical JSON string.
                          stateVersion:
                            type: string
                            pattern: ^(0|[1-9][0-9]*)$
                            description: >-
                              Exact token base-unit quantity encoded as
                              canonical JSON string.
                          timeoutMs:
                            type: integer
                            minimum: 5000
                            maximum: 86400000
                          armedAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          lastHeartbeatAt:
                            type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          expiresAt:
                            anyOf:
                              - type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              - type: 'null'
                          triggeredAt:
                            anyOf:
                              - type: string
                                format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                              - type: 'null'
                          source:
                            type: object
                            properties:
                              epoch:
                                type: string
                                pattern: ^(0|[1-9][0-9]*)$
                                description: >-
                                  Exact token base-unit quantity encoded as
                                  canonical JSON string.
                              sequence:
                                type: string
                                pattern: ^(0|[1-9][0-9]*)$
                                description: >-
                                  Exact token base-unit quantity encoded as
                                  canonical JSON string.
                              hash:
                                type: string
                                pattern: ^[0-9a-f]{64}$
                            required:
                              - epoch
                              - sequence
                              - hash
                            additionalProperties: false
                        required:
                          - status
                          - generation
                          - stateVersion
                          - timeoutMs
                          - armedAt
                          - lastHeartbeatAt
                          - expiresAt
                          - triggeredAt
                          - source
                        additionalProperties: false
                      - type: 'null'
                  positions:
                    type: object
                    properties:
                      authority:
                        type: string
                        enum:
                          - indexer-derived
                      unit:
                        type: string
                        enum:
                          - collateral_display_and_share_display
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              exclusiveMinimum: 0
                              maximum: 9007199254740991
                            marketId:
                              type: integer
                              exclusiveMinimum: 0
                              maximum: 9007199254740991
                            marketAddress:
                              type: string
                              minLength: 30
                              maxLength: 80
                              pattern: >-
                                ^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz:]+$
                              description: >-
                                Alephium address (base58, optional `:N` group
                                suffix).
                            outcome:
                              type: string
                              enum:
                                - 'yes'
                                - 'no'
                            shares:
                              type: string
                              pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                              description: >-
                                Exact nonnegative decimal value encoded as
                                canonical JSON string.
                            averageCostProbability:
                              anyOf:
                                - type: string
                                  pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                                  description: >-
                                    Exact nonnegative decimal value encoded as
                                    canonical JSON string.
                                - type: 'null'
                            currentProbability:
                              anyOf:
                                - type: string
                                  pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                                  description: >-
                                    Exact nonnegative decimal value encoded as
                                    canonical JSON string.
                                - type: 'null'
                            priceObservedAtMs:
                              anyOf:
                                - type: string
                                  pattern: ^(0|[1-9][0-9]*)$
                                  description: >-
                                    Unix timestamp in milliseconds, encoded
                                    exactly as text.
                                - type: 'null'
                            potentialPayoutCollateral:
                              anyOf:
                                - type: string
                                  pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                                  description: >-
                                    Exact nonnegative decimal value encoded as
                                    canonical JSON string.
                                - type: 'null'
                            lockedCollateral:
                              type: string
                              pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                              description: >-
                                Exact nonnegative decimal value encoded as
                                canonical JSON string.
                            lockedShares:
                              type: string
                              pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                              description: >-
                                Exact nonnegative decimal value encoded as
                                canonical JSON string.
                            unrealizedPnlCollateral:
                              anyOf:
                                - type: string
                                  pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                                  description: >-
                                    Exact decimal value encoded as canonical
                                    JSON string.
                                - type: 'null'
                            settled:
                              type: boolean
                            updatedAt:
                              type: string
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          required:
                            - id
                            - marketId
                            - marketAddress
                            - outcome
                            - shares
                            - averageCostProbability
                            - currentProbability
                            - priceObservedAtMs
                            - potentialPayoutCollateral
                            - lockedCollateral
                            - lockedShares
                            - unrealizedPnlCollateral
                            - settled
                            - updatedAt
                          additionalProperties: false
                      truncated:
                        type: boolean
                      continuation:
                        type: string
                        enum:
                          - /v1/users/{address}/positions
                    required:
                      - authority
                      - unit
                      - items
                      - truncated
                      - continuation
                    additionalProperties: false
                  pnl:
                    type: object
                    properties:
                      authority:
                        type: string
                        enum:
                          - indexer-derived
                      unit:
                        type: string
                        enum:
                          - collateral_display
                      realizedWon:
                        type: string
                        pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                        description: >-
                          Exact nonnegative decimal value encoded as canonical
                          JSON string.
                      realizedLost:
                        type: string
                        pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                        description: >-
                          Exact nonnegative decimal value encoded as canonical
                          JSON string.
                      realizedNet:
                        type: string
                        pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                        description: Exact decimal value encoded as canonical JSON string.
                      unrealizedEstimate:
                        type: string
                        pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                        description: Exact decimal value encoded as canonical JSON string.
                      methodology:
                        type: string
                        enum:
                          - >-
                            open shares multiplied by latest retained price
                            minus average cost; null-priced positions excluded
                    required:
                      - authority
                      - unit
                      - realizedWon
                      - realizedLost
                      - realizedNet
                      - unrealizedEstimate
                      - methodology
                    additionalProperties: false
                  claimsAndEarnings:
                    type: object
                    properties:
                      payoutQueue:
                        type: array
                        items:
                          type: object
                          properties:
                            category:
                              type: string
                              enum:
                                - winnings_claim
                                - parlay_payout
                                - creator_fees
                                - treasury_fees
                                - referral_fees
                                - dispute_fees
                            status:
                              type: string
                              enum:
                                - pending
                                - processing
                                - sent
                                - confirmed
                                - failed
                                - abandoned
                            amountBaseUnits:
                              type: string
                              pattern: ^(0|[1-9][0-9]*)$
                              description: >-
                                Exact token base-unit quantity encoded as
                                canonical JSON string.
                            count:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                          required:
                            - category
                            - status
                            - amountBaseUnits
                            - count
                          additionalProperties: false
                      claimableWinningsBaseUnits:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      pendingClaimsBaseUnits:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      confirmedClaimsBaseUnits:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      creatorEarningsBaseUnits:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      referralEarningsBaseUnits:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      makerRewardsCollateral:
                        type: string
                        pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                        description: >-
                          Exact nonnegative decimal value encoded as canonical
                          JSON string.
                      makerRewardsState:
                        type: array
                        items:
                          type: object
                          properties:
                            status:
                              type: string
                            amountCollateral:
                              type: string
                              pattern: ^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$
                              description: >-
                                Exact nonnegative decimal value encoded as
                                canonical JSON string.
                            count:
                              type: integer
                              minimum: 0
                              maximum: 9007199254740991
                          required:
                            - status
                            - amountCollateral
                            - count
                          additionalProperties: false
                    required:
                      - payoutQueue
                      - claimableWinningsBaseUnits
                      - pendingClaimsBaseUnits
                      - confirmedClaimsBaseUnits
                      - creatorEarningsBaseUnits
                      - referralEarningsBaseUnits
                      - makerRewardsCollateral
                      - makerRewardsState
                    additionalProperties: false
                  funding:
                    type: object
                    properties:
                      authority:
                        type: string
                        enum:
                          - wallet-svc
                      pendingDepositsBaseUnits:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      pendingOutflowsBaseUnits:
                        type: string
                        pattern: ^(0|[1-9][0-9]*)$
                        description: >-
                          Exact token base-unit quantity encoded as canonical
                          JSON string.
                      recent:
                        type: array
                        items:
                          type: object
                          properties:
                            operationId:
                              type: string
                              format: uuid
                              pattern: >-
                                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            kind:
                              type: string
                              enum:
                                - deposit
                                - transfer
                                - sweep
                            state:
                              type: string
                              enum:
                                - signing
                                - submitted
                                - confirmed
                                - failed
                            depositBaseUnits:
                              anyOf:
                                - type: string
                                  pattern: ^(0|[1-9][0-9]*)$
                                  description: >-
                                    Exact token base-unit quantity encoded as
                                    canonical JSON string.
                                - type: 'null'
                            attoAlphOutflow:
                              anyOf:
                                - type: string
                                  pattern: ^(0|[1-9][0-9]*)$
                                  description: >-
                                    Exact token base-unit quantity encoded as
                                    canonical JSON string.
                                - type: 'null'
                            tokenOutflows:
                              anyOf:
                                - type: object
                                  propertyNames:
                                    type: string
                                    pattern: ^[0-9a-f]{64}$
                                  additionalProperties:
                                    type: string
                                    pattern: ^(0|[1-9][0-9]*)$
                                    description: >-
                                      Exact token base-unit quantity encoded as
                                      canonical JSON string.
                                - type: 'null'
                            transactionId:
                              anyOf:
                                - type: string
                                - type: 'null'
                            intentHash:
                              anyOf:
                                - type: string
                                  pattern: ^[0-9a-f]{64}$
                                - type: 'null'
                            updatedAt:
                              type: string
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                          required:
                            - operationId
                            - kind
                            - state
                            - depositBaseUnits
                            - attoAlphOutflow
                            - tokenOutflows
                            - transactionId
                            - intentHash
                            - updatedAt
                          additionalProperties: false
                      history:
                        type: object
                        properties:
                          limit:
                            type: integer
                            minimum: 1
                            maximum: 100
                          hasMore:
                            type: boolean
                          nextCursor:
                            anyOf:
                              - type: string
                                maxLength: 512
                              - type: 'null'
                          continuation:
                            type: string
                            enum:
                              - /v1/funding/operations
                        required:
                          - limit
                          - hasMore
                          - nextCursor
                          - continuation
                        additionalProperties: false
                      historyStatus:
                        type: string
                        enum:
                          - available
                    required:
                      - authority
                      - pendingDepositsBaseUnits
                      - pendingOutflowsBaseUnits
                      - recent
                      - history
                      - historyStatus
                    additionalProperties: false
                required:
                  - account
                  - snapshot
                  - collateral
                  - positionReservations
                  - orders
                  - holds
                  - pendingSettlements
                  - deadManSwitch
                  - positions
                  - pnl
                  - claimsAndEarnings
                  - funding
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Machine-readable error code (snake_case).
                      message:
                        type: string
                        description: Human-readable error message.
                      requestId:
                        type: string
                        description: >-
                          Per-request correlation id. Include it when reporting
                          an error to Aura.
                      details: {}
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Machine-readable error code (snake_case).
                      message:
                        type: string
                        description: Human-readable error message.
                      requestId:
                        type: string
                        description: >-
                          Per-request correlation id. Include it when reporting
                          an error to Aura.
                      details: {}
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Machine-readable error code (snake_case).
                      message:
                        type: string
                        description: Human-readable error message.
                      requestId:
                        type: string
                        description: >-
                          Per-request correlation id. Include it when reporting
                          an error to Aura.
                      details: {}
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '409':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Machine-readable error code (snake_case).
                      message:
                        type: string
                        description: Human-readable error message.
                      requestId:
                        type: string
                        description: >-
                          Per-request correlation id. Include it when reporting
                          an error to Aura.
                      details: {}
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '429':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Machine-readable error code (snake_case).
                      message:
                        type: string
                        description: Human-readable error message.
                      requestId:
                        type: string
                        description: >-
                          Per-request correlation id. Include it when reporting
                          an error to Aura.
                      details: {}
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Machine-readable error code (snake_case).
                      message:
                        type: string
                        description: Human-readable error message.
                      requestId:
                        type: string
                        description: >-
                          Per-request correlation id. Include it when reporting
                          an error to Aura.
                      details: {}
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '503':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Machine-readable error code (snake_case).
                      message:
                        type: string
                        description: Human-readable error message.
                      requestId:
                        type: string
                        description: >-
                          Per-request correlation id. Include it when reporting
                          an error to Aura.
                      details: {}
                    required:
                      - code
                      - message
                      - requestId
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      security:
        - SessionCookie: []
        - SessionBearer: []
        - DeveloperKey: []
          SessionCookie: []
        - DeveloperKey: []
          SessionBearer: []
components:
  securitySchemes:
    SessionCookie:
      type: apiKey
      in: cookie
      name: aura_session
      description: >-
        HttpOnly session cookie set by POST /v1/auth/session. Mutating requests
        must also send the CSRF token (returned by that call) in the
        x-csrf-token header.
    SessionBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        The same wallet-bound session JWT returned only when POST
        /v1/auth/session uses issueToken=true. Intended for server-side/scripted
        clients; cookie CSRF does not apply.
    DeveloperKey:
      type: apiKey
      in: header
      name: x-aura-developer-key
      description: >-
        Builder identity and quota key. It never substitutes for a wallet
        session or restricted trading authorization and can never sign or
        custody assets.

````