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

# Discovery detail for one program



## OpenAPI

````yaml /openapi.yaml get /v1/solana/protocols/{programId}/discovery
openapi: 3.1.0
info:
  title: Lucidblock Positions API
  version: 0.1.0
  summary: >-
    Read-only Solana DeFi positions with explicit coverage and sourced USD
    values.
  description: >
    For a Solana wallet, returns the lending, liquidity, staking, vault and
    perpetual positions found by

    verified protocol adapters, with exact per-leg amounts, sourced USD values
    and explicit coverage.


    Conventions: amounts (`amount_raw`) are non-negative base-10 integer
    strings; `amount` and every USD

    value are decimal strings; unknown values are `null`, never `"0"`. Times are
    ISO 8601 UTC with second

    precision. Addresses are base58 and case-sensitive. Absence of a position is
    trustworthy only for

    protocols whose coverage status is `complete`. Totals cover the supported
    universe only; they are not

    total wallet net worth.


    Every `/v1/*` response that passed the rate limiter carries
    `RateLimit-Limit`, `RateLimit-Remaining`

    and `RateLimit-Reset`; a 429 adds `Retry-After`. Every response carries
    `X-Request-Id`.


    While `PRIVATE_API_TOKEN` is configured (private alpha), every `/v1/*` route
    except `/v1/health`

    requires `Authorization: Bearer <token>`.


    Snapshots carry display metadata (names, symbols, first-party logo URLs
    under /assets/v1/, provenance)

    and a trademark notice: protocol and token names and logos belong to their
    owners and are shown for

    identification only (14-metadata.md). Metadata never changes ids, amounts or
    totals.
  license:
    name: Proprietary
servers:
  - url: https://api.lucidblock.xyz
    description: Production (private alpha until the v1 release gate)
security:
  - {}
  - AccessToken: []
tags:
  - name: meta
  - name: positions
  - name: catalogue
paths:
  /v1/solana/protocols/{programId}/discovery:
    get:
      tags:
        - catalogue
      summary: Discovery detail for one program
      operationId: getProgramDiscovery
      parameters:
        - name: programId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/Address'
      responses:
        '200':
          description: Discovery detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProgramDiscovery'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    Address:
      type: string
      pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
    ProgramDiscovery:
      type: object
      additionalProperties: false
      required:
        - program_id
        - protocol_id
        - integration_status
        - first_observed_slot
        - last_observed_slot
        - sources
        - upgrade_history
        - idl
        - account_structures
        - candidate_types
        - observation_count
        - warnings
        - note
      properties:
        program_id:
          $ref: '#/components/schemas/Address'
        protocol_id:
          type:
            - string
            - 'null'
        integration_status:
          type: string
        first_observed_slot:
          type:
            - integer
            - 'null'
        last_observed_slot:
          type:
            - integer
            - 'null'
        sources:
          type: array
          items:
            type: string
        upgrade_history:
          type: array
          items:
            type: object
            required:
              - slot
              - bytecode_hash
            properties:
              slot:
                type: integer
              bytecode_hash:
                type:
                  - string
                  - 'null'
        idl:
          type: object
          required:
            - present
            - source
            - hash
            - version
            - name
          properties:
            present:
              type: boolean
            source:
              type:
                - string
                - 'null'
            hash:
              type:
                - string
                - 'null'
            version:
              type:
                - string
                - 'null'
            name:
              type:
                - string
                - 'null'
        account_structures:
          type: array
          items:
            type: object
            required:
              - name
              - discriminator_hex
              - size
              - owner_field_offset
            properties:
              name:
                type: string
              discriminator_hex:
                type:
                  - string
                  - 'null'
              size:
                type:
                  - integer
                  - 'null'
              owner_field_offset:
                type:
                  - integer
                  - 'null'
        candidate_types:
          type: array
          items:
            type: string
        observation_count:
          type: integer
        warnings:
          type: array
          items:
            type: string
        note:
          type: string
    ErrorEnvelope:
      type: object
      additionalProperties: false
      required:
        - error
        - request_id
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - message
          properties:
            code:
              $ref: '#/components/schemas/ErrorCode'
            message:
              type: string
            details:
              type: object
        request_id:
          type: string
    ErrorCode:
      type: string
      enum:
        - INVALID_PARAMETER
        - INVALID_ADDRESS
        - UNSUPPORTED_PROTOCOL
        - CURSOR_EXPIRED
        - UNAUTHORIZED
        - NOT_FOUND
        - JOB_NOT_FOUND
        - METHOD_NOT_ALLOWED
        - FORBIDDEN
        - CONFLICT
        - CONFIG_INVALID
        - RATE_LIMITED
        - INTERNAL
        - DB_UNAVAILABLE
        - QUEUE_UNAVAILABLE
        - SNAPSHOT_UNAVAILABLE
        - SCAN_FAILED
        - RPC_BUDGET_EXHAUSTED
        - ASSET_REMOVED
  responses:
    BadRequest:
      description: >-
        INVALID_PARAMETER, INVALID_ADDRESS, UNSUPPORTED_PROTOCOL or
        CURSOR_EXPIRED
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unauthorized:
      description: UNAUTHORIZED
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: NOT_FOUND or JOB_NOT_FOUND
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: RATE_LIMITED
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Unavailable:
      description: >-
        DB_UNAVAILABLE, QUEUE_UNAVAILABLE, SNAPSHOT_UNAVAILABLE, SCAN_FAILED,
        CONFIG_INVALID or RPC_BUDGET_EXHAUSTED
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  headers:
    RetryAfter:
      schema:
        type: integer
        minimum: 1
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      description: >-
        PRIVATE_API_TOKEN, required on /v1/* (except /v1/health) while
        configured.

````

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