YOUR KEYS. YOUR CAPITAL.

EXPLORE

OverviewFind walletLiquidity poolsTokenNew pool radarWatchlist

YOUR CAPITAL

Wallet profileTransactionsAutomationSwap

ECOSYSTEM

Network statusDocumentationGuidesArticlesDevelopersSettings
BANIPOOL/Documentation

Search pools

Paste or type a pool address, pool ID, token address, or token symbol. All networks are searched at once.

A token address shows pools that use that token.

Create new pool

Connect wallet

Choose a wallet on this device or connect your phone wallet with a QR code.

Detected wallets

No browser wallet detected. Use WalletConnect for a wallet on your phone.

Signing in to view your portfolio does not authorize transactions.

Documentation

API reference

Manage API keys · Download the OpenAPI contract

Authentication & scopes

Send the key through x-api-key or Bearer headers. Store keys on the server. The portal requires a wallet session; keys cannot create new keys. Public reads are also available without a key, subject to IP rate limits.

curl "$API_BASE_URL/v1/chains" -H "x-api-key: $DEFI_API_KEY"

data:read for data; quotes:create for quotes; plans:create for unsigned plans and tracking transactions of the key owner's wallet. A wallet signature is still required. strategies:read reads the automation rules of the key owner's wallet (GET /v1/strategies); strategies:write creates, edits, pauses, resumes and revokes rules (live execution still needs the on-chain keeper permission signed by the wallet). webhooks:manage manages webhook subscriptions (GET/POST /v1/developer/webhooks, DELETE /v1/developer/webhooks/{id}, GET …/deliveries). API keys themselves can only be managed through a wallet session.

Wallet sign-in for non-browser clients

Transaction endpoints also accept wallet sessions. Create a challenge, sign its unmodified message with personal_sign, and verify it. The response contains a 7-day session token for Authorization: Bearer (sessionToken in the SDK). Browsers receive only an HttpOnly cookie. Signing in does not authorize any transactions.

POST /v1/auth/challenges  {"address":"0x…","chainId":8453}   → {id, message, expiresAt}
POST /v1/auth/verify      {"challengeId":"…","signature":"0x…"} → {token, actor, expiresAt}
GET  /v1/auth/session     (Authorization: Bearer <token>)      → {actor}
DELETE /v1/auth/session   → logout

TypeScript SDK

The @defi/api-client workspace provides an OpenAPI-generated client. Run it on the server.

import { createDefiClient } from '@defi/api-client';
const client = createDefiClient({
  baseUrl: process.env.API_BASE_URL!,
  apiKey: process.env.DEFI_API_KEY!,
});
const { data, error, response } = await client.GET('/v1/pools', {
  params: { query: { chain: 'base', limit: 50 } },
});
if (!response.ok) throw new Error(JSON.stringify(error));
console.log(data?.data, data?.meta.nextCursor);

Pagination & precision

Pool lists, token lists, and transaction history (GET /v1/transactions) use limit 1–200 (default 50) and the cursor from meta.nextCursor. Keep filters and sorting when fetching the next page. Token amounts and financial values are strings; unavailable metrics are null. Check meta.partial, dataStatus, and timestamps before using data.

Quotas, errors, and idempotency

Costs: standard reads 1 unit, account history/balances/positions 5, quotes/plans 10, tracking 5. Daily key quotas are set by the operator; see X-Quota-Limit and X-Quota-Remaining. HTTP 429 includes Retry-After. IP limits still apply. Public reads include ETag: send If-None-Match for a bodyless 304 when data is unchanged. Success responses contain data/meta; errors contain code, message, retryable, details, and requestId.

POST /v1/quotes requires an 8–128 character Idempotency-Key; POST /v1/developer/api-keys and /webhooks accept it optionally (repeating the same payload returns the same resource with replayed: true and secret null). Use the same key for the same payload. The client does not automatically retry mutations. Plans do not sign or broadcast transactions.

Webhook

