Uniswap WalletCheckDelegation API

The WalletCheckDelegation API from Uniswap — 1 operation(s) for walletcheckdelegation.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

uniswap-walletcheckdelegation-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 1.0.0
  title: Token Trading Approval WalletCheckDelegation API
  description: 'Uniswap Labs trading APIs.


    Each operation may include the vendor extension `x-public-endpoint` (boolean): `true` when the operation is available on the public gateway for standard API keys, `false` when it is not publicly exposed. See the [OpenAPI specification extensions](https://swagger.io/docs/specification/v3_0/openapi-extensions/) definition of `x-` fields.'
servers:
- description: Uniswap Trading API
  url: https://trade-api.gateway.uniswap.org/v1
security:
- apiKey: []
tags:
- name: WalletCheckDelegation
paths:
  /wallet/check_delegation:
    post:
      tags:
      - WalletCheckDelegation
      summary: Get wallet delegation info
      description: Gets the current delegation status and message for a smart contract wallet across different chains. Returns delegation information for each chain ID in the request.
      operationId: wallet_check_delegation
      security:
      - apiKey: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WalletCheckDelegationRequestBody'
            example:
              walletAddresses:
              - '0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421'
              chainIds:
              - 1
              - 8453
      responses:
        '200':
          $ref: '#/components/responses/WalletCheckDelegationSuccess200'
        '400':
          $ref: '#/components/responses/BadRequest400'
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '404':
          $ref: '#/components/responses/QuoteNotFound404'
        '429':
          $ref: '#/components/responses/RateLimitedErr429'
        '500':
          $ref: '#/components/responses/InternalErr500'
        '504':
          $ref: '#/components/responses/Timeout504'
      x-public-endpoint: true
components:
  schemas:
    ChainId:
      description: The unique ID of the blockchain. For a list of supported chains see the [FAQ](https://api-docs.uniswap.org/guides/faqs).
      type: number
      enum:
      - 1
      - 10
      - 56
      - 130
      - 137
      - 143
      - 196
      - 324
      - 480
      - 1868
      - 4217
      - 8453
      - 10143
      - 42161
      - 42220
      - 43114
      - 59144
      - 81457
      - 7777777
      - 1301
      - 84532
      - 11155111
      default: 1
    Err500:
      type: object
      properties:
        errorCode:
          default: InternalServerError
          type: string
        detail:
          type: string
    ChainDelegationMap:
      type: object
      description: Map of chain IDs to delegation details for a specific wallet.
      additionalProperties:
        $ref: '#/components/schemas/DelegationDetails'
    DelegationDetails:
      type: object
      properties:
        isWalletDelegatedToUniswap:
          type: boolean
          description: Whether the current delegation address is a Uniswap delegation address.
        currentDelegationAddress:
          type: string
          nullable: true
          description: The current delegation address of the wallet. May be null if the wallet does not currently delegate to any address.
        latestDelegationAddress:
          type: string
          description: The latest delegation address that the wallet could upgrade to.
      required:
      - isWalletDelegatedToUniswap
      - currentDelegationAddress
      - latestDelegationAddress
    RequestId:
      type: string
      description: A unique ID for the request.
    Err404:
      type: object
      properties:
        errorCode:
          enum:
          - ResourceNotFound
          - QuoteAmountTooLowError
          - TokenBalanceNotAvailable
          - InsufficientBalance
          type: string
        detail:
          type: string
    WalletCheckDelegationRequestBody:
      type: object
      properties:
        walletAddresses:
          type: array
          description: Array of wallet addresses to check delegation status for.
          items:
            $ref: '#/components/schemas/Address'
        chainIds:
          type: array
          description: Array of chain IDs to check delegation status for.
          items:
            $ref: '#/components/schemas/ChainId'
      required:
      - walletAddress
      - chainIds
    WalletCheckDelegationResponseBody:
      type: object
      properties:
        requestId:
          $ref: '#/components/schemas/RequestId'
        delegationDetails:
          type: object
          description: Map of wallet addresses to chain IDs to delegation details.
          additionalProperties:
            $ref: '#/components/schemas/ChainDelegationMap'
      required:
      - requestId
      - delegationDetails
    Address:
      type: string
      pattern: ^(0x)?[0-9a-fA-F]{40}$
    Err504:
      type: object
      properties:
        errorCode:
          default: Timeout
          type: string
        detail:
          type: string
    Err400:
      type: object
      properties:
        errorCode:
          default: RequestValidationError
          type: string
        detail:
          type: string
    Err401:
      type: object
      properties:
        errorCode:
          default: UnauthorizedError
          type: string
        detail:
          type: string
    Err429:
      type: object
      properties:
        errorCode:
          default: Ratelimited
          type: string
        detail:
          type: string
  responses:
    RateLimitedErr429:
      description: Ratelimited
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Err429'
    WalletCheckDelegationSuccess200:
      description: Wallet delegation info request successful.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WalletCheckDelegationResponseBody'
          example:
            requestId: cOxNNjs6iYcEJEA=
            delegationDetails:
              '0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421':
                '1':
                  isWalletDelegatedToUniswap: true
                  currentDelegationAddress: '0x000000009b1d0af20d8c6d0a44e162d11f9b8f00'
                  latestDelegationAddress: '0x000000009b1d0af20d8c6d0a44e162d11f9b8f00'
                '8453':
                  isWalletDelegatedToUniswap: true
                  currentDelegationAddress: '0x000000009b1d0af20d8c6d0a44e162d11f9b8f00'
                  latestDelegationAddress: '0x000000009b1d0af20d8c6d0a44e162d11f9b8f00'
    QuoteNotFound404:
      description: ResourceNotFound eg. No quotes available or Gas fee/price not available
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Err404'
    Unauthorized401:
      description: UnauthorizedError eg. Account is blocked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Err401'
    BadRequest400:
      description: RequestValidationError, Bad Input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Err400'
    Timeout504:
      description: Request duration limit reached.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Err504'
    InternalErr500:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Err500'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key