0Bit Documentation

Read 0Pools balance

GET /pools/{id}/balance - Read your partner-visible balance and entitlement view for an entitled pool.

0Pools API pages are for approved headless partners. They cover the partner-visible quote, transact, status, trade, and balance lifecycle only.

Endpoint

FieldValue
MethodGET
Path/pools/{id}/balance
AreaBalance
Operation idgetBalance
Auth boundarySecret key from your server.

Use it for

Read the partner-visible balance for an entitled pool, plus the entitlement context you transact within: your provisioned tier and the set of pools you are allowed to use (allowedPools). The available boolean tells you whether the pool is usable. When the balance gate is on, balance is your pre-funded fiat balance (a decimal string) you can reconcile against your own ledger; when the gate is off, balance is null. The endpoint requires your secret key and is partner-scoped; a key scoped to another partner, or an id outside your scope, resolves as 404, never 403.

Use this endpoint only for the partner-scoped resource it describes. Store your own reference id, the returned 0Bit object id, the request id, timestamps, and the current values so support and reconciliation do not depend on browser callbacks alone.

This response carries entitlement context, not access state

The balance response includes your tier and allowedPools, but it deliberately does not echo your access status or KYC state. Those never appear as fields here — they surface only as 403 denial codes (pools_not_enabled, pool_access_suspended, kyc_not_approved, pool_not_allowed, key_mode_mismatch). If a pool is usable, you get a balance; if it is not, you get a 403. Branch on the denial code, not on a missing field.

This is your balance, not a liquidity view

This endpoint reports only your own partner-scoped balance. It does not return any liquidity, depth, venue, or reserve numbers, and there is no venues field. Do not infer market liquidity, routing, or settlement internals from it.

Response fields

FieldTypeUse
poolIdstringPool selected by entitlement; join quote, transact, capabilities, and trade records.
pairstringHuman-readable currency pair for display and reconciliation. Do not parse it for machine logic.
availablebooleanWhether the pool is usable. Branch on this boolean, not on a numeric value.
tierstringYour provisioned tier for the pool.
allowedPoolsstring arrayThe pool ids your key is entitled to. Use it to scope which pools you can quote and transact.
balancestring | nullYour partner pre-funded fiat balance as a decimal string when the balance gate is on; null when the gate is off.

When balance is non-null it is the pre-funded fiat balance as a decimal string — keep it as a string and do not convert to floating point for storage or arithmetic. When the balance gate is off, balance is null; treat that as "no pre-funded balance to reconcile" rather than as zero.

Request

curl https://pools-api.0bit.app/v1/pools/EUR-USDT/balance \
  -H "Authorization: Bearer sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

{
  "poolId": "EUR-USDT",
  "pair": "EUR/USDT",
  "available": true,
  "tier": "standard",
  "allowedPools": ["EUR-USDT", "EUR-USDC"],
  "balance": "2000.00"
}

Values shown are fake placeholders. Read the live response for your account; do not copy these into production configuration.

Where to read networks, fees, and limits

Balance does not describe how a pool can be used. For supported delivery networks, allowed sides, fee and spread ceilings, order-size limits, and your dedicated deposit address, read Read pool capabilities. Treat capabilities as the source of truth and refresh it periodically instead of hard-coding values.

Errors

The API returns a unified error envelope with type, code, message, request_id, doc_url, and statusCode. Every response carries an X-Request-Id header. Branch on code, not on the free-form message.

StatustypeNotable code valuesWhat it means
401unauthorizedMissing or invalid secret key. Fix credentials before retrying.
403forbiddenpools_not_enabled, pool_access_suspended, kyc_not_approved, pool_not_allowed, key_mode_mismatchValid key but access is denied. Branch on the denial code.
404not_foundPool not found or not scoped to your account. Cross-tenant reads return 404.
429rate_limitedThrottled. Retry with backoff.
5xxserver_errorServer or upstream failure. Retry bounded with backoff.

Production rules

  • Keep secret keys on your server.
  • Branch on the available boolean to decide whether the pool is usable, and reconcile balance against your own ledger (handling null when the balance gate is off).
  • Drive entitlement from allowedPools; read capabilities for networks, fees, and limits instead of hard-coding them.
  • Treat access and KYC state as 403 denial codes, not as fields on this response.
  • Branch on machine-readable fields, error code, object id, and request id.
  • Treat examples and placeholder ids as fake data only.

Public boundary

This reference covers partner-visible discovery, quote, transact, status, trade, and balance behavior. Liquidity operations, routing internals, provider details, reserve logic, and runbooks are outside the public API contract.

On this page