Integration APIs

CHAINFetch Bucket State

Last updated January 31, 2026

Fetch real-time bucket state directly from the blockchain using the Genesis JavaScript SDK. This returns deposit totals, counts, token allocation, and time conditions.

On-chain fetching requires Umi and the Genesis SDK.

Methods

MethodLaunch TypeDescription
fetchLaunchPoolBucketV2Launch PoolFetch launch pool bucket state
fetchPresaleBucketV2PresaleFetch presale bucket state

Launch Pool Bucket

import { fetchLaunchPoolBucketV2 } from '@metaplex-foundation/genesis';
const bucket = await fetchLaunchPoolBucketV2(umi, launchPoolBucket);
console.log('Total deposits:', bucket.quoteTokenDepositTotal);
console.log('Deposit count:', bucket.depositCount);
console.log('Claim count:', bucket.claimCount);
console.log('Token allocation:', bucket.bucket.baseTokenAllocation);

Presale Bucket

import { fetchPresaleBucketV2 } from '@metaplex-foundation/genesis';
const bucket = await fetchPresaleBucketV2(umi, presaleBucket);
console.log('Total deposits:', bucket.quoteTokenDepositTotal);
console.log('Deposit count:', bucket.depositCount);
console.log('Token allocation:', bucket.bucket.baseTokenAllocation);
console.log('SOL cap:', bucket.allocationQuoteTokenCap);

Time Conditions

Each bucket has four time conditions that control the launch phases:

ConditionPurpose
depositStartConditionWhen deposits open
depositEndConditionWhen deposits close
claimStartConditionWhen claims open
claimEndConditionWhen claims close
const bucket = await fetchLaunchPoolBucketV2(umi, launchPoolBucket);
// Deposit window
const depositStart = bucket.depositStartCondition.time;
const depositEnd = bucket.depositEndCondition.time;
// Claim window
const claimStart = bucket.claimStartCondition.time;
const claimEnd = bucket.claimEndCondition.time;
console.log('Deposit starts:', new Date(Number(depositStart) * 1000));
console.log('Deposit ends:', new Date(Number(depositEnd) * 1000));
console.log('Claims start:', new Date(Number(claimStart) * 1000));
console.log('Claims end:', new Date(Number(claimEnd) * 1000));