WOOFi Swap API – LLM Integration Guide ======================================= ## Document Info - **Version**: 1.1 - **Last Updated**: 2026-03-20 ## QUICK START - **Daily Protocol Revenue (Swap + Pro)**: `GET /analytics/daily_fee?start_date=2026-03-01&end_date=2026-03-20` ### 1. Choose Your Integration Path - **WOOFi Skill**: `/plugin install woofi/woofi-skills` - **Python SDK**: `pip install woofi` (https://github.com/woonetwork/woofi-python-sdk) - **Direct API**: Base URL `https://api.woofi.com` (No dependencies) ### 2. Common Queries - **Earn TVL (single chain)**: `GET /yield?network=arbitrum` → Use `total_deposit / 10^18`. - **Earn TVL (all chains)**: Query all 10 networks (excluding Solana/HyperEVM/Monad), sum `total_deposit / 10^18`. - **24h swap volume**: `GET /stat?period=1d&network=arbitrum` → Sum all `volume_usd` and divide by 10^18. - **WOO staking APR**: `GET /stakingv2` → Directly use `avg_apr`. --- ## Overview This document provides guidance for LLMs to interact with the WOOFi Swap API. WOOFi Swap is a decentralized exchange aggregator offering deep liquidity and competitive pricing across multiple chains. Base URL: https://api.woofi.com Authentication: None required (fully public) Rate Limit: 120 requests per minute (shared across all endpoints). If rate limited, wait 60 seconds and retry. When querying multiple networks in parallel, stagger requests. ## ERROR HANDLING - **status != "ok"**: The API returned an error. DO NOT use the `data` field. Report the `message` to the user. - **Empty data array**: No historical data for this network/period combination. - **Unsupported Network**: Some networks (Solana, HyperEVM, Monad) do not have Earn vaults. If `/yield` returns empty or 404 for these, skip that network in cross-chain totals. - **Rate Limit (429)**: Wait 60 seconds and retry. --- ## SECTION 1: SWAP SUPPORT ### GET /swap_support Purpose: Retrieve the full list of supported networks, DEXs, and tokens for WOOFi swaps. Parameters: - None Caching: 1 hour (3600 seconds) Example Request: GET https://api.woofi.com/swap_support Example Response (abbreviated): { "status": "ok", "data": { "arbitrum": { "dexs": ["uni_swap", "sushi_swap", "curve", "woofi"], "network_infos": { "name": "Arbitrum", "public_rpc_url": "https://arb1.arbitrum.io/rpc", "chain_id": 42161, "currency_symbol": "ETH", "bridge_enable": true, "mainnet": true, "explorer_base_url": "https://arbiscan.io/", "est_txn_mins": 15 }, "token_infos": [ { "address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", "symbol": "ETH", "decimals": 18, "woofi_dex_precision": 2, "swap_enable": true } ] } } } Field Descriptions: - dexs : List of DEX integrations available on this network - network_infos : Chain metadata (name, RPC URL, chain ID, explorer, bridge support) - token_infos : List of supported tokens with address, symbol, decimals, and swap_enable flag - swap_enable : Whether swapping is currently active for this token on this network - bridge_enable : Whether cross-chain bridging is supported on this network - woofi_dex_precision : Price precision for WOOFi DEX display Notes for LLMs: - Use this endpoint to discover which networks and tokens are available before calling swap endpoints - Paused networks (currently: fantom, zksync, polygon_zkevm) have swap_enable=false for all tokens - The Sei network is included with a hardcoded configuration (chain ID 1329, tokens: SEI, USDC), and is for WOOFi Pro only, not WOOFi Swap - Some networks (sonic, hyperevm, monad) are excluded from this endpoint's output - Rate limit is 120 requests per minute; this endpoint is heavily cached (1 hour), so repeated calls are cheap --- ## SECTION 2: TRADING STATISTICS ### GET /stat Purpose: Retrieve trading statistics for a given time period and network. Parameters: - period (query, required): Time range - 1d — last 24 hours (hourly buckets) - 1w — last 7 days (may return only 6 days of data; use 1m for full 7-day queries) - 1m — last 30 days (daily buckets) - 3m — last 3 months (daily buckets) - 1y — last 1 year (daily buckets) - all — all-time data (daily buckets) - network (query, required): Blockchain network - bsc — BNB Smart Chain - avax — Avalanche - polygon — Polygon - arbitrum — Arbitrum One - optimism — Optimism - linea — Linea - base — Base - mantle — Mantle - sonic — Sonic - berachain — Berachain - hyperevm — HyperEVM - monad — Monad - solana — Solana Default: period=1m if omitted. Caching: Varies by period — 1d: 10 minutes, 1w: 30 minutes, 1m/3m/1y/all: 2 hours. Example Requests: GET https://api.woofi.com/stat?period=1d&network=arbitrum GET https://api.woofi.com/stat?period=1m&network=bsc GET https://api.woofi.com/stat?period=all&network=base Example Response: { "status": "ok", "data": [ { "id": "492229", "timestamp": "1772024400", "volume_usd": "124234640850000000000000", "traders": "29", "txs": "89", "txns": "89" } ] } Field Descriptions: - timestamp : Unix epoch (seconds) for the start of the time bucket - volume_usd : Trading volume in USD, denominated in wei (divide by 10^18 to get USD value) - traders : Number of unique trading wallets within that single time bucket. WARNING: Do NOT sum traders across multiple buckets to derive unique traders over a longer period — the same wallet can appear in multiple buckets, making the summed value misleading. - txs / txns : Number of swap transactions in the time bucket (both fields are identical) Notes for LLMs: - **Partial Data Alert**: The final bucket in the response often represents the **current day's partial data**. To compare full 24h periods, use yesterday's bucket. - To compute total volume for a period: sum all volume_usd values and divide by 10^18 - To compute total txs: sum all txs values - **IMPORTANT**: Do NOT sum traders across buckets; use per-bucket traders only for hourly/daily activity snapshots. The API does not provide unique trader counts for a total period via /stat. - period=1w may return only 6 days of data due to bucket boundaries; always use period=1m and filter by date range when a full 7-day window is required - To get a specific date's volume: use period=1m, filter buckets where timestamp falls within that date's UTC 00:00:00 to 23:59:59 range - To get cross-chain totals: query each network separately and aggregate - Rate limit is 120 requests per minute; when querying all 13 networks at once, batch requests or add small delays to avoid hitting the limit --- ## SECTION 3: TRADING VOLUME BY SOURCE ### GET /source_stat Purpose: Retrieve trading volume breakdown by traffic source (integrator/aggregator) for a given time period and network. Parameters: - period (query, required): Time range - 1d — last 24 hours - 1w — last 7 days - 1m — last 30 days - 3m — last 3 months - 1y — last 1 year - all — all-time data - network (query, required): Blockchain network - bsc — BNB Smart Chain - avax — Avalanche - polygon — Polygon - arbitrum — Arbitrum One - optimism — Optimism - linea — Linea - base — Base - mantle — Mantle - sonic — Sonic - berachain — Berachain - hyperevm — HyperEVM - monad — Monad Default: period=1m if omitted. Caching: Same as /stat (varies by period). Example Requests: GET https://api.woofi.com/source_stat?period=1d&network=arbitrum GET https://api.woofi.com/source_stat?period=1w&network=base GET https://api.woofi.com/source_stat?period=1m&network=bsc Example Response: { "status": "ok", "data": [ { "id": "3", "name": "OpenOcean", "volume_usd": "82198846992000000000000", "txns": 12, "percentage": 3.363419938553669 }, { "id": "99", "name": "Other", "volume_usd": "1526079366118000000000000", "txns": 1415, "percentage": 62.44425506742424 } ] } Field Descriptions: - id : Internal source identifier - name : Name of the traffic source (integrator or aggregator, e.g. "KyberSwap", "0x", "ODOS") - volume_usd : Trading volume from this source in USD, denominated in wei (divide by 10^18 to get USD value) - txns : Number of swap transactions from this source - percentage : This source's share of total volume for the given period and network (%) Known Sources: - 0: WOOFi, 1: 1inch, 2: DODO, 3: OpenOcean, 4: MetaMask, 5: YieldYak, 6: Firebird, 7: BitKeep, 8: Velora, 10: Transit Swap, 11: 0x, 12: ODOS, 13: Hera Finance, 14: THORSwap, 15: OKX, 16: ONTO, 17: Yeti, 18: Joy, 19: ZetaFarm, 20: Slingshot, 21: KALM, 22: unizen, 23: KyberSwap, 24: 1delta Notes for LLMs: - Each response covers the full period for the given network — no timestamp filtering needed - "Other" is a catch-all bucket for sources not individually listed - On Solana, long-address rebate sources are merged into the "Other" category - To get the top source by volume: find the entry with the highest volume_usd (excluding "Other") - To compute USD value: divide volume_usd by 10^18 - Rate limit is 120 requests per minute --- ## SECTION 4: MULTI-CHAIN TOTAL STATISTICS ### GET /multi_total_stat Purpose: Retrieve aggregated trading statistics across all supported chains in a single call. Parameters: - None Caching: 5 seconds. Example Request: GET https://api.woofi.com/multi_total_stat Example Response: { "status": "ok", "data": { "past_24h_volume": "45230000000000000000000000", "total_volume_usd": "127800000000000000000000000000", "yesterday_volume_usd": "38900000000000000000000000", "last_week_volume_usd": "312000000000000000000000000", "updated_at": 1710979200 } } Field Descriptions: - past_24h_volume : 24-hour trading volume across all chains in USD (divide by 10^18) - total_volume_usd : All-time cumulative trading volume in USD (divide by 10^18) - yesterday_volume_usd: Previous UTC day's volume in USD (divide by 10^18) - last_week_volume_usd: Last 7 days' volume in USD (divide by 10^18) - updated_at : Unix timestamp of the last update Notes for LLMs: - This is the fastest way to get cross-chain aggregate volume without querying each network separately - Includes Solana statistics added in real time on top of pre-computed EVM data from Redis - All volume values are 18-decimal strings — divide by 10^18 to get USD amounts - Rate limit is 120 requests per minute --- ## SECTION 5: PROTOCOL REVENUE (ANALYTICS) ### GET /analytics/daily_fee Purpose: Retrieve daily net protocol revenue breakdown for WOOFi Swap and WOOFi Pro. Parameters: - start_date (query, required): Start date in YYYY-MM-DD format (e.g. 2026-01-01) - end_date (query, required): End date in YYYY-MM-DD format (e.g. 2026-03-31) - Max range between start and end date is 90 days. Example Request: GET https://api.woofi.com/analytics/daily_fee?start_date=2026-03-01&end_date=2026-03-10 Example Response: ```json { "status": "ok", "data": { "2026-03-01": { "swap": 1732.845286, "pro": 138.757985 }, "2026-03-02": { "swap": 1647.243083, "pro": 327.086074 } } } ``` Field Descriptions: - swap : Net fee revenue from WOOFi Swap (USD) - pro : Net fee revenue from WOOFi Pro (USD) Notes for LLMs: - Values are already in USD (not scaled by 10^18). - To get total protocol revenue for a period, sum the `swap` and `pro` fields across all dates in the range. --- ## SECTION 6: NETWORK TOTAL STATISTICS ### GET /total_stat Purpose: Retrieve all-time total volume, traders, and transactions for a specific network. Parameters: - network (query, required): Blockchain network (same list as /stat) Caching: 60 seconds (cached in Redis). Example Request: GET https://api.woofi.com/total_stat?network=arbitrum Example Response: { "status": "ok", "data": { "volume_usd": "28750000000000000000000000000", "traders": "145230", "txs": "1523400", "txns": "1523400", "updated_at": "1710979200" } } Field Descriptions: - volume_usd : All-time total trading volume in USD (divide by 10^18) - traders : All-time unique traders count - txs / txns : All-time total transactions (both fields identical; txs is deprecated) - updated_at : Unix timestamp of the last update Notes for LLMs: - For EVM networks: data comes from SQL subgraph - For Solana: data is aggregated from Solana-specific stats - Unlike /stat, this returns a single aggregate — not time-series data - Rate limit is 120 requests per minute --- ## SECTION 7: 24-HOUR CUMULATIVE STATISTICS ### GET /cumulate_stat Purpose: Retrieve 24-hour cumulative statistics including volume, traders, transactions, and turnover rate for a specific network. Parameters: - network (query, required): Blockchain network (same list as /stat) Caching: 60 seconds (cached in Redis). Example Request: GET https://api.woofi.com/cumulate_stat?network=arbitrum Example Response: { "status": "ok", "data": { "24h_volume_usd": "5230000000000000000000000", "24h_traders": "1250", "24h_txs": "3420", "24h_txns": "3420", "24h_turnover_rate_percentage": 12.45 } } Field Descriptions: - 24h_volume_usd : 24-hour trading volume in USD (divide by 10^18) - 24h_traders : 24-hour unique traders - 24h_txs / 24h_txns : 24-hour transactions (both fields identical; 24h_txs is deprecated) - 24h_turnover_rate_percentage : Turnover rate = (24h volume / TVL) * 100 Notes for LLMs: - Turnover rate indicates how actively the pool's liquidity is being utilized - For EVM: aggregates hourly data from the last 24 hours via SQL subgraph - For Solana: uses hourly aggregates from Redis - Rate limit is 120 requests per minute --- ## SECTION 8: TOKEN STATISTICS ### GET /token_stat Purpose: Retrieve 24-hour per-token trading statistics for a specific network, including TVL, volume, and turnover rate. Parameters: - network (query, required): Blockchain network (same list as /stat) Caching: 5 seconds. Example Request: GET https://api.woofi.com/token_stat?network=arbitrum Example Response: { "status": "ok", "data": [ { "logo_url": "https://fi-static.woo.org/static/ETH.png", "symbol": "ETH", "decimals": 18, "tvl": "8250000000000000000000000", "24h_volume_usd": "1230000000000000000000000", "24h_txs": "890", "24h_txns": "890", "turnover_rate_percentage": 14.91 }, { "logo_url": "https://fi-static.woo.org/static/USDC.png", "symbol": "USDC", "decimals": 6, "tvl": "5100000000000000000000000", "24h_volume_usd": "980000000000000000000000", "24h_txs": "650", "24h_txns": "650", "turnover_rate_percentage": 19.22 } ] } Field Descriptions: - logo_url : URL to the token's logo image - symbol : Token symbol (e.g., "ETH", "USDC", "ARB") - decimals : Token decimal places - tvl : Total Value Locked for this token in the pool (18-decimal string; divide by 10^18 for USD value) - 24h_volume_usd : 24-hour trading volume in USD (18-decimal string) - 24h_txs / 24h_txns : 24-hour transaction count (both identical; 24h_txs is deprecated) - turnover_rate_percentage : (24h volume / TVL) * 100; may be "--" if TVL is unavailable Notes for LLMs: - Results are sorted by 24h_volume_usd in descending order (highest volume first) - tvl can be "--" (string) for tokens not in the WooPP pool — handle this case - To get the most traded token: the first item in the list has the highest 24h volume - Rate limit is 120 requests per minute --- ## SECTION 9: SOLANA STATISTICS ### GET /solana_stat Purpose: Retrieve raw Solana pool statistics from Redis, broken down by pool address and date. Parameters: - filter_days (query, optional): Number of days to look back. Default: 14. Caching: None (reads directly from Redis). Example Request: GET https://api.woofi.com/solana_stat?filter_days=7 Example Response: [ { "date": "2025-03-20", "address": "7oteH4gBQGW4RUn3oXqzmub5eME5xAKkYRBm2vHcYRN", "swapVol": 125000000, "swapFee": 3750000, "totalValidTxs": 450 } ] Field Descriptions: - date : Date string (YYYY-MM-DD) - address : Solana pool address - swapVol : Swap volume in 6-decimal USDC units (divide by 10^6 for USD) - swapFee : Swap fees collected in 6-decimal USDC units - totalValidTxs : Number of valid swap transactions Notes for LLMs: - Unlike EVM endpoints, Solana volumes use 6-decimal precision (not 18) - Data is keyed by pool address, so multiple entries may exist per date - To get total Solana daily volume: sum swapVol for all addresses on a given date, divide by 10^6 - Rate limit is 120 requests per minute --- ## SECTION 10: EARN TVL ### GET /yield Purpose: Retrieve current TVL (Total Value Locked) and yield farming data for WOOFi Earn vaults on a given network. Parameters: - network (query, required): Blockchain network - bsc — BNB Smart Chain - avax — Avalanche - polygon — Polygon - arbitrum — Arbitrum One - optimism — Optimism - linea — Linea - base — Base - mantle — Mantle - sonic — Sonic - berachain — Berachain **Note**: /yield does **NOT** support Solana, HyperEVM, or Monad (Vaults are not deployed there). Example Requests: GET https://api.woofi.com/yield?network=base GET https://api.woofi.com/yield?network=arbitrum Example Response: { "status": "ok", "data": { "auto_compounding": { "0xb772122C4a37fe1754B46AB1799b909351e8Cb43": { "symbol": "ETH", "source": "woofi_super_charger_v2", "apy": 4.5799287826415735, "tvl": "104537211942693926600704", "price": 2267.2239821687, "share_price": "1090914172758238007", "decimals": 18, "loan_assets_percentage": 83.95089054785724, "loan_interest_apr": 5, "reserve_vault_assets_percentage": 16.049109452142766, "reserve_vault_apr": 1.7501056547177187, "weighted_average_apr": 4.478420899446649, "x_woo_rewards_apr": 0, "woo_rewards_apr": 6.033505588364045e-12, "reward_apr": 6.033505588364045e-12 } }, "total_deposit": "1512872344779163030257664" } } Field Descriptions: - auto_compounding : Map of vault contract address to vault data - symbol : Token symbol for this vault (e.g. "ETH", "USDC", "cbBTC") - source : Vault strategy type (e.g. "woofi_super_charger_v2") - apy : Current annual percentage yield (%) - tvl : Total value locked in this specific vault, denominated in USD. CRITICAL: The returned value is scaled by 10^decimals, so divide by 10^decimals to get the actual USD amount. Do not treat this field as a raw token amount, and no token price conversion is required. NOTE: Decimals vary by token and chain (e.g., USDC is usually 6, USDT is 18 on BSC but 6 on others). Always use the `decimals` field from the response. - price : Current token price in USD. Informational only and not needed for tvl conversion. - decimals : Decimal scaling for `tvl`; divide by 10^decimals to get the actual USD amount. Do NOT assume a fixed value for any token symbol. - loan_assets_percentage : Percentage of assets currently deployed in lending - loan_interest_apr : Interest APR from lending (%) - reserve_vault_assets_percentage : Percentage of assets in reserve vault - reserve_vault_apr : APR from reserve vault (%) - weighted_average_apr : Blended APR across lending and reserve (%) - reward_apr : Additional reward APR from token incentives (%) - total_deposit : Total TVL across all vaults on this specific network, expressed as a USD value scaled by 10^18. Divide by 10^18 to get the human-readable USD value. Notes for LLMs: - **Total Network TVL**: Always use `total_deposit` divided by 10^18 to get the network-wide USD TVL. - **Individual Vault TVL**: Use `tvl / 10^decimals` to get the USD value of a single vault. - To get cross-chain total TVL: query each supported network separately and sum all total_deposit values. - Rate limit is 120 requests per minute --- ## SECTION 11: EARN SUMMARY ### GET /earn_summary Purpose: Retrieve a summary of active WOOFi Supercharger vaults across all networks, sorted by APR. This is a quick overview endpoint — use /yield for detailed per-vault data. Parameters: - None Caching: 5 seconds. Example Request: GET https://api.woofi.com/earn_summary Example Response: { "status": "ok", "data": [ { "network": "arbitrum", "symbol": "ETH", "apr": 5.23, "network_logo": "https://fi-static.woo.org/static/arbitrum.png", "token_logo": "https://fi-static.woo.org/static/ETH.png", "vault": "0x..." } ] } Field Descriptions: - network : Network where the vault is deployed - symbol : Token symbol for the vault (e.g. "ETH", "USDC") - apr : Current weighted average APR (%) combining loan interest and reserve vault returns - network_logo : URL to the network's logo image - token_logo : URL to the token's logo image - vault : Vault contract address Notes for LLMs: - Results are sorted by APR in descending order (highest APR first) - Paused networks (fantom, zksync, polygon_zkevm) and deprecated vaults are excluded - Vaults with 0% APR are also excluded - To find the best-yielding vault: the first item in the list has the highest APR - Rate limit is 120 requests per minute --- ## SECTION 12: WOO STAKING ### GET /stakingv2 Purpose: Retrieve current WOO staking statistics including total staked WOO and APR breakdown. This endpoint is chain-agnostic and returns global staking data. Parameters: - None required Example Request: GET https://api.woofi.com/stakingv2 Example Response: { "status": "ok", "data": { "avg_apr": 2.945327738329302, "base_apr": 1.9756815896339195, "mp_boosted_apr": 0.9696461486953825, "total_woo_staked": "567182560788976722553288628", "woo_decimals": 18 } } Field Descriptions: - avg_apr : Current average APR for WOO stakers (%) - base_apr : Base staking APR before any boosts (%) - mp_boosted_apr : Additional APR from Multiplier Points boosting (%) - total_woo_staked : Total amount of WOO tokens staked across all chains, denominated in wei (divide by 10^woo_decimals to get WOO amount) - woo_decimals : Decimal places for WOO token (18) Notes for LLMs: - **USD Value Note**: /stakingv2 returns WOO token amount, NOT USD value. To calculate the USD value of staked WOO, you MUST fetch the current WOO price from an external source (e.g. CoinGecko). - To get total staked WOO amount: divide total_woo_staked by 10^18 - avg_apr = base_apr + mp_boosted_apr - This endpoint returns global data across all chains; no network parameter is needed - Rate limit is 120 requests per minute --- ## SECTION 13: USER BALANCES ### GET /user_balances Purpose: Retrieve a user's native and ERC20 token balances for all tokens supported by WOOFi on a given network. Parameters: - network (query, required): Blockchain network (EVM networks only; Solana not supported) - user_address (query, required): User's EVM wallet address (0x...) Caching: 5 seconds. Example Request: GET https://api.woofi.com/user_balances?network=arbitrum&user_address=0x1234...abcd Example Response: { "status": "ok", "data": { "address": "0x1234...abcd", "chain_id": 42161, "items": [ { "balance": "1500000000000000000", "contract_address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "contract_decimals": 18 }, { "balance": "5000000", "contract_address": "0xaf88d065e77c8cc2239327c5edb3a432268e5831", "contract_decimals": 6 } ] } } Field Descriptions: - address : User's checksummed address (lowercased in response) - chain_id : Numeric chain ID for the network - items : List of token balances - balance : Token balance in smallest unit (divide by 10^contract_decimals) - contract_address : Token contract address (0xeee...eee for native token) - contract_decimals : Token decimal places Notes for LLMs: - The first item is always the native token balance (ETH, BNB, MATIC, etc.) - Uses Multicall3 for efficient batch fetching — all balances in one RPC call - Addresses are lowercased in the response - Rate limit is 120 requests per minute --- ## SECTION 14: USER TRADING VOLUMES ### GET /user_trading_volumes Purpose: Retrieve a user's trading volume across all supported EVM networks for a given period. Parameters: - period (query, required): One of "7d", "14d", "30d" - user_address (query, required): User's EVM wallet address (0x...) Caching: 5 seconds. Example Request: GET https://api.woofi.com/user_trading_volumes?period=7d&user_address=0x1234...abcd Notes for LLMs: - Only EVM addresses are supported (must be a valid hex address) - Period values are strictly "7d", "14d", or "30d" — other values will return an error - Volume is calculated using UTC day boundaries - Rate limit is 120 requests per minute --- ## SECTION 15: USER SUPERCHARGER INFOS ### GET /user_supercharger_infos Purpose: Retrieve a user's positions (deposits, pending withdrawals, etc.) in WOOFi Supercharger vaults across all networks. Parameters: - user_address (query, required): User's EVM wallet address (0x...) Caching: 5 seconds. Example Request: GET https://api.woofi.com/user_supercharger_infos?user_address=0x1234...abcd Notes for LLMs: - Returns vault positions across all active networks - Only EVM addresses are supported - Rate limit is 120 requests per minute --- ## SECTION 16: USER STAKING V2 INFOS ### GET /user_stakingv2_infos Purpose: Retrieve a user's Staking V2 information, including claimed rewards (USDC/ARB), compounded WOO, and expected yearly earnings. Parameters: - user_address (query, required): User's EVM wallet address (0x...) - network (query, optional): Network for staking data. Default: "arbitrum" - days (query, optional): Number of days for earnings calculation. Default: 30 Caching: 5 seconds. Example Request: GET https://api.woofi.com/user_stakingv2_infos?user_address=0x1234...abcd GET https://api.woofi.com/user_stakingv2_infos?user_address=0x1234...abcd&network=arbitrum&days=90 Example Response: { "status": "ok", "data": { "id": "0x1234...abcd", "claimed_amount_usdc": "125000000", "claimed_amount_arb": "50000000000000000000", "compounded_amount_woo": "1000000000000000000000", "updated_at": "1710979200", "total_usd": "45.23", "expected_year_usd": "180.92" } } Field Descriptions: - id : User's address (lowercased) - claimed_amount_usdc : Total USDC claimed (includes both USDC and USDC.e) - claimed_amount_arb : Total ARB claimed - compounded_amount_woo : Total WOO compounded - updated_at : Unix timestamp of last update - total_usd : Total USD earned in the last N days (from 'days' parameter) - expected_year_usd : Projected annual USD earnings at current rate Notes for LLMs: - If the user has never staked, all values will be "0" - total_usd is calculated over the number of days specified (default 30) - Rate limit is 120 requests per minute --- ## SECTION 17: USER BOOSTED APR INFO ### GET /user/boosted_apr_info Purpose: Check if a user is eligible for "Boosted APR" — a higher staking APR available to new stakers within 60 days of their first stake. Parameters: - user_address (query, required): User's EVM wallet address (0x...) Caching: 5 seconds. Example Request: GET https://api.woofi.com/user/boosted_apr_info?user_address=0x1234...abcd Example Response: { "status": "ok", "data": { "deadline": 1716163200, "is_boosted": true } } Field Descriptions: - deadline : Unix timestamp when the boosted APR period ends (first_stake_time + 60 days) - is_boosted : Boolean — true if the user is currently within the 60-day boosted APR window Notes for LLMs: - Boosted APR period is exactly 60 days (86400 * 60 seconds) from first stake - If the user has never staked, deadline=0 and is_boosted=false - Rate limit is 120 requests per minute --- ## SECTION 18: WOOFI PRO PERPS VOLUME ### GET /woofi_pro/perps_volume Purpose: Retrieve the daily trading volume for the WOOFi Pro broker (perpetual futures via Orderly Network). Parameters: - None Caching: 5 seconds. Example Request: GET https://api.woofi.com/woofi_pro/perps_volume Notes for LLMs: - Returns daily volume data for the last 80 days - Data is sourced from the Orderly Network API (fetch_volume_broker_daily) - Rate limit is 120 requests per minute --- ## SECTION 19: USER PERP VOLUMES ### GET /woofi_dex/user_perp_volumes Purpose: Retrieve a user's perpetual trading volume on WOOFi DEX for a given period. Parameters: - period (query, required): One of "7d", "14d", "30d" - user_address (query, required): User's EVM wallet address (0x...) Caching: 5 seconds. Example Request: GET https://api.woofi.com/woofi_dex/user_perp_volumes?period=7d&user_address=0x1234...abcd Example Response: { "status": "ok", "data": { "user_address": "0x1234...ABCD", "perp_volume": 125000.50 } } Field Descriptions: - user_address : User's checksummed address - perp_volume : User's perpetual trading volume for the period (0 if not found) Notes for LLMs: - Data is pre-computed and stored in Redis (key: woofi:woofi_pro_user_perp_volumes:{period}) - Period values are strictly "7d", "14d", or "30d" - Returns perp_volume=0 if the user has no trading activity in the period - Rate limit is 120 requests per minute --- ## SECTION 20: INTEGRATION — PAIRS ### GET /integration/pairs Purpose: Retrieve the list of supported trading pairs for third-party integrations (e.g., CoinMarketCap, CoinGecko). Parameters: - None Caching: 1 hour (3600 seconds). Example Request: GET https://api.woofi.com/integration/pairs Example Response: { "status": "ok", "data": [ { "ticker_id": "ETH_USDC", "base": "ETH", "target": "USDC" }, { "ticker_id": "BNB_USDT", "base": "BNB", "target": "USDT" } ] } Field Descriptions: - ticker_id : Trading pair identifier in BASE_QUOTE format - base : Base token symbol - target : Quote token symbol (usually USDC or USDT) Notes for LLMs: - Pairs are deduplicated across chains — each ticker_id appears only once - Paused networks are excluded - Rate limit is 120 requests per minute --- ## SECTION 21: INTEGRATION — TICKERS ### GET /integration/tickers Purpose: Retrieve 24-hour market data (last price, base volume, quote volume) for all integration pairs. Parameters: - None Caching: 5 seconds. Example Request: GET https://api.woofi.com/integration/tickers Example Response: { "status": "ok", "data": { "ETH_USDC": { "ticker_id": "ETH_USDC", "base_currency": "ETH", "quote_currency": "USDC", "last_price": 2267.22, "base_volume": 1523.45, "target_volume": 3455120.67 } } } Field Descriptions: - ticker_id : Trading pair identifier - base_currency : Base token symbol - quote_currency : Quote token symbol - last_price : Last traded price of the base token in quote currency - base_volume : 24-hour volume in base token units - target_volume : 24-hour volume in quote token units (USD value) Notes for LLMs: - Data is aggregated across all supported chains — volumes from all networks are summed - last_price is taken from the on-chain oracle's last traded price - Rate limit is 120 requests per minute --- ## SECTION 22: INTEGRATION — POOL STATES ### GET /integration/pool_states Purpose: Retrieve the internal state of WOOFi Liquidity Pools (WooPP), including reserves, fee rates, oracle prices, and risk parameters. Parameters: - network (query, required): Blockchain network (EVM only; Solana not supported) Caching: 5 seconds. Example Request: GET https://api.woofi.com/integration/pool_states?network=arbitrum Example Response: { "status": "ok", "data": { "block_number": 185234567, "pool_states": { "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1": { "reserve": 150000000000000000000, "fee_rate": 25, "max_gamma": 10000000000000000, "max_notional_swap": 500000000000000000000000, "cap_bal": 1000000000000000000000, "price": 2267220000000000000000, "spread": 200000000000000, "coeff": 1000000000, "wo_feasible": true } } } } Field Descriptions: - block_number : The EVM block number at which the data was read - reserve : Token reserve in the WooPP pool (in token's smallest unit) - fee_rate : Trading fee rate (in basis points * 1e5, i.e. 25 = 0.025%) - max_gamma : Maximum gamma parameter for the sPMM pricing model - max_notional_swap: Maximum notional swap size in quote token units - cap_bal : Maximum balance cap for the token in the pool - price : Current oracle price (18-decimal fixed point) - spread : Price spread from the oracle (18-decimal fixed point) - coeff : Price coefficient for the sPMM model - wo_feasible : Whether the Wooracle state is currently feasible for trading Notes for LLMs: - Uses Multicall3 to batch-call tokenInfos on WooPP and state on Wooracle contracts - Paused networks return an error - SVM (Solana) is not supported — will raise an error - wo_feasible=false means the oracle is stale or unreliable; swaps may fail - Rate limit is 120 requests per minute --- ## Usage Examples Q: What is WOOFi Swap's trading volume on Arbitrum in the last 24 hours? 1. Call GET https://api.woofi.com/stat?period=1d&network=arbitrum 2. Sum all volume_usd values, divide by 10^18 3. Report the result in USD Q: How many swaps were made on WOOFi on BSC last week? 1. Call GET https://api.woofi.com/stat?period=1m&network=bsc 2. Filter buckets to the last 7 days by UTC timestamp 3. Sum all txs values 4. Report the result Q: What is WOOFi's all-time trading volume on Base? 1. Call GET https://api.woofi.com/stat?period=all&network=base 2. Sum all volume_usd values, divide by 10^18 3. Report the result in USD Q: What is WOOFi's total volume across all chains last 7 days? 1. Call GET https://api.woofi.com/multi_total_stat 2. Take last_week_volume_usd, divide by 10^18 3. Report the result in USD (Alternative: query /stat?period=1m for each network and filter to last 7 days for per-network breakdown) Q: Which source drove the most volume on WOOFi Arbitrum today? 1. Call GET https://api.woofi.com/source_stat?period=1d&network=arbitrum 2. Find the entry with the highest volume_usd (excluding "Other") 3. Divide volume_usd by 10^18 and report the source name, volume, and percentage Q: What percentage of WOOFi's volume on Base came from 0x last month? 1. Call GET https://api.woofi.com/source_stat?period=1m&network=base 2. Find the entry where name is "0x" 3. Report the percentage field directly Q: What is the 24-hour turnover rate on Arbitrum? 1. Call GET https://api.woofi.com/cumulate_stat?network=arbitrum 2. Report the 24h_turnover_rate_percentage value directly Q: Which token has the highest 24h volume on Arbitrum? 1. Call GET https://api.woofi.com/token_stat?network=arbitrum 2. The first item in the list has the highest volume (pre-sorted) 3. Report the symbol and 24h_volume_usd (divide by 10^18) Q: What is WOOFi Earn's total TVL on Base? 1. Call GET https://api.woofi.com/yield?network=base 2. Take total_deposit from the response, divide by 10^18 3. Report the result in USD Q: What is WOOFi Earn's total TVL across all chains? 1. Call /yield?network= for each supported network: bsc, avax, polygon, arbitrum, optimism, linea, base, mantle, sonic, berachain 2. Sum all total_deposit values, divide by 10^18 3. Report the combined total in USD Q: Which earn vault has the best APR right now? 1. Call GET https://api.woofi.com/earn_summary 2. The first item in the list has the highest APR (pre-sorted) 3. Report the network, symbol, and apr Q: How much WOO is currently staked on WOOFi? 1. Call GET https://api.woofi.com/stakingv2 2. Take total_woo_staked, divide by 10^18 3. Report the result in WOO Q: What is the current WOO staking APR? 1. Call GET https://api.woofi.com/stakingv2 2. Report avg_apr as the current staking APR 3. Optionally break down into base_apr and mp_boosted_apr Q: Is my wallet eligible for boosted staking APR? 1. Call GET https://api.woofi.com/user/boosted_apr_info?user_address=0x... 2. Check is_boosted — true means currently eligible 3. If true, deadline shows when the boost expires Q: What is my ETH balance on Arbitrum? 1. Call GET https://api.woofi.com/user_balances?network=arbitrum&user_address=0x... 2. Find the item with contract_address=0xeee...eee (native token) 3. Divide balance by 10^18 to get ETH amount