The Pools API uses a generic proxy pattern to route requests to BCReader. The IBEx.Fi API provides a transparent proxy endpoint that forwards requests to the BCReader API, which handles the actual pool queries.
The proxy endpoints are:
:verb is pools or pools/:address)For pools, you call:
/api/v1.1/pools/api/v1.1/pools/:addressAAVE_SUPPLY and AAVE_WITHDRAW operations to deposit and withdraw from poolsUse this endpoint to retrieve the list of active pools (liquidity protocols) available on a specific blockchain. This routes through the generic proxy to BCReader's /api/v1.1/pools endpoint.
Endpoint : GET /v1.1/bcreader/pools (via generic proxy GET /v1.1/bcreader/:verb)
Headers :
Authorization: Bearer <access_token> (required)X-Blockchain-Id: <chainId> (required) : Target blockchain IDRequest Example :
GET /v1.1/bcreader/pools Authorization: Bearer <access_token> X-Blockchain-Id: 421614
Response (200 OK) :
[
{
"id": 1,
"blockchainId": "421614",
"provider": "AAVE",
"poolAddress": "0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951",
"addressesProvider": "0x012bAC54348C0E635dCAc9D5FB99f06F24136C9A",
"metadata": {
"network": "arbitrum-sepolia",
"version": "v3"
},
"active": true,
"supplyToken": {
"address": "0xEURE12345678901234567890123456789012345678",
"symbol": "EURE",
"name": "Monerium EUR emoney",
"decimals": 18
},
"borrowToken": {
"address": "0xEURE12345678901234567890123456789012345678",
"symbol": "EURE",
"name": "Monerium EUR emoney",
"decimals": 18
},
"poolToken": {
"address": "0xaEURE12345678901234567890123456789012345678",
"symbol": "aEURE",
"name": "Aave Token EURE",
"decimals": 18
}
}
]
X-Blockchain-Id header is required to specify which blockchain to query. You can also use the query parameter ?blockchainId=<id> as an alternative.
Use this endpoint to retrieve pool balances, yields, and performance metrics for a specific wallet address. This shows how much the user has deposited in each pool and the gains they've earned. This routes through the generic proxy to BCReader's /api/v1.1/pools/:address endpoint.
Endpoint : GET /v1.1/bcreader/pools/:address (via generic proxy GET /v1.1/bcreader/:verb)
Headers :
Authorization: Bearer <access_token> (required)X-Blockchain-Id: <chainId> (required) : Target blockchain IDQuery Parameters :
includeZero (boolean, optional, default: false) : Include pools with zero balanceRequest Example :
GET /v1.1/bcreader/pools/0xd676c6188195372EC269E9C2cAf815C56436A679?includeZero=false Authorization: Bearer <access_token> X-Blockchain-Id: 421614
Response (200 OK) :
{
"timestamp": "2025-06-02T13:30:45Z",
"blockchainId": "421614",
"address": "0xd676c6188195372EC269E9C2cAf815C56436A679",
"pools": [
{
"provider": "AAVE",
"items": [
{
"tokenAddress": "0xEURE12345678901234567890123456789012345678",
"symbol": "EURE",
"decimals": 18,
"baseBalance": "100.0000",
"currentBalance": "101.2345",
"gain": "1.2345",
"gainPct": 0.0123,
"method": "ATOKEN_INDEX",
"apr": 0.0456,
"apy": 0.0467
}
]
}
]
}
404 Not Found error is returned. The response includes performance metrics like APR (Annual Percentage Rate) and APY (Annual Percentage Yield) for each pool position.
To deposit tokens into a pool (e.g., AAVE), use the AAVE_SUPPLY operation type in a Safe operation.
Endpoint : POST /v1.1/safes/operations
Request Body :
{
"safeAddress": "0xd676c6188195372EC269E9C2cAf815C56436A679",
"chainId": 421614,
"signerId": "signer_id",
"operations": [
{
"type": "AAVE_SUPPLY",
"amount": "100.0",
"assetTicker": "EURE"
}
]
}
Alternative (using tokenAddress) :
{
"safeAddress": "0xd676c6188195372EC269E9C2cAf815C56436A679",
"chainId": 421614,
"signerId": "signer_id",
"operations": [
{
"type": "AAVE_SUPPLY",
"amount": "100.0",
"tokenAddress": "0xEURE12345678901234567890123456789012345678",
"decimals": 18,
"referralCode": 12345
}
]
}
/config/pools endpoint. You can optionally provide poolAddress to override the automatic resolution. The referralCode parameter (0-65535) is optional and used for AAVE referral programs.
To withdraw tokens from a pool (e.g., AAVE), use the AAVE_WITHDRAW operation type in a Safe operation.
Endpoint : POST /v1.1/safes/operations
Request Body :
{
"safeAddress": "0xd676c6188195372EC269E9C2cAf815C56436A679",
"chainId": 421614,
"signerId": "signer_id",
"operations": [
{
"type": "AAVE_WITHDRAW",
"amount": "50.0",
"assetTicker": "EURE"
}
]
}
Alternative (using tokenAddress) :
{
"safeAddress": "0xd676c6188195372EC269E9C2cAf815C56436A679",
"chainId": 421614,
"signerId": "signer_id",
"operations": [
{
"type": "AAVE_WITHDRAW",
"amount": "50.0",
"tokenAddress": "0xEURE12345678901234567890123456789012345678",
"decimals": 18
}
]
}
/config/pools endpoint. You can optionally provide poolAddress to override the automatic resolution.
Here's a complete example of the pools flow:
// Step 1: List available pools
const poolsResponse = await fetch('https://api.ibex.fi/v1.1/bcreader/pools', {
headers: {
'Authorization': `Bearer ${accessToken}`,
'X-Blockchain-Id': '421614'
}
});
const pools = await poolsResponse.json();
// [{ id: 1, provider: "AAVE", poolAddress: "0x...", ... }]
// Step 2: Check user's pool balances
const balancesResponse = await fetch('https://api.ibex.fi/v1.1/bcreader/pools/0xd676c6188195372EC269E9C2cAf815C56436A679', {
headers: {
'Authorization': `Bearer ${accessToken}`,
'X-Blockchain-Id': '421614'
}
});
const balances = await balancesResponse.json();
// { pools: [{ provider: "AAVE", items: [{ symbol: "EURE", currentBalance: "101.2345", gain: "1.2345", apr: 0.0456 }] }] }
// Step 3: Deposit to pool (AAVE_SUPPLY)
const supplyResponse = await fetch('https://api.ibex.fi/v1.1/safes/operations', {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
safeAddress: '0xd676c6188195372EC269E9C2cAf815C56436A679',
chainId: 421614,
signerId: 'signer_id',
operations: [{
type: 'AAVE_SUPPLY',
amount: '100.0',
assetTicker: 'EURE'
}]
})
});
const supplyResult = await supplyResponse.json();
// { credentialRequestOptions: {...}, ... }
// Step 4: Sign and finalize (PUT /v1.1/safes/operations)
// ... (same as other operations)
// Step 5: Withdraw from pool (AAVE_WITHDRAW)
const withdrawResponse = await fetch('https://api.ibex.fi/v1.1/safes/operations', {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
safeAddress: '0xd676c6188195372EC269E9C2cAf815C56436A679',
chainId: 421614,
signerId: 'signer_id',
operations: [{
type: 'AAVE_WITHDRAW',
amount: '50.0',
assetTicker: 'EURE'
}]
})
});
const withdrawResult = await withdrawResponse.json();
// { credentialRequestOptions: {...}, ... }
X-Blockchain-Id header is required for pool queriesThis section provides detailed technical information for AI systems integrating the IBEX pools flow, including architecture patterns, data models, and implementation details.
Generic Proxy Pattern
GET /v1.1/bcreader/:verb and POST /v1.1/bcreader/:verb:verb is pools or pools/:address, so you call GET /v1.1/bcreader/pools or GET /v1.1/bcreader/pools/:addressGET /v1.1/bcreader/pools
GET /v1.1/bcreader/:verb with verb=poolsGET /api/v1.1/poolsX-Blockchain-Id header or ?blockchainId= query parameter (required, forwarded to BCReader)WatchedPool objects (as returned by BCReader)id, blockchainId, provider, poolAddress, addressesProvider, metadata, active, supplyToken, borrowToken, poolTokenGET /v1.1/bcreader/pools/:address
GET /v1.1/bcreader/:verb with verb=pools/:addressGET /api/v1.1/pools/:addressX-Blockchain-Id header or ?blockchainId= query parameter (required, forwarded to BCReader)includeZero (boolean, optional, forwarded to BCReader)timestamp, blockchainId, address, and pools array (as returned by BCReader)tokenAddress, symbol, decimals, baseBalance, currentBalance, gain, gainPct, method, apr, apyAAVE_SUPPLY Operation
AAVE_SUPPLYamount (string, required): Amount to deposit (human-readable format)assetTicker (string, optional): Token symbol (e.g., "EURE")tokenAddress (string, optional): Token contract address (0x...)decimals (number, optional): Token decimals (required if using tokenAddress)referralCode (number, optional): AAVE referral code (0-65535)poolAddress (string, optional): Override automatic pool resolution/config/pools for the selected chainsupply() functionAAVE_WITHDRAW Operation
AAVE_WITHDRAWamount (string, required): Amount to withdraw (human-readable format)assetTicker (string, optional): Token symbol (e.g., "EURE")tokenAddress (string, optional): Token contract address (0x...)decimals (number, optional): Token decimals (required if using tokenAddress)poolAddress (string, optional): Override automatic pool resolution/config/pools for the selected chainwithdraw() functionWatchedPool (from GET /v1.1/bcreader/pools):
{
"id": number,
"blockchainId": "string",
"provider": "string (e.g., 'AAVE')",
"poolAddress": "string (0x...)",
"addressesProvider": "string (0x...)",
"metadata": {
"network": "string",
"version": "string"
},
"active": boolean,
"supplyToken": {
"address": "string (0x...)",
"symbol": "string",
"name": "string",
"decimals": number
},
"borrowToken": {
"address": "string (0x...)",
"symbol": "string",
"name": "string",
"decimals": number
},
"poolToken": {
"address": "string (0x...)",
"symbol": "string",
"name": "string",
"decimals": number
}
}
Pool Balances (from GET /v1.1/bcreader/pools/:address):
{
"timestamp": "ISO-8601 timestamp",
"blockchainId": "string",
"address": "string (0x...)",
"pools": [
{
"provider": "string",
"items": [
{
"tokenAddress": "string (0x...)",
"symbol": "string",
"decimals": number,
"baseBalance": "string (human-readable)",
"currentBalance": "string (human-readable)",
"gain": "string (human-readable)",
"gainPct": number,
"method": "string",
"apr": number,
"apy": number
}
]
}
]
}
src/routes/v1.2/bcreader.ts : Generic proxy endpoints (GET /v1.1/bcreader/:verb, POST /v1.1/bcreader/:verb)src/clients/BCReader.ts : BCReader API client (handles actual BCReader communication)src/routes/v1/safesOperations.ts : AAVE_SUPPLY and AAVE_WITHDRAW operation handlersdocs/BCREADER_ENDPOINTS_v1.1.en.md : Complete BCReader API documentationGET /v1.1/bcreader/pools with X-Blockchain-Id headerGET /v1.1/bcreader/:verb where verb=poolsGET /v1.1/bcreader/pools/:address with X-Blockchain-Id headerPOST /v1.1/safes/operations with AAVE_SUPPLY operation/config/poolssupply() callPOST /v1.1/safes/operations with AAVE_WITHDRAW operation/config/poolswithdraw() call