◈ API REFERENCE

Build on the Forge

ANVL exposes a set of public REST endpoints — swap routing, token data, platform stats — that you can integrate into your own tools and dashboards.

BASE URL
https://anvl.site
FORMAT
JSON
RATE LIMIT
60 req / min
AUTH
Wallet Signature
◈ GETTING STARTED

Most ANVL endpoints are publicly accessible without authentication. Authenticated endpoints (marked 🔒 AUTH REQUIRED) require a valid session obtained via wallet signature — connect your BNB Chain wallet on anvl.site to get started.

All responses are JSON. Errors return a standard shape: { "error": "message" }

# Example: fetch CAKE price from ANVL's DexScreener proxy
curl "https://anvl.site/api/dexscreener?chain=BSC&address=0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82"

# Response
{
  "pairs": [{ "priceUsd": "2.14", "volume": { "h24": 9420000 }, ... }]
}
⚡ RATE LIMITS & FAIR USE
PUBLIC ENDPOINTS
60 req / min
Per IP
AUTHENTICATED
120 req / min
Per wallet
1INCH SWAP BUILD
20 req / min
Per IP
DEXSCREENER SEARCH
30 req / min
Per IP

Exceeding limits returns HTTP 429. These are best-effort limits — heavy abuse may result in IP blocks. For production integrations with higher needs, reach out at dev@anvl.site.

TOKEN DATA
GET/api/dexscreener

Fetch token pair data from DexScreener. Returns price, liquidity, volume, and price change data.

PARAMETERS
chainstring*Blockchain identifier, e.g. BSC
addressstring*Token mint address
* required   ○ optional
EXAMPLE REQUEST
curl "https://anvl.site/api/dexscreener?chain=BSC&address=0x0E09...cE82"
EXAMPLE RESPONSE
{
  "pairs": [
    {
      "priceUsd": "185.42",
      "liquidity": { "usd": 12480000 },
      "volume": { "h24": 94200000 },
      "priceChange": { "h24": 2.14 }
    }
  ]
}
GET/api/dexscreener/search

Search for tokens by name, symbol, or address across DexScreener's index.

PARAMETERS
qstring*Token name, symbol, or address fragment
* required   ○ optional
EXAMPLE REQUEST
curl "https://anvl.site/api/dexscreener/search?q=BONK"
1INCH SWAP
GET/api/oneinch/quote

Get a swap quote routed through the 1inch Aggregation API on BNB Smart Chain (chain 56). Returns best output amount and gas estimate.

PARAMETERS
srcstring*Input token contract address (0x...)
dststring*Output token contract address (0x...)
amountinteger*Input amount in base units (wei, no decimals)
includeGasbooleanInclude an estimated gas cost in the response
* required   ○ optional
EXAMPLE REQUEST
curl "https://anvl.site/api/oneinch/quote?src=0xEeee...EEeE&dst=0x55d3...7955&amount=1000000000000000000"
EXAMPLE RESPONSE
{
  "dstAmount": "1000234000000000000",
  "gas": 180000
}
GET/api/oneinch/swap

Build a ready-to-send BSC transaction (to/data/value/gas) for a swap. Sign and broadcast it directly with your wallet — no separate serialize step needed.

PARAMETERS
srcstring*Input token contract address (0x...)
dststring*Output token contract address (0x...)
amountinteger*Input amount in base units (wei)
fromstring*Wallet address executing the swap (0x...)
slippagenumber*Slippage tolerance as a percentage, e.g. 1 for 1%
* required   ○ optional
EXAMPLE REQUEST
curl "https://anvl.site/api/oneinch/swap?src=0xEeee...EEeE&dst=0x55d3...7955&amount=1000000000000000000&from=0xAbC1...&slippage=1"
EXAMPLE RESPONSE
{
  "tx": { "to": "0x1111...", "data": "0x...", "value": "0", "gas": 180000, "gasPrice": "..." },
  "dstAmount": "1000234000000000000"
}
GET/api/oneinch/token

Look up a BEP-20 token by contract address — symbol, name, decimals, and logo.

PARAMETERS
addressstring*Token contract address (0x...)
* required   ○ optional
EXAMPLE REQUEST
curl "https://anvl.site/api/oneinch/token?address=0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82"
EXAMPLE RESPONSE
{
  "address": "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82",
  "symbol": "CAKE",
  "name": "PancakeSwap Token",
  "decimals": 18,
  "logoURI": "https://..."
}
PLATFORM STATS
GET/api/stats

Returns aggregate platform statistics — total projects created, wallets connected, and swap volume.

EXAMPLE REQUEST
curl "https://anvl.site/api/stats"
EXAMPLE RESPONSE
{
  "projects": 1420,
  "wallets": 3812,
  "swapVolume": 142000
}
GET/api/ticker

Live ticker data for the $ANVL token — price, 24h change, and market cap.

EXAMPLE REQUEST
curl "https://anvl.site/api/ticker"
EXAMPLE RESPONSE
{
  "symbol": "ANVL",
  "priceUsd": "0.00042",
  "change24h": 12.4,
  "marketCap": 420000
}
🔒
FORGE (AUTHENTICATED)
GET/api/forge/me🔒 AUTH REQUIRED

Returns the authenticated user's Forge profile — XP, tier, crafted items, and quest progress.

EXAMPLE REQUEST
curl "https://anvl.site/api/forge/me" \
  -H "Authorization: Bearer <session_token>"
EXAMPLE RESPONSE
{
  "wallet": "BjNR...Dz5Y",
  "xp": 2400,
  "tier": "IRON",
  "questsCompleted": 7
}
GET/api/forge/leaderboard

Top wallets ranked by XP and crafting activity on the Forge.

EXAMPLE REQUEST
curl "https://anvl.site/api/forge/leaderboard"
◈ SDK & CLIENT LIBRARIES

Official TypeScript SDK and community-maintained wrappers are in progress. Follow @anvlproject for release updates. In the meantime, all endpoints are standard HTTP REST — use fetch, axios, or curl directly.

// TypeScript — fetch a 1inch quote
const params = new URLSearchParams({
  src:    "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", // BNB
  dst:    "0x55d398326f99059fF775485246999027B3197955", // USDT
  amount: "1000000000000000000",
});

const res  = await fetch(`https://anvl.site/api/oneinch/quote?${params}`);
const data = await res.json();
console.log(data.dstAmount); // USDT base units (wei)
⚒ QUESTIONS OR ISSUES?

Open an issue on GitHub or reach us at dev@anvl.site