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

# Get Depeg Risk Detail for a Pegged Token

> Returns the full token detail: identity, classification, market data (with cross-chain rollups, DEX markets, migration lifecycle, audit provenance, score deltas), the latest depeg snapshot with full score decomposition, history series, and recorded depeg events. Address is resolved against the DB; supply `chain` when the same address exists on multiple chains. During partial outage the response carries `stale: true`.

**CU cost:** 1 CU per request (`rwa-detail`).



## OpenAPI

````yaml GET /rwa/{address}
openapi: 3.0.1
info:
  title: Risk Score API
  description: API definition for Webacy Risk Scores
  version: 1.2.0
servers:
  - url: https://api.webacy.com
    description: Webacy Risk Score API (Production)
  - url: https://api-development.webacy.com
    description: Webacy Risk Score API (Development)
  - url: http://0.0.0.0:3030/api/v1/risk-score
    description: Webacy Risk Score API - Local
security:
  - api_key: []
tags:
  - name: Threat Risks
    description: Analyze addresses for security threats and malicious activity
  - name: Sanction Checks
    description: Check addresses against OFAC and other sanction lists
  - name: Approval Risks
    description: Analyze token approvals and associated risks
  - name: Transaction Risks
    description: Assess risk details for blockchain transactions
  - name: Exposure Risk
    description: Understand risk profile and exposure of addresses
  - name: Contract Risk
    description: Real-time smart contract security analysis
  - name: URL Risks
    description: Analyze URLs for phishing and security threats
  - name: API Usage
    description: Monitor and manage API consumption
  - name: Holder Analysis
    description: Token holder distribution and sniper detection
  - name: Address Poisoning
    description: Detect address poisoning attack patterns
  - name: Token Analysis
    description: Comprehensive token security and market analysis
  - name: Pool Analysis
    description: Liquidity pool data and analysis
  - name: Transaction Scanning
    description: Scan and simulate transactions for risks
  - name: trading-lite
    description: Lightweight trading risk assessment
  - name: RWA & Pegged Tokens
    description: >-
      Real-world asset and pegged-token analytics (supply flows, mint/burn
      velocity)
  - name: Vault Risk v3
    description: >-
      Webacy-native v3 vault risk surface — composite grade, categories,
      coverage, and the framework taxonomy (RFC-019).
  - name: RWA Risk v3
    description: >-
      Webacy-native v3 RWA / stablecoin risk surface — composite grade,
      structural-health criteria, and batch (RFC-019).
paths:
  /rwa/{address}:
    get:
      tags:
        - RWA & Pegged Tokens
      summary: Get detailed depeg risk data for a specific pegged token
      description: >-
        Returns the full token detail: identity, classification, market data
        (with cross-chain rollups, DEX markets, migration lifecycle, audit
        provenance, score deltas), the latest depeg snapshot with full score
        decomposition, history series, and recorded depeg events. Address is
        resolved against the DB; supply `chain` when the same address exists on
        multiple chains. During partial outage the response carries `stale:
        true`.


        **CU cost:** 1 CU per request (`rwa-detail`).
      operationId: getRwaTokenDetail
      parameters:
        - name: address
          in: path
          required: true
          schema:
            type: string
          description: Token contract address (hex format).
        - name: chain
          in: query
          required: false
          schema:
            type: string
          description: >-
            Chain disambiguator (required if the address exists on multiple
            chains).
        - name: hours
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 168
            default: 24
          description: Hours of history to return (default 24, max 168).
      responses:
        '200':
          description: >-
            Full token detail with depeg snapshot, score decomposition, and
            history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RwaTokenDetailResponse'
        '400':
          description: >-
            Invalid address format, or address ambiguous across chains (supply
            `chain` to disambiguate)
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Address not found or not classified as a pegged token
      security:
        - api_key: []