Endpoints require public HTTPS on port 443. Secrets are shown once. Headers: x-webhook-id, x-webhook-timestamp, x-webhook-signature. Verify HMAC SHA-256 over timestamp + dot + raw body using the secret; compare in constant time, reject timestamps outside ±5 minutes, and deduplicate event IDs. Body: id, type, data, createdAt.

Up to 8 attempts with backoff/jitter; after that the status is dead. A 2xx response means received; redirects are not followed. Subscribable events: transaction.finalized, transaction.failed, public data.degraded (once per network head outage episode), position.out_of_range, strategy.executed (paper/notified, or executed by the live keeper) and strategy.execution_failed (live keeper execution failed; the rule is paused). Transaction events are produced automatically by background reconciliation (about 30 seconds after a transaction is final/failed), no polling needed; position/strategy events come from the automation worker and the keeper. The positionOutOfRange preference controls position events; strategy audit events stay available.

Realtime (SSE)

GET /v1/events/stream streams the same events as webhooks (owned by the session/key owner, plus public data.degraded) as text/event-stream. Each event carries an id cursor; reconnect with Last-Event-ID (automatic with EventSource) or ?after=. Connections close after about 100 seconds for browsers or 15 minutes for API keys. revoked means the key was revoked/expired or the session ended. reset means the cursor is outside retention: fetch a new snapshot (e.g. GET /v1/transactions). Browsers should use same-origin sessions; never put API keys in URLs — use x-api-key (data:read, 1 unit per connection).

const es = new EventSource('/api/v1/events/stream');
es.addEventListener('transaction.finalized', (e) => console.log(e.lastEventId, JSON.parse(e.data)));
es.addEventListener('reset', () => { /* sinkron ulang */ });

User data (/v1/me)

Wallet sessions only (API keys receive 403). GET/POST /v1/me/watchlist and DELETE /v1/me/watchlist/ {itemId} : pool (internal ID), token (CAIP-19), or watch-only account (CAIP-10), up to 200 items; adding an existing item returns 200 with created: false. GET/PUT /v1/me/settings: version-guarded notification preferences (send the latest version; mismatch → 409). GET /v1/me/portfolio: session wallet on active networks + up to 20 watch-only accounts; unreadable accounts have error status and meta.partial true, not zero balances. DELETE /v1/me/data removes watchlists and preferences (security audit logs remain).

Paper and notification strategies

GET/POST /v1/strategies, GET/PATCH /v1/strategies/ {id} , POST preview/pause/resume/revoke, GET executions. All are private to the session/key owner. Mutations require strategies:write (5 units); reads require strategies:read (1 unit). PATCH and status changes require the latest version; conflicts return 409. Paper mode records triggers, not trade simulations; notify mode is only for notify type. Compound/rebalance/exit do not execute funds yet. The worker enforces time buffers, cooldowns, UTC daily limits, and expiry. Revoke removes the off-chain rule, not on-chain allowances.Manage rules.

Sandbox, changelog, and deprecation

Version 1.4.0: paper/notification strategies, strategy API scopes, position/strategy events. Version 1.3.0: /v1/me endpoints (watchlists, preferences, combined portfolio, data deletion). Version 1.0.0 added the portal, keys, quotas, SDK, and webhooks. Version 1.2.0: complete transaction/quote/balance/status schemas (internal columns no longer sent), transaction history pagination, ETag, optional portal Idempotency-Key, 15-minute/1-unit API-key SSE. Version 1.1.0 added wallet sign-in to OpenAPI and GET /v1/tokens/ {tokenId} in the SDK (URL-encoded CAIP-19 IDs), SSE /v1/events/stream, and automatic transaction events. For a sandbox, run a local database and fixture-based integration tests; the API does not invent mainnet data. The registry shows actual deployment capabilities. Breaking changes use a new major version and an announced migration period before the old version is disabled. No endpoints are deprecated yet.

Public & session endpoints

The endpoint list is taken directly from the running OpenAPI contract.

