Skip to main content
This represents one possible implementation approach. Your implementation may vary based on specific requirements.

Prerequisites

Create Strategy & Get API Key

Before starting, create a strategy in the Customer Portal and get your API key.

Integration Flow

1

Fetch Supported Assets (Once)

Call /strategy-info/{strategy_id}/ once on app initialization to get all supported assets for your strategy.
GET /strategy-info/{strategy_id}/
Use this to:
  • Build your asset selector/dropdown
  • Store the list of supported token mints
  • Know which assets users can deposit
{
  "strategy_id": "43620ba3-...",
  "strategy_name": "my-strategy",
  "assets": [
    "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
    "So11111111111111111111111111111111111111112"
  ],
  "apy": 4.29,
  "apy_per_asset": { ... }
}
Cache this response - the supported assets rarely change.
2

Fetch APY Data (Periodically)

Use the same /strategy-info/{strategy_id}/ endpoint to display current APY rates.
GET /strategy-info/{strategy_id}/
Use this to:
  • Display overall strategy APY
  • Show per-asset APY rates
  • Update APY display periodically (e.g., every few minutes)
{
  "apy": 4.29,
  "apy_per_asset": {
    "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v": 5.66,
    "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB": 2.46,
    "So11111111111111111111111111111111111111112": 2.78
  }
}
3

Fetch User Balances

When a user connects their wallet, fetch their Breeze balances using /breeze-balances/{user_pubkey}.
GET /breeze-balances/{user_pubkey}?strategy_id={strategy_id}
Use this to:
  • Show user’s deposited amounts per asset
  • Display total position value
  • Show earned yield per asset
Call this endpoint whenever you need to refresh balance data (after transactions, on page load, etc.)
4

Deposit Funds

When a user wants to deposit, generate a transaction using /deposit/tx.
POST /deposit/tx
{
  "params": {
    "strategy_id": "your-strategy-id",
    "base_asset": "token-mint-address",
    "amount": 1000000,
    "user_key": "user-wallet-pubkey",
    "payer_key": "user-wallet-pubkey"
  }
}
Flow:
  1. Generate transaction with /deposit/tx
  2. Deserialize the base64 response
  3. User signs with their wallet
  4. Submit to Solana network
  5. Refresh balances after confirmation
5

Withdraw Funds

When a user wants to withdraw, generate a transaction using /withdraw/tx.
POST /withdraw/tx
{
  "params": {
    "strategy_id": "your-strategy-id",
    "base_asset": "token-mint-address",
    "amount": 1000000,
    "user_key": "user-wallet-pubkey",
    "payer_key": "user-wallet-pubkey"
  }
}
Set "all": true in params to withdraw the entire balance for an asset.

Next Steps