Integration recipes
Short, copy-pasteable examples for the most common things integrators and agents do on Kumbaya. All of these are grounded in the actual API and contract surface - no pseudocode.
Building an LLM agent rather than a script? Most of these flows already exist as one-call tools and skills in the Kumbaya Agent Kit - e.g. buying a token (recipe 3) is the
swaptool, and sweeping creator earnings (recipe 4) isclaim_fees+withdraw_tips. Use these recipes when you want the raw calls; use the kit when you want the model to drive.
1. Watch for new launches (live)
Subscribe to the indexer and react as new tokens are deployed.
import { createClient } from 'graphql-ws'
import { WebSocket } from 'ws'
const client = createClient({
url: 'wss://ql.kumbaya.xyz/v1/graphql',
webSocketImpl: WebSocket,
})
const unsubscribe = client.subscribe(
{
query: `
subscription NewLaunches($chainId: Int!) {
FireToken(
where: { chainId: { _eq: $chainId } }
order_by: { createdAt: desc }
limit: 10
) {
address creator createdAt
pool { id }
marketCapUSD graduationProgress
}
}
`,
variables: { chainId: 4326 },
},
{
next: ({ data }) => {
const latest = data?.FireToken?.[0]
if (latest && Date.now() / 1000 - Number(latest.createdAt) < 60) {
console.log('New launch:', latest.address)
// your hook: e.g. evaluate, snipe, post a tweet
}
},
error: console.error,
complete: () => console.log('subscription ended'),
},
)2. "Heating up" - find tokens with rising volume
The indexer tracks 30m/1h/2h-prior buy and sell counts plus velocity ratios. This is exactly how Kumbaya's "Heating up" feed is computed.
3. Buy a launchpad token - quote then swap
Use the Exchange API for routing; submit calldata yourself.
For native ETH ↔ token swaps the API handles wrapping for you. For pre-approved ERC-20 → ERC-20, do the approve once, then run the swap.
4. Sweep your creator earnings
For a graduated launchpad token where you (or an address you control) is the creator:
Run on a schedule (e.g. daily) for any token you've launched.
5. Find every token I created (and what they've earned)
6. Trigger graduation on tokens that are ready
After gracePeriodDuration elapses (read live from FireRegistry.gracePeriodDuration() - see Live registry config), call FireGraduator.graduate(token) to actually finalize.
7. Search-as-you-type token picker
Build a token-picker UI without running your own index:
For full search results (tokens + pools, multiple matches):
Public, no auth, rate-limited per IP.
8. Newest swaps for a pool (REST, no GraphQL)
Where poolId is the address-chainId composite (e.g. 0xabc...-4326).
9. Read protocol-level config live
Don't hardcode tunables. Read on demand:
See Live registry config for the full field list.
10. Build a creator-fee dashboard
Combine indexer + on-chain reads:
FireStream doesn't expose a "preview pending fees" view - to know what the next claimFees would pay out, you'd simulate it (e.g. with eth_call) or just call it and parse the BeneficiaryPaid event from the receipt.
More
Auto-launch a token - full programmatic launch recipe
SIWE auth - get a JWT for the Client API
Live registry config - every tunable + how to read it
Last updated