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

# Get deposit addresses

> Addresses that fund the key’s trading account on one venue, as already created; this never creates one. An address created in the Lean app is returned here too. Each address not created yet is listed in `missing` with a `message` naming POST /deposits/addresses. Send only an asset GET /deposits/assets lists for the same venue, provider and address type. Hyperliquid addresses come only from Relay and credit Hyperliquid spot USDC. Do not use Hyperliquid’s own bridge: sending to Hyperliquid’s own bridge lands in perps, not in the spot balance these addresses fund. A test key gets placeholders that are not addresses on any chain.



## OpenAPI

````yaml api-reference/openapi.json GET /deposits/addresses
openapi: 3.0.0
info:
  title: Lean API
  version: 0.1.0
  description: >-
    Programmatic access to Lean: canonical sports markets, quotes, orders,
    positions and balances.
servers:
  - url: '{baseUrl}/v1'
    description: Lean API
    variables:
      baseUrl:
        default: https://api.lean.xyz
        description: >-
          The Lean API base URL, without /v1. Same value as LEAN_API_URL in the
          guides.
security:
  - apiKey: []
paths:
  /deposits/addresses:
    get:
      tags:
        - Deposits
      summary: Get deposit addresses
      description: >-
        Addresses that fund the key’s trading account on one venue, as already
        created; this never creates one. An address created in the Lean app is
        returned here too. Each address not created yet is listed in `missing`
        with a `message` naming POST /deposits/addresses. Send only an asset GET
        /deposits/assets lists for the same venue, provider and address type.
        Hyperliquid addresses come only from Relay and credit Hyperliquid spot
        USDC. Do not use Hyperliquid’s own bridge: sending to Hyperliquid’s own
        bridge lands in perps, not in the spot balance these addresses fund. A
        test key gets placeholders that are not addresses on any chain.
      operationId: getDepositAddresses
      parameters:
        - schema:
            type: string
            enum:
              - polymarket
              - hyperliquid
          required: true
          name: venue
          in: query
      responses:
        '200':
          description: Deposit addresses of the key’s trading account
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      success:
                        type: boolean
                        enum:
                          - true
                      data:
                        oneOf:
                          - type: object
                            properties:
                              venue:
                                type: string
                                enum:
                                  - hyperliquid
                              addresses:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    provider:
                                      type: string
                                      enum:
                                        - relay
                                    address_type:
                                      type: string
                                      enum:
                                        - evm
                                        - svm
                                    address:
                                      type: string
                                      minLength: 1
                                      maxLength: 256
                                  required:
                                    - provider
                                    - address_type
                                    - address
                              missing:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    venue:
                                      type: string
                                      enum:
                                        - hyperliquid
                                    provider:
                                      type: string
                                      enum:
                                        - relay
                                    address_type:
                                      type: string
                                      enum:
                                        - evm
                                        - svm
                                  required:
                                    - venue
                                    - provider
                                    - address_type
                              message:
                                type: string
                                nullable: true
                                minLength: 1
                              livemode:
                                type: boolean
                            required:
                              - venue
                              - addresses
                              - missing
                              - message
                              - livemode
                          - type: object
                            properties:
                              venue:
                                type: string
                                enum:
                                  - polymarket
                              addresses:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    provider:
                                      type: string
                                      enum:
                                        - polymarket_wallet
                                        - polymarket_bridge
                                    address_type:
                                      type: string
                                      enum:
                                        - evm
                                        - svm
                                    address:
                                      type: string
                                      minLength: 1
                                      maxLength: 256
                                  required:
                                    - provider
                                    - address_type
                                    - address
                              missing:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    venue:
                                      type: string
                                      enum:
                                        - polymarket
                                    provider:
                                      type: string
                                      enum:
                                        - polymarket_wallet
                                        - polymarket_bridge
                                    address_type:
                                      type: string
                                      enum:
                                        - evm
                                        - svm
                                  required:
                                    - venue
                                    - provider
                                    - address_type
                              message:
                                type: string
                                nullable: true
                                minLength: 1
                              livemode:
                                type: boolean
                            required:
                              - venue
                              - addresses
                              - missing
                              - message
                              - livemode
                      meta:
                        type: object
                        properties:
                          timestampMs:
                            type: integer
                            minimum: 0
                          requestId:
                            type: string
                            minLength: 1
                          traceId:
                            type: string
                            minLength: 1
                          cachedAtMs:
                            type: integer
                            minimum: 0
                          source:
                            type: string
                            enum:
                              - cache
                              - database
                              - clickhouse
                              - upstream
                              - fallback
                              - internal
                        required:
                          - timestampMs
                          - requestId
                    required:
                      - success
                      - data
                      - meta
                  - $ref: '#/components/schemas/ApiError'
              example:
                success: true
                data:
                  venue: hyperliquid
                  addresses:
                    - provider: relay
                      address_type: evm
                      address: lean_test_not_a_deposit_address
                    - provider: relay
                      address_type: svm
                      address: lean_test_not_a_deposit_address
                  missing: []
                  message: null
                  livemode: false
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '400':
          description: Invalid venue, or the trading account is not set up on it
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: VALIDATION_ERROR
                  message: Invalid venue, or the trading account is not set up on it
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '401':
          description: Missing, invalid, expired or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: UNAUTHORIZED
                  message: Invalid, expired or revoked API key
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '403':
          description: The key lacks the scope this route needs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: FORBIDDEN
                  message: This API key lacks the scope this route needs
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '429':
          description: API error
          headers:
            Retry-After:
              description: Seconds remaining in the upstream read cooldown, when available
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: RATE_LIMITED
                  message: Too many requests for this API key
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '500':
          description: API error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: INTERNAL_ERROR
                  message: An internal error occurred.
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
        '503':
          description: The deposit provider is unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                success: false
                error:
                  code: UPSTREAM_ERROR
                  message: The deposit provider is unavailable
                meta:
                  timestampMs: 1792771200000
                  requestId: 7d2c9f4e-1b3a-4e8d-9c6f-2a5b8e0d4f17
components:
  schemas:
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - VALIDATION_ERROR
                - NOT_FOUND
                - UNAUTHORIZED
                - FORBIDDEN
                - CONFLICT
                - UPSTREAM_ERROR
                - RATE_LIMITED
                - INTERNAL_ERROR
                - FEATURE_DISABLED
                - CONDITIONAL_SELL_REJECTED
                - CONDITIONAL_SELL_ACTIVE
            message:
              type: string
              minLength: 1
            details:
              nullable: true
          required:
            - code
            - message
        meta:
          type: object
          properties:
            timestampMs:
              type: integer
              minimum: 0
            requestId:
              type: string
              minLength: 1
            traceId:
              type: string
              minLength: 1
            cachedAtMs:
              type: integer
              minimum: 0
            source:
              type: string
              enum:
                - cache
                - database
                - clickhouse
                - upstream
                - fallback
                - internal
          required:
            - timestampMs
            - requestId
      required:
        - success
        - error
        - meta
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A Lean API key, sent as `Authorization: Bearer <key>`. A test key
        (`lean_sk_test_...`) simulates orders and fills with no money; a live
        key (`lean_sk_live_...`) trades for real within the key's limits. Every
        successful response says which mode answered in `data.livemode`.

````

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