Skip to main content
Deframe API operates as a trustless DeFi aggregation platform. We do not hold, manage, or pass any funds through our smart contracts. Transaction signing and propagation are handled entirely on your side, ensuring full custody remains with you.

System Architecture

Deframe API Architecture - System flow showing API interaction, protocol data, transaction execution, and monitoring The diagram above illustrates the complete flow of interactions between your application, Deframe API, and various DeFi protocols across multiple blockchain networks.

API Flow Patterns

1. Protocol Data

Retrieve quotes and protocol information using the API. Endpoints:
GET /strategies/:id
GET /strategies
GET /swap/quote
Purpose:
  • Fetch available protocols and their current rates
  • Get quotes for swaps or yield positions
  • Compare rates across different protocols and chains

2. Transaction Data

Request transaction data (bytecode) needed for execution. Endpoints:
POST /swap/bytecode
GET /strategies/{strategyId}/bytecode
Purpose:
  • Provides the bytecode for executing transactions
  • Supports multiple transaction types:
    • Cross-chain swaps
    • Same-chain swaps
    • Yield positions (deposit/withdraw)

3. Sign & Propagate Bytecode

User Responsibility: Transaction signature and propagation are handled entirely on your side. Deframe does not hold, manage, or pass any funds through its smart contracts.
Key Points:
  • Users sign transactions themselves using their own wallets
  • Transaction propagation is handled by the user
  • Full custody remains with the user at all times
  • Deframe never has access to your private keys or funds

4. Position Monitoring

After transaction execution, Deframe monitors positions and provides updates. Endpoints:
GET /wallets/:wallet
GET /wallets/:wallet/history/:strategyId
Purpose:
  • Track wallet activity and positions across chains
  • Monitor yield earnings in real-time
  • View swap history and transaction status
  • Aggregate positions across multiple protocols

5. Alerts & Notifications

Configure alerts and receive notifications for position monitoring. Features:
  • Webhook notifications - Real-time callbacks to your server
  • Transaction status updates - Track cross-chain transaction progress
  • Position changes - Monitor yield earnings and balances
  • APY change notifications - Get alerted when rates change significantly
Configure webhook URLs in your customer dashboard to receive automatic notifications for transaction status changes.

6. Integration Features

Additional features to enhance user protection and experience. Available Features:
  • Multi-provider routing - Automatic selection of best swap provider
  • Cross-chain optimization - Best route for bridge transactions
  • Real-time APY tracking - Updated protocol rates
  • Gas estimation - Accurate gas cost predictions
  • Transaction simulation - Pre-execution validation

Rate Limiting

API rate limits ensure fair usage and system stability:
  • 100 requests per minute per API key
  • 1,000 requests per hour per API key
If you need higher limits, contact our support team.

API Status

Check real-time API uptime and incident history

Error Handling

The API uses standard HTTP response codes:
CodeMeaningDescription
200SuccessRequest completed successfully
400Bad RequestInvalid parameters or request format
401UnauthorizedInvalid or missing API key
404Not FoundResource does not exist
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer-side error occurred

Key Guarantees

Trustless Operations

No fund custody - you maintain full control of your assets at all times

Position Monitoring

Real-time tracking of your DeFi positions across chains and protocols

Status Notifications

Webhook alerts for transaction status and position updates

Multi-Chain Support

Seamless operations across Ethereum, Base, Optimism, Arbitrum, Solana, Polygon, Gnosis, and Bitcoin

Next Steps

Read more about Why Deframe and explore our complete code examples.