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

Building transactions

The quote → plan → sign → tracking flow used by the site, also available to your app. The server never signs or broadcasts transactions.

Flow

  • 1. POST /v1/quotes (header Idempotency-Key 8–128 characters): the server reads on-chain state, computes output, minimum and costs, then simulates the final transaction from your wallet.
  • 2. If requiresApproval, send the approvals transactions (approval for the transaction amount) and request the quote again.
  • 3. POST /v1/transaction-plans with quoteId → unsigned transaction { id, to, data, value }.
  • 4. Sign & send from the wallet, then report the hash: POST /v1/transactions/:id/submissions.
  • 5. Watch GET /v1/transactions/:id (submitted → confirmed → finalized / failed) or receive the SSE/webhook event transaction.finalized.

Example: swap ETH → USDC on Base

ts
import { createWalletClient, http } from 'viem';
import { base } from 'viem/chains';
import { privateKeyToAccount } from 'viem/accounts';

const API = 'https://banipool.com/api/v1';
const ETH = '0x0000000000000000000000000000000000000000';
const USDC = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913';
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);
const wallet = createWalletClient({ account, chain: base, transport: http() });
const auth = { authorization: `Bearer ${process.env.BANIPOOL_SESSION}`, 'content-type': 'application/json' };

// Rute terbaik (1–2 langkah)
const route = await fetch(`${API}/swap-routes`, { method: 'POST', headers: auth,
  body: JSON.stringify({ chainRef: 'eip155:8453', tokenIn: ETH, tokenOut: USDC, amountIn: '1000000000000000' }) }).then((r) => r.json());
const [first, second] = route.data.steps;

// Quote (disimulasikan di mainnet dari wallet Anda)
const quote = await fetch(`${API}/quotes`, { method: 'POST',
  headers: { ...auth, 'idempotency-key': crypto.randomUUID() },
  body: JSON.stringify({ action: 'swap', deploymentId: first.deploymentId, poolAddress: first.poolAddress,
    tokenIn: ETH, amountIn: '1000000000000000', unwrapNative: false, slippageBps: 100,
    ...(second ? { viaDeploymentId: second.deploymentId, viaPoolAddress: second.poolAddress } : {}) }) }).then((r) => r.json());
console.log('minimum:', quote.data.swap.minOut, 'fee platform:', quote.data.platformFee);

// Plan → tanda tangan → laporkan hash
const plan = await fetch(`${API}/transaction-plans`, { method: 'POST', headers: auth,
  body: JSON.stringify({ quoteId: quote.data.id }) }).then((r) => r.json());
const hash = await wallet.sendTransaction({ to: plan.data.to, data: plan.data.data, value: BigInt(plan.data.value) });
await fetch(`${API}/transactions/${plan.data.id}/submissions`, { method: 'POST', headers: auth, body: JSON.stringify({ txHash: hash }) });

Always show the minimum output, costs and contract address to users before signing. Never put private keys in frontend code.

Supported actions

ActionDescription
swapSwap tokens through a pool (1–2 hops in one transaction).
mint / addOpen a new position or add liquidity to a position.
mint + createPoolCreate a new pool together with its first liquidity (createPool: true, initialPrice = token1 per token0; v4 also tickSpacing). Check first with GET /v1/pool-create/check. Zap In (pay with one token): get a plan from POST /v1/pool-create/zap-plan, run each swap step, then mint with the output.
remove / claimWithdraw liquidity (partial/full) or claim fees.
compound / rebalanceAdd fees back to the position, or move to a new range.
stake / unstakeAerodrome: stake the position in a gauge for rewards.

Zap uses dedicated plan endpoints: POST /v1/zap-in-contract-plans and POST /v1/zap-out-contract-plans (one transaction through the BaniZap contract); the response contains approvals, call, the minimum output and platformFee.

Bridging via the API

bash
# Rute tersedia
curl -s https://banipool.com/api/v1/bridge/routes | jq '.data[] | {symbol, fromChainRef, toChainRef}'

# Kuota (sesi wallet; Idempotency-Key wajib) → transaction + approvals
curl -s -X POST https://banipool.com/api/v1/bridge/quotes \
  -H "authorization: Bearer $BANIPOOL_SESSION" -H "idempotency-key: $(uuidgen)" \
  -H "content-type: application/json" \
  -d '{"fromChainRef":"eip155:8453","toChainRef":"eip155:1","symbol":"USDC","amount":"5000000"}'

# Setelah transaksi dikirim: daftarkan untuk dilacak sampai completed
curl -s -X POST https://banipool.com/api/v1/bridge/transfers -H "authorization: Bearer $BANIPOOL_SESSION" \
  -H "content-type: application/json" -d '{"quoteId":"<id kuota>","txHash":"0x…"}'