Octav Approvals API

Token approval endpoints

OpenAPI Specification

octav-approvals-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Octav Airdrops Approvals API
  description: Comprehensive blockchain data API for portfolio management, transactions, and DeFi analytics
  version: 1.0.0
  contact:
    name: Octav Support
    url: https://octav.fi
    email: info@octav.fi
servers:
- url: https://api.octav.fi/v1
  description: Production API
security:
- bearerAuth: []
tags:
- name: Approvals
  description: Token approval endpoints
paths:
  /approvals/{chain}:
    get:
      summary: Token Approvals
      description: 'Retrieve ERC-20 token approval (allowance) records for a wallet on a given chain.


        **Cost:** 1 credit per call


        **Get your API key:** [Dev Portal](https://data.octav.fi)'
      operationId: getApprovals
      tags:
      - Approvals
      parameters:
      - name: chain
        in: path
        required: true
        description: Chain identifier
        schema:
          type: string
          enum:
          - arbitrum
          - avalanche
          - base
          - binance
          - ethereum
          - fantom
          - gnosis
          - linea
          - optimism
          - polygon
        example: ethereum
      - name: addresses
        in: query
        required: true
        description: Wallet address to fetch approvals for
        schema:
          type: string
        example: '0x6426af179aabebe47666f345d69fd9079673f6cd'
      - name: limit
        in: query
        required: false
        description: Results per page (1-100, default 25)
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 25
        example: 25
      - name: cursor
        in: query
        required: false
        description: Cursor string from a previous response to fetch the next page
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  cursor:
                    type: string
                    nullable: true
                    description: Cursor for the next page. Null when there are no more results.
                  pageSize:
                    type: integer
                    description: Number of items returned in this page
                  items:
                    type: array
                    description: Array of token approval records
                    items:
                      type: object
                      properties:
                        block:
                          type: string
                          description: Block number where the approval was mined
                        timestamp:
                          type: string
                          description: ISO 8601 timestamp of the block
                        hash:
                          type: string
                          description: Transaction hash of the approval
                        contract:
                          type: string
                          description: Address of the approved token contract
                        from:
                          type: string
                          description: Wallet address that granted the approval
                        to:
                          type: string
                          description: Spender address that received the approval
                        amount:
                          type: string
                          description: Raw approved amount (not decimal-adjusted). Max uint256 = unlimited.
                        asset:
                          type: object
                          nullable: true
                          description: Enriched token metadata (present when token is tracked)
                          properties:
                            name:
                              type: string
                            symbol:
                              type: string
                            balance:
                              type: string
                            price:
                              type: string
                            value:
                              type: string
                            decimal:
                              type: string
                            chain:
                              type: string
                            contract:
                              type: string
                            imgSmall:
                              type: string
                            imgLarge:
                              type: string
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '502':
          description: Upstream provider unavailable
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
      security:
      - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer