API Reference
API Reference
Overview
The Bondify API provides programmatic access to all protocol data including CBR pools, SLF metrics, and Looper positions. All endpoints return JSON responses with consistent error handling.
Base URL: https://api.bondify.finance
CBR Pools List
Endpoint:
GET /cbr/list
Description: Retrieves information for all CBR pools. Data can be obtained from both API and smart contracts.
API:
${BASE}/cbr/list
returns complete informationSmart Contracts:
CBR::collateralTokens()
- Get allowed deposit token typesCBR::supplies()
- Get current pool information
Example Request:
curl -X GET "${BASE}/cbr/list"
Response Fields:
name: Pool name
id: Pool identifier
order_weight: Sorting weight (higher values appear first)
collateral: Collateral asset information
name: Collateral asset name
address: Smart contract address
oracle: Oracle contract address
price: Current asset price
risk: Risk thresholds
low_bar: Risk low threshold (e.g., 0.5 = 50%)
mid_bar: Risk medium threshold
high_bar: Risk high threshold
yt: Yield Token information
presents: Whether YT is available (if false, other fields return 0)
earn: Annual yield rate
cost_down: Cost reduction rate
extra_earn: Additional yield rate
points_mul: Points multiplier
leverage: Leverage ratio
looper: Looper strategy information
presents: Whether Looper is available (if false, other fields return 0)
earn: Annual yield rate
earn_target: Target annual yield rate
earn_increase: Yield rate increase
stability_fee: Stability fee rate
max_leverage: Maximum leverage ratio
ltv: Loan-to-Value ratio
liq_ltv: Liquidation LTV
liq_limit: Liquidation ratio limit
liq_penalty: Liquidation penalty
apr: Annual percentage rate
supplied: Current supply amount (in collateral units, before decimal adjustment)
borrowed: Current borrowed amount (in debt asset units, before decimal adjustment)
liquidity: Remaining borrowable amount
protocol: Associated protocols
tag: Pool tags
display: Whether to display pool
paused: Whether pool is paused
Example Response:
{
"status": 0,
"code": "ok",
"msg": "ok",
"data": [
{
"name": "SA/SLB",
"id": 0,
"order_weight": 0,
"collateral": {
"name": "SA",
"address": "0x1234567890abcdef1234567890abcdef12345678",
"oracle": "0x07ac1e01234567890abcdef1234567890abcdef1",
"price": "1.0"
},
"risk": {
"low_bar": 0.5,
"mid_bar": 0.7,
"high_bar": 0.8
},
"yt": {
"presents": true,
"earn": 0.11,
"cost_down": 0.01,
"extra_earn": 0.01,
"points_mul": 11.0,
"leverage": 11.0
},
"looper": {
"presents": true,
"earn": 0.05,
"earn_target": 0.06,
"earn_increase": 0.01,
"stability_fee": 0.05,
"max_leverage": 5
},
"ltv": 0.9,
"liq_ltv": 0.95,
"liq_limit": 0.5,
"liq_penalty": 0.1,
"apr": 0.05,
"supplied": 400000000,
"borrowed": 200000000,
"liquidity": 100000000,
"protocol": "a,b,c",
"tag": "a,b,c",
"display": true,
"paused": false
}
]
}
SLF Overview
Endpoint:
GET /slf/overview
Description: Retrieves SLF overview including deposits, risk management, yield rates, allocation status, and operation history.
Example Request:
curl -X GET "${BASE}/slf/overview"
Response Fields:
total_deposit: Total deposits in USDC (before decimal adjustment)
total_deposit_history: Historical deposit records
time: Timestamp
amount: Deposit amount in USDC (before decimal adjustment)
risk: Risk management information
rebalancer: Risk rebalancer contract address
owner: Risk owner address
deployed: Deployment timestamp
timelock: Timelock period
guardian: Guardian address
apy: Annual percentage yield
apy_history: Historical yield records
time: Timestamp
apy: Annual percentage yield
alloc_peek: Current allocation status
market: Market name
market_type: Market type (YT or looper)
market_id: Market identifier
slb_amount: SLB amount (before decimal adjustment)
token_amount: Token amount in USDC (before decimal adjustment)
deadline: Expiration time (0 for looper)
alloc_history: Historical allocation records
time: Timestamp
SA/SB/SC: Allocation percentages for each market
operation_history: Operation history
time: Operation timestamp
operation: Operation type (deposit, withdraw)
shares: Operation shares
amount: Operation amount in USDC (before decimal adjustment)
principal_after: Remaining principal after operation in USDC (before decimal adjustment)
operator: Operator address
repayment_time: Repayment information
time: Repayment timestamp
amount: Repayment amount
Example Response:
{
"status": 0,
"code": "ok",
"msg": "ok",
"data": {
"total_deposit": 1000000000,
"total_deposit_history": [
{
"time": 17333333333,
"amount": 1000000000
}
],
"risk": {
"rebalancer": "0x1234567890abcdef1234567890abcdef12345678",
"owner": "0xabcdef1234567890abcdef1234567890abcdef12",
"deployed": 1752210685,
"timelock": 86400,
"guardian": "0xabcdef1234567890abcdef1234567890abcdef12"
},
"apy": 0.0812,
"apy_history": [
{
"time": 17333333333,
"apy": 0.0812
}
],
"alloc_peek": [
{
"market": "SA",
"market_type": "YT",
"market_id": 0,
"slb_amount": 1000000000,
"token_amount": 1000000,
"deadline": 1752210785
}
],
"alloc_history": [
{
"time": 1752210785,
"SA": 0.31,
"SB": 0.4,
"SC": 0.29
}
],
"operation_history": [
{
"time": "17333333333",
"operation": "deposit",
"shares": 100000,
"amount": 100010,
"principal_after": 1000000,
"operator": "0xabcdef1234567890abcdef1234567890abcdef12"
}
],
"repayment_time": [
{
"time": 1752210785,
"amount": 100000000
}
]
}
}
SLF User Information
Endpoint:
GET /slf/address/{address}
Description: Retrieves specific user's principal, shares, and operation records in SLF.
Smart Contract Calls:
SLF(SSF)::tokenProviderShares(address _liquidityToken, address _provider)
First parameter: USDC address, Second parameter: User address
SLF(SSF)::tokenProviders(address)
Get share to USDC conversion rate (parameter: USDC address)
Example Request:
curl -X GET "${BASE}/slf/address/0xabcdef1234567890abcdef1234567890abcdef12"
Response Fields:
user: User address
current_deposit: Current remaining principal in USDC (before decimal adjustment)
current_shares: Current remaining shares
current_value: Current value in USDC (before decimal adjustment)
operations: User operation records
time: Operation timestamp
operation: Operation type (deposit, withdraw)
shares: Operation shares
amount: Operation amount in USDC (before decimal adjustment)
principal_after: Remaining principal after operation in USDC (before decimal adjustment)
operator: Operator address
Example Response:
{
"status": 0,
"code": "ok",
"msg": "ok",
"data": {
"user": "0xabcdef",
"current_deposit": 1000000,
"current_shares": 999987,
"current_value": 1000100,
"operations": [
{
"time": "17333333333",
"operation": "deposit",
"shares": 100000,
"amount": 100010,
"principal_after": 1000000,
"operator": "0xabcdef1234567890abcdef1234567890abcdef12"
}
]
}
}
Looper Overview
Endpoint:
GET /looper/overview
Description: Retrieves overview of all Looper pools including base tokens, leverage tokens, prices, yield rates, and leverage limits.
Example Request:
curl -X GET "${BASE}/looper/overview"
Response Fields:
id: Pool identifier
order_weight: Sorting weight (higher values appear first)
name: Pool name
tag: Pool tags
protocol: Protocol information
oracle: Oracle contract address
helper: Helper contract address
deposit_token: Deposit token address
leverage_token: Leverage token address
deposit_price: Deposit token price
withdraw_price: Withdrawal token price
earn_apy: Earning annual percentage yield
borrow_apy: Borrowing annual percentage yield
stability_fee: Stability fee rate
cost_down: Cost reduction rate
extra_earn: Additional earning rate
max_leverage: Maximum leverage ratio
max_amount: Maximum deposit amount
max_points: Maximum points reward multiplier
Example Response:
{
"status": 0,
"code": "ok",
"msg": "ok",
"data": [
{
"id": 0,
"order_weight": 0,
"name": "SLA/ETH",
"tag": "a,b,c",
"protocol": "a,b,c",
"oracle": "0x1234567890abcdef1234567890abcdef12345678",
"helper": "0x77777",
"deposit_token": "0xaaaaa",
"leverage_token": "0xbbbbb",
"deposit_price": 1.0,
"withdraw_price": 2335.0,
"earn_apy": 0.133,
"borrow_apy": 0.15,
"stability_fee": 0.01,
"cost_down": 0.01,
"extra_earn": 0.01,
"max_leverage": 2,
"max_amount": 11.11,
"max_points": 11
}
]
}
Looper Pool Details
Endpoint:
GET /looper/detail/{id}
Description: Retrieves detailed information for a specific Looper pool including tokens, prices, leverage, risk parameters, historical operations, and yield records.
Example Request:
curl -X GET "${BASE}/looper/detail/0"
Response Fields:
id: Pool identifier
order_weight: Sorting weight (higher values appear first)
name: Pool name (e.g., SLA/ETH)
tag: Pool tags
protocol: Protocol information
oracle: Oracle contract address
helper: Helper contract address
deposit_token: Deposit token address
leverage_token: Leverage token address
deposit_price: Deposit token price
withdraw_price: Withdrawal token price
earn_apy: Earning annual percentage yield
borrow_apy: Borrowing annual percentage yield
stability_fee: Stability fee rate
cost_down: Cost reduction rate
extra_earn: Additional earning rate
max_leverage: Maximum leverage ratio
liquidation_ltv: Liquidation LTV threshold
max_amount: Maximum deposit amount
max_points: Maximum points reward multiplier
min_deposit: Minimum deposit amount (in token units)
utilization: Utilization rate parameters
current: Current utilization rate
min: Minimum utilization rate
target: Target utilization rate
max: Maximum utilization rate
fee_at_min: Fee rate at minimum utilization
fee_at_target: Fee rate at target utilization
fee_at_max: Fee rate at maximum utilization
risk_level: Risk level parameters
low_bar: Risk low threshold (50%)
mid_bar: Risk medium threshold (70%)
high_bar: Risk high threshold (80%)
history: Historical operation records
user: User address
deposit_amount: Deposit amount (with decimals; 0 for repay/prepare_withdraw, negative for liquidate/withdraw)
leverage_amount: Leverage amount (with decimals; 0 for prepare_withdraw, negative for non-deposit operations indicating repayment/deleveraging)
type: Operation type (deposit, repay, withdraw, prepare_withdraw, liquidate)
apy_history: Historical yield records
time: Timestamp
max_lev: Maximum leverage ratio
underlying_apy: Underlying asset annual percentage yield
fee_apy: Fee annual percentage yield
Last updated
Was this helpful?