Skip to main content

Launch API

Bankr's Launch API is the HTTP API behind the Launch SDK's reads, at https://api.bankr.bot. With it you can list the launches on your launchpad, read a launchpad's or a builder's stats, read what an account has earned in fees, and build unsigned claims. Call it from any language, or let the SDK call it for you.

It never sends a transaction for you. It returns data and unsigned transactions, and your users' wallets sign and send them. Reads need no API key.

curl "https://api.bankr.bot/launches?chain=base&visibility=all&limit=5"

The OpenAPI spec describes every endpoint.

The endpoints come in four groups:

  • Index. List and read every launch on every launchpad, register a launch you just sent, and read a launchpad's stats and a builder's profile and stats. A builder is a public profile for an app or a team.
  • Fees. Read what an account can claim, and build unsigned transactions that claim it or hand a share to another wallet.
  • Quote tokens. List the tokens a coin can trade against on a chain.
  • Builders. Create your builder profile, the public name Bankr credits your launches to, and manage its wallets and builder codes.

Registering and setting up your own launchpad is not an API call. It happens on-chain, from your own wallet or Safe. Set up a launchpad walks through it. Launching is not an API call either: the SDK builds each launch from the chain. Bankr indexes every launch on your launchpad, with nothing for you to set up.

What needs a key​

RequestKey
Index reads, register, quote tokens, fee reads and fee buildersNone
Create or change a builder profile, its wallets or its codesA read-write account key

A key is a Bankr account API key, bk_usr_…, from bankr.bot/api-keys. A read-only key gets 403 API_KEY_READ_ONLY on a builder write.

  • Send the key in the X-API-Key header: X-API-Key: bk_usr_….
  • Authorization: Bearer bk_usr_… works too, with Bearer spelled exactly that way. When both headers are sent, X-API-Key is used.
  • Keys belong on servers. Never ship one to a browser.

From a browser​

  • Index reads, quote tokens, register and the fee routes answer requests from any origin, so a web page can call them directly.
  • Builder writes send no CORS headers. Send them from a server.

Limits​

EndpointsLimit
POST /launches/register30 per minute per IP
Index reads: GET /launches, GET /launches/{chain}/{token}, GET /launchpads/{chain}/{id}/stats, GET /builders/{slug}, GET /builders/{slug}/launches120 per minute per IP, shared by all five
Builder writes30 per minute per IP
Fee routes: GET /bankr-v4/{token}/fees, GET /bankr-v4/accounts/{account}/fees and the fee builders60 per minute per IP, shared
GET /bankr-v4/quotesNone of its own. Answers can be up to 30 seconds old
  • Past a limit, the answer is 429 with Retry-After in seconds. Limited routes also send RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset on every answer.
  • Index reads are marked cacheable for 10 seconds (Cache-Control: public, max-age=10), so poll no faster than that.
  • Account fee reads can be up to 15 seconds old.

Errors and conventions​

Every error these endpoints send is JSON:

{
"error": "No mined transaction with that hash on this chain.",
"code": "TX_NOT_FOUND"
}
  • error is a message written for people. Show it, but never branch on it.
  • code is stable, so branch on it where it is present. Without a code, branch on the status.
  • details appears only when the request failed validation, with one { code, message, path } entry per problem.
  • A 5xx answer never carries internal detail.

In the SDK, a 429 becomes RATE_LIMITED, with the wait on err.cause.retryAfterSeconds. A 503 with code INDEX_UNAVAILABLE becomes INDEX_UNAVAILABLE. Any other failure becomes API_ERROR. In each case Bankr's status, code and message ride on err.cause, a BankrApiResponseError:

// bankr-reason.ts
import { BankrApiResponseError, isLaunchSdkError } from "@bankr/launch-sdk";

export function bankrReason(err: unknown): string | null {
if (!isLaunchSdkError(err) || !(err.cause instanceof BankrApiResponseError)) {
return null;
}
// e.g. "API_ERROR: 409 NOT_CONFIRMED"
return `${err.code}: ${err.cause.status} ${err.cause.code ?? "(no code)"}`;
}

