# 1delta > One HTTP API for DeFi lending across 221 protocols and 47 EVM chains. Query normalized market data, and build ready-to-sign transaction calldata for deposits, borrows, leveraged loops, collateral and debt swaps, and cross-lender migrations — each as a single atomic transaction. - Base URL: `https://portal.1delta.io` - Auth: optional `x-api-key` header. Requests without one are rate limited per IP; an unrecognised key is ignored, never rejected. - Every response is `{ success, data, actions }` on success and `{ success: false, error: { code, message } }` on failure. Branch on `success`, not on the HTTP status. - Action endpoints return calldata only. They never sign or broadcast. Execute `actions.permissions` first, then exactly one entry from `actions.transactions` or `actions.alternatives`. - Markets are addressed by `marketUid`, formatted `lender:chainId:address`. ## Start here - [Quickstart](https://docs.1delta.io/quickstart/): Go from zero to a signed on-chain lending transaction in four HTTP calls. - [Market identifiers](https://docs.1delta.io/market-identifiers/): How marketUid, lender ids and chain ids are formatted, and how to look them up. - [Errors & retries](https://docs.1delta.io/errors/): The error envelope, what each code means, and how to retry safely. - [What is 1delta](https://docs.1delta.io/): The ultimate lending aggregation API suite. One API for all DeFi lending protocols. - [Lending](https://docs.1delta.io/lending/): Lending - [Looping](https://docs.1delta.io/looping/): Looping ## Machine-readable Every page on this site is also served as plain markdown at the same path plus `.md` — e.g. [https://docs.1delta.io/quickstart.md](https://docs.1delta.io/quickstart.md), [https://docs.1delta.io/1delta-api/lending-lenders.md](https://docs.1delta.io/1delta-api/lending-lenders.md). Fetch that instead of the HTML: it is the whole page, no JavaScript, no navigation chrome. Whole-site bundles, smallest first — pick the one that fits your context window: - [llms-guides.txt](https://docs.1delta.io/llms-guides.txt) (226 KB, ~58k tokens): the hand-written guides only — quickstart, identifiers, errors, risk, contract encoding. - [llms-data.txt](https://docs.1delta.io/llms-data.txt) (502 KB, ~129k tokens): the data endpoints only, with every parameter, field and example. Split further per tag — see the API reference below. - [llms-actions.txt](https://docs.1delta.io/llms-actions.txt) (665 KB, ~170k tokens): the actions endpoints only, with every parameter, field and example. Split further per tag — see the API reference below. - [llms-other.txt](https://docs.1delta.io/llms-other.txt) (121 KB, ~31k tokens): the other endpoints only, with every parameter, field and example. Split further per tag — see the API reference below. - [llms-full.txt](https://docs.1delta.io/llms-full.txt) (1525 KB, ~390k tokens): guides plus every endpoint, parameter, field and example. Complete, and large — prefer a split file above unless you need all of it. - [openapi.json](https://docs.1delta.io/openapi.json) (2186 KB, ~560k tokens): OpenAPI 3.1, enriched — this is what the site renders, and what to generate a typed client from. - [Raw upstream spec](https://portal.1delta.io/v1/openapi.json): straight from the API server, without the docs enrichment. ## API reference (114 endpoints) ### Data **Lending (Data)** — full reference: [llms-lending-data.txt](https://docs.1delta.io/llms-lending-data.txt) (182 KB, ~47k tokens) - [GET /v1/data/lending/comparables](https://docs.1delta.io/1delta-api/comparable-rates-for-one-pair/): Comparable rates for one pair - [GET /v1/data/lending/irm](https://docs.1delta.io/1delta-api/irm-rate-curves/): IRM rate curves - [GET /v1/data/lending/irm/depth](https://docs.1delta.io/1delta-api/rate-at-depth-rate-vs-borrow-supply-amount/): Rate-at-depth (rate vs borrow/supply amount) - [GET /v1/data/lending/isolated-markets/meta](https://docs.1delta.io/1delta-api/get-isolated-market-metadata/): Get isolated market metadata - [GET /v1/data/lending/latest](https://docs.1delta.io/1delta-api/lending-latest/): Get latest lending data (paginated by lender) - [GET /v1/data/lending/lenders](https://docs.1delta.io/1delta-api/lending-lenders/): Enumerate available lenders - [GET /v1/data/lending/mode](https://docs.1delta.io/1delta-api/list-mode-categories/): List mode categories - [GET /v1/data/lending/mode/analysis](https://docs.1delta.io/1delta-api/mode-analysis-on-chain/): Mode analysis (on-chain) - [POST /v1/data/lending/mode/analysis](https://docs.1delta.io/1delta-api/mode-analysis-with-body/): Mode analysis (with body) - [GET /v1/data/lending/next-account](https://docs.1delta.io/1delta-api/next-available-sub-account/): Next available sub-account - [GET /v1/data/lending/orders](https://docs.1delta.io/1delta-api/lending-orders/): Your open orders (unified) - [GET /v1/data/lending/pairs](https://docs.1delta.io/1delta-api/get-lending-pairs/): Get lending pairs - [GET /v1/data/lending/pairs/leverage](https://docs.1delta.io/1delta-api/browse-all-leverage-pairs/): Browse all leverage pairs - [GET /v1/data/lending/pairs/optimize](https://docs.1delta.io/1delta-api/collateral-to-debt-optimizer/): Collateral ⇄ debt optimizer - [GET /v1/data/lending/pools](https://docs.1delta.io/1delta-api/get-lending-pools/): Get lending pools - [GET /v1/data/lending/pools/by-config](https://docs.1delta.io/1delta-api/get-pools-grouped-by-config/): Get pools grouped by config - [GET /v1/data/snapshots](https://docs.1delta.io/1delta-api/get-lending-snapshots/): Get lending snapshots **Loop (Data)** — full reference: [llms-loop-data.txt](https://docs.1delta.io/llms-loop-data.txt) (202 KB, ~52k tokens) - [GET /v1/data/loop/range/close](https://docs.1delta.io/1delta-api/max-close-range/): Max close range - [POST /v1/data/loop/range/close](https://docs.1delta.io/1delta-api/max-close-range-with-body/): Max close range (with body) - [GET /v1/data/loop/range/collateral-swap](https://docs.1delta.io/1delta-api/max-collateral-swap-range/): Max collateral swap range - [POST /v1/data/loop/range/collateral-swap](https://docs.1delta.io/1delta-api/max-collateral-swap-range-with-body/): Max collateral swap range (with body) - [GET /v1/data/loop/range/debt-swap](https://docs.1delta.io/1delta-api/max-debt-swap-range/): Max debt swap range - [POST /v1/data/loop/range/debt-swap](https://docs.1delta.io/1delta-api/max-debt-swap-range-with-body/): Max debt swap range (with body) - [GET /v1/data/loop/range/leverage](https://docs.1delta.io/1delta-api/max-leverage-range/): Max leverage range - [POST /v1/data/loop/range/leverage](https://docs.1delta.io/1delta-api/max-leverage-range-with-body/): Max leverage range (with body) **Yields** — full reference: [llms-yields.txt](https://docs.1delta.io/llms-yields.txt) (10 KB, ~3k tokens) - [GET /v1/data/lending/yields/by-asset/latest](https://docs.1delta.io/1delta-api/get-latest-yields-by-asset/): Get latest yields by asset - [GET /v1/data/lending/yields/by-asset/snapshots](https://docs.1delta.io/1delta-api/get-yield-snapshots-by-asset/): Get yield snapshots by asset - [GET /v1/data/lending/yields/by-lender/latest](https://docs.1delta.io/1delta-api/get-latest-yields-by-lender/): Get latest yields by lender - [GET /v1/data/lending/yields/by-lender/snapshots](https://docs.1delta.io/1delta-api/get-yield-snapshots-by-lender/): Get yield snapshots by lender - [GET /v1/data/lending/yields/intrinsic/latest](https://docs.1delta.io/1delta-api/get-latest-intrinsic-yields/): Get latest intrinsic yields - [GET /v1/data/lending/yields/intrinsic/snapshots](https://docs.1delta.io/1delta-api/get-intrinsic-yield-snapshots/): Get intrinsic yield snapshots **User Positions** — full reference: [llms-user-positions.txt](https://docs.1delta.io/llms-user-positions.txt) (41 KB, ~11k tokens) - [GET /v1/data/lending/user-positions](https://docs.1delta.io/1delta-api/lending-user-positions/): User positions - [POST /v1/data/lending/user-positions/parse](https://docs.1delta.io/1delta-api/parse-user-positions/): Parse user positions - [GET /v1/data/lending/user-positions/rpc-call](https://docs.1delta.io/1delta-api/user-position-rpc-calls/): User position RPC calls **Prices** — full reference: [llms-prices.txt](https://docs.1delta.io/llms-prices.txt) (7 KB, ~2k tokens) - [GET /v1/data/prices/latest](https://docs.1delta.io/1delta-api/get-latest-prices/): Get latest prices - [GET /v1/data/prices/latest-asof](https://docs.1delta.io/1delta-api/get-prices-as-of-x-hours-ago/): Get prices as of X hours ago - [POST /v1/data/sparklines](https://docs.1delta.io/1delta-api/sparkline-price-ratio-time-series/): Sparkline price-ratio time series **Token** — full reference: [llms-token.txt](https://docs.1delta.io/llms-token.txt) (25 KB, ~6k tokens) - [GET /v1/data/token/available](https://docs.1delta.io/1delta-api/get-available-lending-assets/): Get available lending assets - [GET /v1/data/token/balances](https://docs.1delta.io/1delta-api/token-balances/): Token balances - [GET /v1/data/token/balances/lending](https://docs.1delta.io/1delta-api/lending-token-balances/): Lending token balances - [POST /v1/data/token/balances/parse](https://docs.1delta.io/1delta-api/parse-token-balances/): Parse token balances - [GET /v1/data/token/balances/rpc-call](https://docs.1delta.io/1delta-api/token-balance-rpc-calls/): Token balance RPC calls - [GET /v1/data/token/list](https://docs.1delta.io/1delta-api/get-token-list-for-a-chain/): Get token list for a chain - [GET /v1/data/token/metadata](https://docs.1delta.io/1delta-api/resolve-token-metadata-curated-list-then-on-chain/): Resolve token metadata (curated list, then on-chain) - [GET /v1/data/token/prices](https://docs.1delta.io/1delta-api/token-prices-by-address/): Token prices by address **Vaults (Data)** — full reference: [llms-vaults-data.txt](https://docs.1delta.io/llms-vaults-data.txt) (24 KB, ~6k tokens) - [GET /v1/data/vaults](https://docs.1delta.io/1delta-api/vaults/): Get vault data across providers - [GET /v1/data/vaults/user](https://docs.1delta.io/1delta-api/vaults-user/): Get user balances across ERC-4626 vaults - [GET /v1/data/vaults/validators](https://docs.1delta.io/1delta-api/vaults-validators/): Get selectable validators for an LST deposit - [GET /v1/data/vaults/withdrawals](https://docs.1delta.io/1delta-api/vaults-withdrawals/): Get a user's pending vault withdrawal requests **Earn** — full reference: [llms-earn.txt](https://docs.1delta.io/llms-earn.txt) (5 KB, ~1k tokens) - [GET /v1/data/earn/metrics](https://docs.1delta.io/1delta-api/earn-metrics/): Withdrawability + realized rate for one earn row **General** — full reference: [llms-general.txt](https://docs.1delta.io/llms-general.txt) (8 KB, ~2k tokens) - [GET /v1/data/chains](https://docs.1delta.io/1delta-api/get-supported-chains/): Get supported chains - [GET /v1/data/health](https://docs.1delta.io/1delta-api/health-check/): Health check - [GET /v1/data/lender-ids](https://docs.1delta.io/1delta-api/get-lender-ids/): Get lender IDs - [GET /v1/data/meta/lending/complete](https://docs.1delta.io/1delta-api/complete-lending-metadata/): Complete lending metadata - [GET /v1/data/rpcs](https://docs.1delta.io/1delta-api/get-rpc-endpoints-for-chains/): Get RPC endpoints for chains ### Actions **Index** — full reference: [llms-index.txt](https://docs.1delta.io/llms-index.txt) (1 KB, ~<1k tokens) - [GET /v1/actions](https://docs.1delta.io/1delta-api/list-action-endpoints/): List action endpoints **Lending (Actions)** — full reference: [llms-lending-actions.txt](https://docs.1delta.io/llms-lending-actions.txt) (217 KB, ~56k tokens) - [GET /v1/actions/lending/borrow](https://docs.1delta.io/1delta-api/lending-borrow/): Borrow - [POST /v1/actions/lending/borrow](https://docs.1delta.io/1delta-api/borrow-simulate/): Borrow (simulate) - [GET /v1/actions/lending/deposit](https://docs.1delta.io/1delta-api/lending-deposit/): Deposit - [POST /v1/actions/lending/deposit](https://docs.1delta.io/1delta-api/deposit-simulate/): Deposit (simulate) - [GET /v1/actions/lending/enable-collateral](https://docs.1delta.io/1delta-api/enable-disable-collateral/): Enable/disable collateral - [GET /v1/actions/lending/mode](https://docs.1delta.io/1delta-api/switch-mode/): Switch mode - [GET /v1/actions/lending/repay](https://docs.1delta.io/1delta-api/lending-repay/): Repay - [POST /v1/actions/lending/repay](https://docs.1delta.io/1delta-api/repay-simulate/): Repay (simulate) - [GET /v1/actions/lending/repay-with-atoken](https://docs.1delta.io/1delta-api/repay-with-atoken/): Repay with aToken - [GET /v1/actions/lending/simulate](https://docs.1delta.io/1delta-api/lending-simulate/): Simulate a base lending operation on-chain - [GET /v1/actions/lending/withdraw](https://docs.1delta.io/1delta-api/lending-withdraw/): Withdraw - [POST /v1/actions/lending/withdraw](https://docs.1delta.io/1delta-api/withdraw-simulate/): Withdraw (simulate) **Loop (Actions)** — full reference: [llms-loop-actions.txt](https://docs.1delta.io/llms-loop-actions.txt) (215 KB, ~55k tokens) - [GET /v1/actions/loop/close](https://docs.1delta.io/1delta-api/close-margin-position/): Close margin position - [POST /v1/actions/loop/close](https://docs.1delta.io/1delta-api/close-position-simulate/): Close position (simulate) - [GET /v1/actions/loop/collateral-swap](https://docs.1delta.io/1delta-api/collateral-swap/): Collateral swap - [POST /v1/actions/loop/collateral-swap](https://docs.1delta.io/1delta-api/collateral-swap-simulate/): Collateral swap (simulate) - [GET /v1/actions/loop/debt-swap](https://docs.1delta.io/1delta-api/debt-swap/): Debt swap - [POST /v1/actions/loop/debt-swap](https://docs.1delta.io/1delta-api/debt-swap-simulate/): Debt swap (simulate) - [GET /v1/actions/loop/leverage](https://docs.1delta.io/1delta-api/leverage-loop/): Leverage (loop) - [POST /v1/actions/loop/leverage](https://docs.1delta.io/1delta-api/leverage-loop-simulate/): Leverage loop (simulate) - [GET /v1/actions/loop/migrate](https://docs.1delta.io/1delta-api/loop-migrate/): Migrate position (cross-lender) - [GET /v1/actions/loop/migrate/targets](https://docs.1delta.io/1delta-api/loop-migrate-targets/): Migration targets for a position - [GET /v1/actions/loop/refinance](https://docs.1delta.io/1delta-api/refinance-roll-over-move-debt-to-a-fixed-term/): Refinance / roll-over (move debt to a fixed term) **Swap** — full reference: [llms-swap.txt](https://docs.1delta.io/llms-swap.txt) (53 KB, ~14k tokens) - [GET /v1/actions/swap/spot](https://docs.1delta.io/1delta-api/spot-swap-meta-aggregator/): Spot swap (meta-aggregator) - [POST /v1/actions/swap/spot](https://docs.1delta.io/1delta-api/spot-swap-submit-signed-permits/): Spot swap (submit signed permits) - [GET /v1/actions/swap/x-chain](https://docs.1delta.io/1delta-api/cross-chain-swap-bridge-aggregation/): Cross-chain swap (bridge aggregation) - [POST /v1/actions/swap/x-chain](https://docs.1delta.io/1delta-api/cross-chain-swap-submit-signed-permits/): Cross-chain swap (submit signed permits) **Vaults (Actions)** — full reference: [llms-vaults-actions.txt](https://docs.1delta.io/llms-vaults-actions.txt) (76 KB, ~19k tokens) - [GET /v1/actions/vaults/deposit](https://docs.1delta.io/1delta-api/vault-deposit/): Vault deposit - [GET /v1/actions/vaults/gmx](https://docs.1delta.io/1delta-api/vaults-gmx/): GMX V2 GM / GLV deposit · withdraw · cancel - [GET /v1/actions/vaults/lst](https://docs.1delta.io/1delta-api/vaults-lst/): LST / LRT mint · withdraw-request · claim · cancel - [GET /v1/actions/vaults/savings](https://docs.1delta.io/1delta-api/vaults-savings/): Savings-vault request-withdraw · claim · deposit · cancel - [GET /v1/actions/vaults/withdraw](https://docs.1delta.io/1delta-api/vault-withdraw/): Vault withdraw - [POST /v1/actions/vaults/withdraw](https://docs.1delta.io/1delta-api/vault-withdraw-with-caller-supplied-share-balance/): Vault withdraw (with caller-supplied share balance) **Midnight** — full reference: [llms-midnight.txt](https://docs.1delta.io/llms-midnight.txt) (24 KB, ~6k tokens) - [GET /v1/actions/midnight/cancel](https://docs.1delta.io/1delta-api/midnight-cancel/): Cancel offer - [POST /v1/actions/midnight/finalize](https://docs.1delta.io/1delta-api/midnight-finalize/): Make offer (finalize + publish) - [GET /v1/actions/midnight/make](https://docs.1delta.io/1delta-api/midnight-make/): Make offer (build typed-data) **Term** — full reference: [llms-term.txt](https://docs.1delta.io/llms-term.txt) (69 KB, ~18k tokens) - [POST /v1/actions/term/bid](https://docs.1delta.io/1delta-api/term-bid/): Lock borrow bids (auction) - [GET /v1/actions/term/list](https://docs.1delta.io/1delta-api/term-list/): Create a secondary listing - [POST /v1/actions/term/offer](https://docs.1delta.io/1delta-api/term-offer/): Lock lend offers (auction) - [POST /v1/actions/term/reveal-bids](https://docs.1delta.io/1delta-api/term-reveal-bids/): Reveal locked bids - [POST /v1/actions/term/reveal-offers](https://docs.1delta.io/1delta-api/term-reveal-offers/): Reveal locked offers - [GET /v1/actions/term/unlist](https://docs.1delta.io/1delta-api/term-unlist/): Cancel a secondary listing - [GET /v1/actions/term/unlock-bids](https://docs.1delta.io/1delta-api/term-unlock-bids/): Unlock (cancel) bids - [GET /v1/actions/term/unlock-offers](https://docs.1delta.io/1delta-api/term-unlock-offers/): Unlock (cancel) offers **Allocate** — full reference: [llms-allocate.txt](https://docs.1delta.io/llms-allocate.txt) (11 KB, ~3k tokens) - [POST /v1/actions/allocate](https://docs.1delta.io/1delta-api/allocate-multi-op-batch/): Allocate (multi-op batch) ### Other **Data › Bridge** — full reference: [llms-data-bridge.txt](https://docs.1delta.io/llms-data-bridge.txt) (3 KB, ~1k tokens) - [GET /v1/data/bridge/status](https://docs.1delta.io/1delta-api/bridge-transfer-status/): Bridge transfer status **Actions** — full reference: [llms-other-actions.txt](https://docs.1delta.io/llms-other-actions.txt) (13 KB, ~3k tokens) - [GET /v1/actions/earn/{action}](https://docs.1delta.io/1delta-api/earn-action/): One deposit/withdraw entry point over every earn row **Actions › Liquity** — full reference: [llms-actions-liquity.txt](https://docs.1delta.io/llms-actions-liquity.txt) (47 KB, ~12k tokens) - [POST /v1/actions/liquity/adjust-zombie](https://docs.1delta.io/1delta-api/liquity-adjust-zombie/): Re-adjust a zombie trove - [GET /v1/actions/liquity/claim-surplus](https://docs.1delta.io/1delta-api/liquity-claim-surplus/): Claim liquidation collateral surplus - [GET /v1/actions/liquity/close](https://docs.1delta.io/1delta-api/liquity-close/): Close a trove - [POST /v1/actions/liquity/open](https://docs.1delta.io/1delta-api/liquity-open/): Open a trove - [POST /v1/actions/liquity/set-rate](https://docs.1delta.io/1delta-api/liquity-set-rate/): Adjust the user-set interest rate **Actions › River** — full reference: [llms-actions-river.txt](https://docs.1delta.io/llms-actions-river.txt) (27 KB, ~7k tokens) - [GET /v1/actions/river/claim-surplus](https://docs.1delta.io/1delta-api/river-claim-surplus/): Claim collateral surplus - [GET /v1/actions/river/close](https://docs.1delta.io/1delta-api/river-close/): Close the trove - [POST /v1/actions/river/open](https://docs.1delta.io/1delta-api/river-open/): Open a trove **Actions › Twyne** — full reference: [llms-actions-twyne.txt](https://docs.1delta.io/llms-actions-twyne.txt) (32 KB, ~8k tokens) - [GET /v1/actions/twyne/create-position](https://docs.1delta.io/1delta-api/twyne-create-position/): Create a position (deploy a collateral vault) - [GET /v1/actions/twyne/rebalance](https://docs.1delta.io/1delta-api/twyne-rebalance/): Release over-reserved credit - [GET /v1/actions/twyne/set-liq-ltv](https://docs.1delta.io/1delta-api/twyne-set-liq-ltv/): Move a position's liquidation LTV ## Guides & concepts **General** - [Contract Addresses](https://docs.1delta.io/contract-addresses/): Deployed composer and forwarder addresses per chain, and what is immutable about them. - [Protocol coverage matrix](https://docs.1delta.io/protocol-coverage/) - [Security & Audits](https://docs.1delta.io/security/): External audits of the 1delta composer contracts, what each one covered, and the immutability guarantees of the deployed contracts. **Risk methodology** - [Risk methodology](https://docs.1delta.io/risk/): How 1delta scores lending protocols, markets, vaults, assets and chains on one 1-5 scale, plus 6 for compromised objects. - [Asset risk](https://docs.1delta.io/risk/assets/): Scoring tokens per chain - stablecoin peg behaviour, curated categories, LST and wrapper inheritance, token governance and liquidity. - [Bad debt](https://docs.1delta.io/risk/bad-debt/): Rating realised and unrealised losses per market, reserve and vault, normalised by size with a materiality gate. - [Chain risk](https://docs.1delta.io/risk/chains/): Rollup and chain risk from L2Beat criteria - state validation, data availability, exit window, sequencer and proposer failure. - [Curation risk](https://docs.1delta.io/risk/curators/): How vault curators and the markets they run are scored - AUM tier, identity verification, role and reputation. - [Governance risk](https://docs.1delta.io/risk/governance/): Who can unilaterally change a pool, a market, a token or a vault - and how that is classified and scored. - [Protocol risk](https://docs.1delta.io/risk/lending-protocols/): How a lending protocol is rated - baseline, exploit track record, audits, maturity and pool governance. - [Oracle risk](https://docs.1delta.io/risk/oracles/): Scoring the price feed a market liquidates on - mechanism base risk plus verified misconfiguration flags. - [Vault risk](https://docs.1delta.io/risk/vaults/): Rating ERC-4626 style vaults on curator, holdings, withdrawability, NAV integrity and governance. **Smart contract API (on-chain encoding)** - [Across Bridge](https://docs.1delta.io/smart-contract-api/bridge/across/): Byte layout for Across cross-chain transfers through the spoke pool. - [Bridging Operations](https://docs.1delta.io/smart-contract-api/bridge/bridge/): BRIDGING command: the BridgeIds enum and how cross-chain transfers are encoded through the Call Forwarder. - [Stargate V2 Bridge](https://docs.1delta.io/smart-contract-api/bridge/stargate/): Byte layout for Stargate V2 cross-chain transfers, including pool, destination endpoint id and fee handling. - [Contract Entry Point](https://docs.1delta.io/smart-contract-api/entrypoint/): deltaCompose(bytes): the single entry point that executes a batched, byte-encoded operation sequence atomically. - [Close Operation (Withdraw & Repay)](https://docs.1delta.io/smart-contract-api/example-operations/close/): Worked example: exit a leveraged position by withdrawing collateral, swapping to the debt token and repaying atomically. - [Collateral Swap (Withdraw & Deposit)](https://docs.1delta.io/smart-contract-api/example-operations/collateral-swap/): Worked example: exchange collateral assets without repaying debt, including full-balance withdrawals. - [Debt Swap (Borrow & Repay)](https://docs.1delta.io/smart-contract-api/example-operations/debt-swap/): Worked example: switch the debt asset of an open position without touching collateral. - [Leveraging (Borrow & Deposit)](https://docs.1delta.io/smart-contract-api/example-operations/leverage/): Worked example: open a leveraged position by borrowing, swapping and depositing inside one flash-loan-wrapped transaction. - [Position Migration](https://docs.1delta.io/smart-contract-api/example-operations/migration/): Worked example: move a leveraged position between lenders atomically via flash loan, repay, withdraw, deposit and borrow. - [Call Forwarder Operations](https://docs.1delta.io/smart-contract-api/external-call/): The Call Forwarder contract: external calls with safety checks, try-calls, transfers and bridging. - [Flash Loans](https://docs.1delta.io/smart-contract-api/flash-loan/): FLASH_LOAN command: the FlashLoanIds enum and how a flash loan wraps a composer operation sequence. - [Accepted Flash-Loan Sources](https://docs.1delta.io/smart-contract-api/flash-loan/accepted-sources/): The hardcoded, immutable set of contracts the composer trusts as flash-loan callback callers, and why each qualifies. - [Singleton Flash Loan Interface](https://docs.1delta.io/smart-contract-api/flash-loan/singletons/): Flash loans from singleton vaults such as Balancer V3 and the Uniswap V4 Position Manager. - [Standardized Flash Loan Interface](https://docs.1delta.io/smart-contract-api/flash-loan/standardized-interface/): The shared flash-loan parameter layout covering Balancer V2, Aave V2/V3 and Morpho Blue and their forks. - [Lending](https://docs.1delta.io/smart-contract-api/lending/): LENDING command: deposit, borrow, repay and withdraw across every supported lender, and the LenderOps enum. - [Aave V2 & V3 & Forks](https://docs.1delta.io/smart-contract-api/lending/aave/): Byte layouts for deposit, borrow, repay and withdraw on Aave V2, V3 and their forks. - [Compound V2 markets](https://docs.1delta.io/smart-contract-api/lending/compound-v2/): Byte layouts for Compound V2 style cToken markets, including native ETH handling. - [Compound V3 markets](https://docs.1delta.io/smart-contract-api/lending/compound-v3/): Byte layouts for Compound V3 (Comet) markets, where each market isolates a single borrowable currency. - [Morpho Blue](https://docs.1delta.io/smart-contract-api/lending/morpho/): Byte layouts for Morpho Blue, where every operation carries the full MarketParams market definition. - [Margin Operations](https://docs.1delta.io/smart-contract-api/margin/): Composite margin strategies — leverage, close, collateral swap, debt swap and migration — built from lending and swap primitives. - [Operation Encoding](https://docs.1delta.io/smart-contract-api/operations/): How operations are packed into compact byte arrays: the lead-type/sub-type layout shared by every composer command. - [Contract Interfaces](https://docs.1delta.io/smart-contract-api/summary/): Map of the composer contract API — entry point, operation encoding and every supported operation family. - [Transfers](https://docs.1delta.io/smart-contract-api/transfers/): TRANSFERS command (0x40): pull, sweep, approve, wrap and unwrap token movements and their byte layouts.