1delta API v1
Unified API for DeFi data and actions.
Response Envelope
Every endpoint returns a consistent JSON envelope. Integrators can rely on the same top-level shape regardless of the endpoint called.
Success
{
"success": true,
"data": { ... },
"actions": { "transactions": [...], "permissions": [...] } | null
}
data— Informational payload (market data, quotes, simulation results, user positions, etc.). Present on all responses;nullwhen the endpoint only produces transaction calldata with no additional info.actions— Transaction calldata and approval/permission transactions that the caller should execute on-chain. Only populated by action endpoints;nullon data endpoints.actions.transactions— Array of{ to, data, value }objects ready to be sent as EVM transactions.actions.permissions— Array of approval or permission transactions (e.g. ERC-20 approves, credit delegations) that must be executed before the main transactions. Each entry includes a human-readabledescription.
Error
{
"success": false,
"error": { "code": "MISSING_PARAM", "message": "marketUid is required" }
}
error.code— Machine-readable error code (e.g.MISSING_PARAM,INVALID_PARAM,ACTION_FAILED,NOT_FOUND,ORIGIN_FAILED).error.message— Human-readable description.
Data (/v1/data/*)
Cacheable market data, prices, yields, and user positions. These endpoints always return actions: null — only the data field is populated.
Actions (/v1/actions/*)
Transaction builders organized by category:
- Lending — deposit, withdraw, borrow, repay, e-mode, enable-collateral, repay-with-atoken
- Loop — leverage, close, collateral-swap, debt-swap
- Swap — spot, x-chain (coming soon)
- Allocate — batch operations
All action endpoints support GET (query parameters only) and POST (query parameters + JSON body for post-trade simulation). The allocate endpoint is POST-only.
For loop and swap operations, omit account for a quote-only response (data contains quotes, actions is null), or include it to build full transaction calldata (actions is populated with ready-to-send transactions).
Simulation (POST)
POST the same query parameters as GET, plus a JSON body with the user's current balanceData and aprData. The response includes the standard fields plus a simulation object in data with projected post-trade health factor, borrow capacity, and APR data.
Execution Modes (lending only)
- direct (default): Raw protocol interaction (deposit/withdraw/borrow/repay only)
- proxy: Routes through 1delta composer contracts
Authentication
- API Key: ApiKeyAuth
Optional. Without a key, requests are limited to 10 per 15 minutes. Get your key from https://auth.1delta.io/
Security Scheme Type: | apiKey |
|---|---|
Header parameter name: | x-api-key |