MethodEndpointDescription
GET/v1/chains
GET/v1/chains/{chainSlug}/capabilities
GET/v1/protocols
GET/v1/vaultsVault ERC-4626 resmi BaniPool (Spark spUSDG Robinhood, sUSDC Base); snapshot langsung atau unavailable.
GET/v1/vaults/{vaultId}
POST/v1/vaults/{vaultId}/quotesOwner-bound read-only preview including contract fees and limits.
GET/v1/vaults/{vaultId}/positionPosisi wallet sesi di vault: shares, nilai aset, batas tarik kontrak, saldo aset di wallet.
POST/v1/vaults/{vaultId}/plansRencana transaksi vault.
GET/v1/pools
GET/v1/pools/search
GET/v1/pools/ohlcvCandle harga pool (GeckoTerminal) untuk grafik rentang.
GET/v1/pools/dex-listedApakah DexScreener mengindeks pool (untuk grafik embed).
GET/v1/pools/studio/stateOn-chain state of any Uniswap v2/v3/v4 or v3-fork pool by address or v4 pool ID: tokens, fee, tick, active liquidity, 24h LP fees (fee-growth accumulator) and whether adding liquidity is available.
GET/v1/pools/studio/liquidityActive-liquidity distribution around the current price (v3/v4) from initialized ticks; USD value per segment at current token prices.
GET/v1/pools/studio/chartPrice, TVL (v2/v3 balances), LP fees, volume (static fee only) and APR per interval from archive state over 1d/7d/30d.
GET/v1/pools/securityThe last full report is stored server-side and served immediately (cachedAt); reports older than 30 minutes or still computing are served while a background re-check runs (refreshing=true); fresh=1 forces a new check.
GET/v1/pools/security/historySecurity scan history (grade timeline) and detected change events for a pool: grade drops, checks that became riskier, owner/proxy/hook controller changes, active-liquidity and TVL drops of 50% or more.
GET/v1/pools/security/alerts/keyVAPID public key for Web Push security alerts (generated once and stored server-side).
POST/v1/pools/security/alertsOpt in to Web Push alerts for one pool (warning/danger events from the 30-minute monitor and the real-time WSS watcher).
POST/v1/pools/security/alerts/removeStop Web Push alerts for one pool on this browser.
POST/v1/pools/security/alerts/statusWhether this browser receives alerts for the pool.
GET/v1/pools/{poolId}
GET/v1/pools/{poolId}/history
GET/v1/pools/{poolId}/analyticsObserved TVL/price changes over at most 30 days; not PnL/APR.
GET/v1/analytics/poolsCompare 1–5 unique pools using a common observation window.
GET/v1/tokens
GET/v1/tokens/{tokenId}
GET/v1/token-iconsIkon raster on-demand untuk aset terindeks atau hasil deteksi pool, cocok jaringan dan CA.
GET/v1/accounts/{accountId}/balances
GET/v1/accounts/{accountId}/positions
GET/v1/positions/{positionId}/openedWaktu posisi NFT dibuat (block mint).
GET/v1/positions/{positionId}
GET/v1/status
GET/v1/developer/api-keysSesi wallet pemilik diperlukan.
POST/v1/developer/api-keysSesi wallet pemilik diperlukan.
DELETE/v1/developer/api-keys/{id}Sesi wallet pemilik diperlukan.
GET/v1/developer/usageSesi wallet pemilik diperlukan.
GET/v1/developer/webhooksSesi wallet pemilik diperlukan.
POST/v1/developer/webhooksSesi wallet pemilik diperlukan.
DELETE/v1/developer/webhooks/{id}Sesi wallet pemilik diperlukan.
GET/v1/developer/webhooks/{id}/deliveriesSesi wallet pemilik diperlukan.
GET/v1/events/streamServer-Sent Events (text/event-stream): transaction.finalized/failed milik pemilik sesi/API key dan event publik data.degraded.
GET/v1/me/watchlistWatchlist pool/token/akun milik wallet sesi (maks.
POST/v1/me/watchlistTambah item.
DELETE/v1/me/watchlist/{itemId}Sesi wallet pemilik diperlukan.
GET/v1/me/settingsPreferensi wallet sesi (default bila belum pernah disimpan, version 0).
PUT/v1/me/settingsSimpan preferensi dengan version guard: kirim version terakhir yang dibaca (0 bila belum ada); berbeda → 409.
GET/v1/me/portfolioAgregasi wallet sesi (terverifikasi) di jaringan EVM aktif + maks.
DELETE/v1/me/dataHapus watchlist dan preferensi milik wallet sesi.
GET/v1/strategiesStrategi privat milik sesi/key.
POST/v1/strategiesBuat draft dari posisi milik wallet.
GET/v1/strategies/{id}
PATCH/v1/strategies/{id}Ganti konfigurasi dengan version guard.
POST/v1/strategies/{id}/previewEvaluasi read-only; tidak mengubah timer, budget atau histori; tidak simulasi trade.
POST/v1/strategies/{id}/pause
POST/v1/strategies/{id}/resumeAktifkan versi ini setelah cek pemilik, expiry dan data RPC.
POST/v1/strategies/{id}/revokeCabut permanen penjadwalan strategi off-chain ini.
GET/v1/strategies/{id}/executions
GET/v1/strategies/{id}/keeperStatus izin keeper dana nyata (kebijakan BaniKeeperV4 & izin NFT on-chain) untuk posisi aturan ini, data transaksi pemberian/pencabutan izin (ditandatangani wallet pemilik), dan 20 pekerjaan keeper terakhir.
POST/v1/strategies/{id}/keeper/planRencana aksi keeper (compound/rebalance/exit aturan ini) untuk ditandatangani PEMILIK sendiri ("Jalankan sekarang"); disimulasikan, batas minimum dari simulasi.
POST/v1/strategies/{id}/keeper/confirmCatat transaksi keeper yang sudah terkonfirmasi (diverifikasi on-chain: ke kontrak keeper, event untuk posisi & pemilik aturan ini).
GET/v1/me/notificationsKanal notifikasi /automation milik wallet sesi: kunci publik Web Push dan status tautan Telegram.
POST/v1/me/notifications/pushDaftarkan browser ini untuk Web Push notifikasi aturan.
POST/v1/me/notifications/push/removeSesi wallet pemilik diperlukan.
POST/v1/me/notifications/push/statusSesi wallet pemilik diperlukan.
POST/v1/me/notifications/telegram/linkKode tautan sekali pakai (15 menit): buka url lalu tekan Start di bot.
POST/v1/me/notifications/telegram/verifySesi wallet pemilik diperlukan.
POST/v1/me/notifications/telegram/manualTautkan chat ID Telegram secara manual; hanya berhasil bila pesan uji terkirim.
POST/v1/me/notifications/telegram/unlinkSesi wallet pemilik diperlukan.
POST/v1/me/notifications/testKirim notifikasi uji ke semua kanal wallet sesi.
POST/v1/keeper/rebalanceRebalance posisi Uniswap v4 dalam satu transaksi lewat kontrak BaniKeeperV4 (tarik → swap penyeimbang di pool yang sama → posisi baru ±widthPct% milik pemilik).
POST/v1/keeper/confirmVerifikasi rebalance on-chain (event Rebalanced untuk posisi & pemilik ini) dan pindahkan aturan /automation pemilik ke posisi baru.
POST/v1/auth/challengesBuat challenge login (SIWE-like) untuk alamat wallet.
POST/v1/auth/verifyVerifikasi signature dan buat sesi 7 hari.
GET/v1/auth/sessionAlamat pemilik sesi aktif.
DELETE/v1/auth/sessionLogout: cabut sesi.
POST/v1/quotes
POST/v1/transaction-plans
POST/v1/transactions/{id}/submissions
POST/v1/transaction-tracking
POST/v1/transactions/{id}/rejected
GET/v1/zap-balancesSaldo wallet sesi (ETH native = alamat nol), maksimal 100 token jaringan per permintaan.
POST/v1/zap-plansRencana Zap In: token jaringan dikonversi melalui pool kanonik v2/v3 (langsung atau lewat wrapped native/stablecoin), lalu disesuaikan dengan rasio pool tujuan.
POST/v1/zap-out-plans
POST/v1/zap-out-batches
POST/v1/zap-out-contract-plans
POST/v1/zap-in-contract-plans
GET/v1/token-holdingsSemua token ERC-20 milik wallet sesi (pemilih token Zap).
GET/v1/zap-approvalsIzin seluruh koleksi NFT posisi v4 milik wallet sesi ke kontrak Zap BaniPool, beserta transaksi pencabutannya.
GET/v1/zap-receiptsStatus konfirmasi transaksi approval milik sesi, menggunakan RPC server dan cadangannya.
GET/v1/transactions
POST/v1/transactions/{id}/replacement
GET/v1/transactions/{id}
GET/v1/bridge/routesRute bridge Across terverifikasi (Base ↔ Robinhood Chain: ETH, WETH, USDC↔USDG).
POST/v1/bridge/quotesKuota bridge Across: biaya & jumlah diterima dari API Across, divalidasi terhadap SpokePool registry; calldata depositV3 dibangun server dan disimulasikan.
POST/v1/bridge/transfersCatat transaksi deposit yang sudah dikirim wallet.
GET/v1/bridge/transfers50 transfer bridge terakhir milik wallet sesi.
GET/v1/bridge/transfers/{id}Sesi wallet pemilik diperlukan.
POST/v1/swap-routesRute swap halaman /swap (khusus gateway Rust, sesi wallet): token A → B di satu jaringan lewat pool Uniswap v2/v3 terdaftar, langsung atau lewat wrapped native/stablecoin (hasil terbesar).
GET/v1/token-metaSimbol & desimal token ERC-20 dibaca dari kontrak (khusus gateway Rust, sesi wallet; maks.
POST/v1/bridge/estimatesPerkiraan Across untuk rencana swap lintas jaringan (khusus gateway Rust, sesi wallet): tanpa cek saldo, tanpa calldata, tidak disimpan.
POST/v1/me/notifications/email/linkKirim kode verifikasi 6 digit ke alamat email (khusus gateway Rust, sesi wallet; sekali per menit; aktif bila SMTP diatur).
POST/v1/me/notifications/email/verifyVerifikasi kode 6 digit (maks.
POST/v1/me/notifications/email/unlinkLepas email notifikasi.
GET/v1/platform-feeFee platform yang berlaku (publik, khusus gateway Rust), bps (100 = 1%) dikirim ke `recipient` di transaksi yang sama: `swapBps`/`stableBps` dari hasil swap /swap (stableBps untuk stablecoin ↔ stablecoin); `zapBps` dari input Zap In / hasil Zap Out (BaniZapV6); `bridgeBps` dari jumlah bridge di jaringan asal (BaniBridgeV1); `keeperBps` dari fee LP yang di-compound wallet keeper (BaniKeeperV6, maks `maxKeeperBps`, berlaku untuk izin baru).
GET/v1/pool-create/checkCek sebelum membuat pool baru (sesi wallet; Fase H, saat ini Robinhood Chain): urutan token0/token1, simbol & desimal, status terverifikasi, harga USD, apakah pool/pair sudah ada, tick spacing, dan harga pasar pembanding (token1 per token0).
GET/v1/pool-create/detectDeteksi otomatis untuk Buat pool (sesi wallet): jaringan (yang sudah dibuka) tempat kedua alamat adalah token valid, simbol/desimal/harga, dan per protokol daftar fee tier beserta pool yang sudah ada.
GET/v1/pool-create/tokenLangkah pertama Buat pool (sesi wallet): metadata satu token di jaringan yang dibuka dan hasil pemeriksaan keamanan token tanpa pool (nilai A–F, ringkasan, daftar pemeriksaan: peniru, proxy, mint, pajak, owner, dll.).
POST/v1/pool-create/zap-planZap In untuk pool baru (sesi wallet): bayar satu token (token pool, ETH, atau token lain).
POST/v1/pool-create/zap-contract-planZap In pool baru dalam SATU transaksi lewat kontrak BaniZapCreate (sesi wallet): body sama dengan /v1/pool-create/zap-plan ditambah slippageBps, swapSlippageBps, acceptTokenRisk, acceptPriceDeviation.