0Bit Documentation

Check pool balances and availability

For approved 0Pools partners, use partner-safe availability signals without exposing liquidity or treasury internals.

Pool availability tells an approved partner whether a pool-backed path can be used now. It is not a public reserve dashboard and should not expose liquidity sources, balances, treasury operations, or route diagnostics.

Availability is not a balance sheet

Show partner-safe availability and next actions. Do not publish real reserves, provider balances, funding instructions, internal thresholds, or operational runbooks.

Availability path

What to show

Field categoryPublic-safe handling
Pool id or pairShow only values returned for the entitled partner.
AvailabilityUse it to decide whether quoting is possible.
Tier and entitled poolsThe balance view carries the partner's tier and allowedPools. Show only where approved for that partner.
Balance detailThe optional pre-funded balance is nullable; keep generic unless product explicitly approves a partner-specific view.
Unavailable reasonUse broad categories, not internal operational causes.

Balance does not echo access or KYC state

GET /pools/:id/balance returns availability plus the partner's tier and allowedPools (and an optional, nullable pre-funded balance). It does not echo access or KYC status — those surface only as 403 denial codes on a call, not as a field here. Read GET /pools/:id/capabilities for supported networks, fees, and limits instead of inferring them from balance.

Server pattern

async function readPoolAvailability(input: { accountId: string; poolId: string }) {
  const approval = await partnerApprovals.require('0pools_headless_liquidity');
  if (!approval.allowed) return { view: 'use_0gate' };

  const availability = await poolsClient.poolAvailability(input.poolId);

  await poolAvailabilitySnapshots.record({
    accountId: input.accountId,
    poolId: input.poolId,
    available: availability.available,
    checkedAt: new Date().toISOString(),
  });

  return availability.available ? { view: 'can_quote' } : { view: 'pool_unavailable' };
}

UI behavior

AvailabilityUI behavior
AvailableAllow the user or operator to request a quote.
UnavailableShow a fallback, retry later, or route back to 0Gate if appropriate.
UnknownKeep the quote button disabled and ask the backend to refresh.
Approval missingHide 0Pools and use the hosted 0Gate path.

Guardrails

  • Do not show reserve amounts, treasury balances, provider balances, or bank details.
  • Do not expose internal switches, alert thresholds, or operational reason codes.
  • Do not treat availability as a quote. Request a quote before showing executable terms.
  • Do not cache availability so long that users see stale quote options.

On this page