Skip to main content

Reading Creator Fees

Query accrued, claimable, and historical creator fees for any Doppler or Clanker token launched through Bankr — programmatically, on-chain, or from the CLI. For a Bankr Launch v3 (Arc) token, read GET /launch-v3/:tokenAddress/fees?account=0x… instead.

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 web app and the bankr fees CLI call these same 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 5 minutes.

Request

curl "https://api.bankr.bot/token-launches/0xTokenAddress/fees?days=30"

days is optional (default 30, max 90) and controls the dailyEarnings window. The older GET /public/doppler/token-fees/:tokenAddress path returns the same response but is deprecated. The response schema — per-token claimable / claimed amounts, share, poolId and initializer, a dailyEarnings series and lifetime totals — is in the Check fees reference.

The initializer is the Fees Manager contract for this token's pool — the same address you'd call collectFees(poolId) on. When a token entry also carries feesContract (a quote-only fees launch, whose creator position lives on the hook), use that address instead. Each token entry also names its launch chain. Both initializer and poolId are stable once a pool is deployed, so cache them.

Claimable fees for a specific beneficiary​

Cheap single-address lookup, read live from the chain. 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 was set as the creator beneficiary at launch, with aggregated totals and unified daily timeline. A position transferred to the address later doesn't appear here — check it per token with the claimable-fees lookup above.

Request

curl "https://api.bankr.bot/public/doppler/creator-fees/0xYourAddress?days=30"

The response has the same shape as 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. poolId is in the deploy response; both come back from every call to GET /token-launches/:tokenAddress/fees.


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.

Each transaction names its chainId; the signing wallet needs a little native gas on that chain. See Claiming Fees for the gas-sponsorship rules across all claim paths.


Caching & rate limits​

  • Server-side cache: 5 minutes per (address, days) or (tokenAddress, days) pair
  • The /public/doppler/* endpoints allow 20 requests per minute per IP and answer 429 beyond that; poll at most every 30s per token
  • poolId and initializer never change once a pool is deployed; cache them client-side