Balances & rates

Read your organization's balances and quote conversion rates.

Get balances

GET /v1/balances — Scope: balances:read

Returns your organization's balance for each asset it holds — the available amount you can pay out and the held amount reserved by in-flight payouts. Takes no parameters.

Request

bash
curl https://api.caiboglobal.com/v1/balances \
  -H "X-API-Key: $CAIBO_API_KEY"

Response — 200 OK

json
{
  "object": "list",
  "data": [
    { "asset": "USDC", "available": "1200.00", "held": "25.00" },
    { "asset": "USDT", "available": "0", "held": "0" }
  ]
}
FieldTypeDescription
assetstringThe asset, e.g. USDC.
availablestringDecimal amount available to pay out.
heldstringDecimal amount reserved by payouts that are in flight.

Errors

HTTPtypecodeWhen
401authentication_errorapi_key_missing / api_key_invalidNo key, or an unknown/revoked key.
403permission_errorscope_insufficientThe key lacks balances:read.
429rate_limit_errorrate_limitedToo many requests.

Get a rate

GET /v1/rates — Scope: balances:read

Returns the current conversion quote for a currency pair, including the effective rate (after spread) and the amount you'd receive for a given input amount. This is a read-only quote — it creates nothing.

Query parameters

ParameterTypeRequiredDescription
from_currency_idstringYesThe source currency's internal id.
to_currency_idstringYesThe target currency's internal id.
amountstringNoDecimal input amount to convert. Defaults to 0.
from_currency_id and to_currency_id are internal currency identifiers. There is no currency-listing endpoint on v1 today; if you need the ids for your configured pairs, contact support.

Request

bash
curl "https://api.caiboglobal.com/v1/rates?from_currency_id=cur_cad&to_currency_id=cur_usdc&amount=100" \
  -H "X-API-Key: $CAIBO_API_KEY"

Response — 200 OK

json
{
  "object": "rate",
  "rate": "0.735",
  "effective_rate": "0.72765",
  "fee": "0.50",
  "amount_in": "100",
  "amount_out": "72.401175"
}
FieldTypeDescription
ratestringThe base conversion rate.
effective_ratestringThe rate after applying the spread.
feestringThe flat fee subtracted from the input before conversion.
amount_instringThe input amount you supplied.
amount_outstringThe resulting amount: max(0, amount_in − fee) × effective_rate.

Errors

HTTPtypecodeWhen
400invalid_request_errorbad_requestMissing from_currency_id/to_currency_id, or an invalid amount.
401authentication_errorapi_key_missing / api_key_invalidNo key, or an unknown/revoked key.
403permission_errorscope_insufficientThe key lacks balances:read.
404invalid_request_errornot_foundNo active rate exists for the pair.
429rate_limit_errorrate_limitedToo many requests.