Token Balances

ℹ️ We use the term clubs and tokens interchangeably. We will migrate to using tokens in the future.

ℹ️ Queries Lens Chain tokens by default. Include query param chain=base for Base tokens.

Get a wallet's available / vesting balance

Once a token has graduated (ie club.complete && club.liquidityReleasedAt) then the early investors can transfer or sell their tokens according to the vesting schedule:

  • Use club.cliffPercent to determine the % of tokens that early investors purchased are immediately available upon graduation.

  • Use club.liquidityReleasedAt + club.vestingDuration to determine when the vesting schedule is fully complete, at which point 100% of the tokens are available

  • Finally, to show the available / vesting / total balance for a given user address, call the following endpoint with club.tokenAddressand the account

GET https://app.onbons.ai/api/clubs/get-vesting-balance?tokenAddress={club.tokenAddress}&account={account}

The response numbers are formatted with 18 decimals of precision. In this case, the user has 5mil tokens available for trading now, 5mil vesting linearly, and 10mil total tokens purchased.

{
    "availableBalance": "5000000",
    "vestingBalance": "5000000",
    "totalBalance": "10000000"
}

Last updated