Reading Creator Fees
Query accrued, claimable, and historical creator fees for any Bankr-launched token — programmatically, on-chain, or from the CLI.
All reads are unauthenticated — no partner key or API key required. Use these endpoints to build your own dashboards, trigger claims from an agent, or track earnings across multiple wallets.
REST API
The bankr.bot/launches/ web UI and bankr fees CLI both call these public endpoints. Base URL: https://api.bankr.bot.
Fee data for a token
Per-token claimable and claimed fees, daily earnings for charts, and lifetime totals. Cached server-side for 2 minutes.
Request
curl "https://api.bankr.bot/public/doppler/token-fees/0xTokenAddress?days=30"
days is optional (default 30, max 90) and controls the dailyEarnings window.
Response
{
"address": "0x87be4da49869fd055d5a60cac2a6dc61fdd3052d",
"chain": "base",
"days": 30,
"tokens": [
{
"tokenAddress": "0x1234...5678",
"name": "My Token",
"symbol": "MTK",
"poolId": "0xabcd...1234",
"initializer": "0xFeesManager...",
"share": "57.00%",
"token0Label": "WETH",
"token1Label": "MTK",
"claimable": { "token0": "0.0042", "token1": "125000.0000" },
"claimed": { "token0": "0.1234", "token1": "500000.0000", "count": 3 },
"source": "doppler"
}
],
"dailyEarnings": [
{ "date": "2026-04-14", "weth": "0.0012" },
{ "date": "2026-04-15", "weth": "0.0031" }
],
"lifetimeEarnedWeth": "1.2345",
"lifetimeDays": 42,
"lifetimeBestDay": { "date": "2026-03-22", "weth": "0.0891" },
"totals": { "claimableWeth": "0.0042", "claimedWeth": "0.1234", "claimCount": 3 }
}
The initializer is the Fees Manager contract for this token's pool — the same address you'd call collectFees(poolId) on. Both initializer and poolId are stable once a pool is deployed, so cache them.
Claimable fees for a specific beneficiary
Cheap single-address lookup — one on-chain read. Use this to gate a "Claim" button in your UI.
Request
curl "https://api.bankr.bot/public/doppler/claimable-fees/0xTokenAddress?beneficiary=0xYourAddress"
Response (eligible)
{
"eligible": true,
"tokenAddress": "0x1234...5678",
"share": "57.00%",
"claimableFees": {
"token0": "0.0042",
"token1": "125000.0000",
"token0Label": "WETH",
"token1Label": "MTK"
}
}
Response (not eligible)
{ "eligible": false, "tokenAddress": "0x1234...5678" }
All tokens for a creator
Returns every Doppler and Clanker token where the address is a creator beneficiary, with aggregated totals and unified daily timeline.
Request
curl "https://api.bankr.bot/public/doppler/creator-fees/0xYourAddress?days=30"
Response shape matches Fee data for a token above, but tokens[] contains one entry per token the address creates, and dailyEarnings/totals are summed across all of them.
On-chain reads
If you want to skip the API entirely, all claimable amounts are live on-chain. Each pool has a Fees Manager contract (the initializer address returned by the API). The formula:
claimable = (currentCumulatedFees + uncollectedInPool - lastCumulatedFeesForBeneficiary) × shares / 1e18
ABI (subset)
function getShares(bytes32 poolId, address beneficiary) view returns (uint256);
function getCumulatedFees0(bytes32 poolId) view returns (uint256);
function getCumulatedFees1(bytes32 poolId) view returns (uint256);
function getLastCumulatedFees0(bytes32 poolId, address beneficiary) view returns (uint256);
function getLastCumulatedFees1(bytes32 poolId, address beneficiary) view returns (uint256);
function collectFees(bytes32 poolId) returns (uint256 fees0, uint256 fees1);
function updateBeneficiary(bytes32 poolId, address newBeneficiary);
collectFees is used by claim flows. updateBeneficiary is used by transfer flows.
viem example
import { createPublicClient, http } from "viem";
import { base } from "viem/chains";
const client = createPublicClient({ chain: base, transport: http() });
// Resolve `initializer` + `poolId` from the token-fees API (or the deploy response)
const [cumulated, lastClaimed, shares, sim] = await Promise.all([
client.readContract({
address: initializer,
abi,
functionName: "getCumulatedFees1",
args: [poolId],
}),
client.readContract({
address: initializer,
abi,
functionName: "getLastCumulatedFees1",
args: [poolId, beneficiary],
}),
client.readContract({
address: initializer,
abi,
functionName: "getShares",
args: [poolId, beneficiary],
}),
client.simulateContract({
address: initializer,
abi,
functionName: "collectFees",
args: [poolId],
account: beneficiary,
}),
]);
const [uncollected0, uncollected1] = sim.result;
const claimableWeth =
((cumulated + uncollected1 - lastClaimed) * shares) / 10n ** 18n;
The poolId and initializer for a token never change, so you can cache them once and re-use them forever. Both are returned in every deploy response and every call to GET /public/doppler/token-fees/:tokenAddress.
CLI
The Bankr CLI wraps the same REST endpoints with a terminal dashboard:
bankr fees # All tokens for your account
bankr fees --token 0xTokenAddress # Fees for a single token
bankr fees --days 7 # Last 7 days
bankr fees --json # Raw JSON — pipe into jq / scripts
See the CLI reference for full options.
Building claim transactions (no private key needed)
If you hold the private key yourself (e.g. an agent wallet or multisig signer), build unsigned claim transactions via:
Request
curl -X POST https://api.bankr.bot/public/doppler/build-claim \
-H "Content-Type: application/json" \
-d '{
"beneficiaryAddress": "0xYourAddress",
"tokenAddresses": ["0xTokenAddress"]
}'
Up to 50 token addresses per request. No auth — the signing wallet's private key is the authorization.
Response
{
"transactions": [
{
"tokenAddress": "0x1234...5678",
"tokenName": "My Token",
"tokenSymbol": "MTK",
"to": "0xFeesManagerAddress...",
"data": "0xabcdef...",
"chainId": 8453,
"gasEstimate": "390000",
"maxFeePerGas": "100000000",
"maxPriorityFeePerGas": "1000000",
"description": "Collect fees for MTK"
}
],
"errors": []
}
Sign each transaction with the beneficiary's key and broadcast. gasEstimate already includes a 30% buffer. Per-token errors (e.g. "Address is not a beneficiary for this pool") come back in the errors[] array — successful transactions still return alongside them.
The signing wallet must hold ETH on Base to pay gas. See Claiming Fees for the gas-sponsorship rules across all claim paths.
Caching & rate limits
- Server-side cache: 2 minutes per
(address, days)or(tokenAddress, days)pair - No rate limits on public read endpoints currently, but be polite — poll at most every 30s per token
poolIdandinitializernever change once a pool is deployed; cache them client-side