components:
  schemas:
    RwaTokenDetailResponse:
      type: object
      required:
        - token
        - snapshot
        - risk
        - history
        - depegEvents
        - events
        - stale
      properties:
        token:
          $ref: '#/components/schemas/RwaTokenIdentity'
        snapshot:
          $ref: '#/components/schemas/RwaDepegSnapshot'
        risk:
          type: object
          nullable: true
          additionalProperties: true
        history:
          $ref: '#/components/schemas/RwaHistory'
        depegEvents:
          type: array
          items:
            $ref: '#/components/schemas/RwaDepegEventEntry'
        events:
          type: array
          items:
            $ref: '#/components/schemas/RwaDepegEvent'
        stale:
          type: boolean
    RwaTokenIdentity:
      type: object
      description: Token identity + classification + market data for the detail endpoint.
      required:
        - address
        - chain
        - symbol
        - name
        - assetType
        - assetTypeReason
        - denomination
        - token_type
        - token_labels
        - peg_range
        - is_collapsed
        - is_rwa_nav
        - rwa_nav_usd
        - rwa_classification
        - rwa_nav_as_of
        - market_cap_usd
        - total_market_cap_usd
        - market_cap_by_chain
        - circulating_supply
        - total_supply_on_chain
        - total_supply_cross_chain
        - fdv_usd
        - volume_24h
        - volume_24h_usd
        - dex_volume_24h_usd
        - markets
        - migration
        - project_info
        - score_delta_24h
        - score_delta_7d
      properties:
        address:
          type: string
        chain:
          type: string
        symbol:
          type: string
        name:
          type: string
          nullable: true
        assetType:
          type: string
        assetTypeReason:
          type: string
          nullable: true
        denomination:
          $ref: '#/components/schemas/RwaDenominationSummary'
        token_type:
          $ref: '#/components/schemas/RwaTokenType'
        token_labels:
          type: array
          items:
            type: string
        peg_range:
          type: array
          nullable: true
          items:
            type: number
          minItems: 2
          maxItems: 2
        is_collapsed:
          type: boolean
        is_rwa_nav:
          type: boolean
        rwa_nav_usd:
          type: number
          nullable: true
        rwa_classification:
          $ref: '#/components/schemas/RwaClassification'
        rwa_nav_as_of:
          type: string
          nullable: true
        market_cap_usd:
          type: number
          nullable: true
          description: >-
            Single-chain market cap (this token's chain only). Use
            `total_market_cap_usd` for the cross-chain rollup.
        total_market_cap_usd:
          type: number
          nullable: true
          description: >-
            Cross-chain market cap rollup (WEB-3554). Headline mcap for
            multi-chain tokens; may exceed `market_cap_usd`.
        market_cap_by_chain:
          type: object
          nullable: true
          additionalProperties:
            type: number
            format: double
        circulating_supply:
          type: number
          nullable: true
        total_supply_on_chain:
          type: number
          nullable: true
        total_supply_cross_chain:
          type: number
          nullable: true
        fdv_usd:
          type: number
          nullable: true
        volume_24h:
          type: number
          nullable: true
          deprecated: true
          description: Deprecated. Use `volume_24h_usd`.
        volume_24h_usd:
          type: number
          nullable: true
        dex_volume_24h_usd:
          type: number
          nullable: true
        markets:
          type: array
          nullable: true
          description: >-
            DEX market entries (WEB-3557). `null` = outside top-N scope; `[]` =
            in scope, no markets; populated = real entries.
          items:
            $ref: '#/components/schemas/RwaMarket'
        migration:
          $ref: '#/components/schemas/RwaMigration'
        project_info:
          $ref: '#/components/schemas/RwaProjectInfo'
        score_delta_24h:
          type: number
          nullable: true
        score_delta_7d:
          type: number
          nullable: true
    RwaDepegSnapshot:
      type: object
      description: Full point-in-time depeg snapshot returned by the detail endpoint.
      additionalProperties: true
      properties:
        ts:
          type: string
          nullable: true
        score:
          type: number
          nullable: true
        tier:
          $ref: '#/components/schemas/RwaRiskTier'
        drivers:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/RwaScoreDriver'
        price:
          type: number
          nullable: true
        peg_value:
          type: number
          nullable: true
        abs_dev_clean:
          type: number
          nullable: true
        dev_clean:
          type: number
          nullable: true
        reference_price:
          type: number
          nullable: true
        reference_prices:
          type: object
          additionalProperties:
            type: number
        price_source:
          type: string
          nullable: true
        price_sources_agree:
          type: boolean
          nullable: true
        price_source_deviation:
          type: number
          nullable: true
        within_expected_range:
          type: boolean
          nullable: true
        data_alerts:
          type: array
          items:
            type: string
    RwaHistory:
      type: object
      required:
        - hours
        - series
        - consecutive_days_below_peg
      properties:
        hours:
          type: integer
          minimum: 1
          maximum: 168
        series:
          type: array
          items:
            $ref: '#/components/schemas/RwaHistoryPoint'
        consecutive_days_below_peg:
          type: integer
          nullable: true
    RwaDepegEventEntry:
      type: object
      required:
        - eventType
        - oldTier
        - newTier
        - riskScore
        - deviationPct
        - detectedAt
      properties:
        eventType:
          type: string
        oldTier:
          type: string
          nullable: true
        newTier:
          type: string
        riskScore:
          type: number
        deviationPct:
          type: number
        detectedAt:
          type: string
          format: date-time
    RwaDepegEvent:
      type: object
      required:
        - id
        - name
        - symbol
        - chain
        - address
        - start
        - end
        - notes
      properties:
        id:
          type: string
        name:
          type: string
        symbol:
          type: string
        chain:
          type: string
        address:
          type: string
        start:
          type: string
        end:
          type: string
        notes:
          type: string
    RwaDenominationSummary:
      type: object
      description: Denomination context for a pegged token (e.g. USD, EUR, XAU).
      nullable: true
      required:
        - code
        - name
        - category
        - pegRatio
        - pegType
      properties:
        code:
          type: string
        name:
          type: string
        category:
          type: string
          description: e.g. fiat, commodity, crypto, index
        pegRatio:
          type: string
        pegType:
          type: string
    RwaTokenType:
      type: string
      description: Pipeline-assigned token sub-classification.
      enum:
        - standard
        - yield
        - rwa
        - gold
        - bridged
        - vault
      nullable: true
    RwaClassification:
      type: string
      description: >-
        Producer-assigned RWA category when a token is classified as a
        NAV-pegged real-world asset.
      enum:
        - tbill
        - money_market
        - tokenized_fund
      nullable: true
    RwaMarket:
      type: object
      description: >-
        A single DEX market entry surfaced by the producer (WEB-3557). The
        producer emits the top-N pools by liquidity per token.
      required:
        - dex
        - pair
        - pool_address
        - chain
        - liquidity_usd
        - volume_24h_usd
      properties:
        dex:
          type: string
          description: DEX identifier, e.g. `curve`, `uniswap`.
        pair:
          type: string
          description: Trading pair label, e.g. `DAI/USDT`.
        pool_address:
          type: string
          nullable: true
        chain:
          type: string
          description: Short chain code, e.g. `eth`.
        liquidity_usd:
          type: number
          format: double
        volume_24h_usd:
          type: number
          format: double
    RwaMigration:
      type: object
      description: >-
        Migration lifecycle grouping for a token (WEB-3560). `null` at the
        parent level means the producer has emitted no migration data at all; a
        non-null object means at least one migration field is available, with
        each leaf independently nullable.
      nullable: true
      required:
        - status
        - target_symbol
        - target_address
        - ratio
        - notes
      properties:
        status:
          $ref: '#/components/schemas/RwaMigrationStatus'
        target_symbol:
          type: string
          nullable: true
        target_address:
          type: string
          nullable: true
        ratio:
          type: number
          nullable: true
        notes:
          type: string
          nullable: true
    RwaProjectInfo:
      type: object
      description: >-
        Issuer / audit provenance sourced from `stablecoin_audit_lookup.json`
        (WEB-3561). All leaf fields are independently nullable except
        `audit_firms` / `audit_report_urls`, which are always-arrays (empty =
        checked, none found).
      nullable: true
      required:
        - issuer
        - audit_count
        - audit_firms
        - auditor_tier
        - last_audit_date
        - audit_report_urls
        - notes
      properties:
        issuer:
          type: string
          nullable: true
        audit_count:
          type: integer
          nullable: true
        audit_firms:
          type: array
          items:
            type: string
        auditor_tier:
          $ref: '#/components/schemas/RwaAuditorTier'
        last_audit_date:
          type: string
          nullable: true
          description: '`YYYY-MM` form.'
        audit_report_urls:
          type: array
          items:
            type: string
        notes:
          type: string
          nullable: true
    RwaRiskTier:
      type: string
      description: >-
        Base risk tier from the depeg pipeline. `premium` is an API-layer
        override added when a token trades above its peg.
      enum:
        - critical
        - warning
        - watch
        - ok
        - premium
    RwaScoreDriver:
      type: object
      description: A single component of the 12-factor depeg risk score decomposition.
      required:
        - name
        - raw
        - normalized
        - weight
        - contribution
      properties:
        name:
          type: string
        raw:
          oneOf:
            - type: number
              nullable: true
            - type: string
              nullable: true
            - type: boolean
              nullable: true
        normalized:
          type: number
          nullable: true
        weight:
          type: number
        contribution:
          type: number
          nullable: true
    RwaHistoryPoint:
      type: object
      required:
        - ts
        - score
        - tier
        - abs_dev_clean
        - price
        - peg_value
      properties:
        ts:
          type: string
        score:
          type: number
          nullable: true
        tier:
          $ref: '#/components/schemas/RwaRiskTier'
        abs_dev_clean:
          type: number
          nullable: true
        price:
          type: number
          nullable: true
        peg_value:
          type: number
          nullable: true
    RwaMigrationStatus:
      type: string
      description: >-
        Token migration lifecycle status from the producer (WEB-3560). `null` =
        producer has not yet classified this token.
      enum:
        - active
        - migrating
        - deprecated
      nullable: true
    RwaAuditorTier:
      type: string
      description: >-
        Auditor quality tier, normalised to the canonical API vocabulary. Same
        vocabulary as `/rwa/grades`.
      enum:
        - top
        - mid
        - low
        - basic
      nullable: true
  responses:
    UnauthorizedError:
      description: Authorization information is missing or invalid
      content:
        application/json:
          example:
            message: Unauthorized
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: x-api-key

````