expand.network
  • Overview
  • Getting Started
  • 🔑How do I get my API Key?
  • 📑List of All Endpoints
  • ⚙️SDK
    • Overview
    • Getting Started
  • ⛓️INTEGRATIONS
    • ⚡Blockchains
      • EVM based blockchains
        • Ethereum
        • Binance Smart Chain
        • Avalanche - C
        • Avalanche - P
        • Avalanche - X
        • Polygon
        • Cronos
        • Arbitrum
        • Fantom
        • Optimism
        • Base
        • zkSync Era
        • Mantle
      • Non-EVM based chains
        • Tron
        • Solana
        • Near
        • Algorand
        • Aptos
        • Sui
        • Starknet
        • TON
        • Cosmos Hub
        • Osmosis
        • Stacks
        • Bitcoin
        • Stellar
          • Stellar RWA
        • XRP Ledger
          • XRP Ledger RWA
    • ⚡Bridges
      • Stargate
      • Stargate V2
      • Squid Router
      • Squid Router V2
      • Allbridge Classic
      • Allbridge Core
    • ⚡DEX & DEX Aggregators
      • Uniswap V2
      • Uniswap V3
      • Uniswap X
      • Sushiswap V2
      • PancakeSwap V2
      • PancakeSwap V3
      • Aerodrome
      • Camelot V3
      • Curve V2
      • Balancer V2
      • STON.fi
      • Trader Joe
      • Orca
      • Raydium
      • SDEX
      • Cetus
      • REF Finance
      • Liquidswap
      • Sologenic
      • Alex
      • 0x (Aggregator)
      • 1inch (Aggregator)
      • Kyberswap (Aggregator)
        • Kyberswap ( Limit Order Endpoints )
      • Jupiter (Aggregator)
    • ⚡Derivatives
      • dYdX V4
    • ⚡Fungible Tokens
      • ERC20
      • WETH
    • ⚡Lending Protocols
      • Aave V2
      • Aave V3
      • Compound V2
      • Compound V3
      • Morpho
    • ⚡Yield Aggregators
      • Yearn Finance V2
      • Harvest Finance
      • Pendle
    • ⚡Liquid Staking
      • Chorus One
      • Lido V2
      • Stader
      • Benqi
      • Jito
      • EigenLayer
    • ⚡Non Fungible Tokens
      • ERC721
      • ERC1155
      • Metaplex
    • ⚡Oracles
      • ChainLink
      • WinkLink
      • Pyth Network
      • RedStone
    • ⚡Stablecoins
      • EVM
    • ⚡Synthetics
      • Synthetix
    • ⚡Supported Wallets
      • MPC Wallets
        • DFNS
        • FORDEFI
        • FIREBLOCKS
        • CIRCLE
      • HD Wallets
        • PHANTOM
        • COINBASE
        • TON Wallet
      • Wallet Connect v2
  • How To
    • Execute a Local Swap
    • Execute a Cross Chain Swap
    • Use Limit Orders
    • Lend and Borrow
    • Provision Liquidity
      • Adding Liquidity
      • Removing liquidity
    • Yield Farm
    • Use Our Transaction Decoder
    • Submit an RFQ
    • Subscribe to Events
    • Stream Data (WebSocket)
      • Stream Transaction
      • Stream Trade
      • Stream Gas
      • Stream Ticker Price
    • Source Pricing
    • Track Memecoins
    • Manage Token Approvals
  • Use Cases
    • Trade Reconciliation
    • Portfolio Management
    • Trading Features
    • On-Chain Data: DEX Liquidity Pool Forensics
    • Transaction and Pool Analysis
  • Account Abstraction
    • Overview
      • User Endpoints
      • Paymaster Endpoint
      • Bundler Endpoint
    • ⚙️SDK - Overview
  • Additional Info
    • Error Messages
    • Client-Side Security Essentials
    • Compute Unit Costs
    • API Metadata
    • Audit Certificate
    • Brand Assets
    • FAQs
    • Quicknode Marketplace
      • DEX
      • Lending Protocols
  • ID's
    • Chain IDs
    • Bridge IDs
      • Internal Chain IDs for Bridges
    • DEX IDs
    • Lending Protocol IDs
    • Yield Aggregator ID
    • Liquid Staking IDs
    • Oracle IDs
    • Stablecoin IDs
    • Derivatives IDs
    • Synthetics IDs
  • Mapping
    • Blockchains
    • DEXs
      • Uniswap V2
      • Uniswap V3
      • Sushiswap
      • PancakeSwap
      • Curve
      • Balancer
    • Lending Protocols
      • Aave
      • Compound
  • Protocol Spender
    • Spender list
