{
  "openapi": "3.1.0",
  "info": {
    "title": "booAIP - Crypto data API for AI agents",
    "version": "1.0.0",
    "description": "Pay-per-call crypto/web3 ground-truth data for AI agents. Token prices, DeFi TVL, market sentiment and more. USDC via x402 on Base. No API key, no signup.",
    "contact": {
      "name": "booAIP",
      "email": "vanlucpdu@gmail.com",
      "url": "https://booaip.vercel.app"
    }
  },
  "servers": [
    {
      "url": "https://booaip.vercel.app"
    }
  ],
  "x-docs": {
    "llmsTxt": "https://booaip.vercel.app/llms.txt"
  },
  "x402Version": 2,
  "x-discovery": {
    "ownershipProofs": [
      "0xcd6b6d99b7751ff30b68fa1365488eb73fa7cefa"
    ]
  },
  "paths": {
    "/api/price": {
      "post": {
        "operationId": "price",
        "summary": "Token Price",
        "description": "Token price, liquidity, 24h volume and FDV from DEX pairs (DexScreener). Body: { token, chain? }.",
        "x-payment-info": {
          "x402Version": 2,
          "price": {
            "mode": "fixed",
            "amount": "0.01",
            "currency": "USD"
          },
          "protocols": [
            "x402"
          ],
          "network": "eip155:8453",
          "asset": "USDC",
          "payTo": "0xcd6b6d99b7751ff30b68fa1365488eb73fa7cefa"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Token contract address."
                  },
                  "chain": {
                    "type": "string",
                    "description": "Optional: eth, bnb, base."
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Token Price result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "found": {
                      "type": "boolean"
                    },
                    "symbol": {
                      "type": "string"
                    },
                    "priceUsd": {
                      "type": "number"
                    },
                    "liquidityUsd": {
                      "type": "number"
                    },
                    "volume24hUsd": {
                      "type": "number"
                    },
                    "fdvUsd": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - missing/invalid input."
          },
          "402": {
            "description": "Payment Required (x402, USDC on Base)."
          }
        }
      }
    },
    "/api/tvl": {
      "post": {
        "operationId": "tvl",
        "summary": "DeFi Protocol TVL",
        "description": "DeFi protocol TVL, chains and 1d/7d change (DefiLlama). Body: { protocol } using the DefiLlama slug (e.g. aave, uniswap, lido).",
        "x-payment-info": {
          "x402Version": 2,
          "price": {
            "mode": "fixed",
            "amount": "0.01",
            "currency": "USD"
          },
          "protocols": [
            "x402"
          ],
          "network": "eip155:8453",
          "asset": "USDC",
          "payTo": "0xcd6b6d99b7751ff30b68fa1365488eb73fa7cefa"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "protocol": {
                    "type": "string",
                    "description": "DefiLlama protocol slug."
                  }
                },
                "required": [
                  "protocol"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "DeFi Protocol TVL result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "found": {
                      "type": "boolean"
                    },
                    "protocol": {
                      "type": "string"
                    },
                    "tvlUsd": {
                      "type": "number"
                    },
                    "chains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "change1dPct": {
                      "type": "number"
                    },
                    "change7dPct": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - missing/invalid input."
          },
          "402": {
            "description": "Payment Required (x402, USDC on Base)."
          }
        }
      }
    },
    "/api/feargreed": {
      "post": {
        "operationId": "feargreed",
        "summary": "Fear & Greed Index",
        "description": "Current crypto Fear & Greed Index with 1-day change (alternative.me). Body: {} (no params).",
        "x-payment-info": {
          "x402Version": 2,
          "price": {
            "mode": "fixed",
            "amount": "0.005",
            "currency": "USD"
          },
          "protocols": [
            "x402"
          ],
          "network": "eip155:8453",
          "asset": "USDC",
          "payTo": "0xcd6b6d99b7751ff30b68fa1365488eb73fa7cefa"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Fear & Greed Index result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "number"
                    },
                    "classification": {
                      "type": "string"
                    },
                    "change1d": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - missing/invalid input."
          },
          "402": {
            "description": "Payment Required (x402, USDC on Base)."
          }
        }
      }
    },
    "/api/yields": {
      "post": {
        "operationId": "yields",
        "summary": "Yield Finder",
        "description": "Top APY yield pools by token symbol and chain (DefiLlama). Body: { symbol?, chain?, limit? }.",
        "x-payment-info": {
          "x402Version": 2,
          "price": {
            "mode": "fixed",
            "amount": "0.01",
            "currency": "USD"
          },
          "protocols": [
            "x402"
          ],
          "network": "eip155:8453",
          "asset": "USDC",
          "payTo": "0xcd6b6d99b7751ff30b68fa1365488eb73fa7cefa"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "description": "Token symbol (e.g. USDC)."
                  },
                  "chain": {
                    "type": "string",
                    "description": "Optional chain filter."
                  },
                  "limit": {
                    "type": "number",
                    "description": "Max pools 1-20."
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Yield Finder result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "number"
                    },
                    "pools": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - missing/invalid input."
          },
          "402": {
            "description": "Payment Required (x402, USDC on Base)."
          }
        }
      }
    },
    "/api/stablecoins": {
      "post": {
        "operationId": "stablecoins",
        "summary": "Stablecoin Monitor",
        "description": "Stablecoin circulating supply, price and peg deviation (DefiLlama). Body: { symbol? }.",
        "x-payment-info": {
          "x402Version": 2,
          "price": {
            "mode": "fixed",
            "amount": "0.01",
            "currency": "USD"
          },
          "protocols": [
            "x402"
          ],
          "network": "eip155:8453",
          "asset": "USDC",
          "payTo": "0xcd6b6d99b7751ff30b68fa1365488eb73fa7cefa"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "description": "Stablecoin symbol (e.g. USDT). Omit for top 10."
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stablecoin Monitor result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "found": {
                      "type": "boolean"
                    },
                    "symbol": {
                      "type": "string"
                    },
                    "circulatingUsd": {
                      "type": "number"
                    },
                    "pegDeviationPct": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - missing/invalid input."
          },
          "402": {
            "description": "Payment Required (x402, USDC on Base)."
          }
        }
      }
    },
    "/api/chains": {
      "post": {
        "operationId": "chains",
        "summary": "Chain Overview",
        "description": "Chain TVL, rank and dominance (DefiLlama). Body: { chain? }.",
        "x-payment-info": {
          "x402Version": 2,
          "price": {
            "mode": "fixed",
            "amount": "0.01",
            "currency": "USD"
          },
          "protocols": [
            "x402"
          ],
          "network": "eip155:8453",
          "asset": "USDC",
          "payTo": "0xcd6b6d99b7751ff30b68fa1365488eb73fa7cefa"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "chain": {
                    "type": "string",
                    "description": "Chain name (e.g. base). Omit for top 10."
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Chain Overview result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "found": {
                      "type": "boolean"
                    },
                    "chain": {
                      "type": "string"
                    },
                    "tvlUsd": {
                      "type": "number"
                    },
                    "rank": {
                      "type": "number"
                    },
                    "dominancePct": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - missing/invalid input."
          },
          "402": {
            "description": "Payment Required (x402, USDC on Base)."
          }
        }
      }
    },
    "/api/gas": {
      "post": {
        "operationId": "gas",
        "summary": "Gas Oracle",
        "description": "Current gas price (gwei) on an EVM chain via on-chain read. Body: { chain } (eth, bnb, base).",
        "x-payment-info": {
          "x402Version": 2,
          "price": {
            "mode": "fixed",
            "amount": "0.005",
            "currency": "USD"
          },
          "protocols": [
            "x402"
          ],
          "network": "eip155:8453",
          "asset": "USDC",
          "payTo": "0xcd6b6d99b7751ff30b68fa1365488eb73fa7cefa"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "chain": {
                    "type": "string",
                    "description": "eth, bnb, or base."
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Gas Oracle result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "chain": {
                      "type": "string"
                    },
                    "gasPriceGwei": {
                      "type": "number"
                    },
                    "maxFeePerGasGwei": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - missing/invalid input."
          },
          "402": {
            "description": "Payment Required (x402, USDC on Base)."
          }
        }
      }
    },
    "/api/ens": {
      "post": {
        "operationId": "ens",
        "summary": "ENS Resolver",
        "description": "Resolve ENS name to address or reverse-resolve address to name (Ethereum mainnet). Body: { query }.",
        "x-payment-info": {
          "x402Version": 2,
          "price": {
            "mode": "fixed",
            "amount": "0.005",
            "currency": "USD"
          },
          "protocols": [
            "x402"
          ],
          "network": "eip155:8453",
          "asset": "USDC",
          "payTo": "0xcd6b6d99b7751ff30b68fa1365488eb73fa7cefa"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "ENS name (xxx.eth) or address (0x...)."
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "ENS Resolver result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "found": {
                      "type": "boolean"
                    },
                    "name": {
                      "type": "string"
                    },
                    "address": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - missing/invalid input."
          },
          "402": {
            "description": "Payment Required (x402, USDC on Base)."
          }
        }
      }
    },
    "/api/supply": {
      "post": {
        "operationId": "supply",
        "summary": "Token Supply Info",
        "description": "ERC-20 token name, symbol, decimals and total supply via on-chain read. Body: { token, chain }.",
        "x-payment-info": {
          "x402Version": 2,
          "price": {
            "mode": "fixed",
            "amount": "0.01",
            "currency": "USD"
          },
          "protocols": [
            "x402"
          ],
          "network": "eip155:8453",
          "asset": "USDC",
          "payTo": "0xcd6b6d99b7751ff30b68fa1365488eb73fa7cefa"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Token contract address."
                  },
                  "chain": {
                    "type": "string",
                    "description": "eth, bnb, base."
                  }
                },
                "required": [
                  "token",
                  "chain"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Token Supply Info result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "found": {
                      "type": "boolean"
                    },
                    "symbol": {
                      "type": "string"
                    },
                    "decimals": {
                      "type": "number"
                    },
                    "totalSupply": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - missing/invalid input."
          },
          "402": {
            "description": "Payment Required (x402, USDC on Base)."
          }
        }
      }
    },
    "/api/sanctions": {
      "post": {
        "operationId": "sanctions",
        "summary": "Wallet Sanctions Screen",
        "description": "Screen an EVM wallet against the OFAC SDN crypto address list (PASS/BLOCK). Body: { address }.",
        "x-payment-info": {
          "x402Version": 2,
          "price": {
            "mode": "fixed",
            "amount": "0.01",
            "currency": "USD"
          },
          "protocols": [
            "x402"
          ],
          "network": "eip155:8453",
          "asset": "USDC",
          "payTo": "0xcd6b6d99b7751ff30b68fa1365488eb73fa7cefa"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "description": "EVM wallet address."
                  }
                },
                "required": [
                  "address"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Wallet Sanctions Screen result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string"
                    },
                    "verdict": {
                      "type": "string",
                      "enum": [
                        "PASS",
                        "BLOCK"
                      ]
                    },
                    "sanctioned": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - missing/invalid input."
          },
          "402": {
            "description": "Payment Required (x402, USDC on Base)."
          }
        }
      }
    }
  }
}