Conventions across the API:

  • Chains. A chain is named as in the SDK, such as base. The fee routes that take chainId take the chain's id, such as 8453.
  • Large integers are decimal strings. Token amounts are in the token's base units, as in "amount": "10000000000000000", and a launchpad id is a string too, as in "launchpadId": "7".
  • Fee rates and shares. Fields named …Pips are fee rates in pips, where 1,000,000 is 100%. Fields named bps or …Bps are shares in bps, where 10,000 is 100%.
  • Paging. GET /launches and GET /builders/{slug}/launches return { launches, nextCursor }. Pass nextCursor back as cursor, unchanged, until it is null. limit is 1 to 100, default 20.
  • A chain whose index is behind. The account fee routes, launchpad stats, and a launch list that asks only for that chain's Bankr Hook launches answer 503 with code INDEX_UNAVAILABLE. Any other launch list answers without that chain's Bankr Hook launches and names the chains it left out in incomplete. Retry shortly. In the SDK, client.index.all throws INDEX_UNAVAILABLE on an incomplete page unless you pass onIncomplete. Reading launches has the detail.
  • Hidden launches. Lists default to visibility=listed. Launches made with the SDK are hidden by default, so pass visibility=all to include them. A launch read by its token address is returned either way.
  • Credit. Reads default to attribution=verified, so a builder credited only by a builder code shows only with attribution=all. Reading launches explains the credit fields.
  • Unknown fields. Request bodies refuse fields they don't know, with a 400. Responses can gain fields in any release, so ignore the ones you don't know.

Endpoints​

The base URL is https://api.bankr.bot. Each link opens the endpoint's own page, with every parameter, response and error.

Index​

EndpointKeyIn the SDK
GET /launches: every indexed launch, newest first, by chain, builder, launcher, code, provider or launchpadNoneclient.index.launches(), or createBankrApi().launches() across chains
GET /launches/{chain}/{token}: one launch, hidden or notNoneclient.index.launch(token)
POST /launches/register: index a launch at 5 confirmations, ahead of the indexerNoneclient.index.register(txHash). With api set, client.launch() calls it
GET /launchpads/{chain}/{id}/stats: one launchpad's launch count and 24-hour volumeNoneclient.index.launchpadStats(id)
GET /builders/{slug}: a builder's profile and launch statsNoneclient.index.builder(slug)
GET /builders/{slug}/launches: the launches credited to one builderNoneclient.index.launches({ builder }), through GET /launches

Fees​

EndpointKeyIn the SDK
GET /bankr-v4/accounts/{account}/fees?chainId=: everything an account is owed on a chain, across every launchNoneclient.fees.getOwed(account)
POST /bankr-v4/accounts/{account}/fees/build-claim-all: the unsigned transactions that claim all of it, usually oneNoneclient.fees.buildClaimAll(account)
GET /bankr-v4/{token}/fees?account=: an account's share of a launch's creator fees, and what it can claim nowNoneclient.fees.get(token, account)
POST /bankr-v4/{token}/fees/build-claim: an unsigned claim for that accountNoneclient.fees.buildClaim(token, account)
POST /bankr-v4/{token}/recipient/build: an unsigned transaction that hands the account's share to a new walletNoneclient.fees.buildSetFeeRecipient(token, account, newRecipient)

The single-launch routes find a launch by its token address, once it is in the index. They answer 404 for a token the index does not hold, while the SDK reads the chain directly. The single-launch routes and the claim-all build cover Base, Robinhood Chain, Arbitrum and Arc. On Ethereum and BNB Chain, use the SDK calls beside them. Fees and rewards explains who claims what.

Quote tokens​

EndpointKeyIn the SDK
GET /bankr-v4/quotes?chain=: the quote tokens Bankr lists on a chainNoneclient.contracts().settings.quotes(), read from the chain

Builders​

EndpointKey
POST /builders: create your builder profileRead-write account key
PATCH /builders/{slug}: change its name, description or websiteRead-write account key
POST /builders/{slug}/wallets: add a wallet you proved you controlRead-write account key
DELETE /builders/{slug}/wallets/{chain}/{address}: remove a walletRead-write account key
POST /builders/{slug}/codes: register a builder codeRead-write account key
DELETE /builders/{slug}/codes/{code}: release a builder codeRead-write account key

An account has one builder, and its slug never changes. Builder writes come from a server, never a browser. The SDK does not manage builders.

For AI tools​