Powered by GitBook
On this page
  • Get Pool
  • Get Pools
  • Get User Account Data
  • Get Enter Market Status
  • Borrow
  • Deposit
  • Repay
  • Withdraw
  • Enter Market
  • Exit Market
  • Exit Isolation Mode
  • Set User E-mode
  • Migrate
  1. Additional Info
  2. Quicknode Marketplace

Lending Protocols

Get Pool

The user will be able to get the lend and borrow APY for the given pool from the given protocol.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_getPool",
    "params": [
        {
            "lendborrowId": "1200",
            "asset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_getPool",
        "result": {
            "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
            "variableBorrowRate": "5.95",
            "stableBorrowRate": "7.50",
            "variableSupplyRate": "0",
            "stableSupplyRate": "4.77"
        }
    },
    "jsonrpc": "2.0"
}

Get Pools

The user will be able to get the list of supply and borrow APYs of the mentioned assets.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_getPools",
    "params": [
        {
            "lendborrowId": "1200",
            "assets": [
                "0x6b175474e89094c44da98b954eedeac495271d0f",
                "0xdac17f958d2ee523a2206206994597c13d831ec7",
                "0x5f98805A4E8be255a32880FDeC7F6728C6568bA0"
            ]
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_getPools",
        "result": {
            "DAI": {
                "tokenAddress": "0x6b175474e89094c44da98b954eedeac495271d0f",
                "variableBorrowRate": "5.87",
                "stableBorrowRate": "7.49",
                "variableSupplyRate": "0",
                "stableSupplyRate": "4.65",
                "tokenSymbol": "DAI"
            },
            "USDT": {
                "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
                "variableBorrowRate": "5.91",
                "stableBorrowRate": "10.94",
                "variableSupplyRate": "0",
                "stableSupplyRate": "4.71",
                "tokenSymbol": "USDT"
            },
            "LUSD": {
                "tokenAddress": "0x5f98805A4E8be255a32880FDeC7F6728C6568bA0",
                "variableBorrowRate": "16.84",
                "stableBorrowRate": "21.84",
                "variableSupplyRate": "0",
                "stableSupplyRate": "12.51",
                "tokenSymbol": "LUSD"
            }
        }
    },
    "jsonrpc": "2.0"
}

Get User Account Data

The user will be able to get the repay, borrow, and withdraw amount details for the given user.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_getUserAccountData",
    "params": [
        {
            "lendborrowId": "1200",
            "asset": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
            "address": "0x025C62433Ecf89Ed45EDf7F41BF05318204d0b2b",
            "interestRateMode": "1"
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_getUserAccountData",
        "result": {
            "tokenAddress": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
            "repayAmount": "0",
            "borrowAmount": "1170139125",
            "borrowErrorMessage": "The Stable Rate is not enabled for this currency",
            "withdrawAmount": "1118338519"
        }
    },
    "jsonrpc": "2.0"
}

Get Enter Market Status

The user will be able to check whether the user approved before depositing on compound.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_getLendBorrowEnterMarketStatus",
    "params": [
        {
            "lendborrowId": "1100",
            "account": "0x6Fb447Ae94F5180254D436A693907a1f57696900"
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_getLendBorrowEnterMarketStatus",
        "result": {
            "enterMarketStatus": [
                "0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643",
                "0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5",
                "0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9",
                "0xFAce851a4921ce59e912d19329929CE6da6EB0c7"
            ]
        }
    },
    "jsonrpc": "2.0"
}

Borrow

The user will be able to trigger the borrow transaction from the given protocol.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_borrow",
    "params": [
        {
            "lendborrowId": "1100",
            "asset": "USDC",
            "amount": "100000",
            "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "gas": "608298"
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_borrow",
        "result": {
            "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "to": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
            "value": "0",
            "gas": "608298",
            "data": "0xc5ebeaec00000000000000000000000000000000000000000000000000000000000186a0"
        }
    },
    "jsonrpc": "2.0"
}

Deposit

