openapi: 3.1.0 info: title: Footprint Analytics Data Chain DeFi API description: 'Footprint Analytics is a blockchain data analytics platform providing unified REST and SQL APIs for querying DeFi protocol metrics, NFT market data, token analytics, GameFi economics, and on-chain activity across 30+ chains including Ethereum, Bitcoin, Solana, BNB Chain, Polygon, Arbitrum, Optimism, and Sui. The platform indexes 30,000+ protocols, 100M+ tokens, 2M+ NFT collections, and 3,000+ blockchain games. Authentication is via API key passed as a query parameter or request header. ' version: 1.0.0 contact: name: Footprint Analytics Support url: https://www.footprint.network/ license: name: Proprietary url: https://www.footprint.network/ servers: - url: https://api.footprint.network description: Footprint Analytics production API - url: https://fp-api.readme.io description: Footprint Analytics documentation API security: - ApiKeyHeader: [] - ApiKeyQuery: [] tags: - name: DeFi description: DeFi protocol metrics including TVL, DEX liquidity, and yield paths: /api/v1/defi/protocols: get: operationId: listDefiProtocols summary: List DeFi protocols description: 'Returns a paginated list of DeFi protocols tracked by Footprint Analytics, including TVL, volume, and yield metrics across 30+ chains. ' tags: - DeFi parameters: - $ref: '#/components/parameters/Chain' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' - name: category in: query description: DeFi protocol category filter schema: type: string enum: - dex - lending - yield - bridge - liquid_staking - derivatives responses: '200': description: List of DeFi protocols content: application/json: schema: $ref: '#/components/schemas/DefiProtocolListResponse' '401': $ref: '#/components/responses/Unauthorized' /api/v1/defi/protocols/{protocol_id}/tvl: get: operationId: getProtocolTvl summary: Get protocol TVL history description: 'Returns historical Total Value Locked (TVL) data for a specific DeFi protocol. Supports daily granularity across a date range. ' tags: - DeFi parameters: - name: protocol_id in: path required: true description: Unique identifier of the DeFi protocol schema: type: string example: uniswap-v3 - $ref: '#/components/parameters/StartDate' - $ref: '#/components/parameters/EndDate' - $ref: '#/components/parameters/Granularity' responses: '200': description: Protocol TVL history content: application/json: schema: $ref: '#/components/schemas/TvlHistoryResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: schemas: TvlHistoryResponse: type: object properties: protocol_id: type: string data: type: array items: $ref: '#/components/schemas/TvlDataPoint' DefiProtocol: type: object properties: protocol_id: type: string description: Unique identifier for the protocol protocol_name: type: string description: Display name of the DeFi protocol category: type: string description: Protocol category (dex, lending, yield, bridge, etc.) chain: $ref: '#/components/schemas/ChainEnum' tvl_usd: type: number format: double description: Total Value Locked in USD volume_24h_usd: type: number format: double description: 24-hour trading volume in USD apy: type: number format: double description: Annual percentage yield (where applicable) updated_at: type: string format: date-time DefiProtocolListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/DefiProtocol' total: type: integer limit: type: integer offset: type: integer ErrorResponse: type: object properties: error: type: object properties: code: type: string description: Machine-readable error code message: type: string description: Human-readable error message details: type: object additionalProperties: true TvlDataPoint: type: object properties: date: type: string format: date description: Date of the TVL snapshot tvl_usd: type: number format: double description: Total Value Locked in USD at that date ChainEnum: type: string description: Supported blockchain network identifier enum: - ethereum - bnb - polygon - arbitrum - optimism - avalanche - fantom - solana - bitcoin - sui - starknet - zksync - celo - cronos - ronin - moonbeam - moonriver - base - linea - scroll example: ethereum parameters: Chain: name: chain in: query description: Blockchain network to query schema: $ref: '#/components/schemas/ChainEnum' StartDate: name: start_date in: query description: Start date for time-range queries (YYYY-MM-DD) schema: type: string format: date example: '2024-01-01' Offset: name: offset in: query description: Number of results to skip for pagination schema: type: integer minimum: 0 default: 0 EndDate: name: end_date in: query description: End date for time-range queries (YYYY-MM-DD) schema: type: string format: date example: '2024-12-31' Limit: name: limit in: query description: Maximum number of results to return schema: type: integer minimum: 1 maximum: 1000 default: 20 Granularity: name: granularity in: query description: Time series granularity schema: type: string enum: - hour - day - week - month default: day responses: NotFound: description: Requested resource not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' Unauthorized: description: Missing or invalid API key content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' securitySchemes: ApiKeyHeader: type: apiKey in: header name: X-API-KEY description: Footprint Analytics API key passed as a request header ApiKeyQuery: type: apiKey in: query name: apiKey description: Footprint Analytics API key passed as a query parameter