The user will be able to trigger the deposit transaction from the given protocol.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_deposit",
    "params": [
        {
            "lendborrowId": "1100",
            "asset": "DAI",
            "amount": "1000000000000000000",
            "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "gas": "608298"
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_deposit",
        "result": {
            "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
            "value": "0",
            "gas": "608298",
            "data": "0xa0712d680000000000000000000000000000000000000000000000000de0b6b3a7640000"
        }
    },
    "jsonrpc": "2.0"
}

Repay

The user will be able to trigger the repay transaction from the given protocol.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_repay",
    "params": [
        {
            "lendborrowId": "1100",
            "asset": "USDC",
            "amount": "100000",
            "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "gas": "608298"
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_repay",
        "result": {
            "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "to": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
            "value": "0",
            "gas": "608298",
            "data": "0x0e75270200000000000000000000000000000000000000000000000000000000000186a0"
        }
    },
    "jsonrpc": "2.0"
}

Withdraw

The user will be able to trigger the repay transaction from the given protocol.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_withdraw",
    "params": [
        {
            "lendborrowId": "1100",
            "asset": "DAI",
            "amount": "1000000000000000000",
            "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "gas": "608298"
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_withdraw",
        "result": {
            "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
            "value": "0",
            "gas": "608298",
            "data": "0x852a12e30000000000000000000000000000000000000000000000000de0b6b3a7640000"
        }
    },
    "jsonrpc": "2.0"
}

Enter Market

The user will be able to approve before they can start deposit on Compound.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_enterMarket",
    "params": [
        {
            "lendborrowId": "1100",
            "asset": "USDT",
            "from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
            "gas": "408298"
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_enterMarket",
        "result": {
            "from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
            "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
            "value": "0",
            "gas": "408298",
            "data": "0xc299823800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f650c3d88d12db855b8bf7d11be6c55a4e07dcc9"
        }
    },
    "jsonrpc": "2.0"
}

Exit Market

The user will be able to trigger the exit market transaction on Compound.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_exitMarket",
    "params": [
        {
            "lendborrowId": "1100",
            "asset": "USDT",
            "from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
            "gas": "608298"
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_exitMarket",
        "result": {
            "from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
            "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
            "value": "0",
            "gas": "608298",
            "data": "0xede4edd0000000000000000000000000f650c3d88d12db855b8bf7d11be6c55a4e07dcc9"
        }
    },
    "jsonrpc": "2.0"
}

Exit Isolation Mode

The user will be able to trigger the exit of isolation mode options on Aave v3.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_exitIsolationMode",
    "params": [
        {
            "lendborrowId": "1200",
            "asset": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
            "from": "0xf7426829DBAAc7F26b48C49A04a93fc4f75cfa41",
            "gas": "429000"
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_exitIsolationMode",
        "result": {
            "from": "0xf7426829DBAAc7F26b48C49A04a93fc4f75cfa41",
            "to": "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2",
            "value": "0",
            "gas": "429000",
            "data": "0x5a3b74b90000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a20000000000000000000000000000000000000000000000000000000000000000"
        }
    },
    "jsonrpc": "2.0"
}

Set User E-mode

The user will be able to trigger the E-Mode options on Aave v3.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_setUserEMode",
    "params": [
        {
            "lendborrowId": "1200",
            "from": "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45",
            "categoryId": "1",
            "gas": "408298"
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_setUserEMode",
        "result": {
            "from": "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45",
            "to": "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2",
            "value": "0",
            "gas": "408298",
            "data": "0x28530a470000000000000000000000000000000000000000000000000000000000000001"
        }
    },
    "jsonrpc": "2.0"
}

Migrate

The user will be able to trigger a transaction to migrate their positions from Aave v2 to Aave v3.

URL:

https://lend-borrow.quicknode.expand.network/lendborrow

Payload:

{
    "method": "en_migrate",
    "params": [
        {
            "lendborrowId": "1200",
            "assets": [
                "0x6b175474e89094c44da98b954eedeac495271d0f"
            ],
            "from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
            "gas": "329000"
        }
    ]
}
{
    "id": 1,
    "result": {
        "message": "success",
        "method": "en_migrate",
        "result": {
            "from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
            "to": "0xb748952c7bc638f31775245964707bcc5ddfabfc",
            "value": "0",
            "gas": "329000",
            "data": "0x3698d492000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        }
    },
    "jsonrpc": "2.0"
}
PreviousDEXNextChain IDs

Last updated 1 year ago