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
  • Supported Chains
  • Available Endpoints:
  • Lending Protocol IDs
  • Endpoint Details
  • /getpool
  • /getpools
  • /getuseraccountdata
  • /getuserpositions
  • /borrow
  • /deposit
  • /repay
  • /withdraw
  1. INTEGRATIONS
  2. Lending Protocols

Aave V2

PreviousLending ProtocolsNextAave V3

Last updated 1 month ago

Supported Chains

Available on Ethereum , Avalanche and Polygon.

Available Endpoints:

Click on the endpoint to jump to the section with full details

  • - Get the lend and borrow APY for the given pool from AAVE protocol.

  • GET - Get the list of supply and borrow APYs of the mentioned assets.

  • / GET - Get the repay, borrow, withdraw amount and health factor details for the given user.

  • GET - Retrieves the lending and borrowing positions of a user, including details such as token balances and collateral usage status.

  • POST - Trigger the borrow transaction from the given protocol.

  • POST - Trigger the deposit transaction from the given protocol.

  • POST - Trigger the repay transaction from the given protocol.

  • POST - Trigger the withdraw transaction from the given protocol.

Lending Protocol IDs

Many endpoints have a parameter where you can provide a lendborrow ID.

Below is a list of lendborrow IDs related to Aave V2. Please see the for a complete Lending Protocol ID list and more information.

Lending Protocol Name
Chain
Lending Protocol ID

Aave V2

Ethereum

1000

Aave V2

Avalanche

1003

Aave V2

Polygon

1005

Endpoint Details

/getpool

Get the lend and borrow APY for the given pool from AAVE protocol.

GET https://api.expand.network/lendborrow/getpool

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendborrowId

String

asset*

String

Token address to get the details of.

https://api.expand.network/lendborrow/getpool?lendborrowId=1000&asset=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
{
    "status": 200,
    "msg": "success",
    "data": {
        "tokenAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "variableBorrowRate": "2.46",
        "stableBorrowRate": "4.54",
        "variableSupplyRate": "0",
        "stableSupplyRate": "0.38",
        "ltv": "82.5",
        "availableLiquidity": "113254567932739787526717",
        "reserveSize": "163635814986025319212051"
    }
}

/getpools

Get the list of supplies and borrow APYs from the AAVE V2 protocol.

GET https://api.expand.network/lendborrow/getpools

Query Parameters

Name
Type
Description

lendborrowId

String

assets

String

Comma-separated token address. If not provided, it will fetch all the supported assets

https://api.expand.network/lendborrow/getpools?lendborrowId=1000
{
    "status": 200,
    "msg": "success",
    "data": {
        "LUSD": {
            "tokenAddress": "0x5f98805a4e8be255a32880fdec7f6728c6568ba0",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "32.12",
            "stableBorrowRate": "17.29",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "77006726623077655725248",
            "reserveSize": "103632381824927576871858",
            "tokenSymbol": "LUSD"
        },
        "MKR": {
            "tokenAddress": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "20.00",
            "stableBorrowRate": "3.02",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "1278729306125753953202",
            "reserveSize": "1279822124508185051839",
            "tokenSymbol": "MKR"
        },
        "GUSD": {
            "tokenAddress": "0x056fd409e1d7a124bd7017459dfea2f387b6d5cd",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "83.39",
            "stableBorrowRate": "40.69",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "32623758",
            "reserveSize": "61125095",
            "tokenSymbol": "GUSD"
        },
        "LINK": {
            "tokenAddress": "0x514910771af9ca656af840dff83e8264ecf986ca",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "0.68",
            "stableBorrowRate": "3.97",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "1193700896741468562426997",
            "reserveSize": "1248472656103005124023274",
            "tokenSymbol": "LINK"
        },
        "FRAX": {
            "tokenAddress": "0x853d955acef822db058eb8505911ed77f175b99e",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "12.61",
            "stableBorrowRate": "0.00",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "511987804049522861930697",
            "reserveSize": "587777132902145320152786",
            "tokenSymbol": "FRAX"
        },
        "1INCH": {
            "tokenAddress": "0x111111111117dc0aa78b770fa6a738034120c302",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "20.00",
            "stableBorrowRate": "0.00",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "55357019076770918062629",
            "reserveSize": "56496898095330410902989",
            "tokenSymbol": "1INCH"
        },
        "BUSD": {
            "tokenAddress": "0x4fabb145d64652a948d72533023f6e7a623c7c53",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "10.00",
            "stableBorrowRate": "150.02",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "575265740349124045010809",
            "reserveSize": "792752563426923457825588",
            "tokenSymbol": "BUSD"
        },
        "DAI": {
            "tokenAddress": "0x6b175474e89094c44da98b954eedeac495271d0f",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "41.30",
            "stableBorrowRate": "47.80",
            "variableSupplyRate": "0",
            "stableSupplyRate": "5.55",
            "ltv": "63",
            "availableLiquidity": "3045235489027835392126555",
            "reserveSize": "29144822136454532498888813",
            "tokenSymbol": "DAI"
        },
        "USDT": {
            "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "71.41",
            "stableBorrowRate": "77.91",
            "variableSupplyRate": "0",
            "stableSupplyRate": "9.98",
            "ltv": "0",
            "availableLiquidity": "5814305491313",
            "reserveSize": "85276118847760",
            "tokenSymbol": "USDT"
        },
        "SNX": {
            "tokenAddress": "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "20.00",
            "stableBorrowRate": "0.00",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "401177398555774938702130",
            "reserveSize": "402156407105711365442784",
            "tokenSymbol": "SNX"
        },
        "TUSD": {
            "tokenAddress": "0x0000000000085d4780b73119b644ae5ecd22b376",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "10.00",
            "stableBorrowRate": "159.69",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "366460360656447246350806",
            "reserveSize": "504142753697157517092861",
            "tokenSymbol": "TUSD"
        },
        "stETH": {
            "tokenAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "0.00",
            "stableBorrowRate": "0.00",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "72",
            "availableLiquidity": "53089770724921131090223",
            "reserveSize": "53089770724921131090223",
            "tokenSymbol": "stETH"
        },
        "AAVE": {
            "tokenAddress": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "0.00",
            "stableBorrowRate": "0.00",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "66",
            "availableLiquidity": "36950678362513807739186",
            "reserveSize": "36950678362513807739186",
            "tokenSymbol": "AAVE"
        },
        "DPI": {
            "tokenAddress": "0x1494ca1f11d487c2bbe4543e90080aeba4ba3c2b",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "37.73",
            "stableBorrowRate": "0.00",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "381243732115848862926",
            "reserveSize": "811684752053466357550",
            "tokenSymbol": "DPI"
        },
        "ENS": {
            "tokenAddress": "0xc18360217d8f7ab5e7c516566761ea12ce7f9d72",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "20.00",
            "stableBorrowRate": "0.00",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "9430517331780300697697",
            "reserveSize": "9449742786126396612494",
            "tokenSymbol": "ENS"
        },
        "USDP": {
            "tokenAddress": "0x8e870d67f660d95d5be530380d0ec0bd388289e1",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "134.72",
            "stableBorrowRate": "0.00",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.01",
            "ltv": "0",
            "availableLiquidity": "56679821554076798473774",
            "reserveSize": "170862462194523456791818",
            "tokenSymbol": "USDP"
        },
        "WBTC": {
            "tokenAddress": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "0.26",
            "stableBorrowRate": "3.65",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "72",
            "availableLiquidity": "408059770286",
            "reserveSize": "425924045364",
            "tokenSymbol": "WBTC"
        },
        "UNI": {
            "tokenAddress": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "20.00",
            "stableBorrowRate": "0.99",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "75770894175151538323669",
            "reserveSize": "78703335365737857005517",
            "tokenSymbol": "UNI"
        },
        "USDC": {
            "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "32.08",
            "stableBorrowRate": "37.58",
            "variableSupplyRate": "0",
            "stableSupplyRate": "4.54",
            "ltv": "75",
            "availableLiquidity": "4891442618167",
            "reserveSize": "87825965324087",
            "tokenSymbol": "USDC"
        },
        "sUSD": {
            "tokenAddress": "0x57ab1ec28d129707052df4df418d58a2d46d5f51",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "71.29",
            "stableBorrowRate": "0.00",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "207116631044337396149030",
            "reserveSize": "354289141610132196147068",
            "tokenSymbol": "sUSD"
        },
        "CRV": {
            "tokenAddress": "0xd533a949740bb3306d119cc777fa900ba034cd52",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "20.00",
            "stableBorrowRate": "3.12",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.00",
            "ltv": "0",
            "availableLiquidity": "2516817169977279859419238",
            "reserveSize": "2524844760028715574320036",
            "tokenSymbol": "CRV"
        },
        "WETH": {
            "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "poolAddress": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
            "variableBorrowRate": "1.91",
            "stableBorrowRate": "3.95",
            "variableSupplyRate": "0",
            "stableSupplyRate": "0.05",
            "ltv": "82.5",
            "availableLiquidity": "64464470844963744307589",
            "reserveSize": "79678322543407769925227",
            "tokenSymbol": "WETH"
        }
    }
}

/getuseraccountdata

Get the repay, borrow, withdraw amount and health factor details for the given user.

GET https://api.expand.network/lendborrow/getuseraccountdata

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendborrowId

String

asset*

String

Token address.

address*

String

Public address of sender.

interestRateMode*

String

Interest mode as per Aave. Is set '1' as default.

https://api.expand.network/lendborrow/getuseraccountdata?address=0x6Fb447Ae94F5180254D436A693907a1f57696900&asset=0x514910771af9ca656af840dff83e8264ecf986ca&lendborrowId=1000&interestRateMode=1
{
    "status": 200,
    "msg": "success",
    "data": {
        "tokenAddress": "0x514910771af9ca656af840dff83e8264ecf986ca",
        "repayAmount": "0",
        "borrowAmount": "473877059646280",
        "borrowErrorMessage": "The Stable Rate is not enabled for this currency",
        "withdrawAmount": "0",
        "healthFactor": "1086711741859975271"
    }
}

/getuserpositions

Retrieves the lending and borrowing positions of a user, including details such as token balances and collateral usage status.

GET https://api.expand.network/lendborrow/getuserpositions

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

address*

String

Public address of sender.

lendborrowId

String

https://api.expand.network/lendborrow/getuserpositions?address=0x6Fb447Ae94F5180254D436A693907a1f57696900&lendborrowId=1000
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "aToken": "0x030bA81f1c18d280636F32af80b9AAd02Cf0854e",
            "underlyingAsset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
            "scaledATokenBalance": "5294314974264415",
            "usageAsCollateralEnabledOnUser": true
        },
        {
            "aToken": "0x028171bCA77440897B824Ca71D1c56caC55b68A3",
            "underlyingAsset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
            "scaledATokenBalance": "7412180471335674791",
            "usageAsCollateralEnabledOnUser": true
        }
    ]
}

/borrow

Trigger the borrow transaction from the given protocol.

POST https://api.expand.network/lendborrow/borrow

Request Body

Name
Type
Description

lendborrowId

String

asset*

String

Token address to borrow.

amount*

String

Number of tokens to be borrowed.

interestRateMode*

String

Interest mode as per Aave. 0 for static and 1 for variable.

onBehalfOf*

String

Required in case borrow need to be done on behalf of other public address.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for transaction.

rpc

String

Remote procedural call URL.

gasPriority

String

low, medium, or high.

ofacCheck

Boolean

if true,provides insights of the contract and tokens involved in the transaction. By Default, false Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet

{
    "lendborrowId": "1000",
    "asset": "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F",
    "amount": "100",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "onBehalfOf": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "interestRateMode": "2",
    "gas": "408298"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "value": "0",
        "gas": "408298",
        "data": "0xa415bcad000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006",
        "referenceId": "73d8435c30b6432aa661e8c90215e863"
    }
}

With gasPriority(medium):

{
    "lendborrowId": "1000",
    "asset": "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F",
    "amount": "100",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "onBehalfOf": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "interestRateMode": "2",
    "gas": "408298",
    "gasPriority": "medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "value": "0",
        "gas": "408298",
        "data": "0xa415bcad000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006",
        "gasPrice": "4115928188",
        "referenceId": "a9c5748d49b44d0581111f7ea11c8a61"
    }
}

With ofacCheck:

{
    "lendborrowId": "1000",
    "asset": "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F",
    "amount": "100",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "onBehalfOf": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "interestRateMode": "2",
    "gas": "408298",
    "gasPriority": "medium",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "value": "0",
        "gas": "408298",
        "data": "0xa415bcad000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006",
        "gasPrice": "458797195",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "ff5b698cea434943b49c3d57f8108ab0"
    }
}

/deposit

Trigger the deposit transaction from the given protocol.

POST https://api.expand.network/lendborrow/deposit

Request Body

Name
Type
Description

lendborrowId

String

asset*

String

Token address to deposit.

amount*

String

Number of tokens to deposit.

onBehalfOf*

String

Required in case deposit need to be done on behalf of other public address.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for the transaction.

rpc

String

Remote procedural call URL.

involveBaseToken

String

0 for any ERC-20 token, 1 for ETH.

gasPriority

String

low, medium, or high.

ofacCheck

Boolean

if true,provides insights of the contract and tokens involved in the transaction. By Default, false Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet

{
    "lendborrowId": "1000",
    "asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "amount": "10000000000000000",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "onBehalfOf": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "408298"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "value": "0",
        "gas": "408298",
        "data": "0xe8eda9df000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000000000000",
        "referenceId": "e7354f7c396f451f98359be5db31bd4a"
    }
}

With gasPriority (low):

{
    "lendborrowId": "1000",
    "asset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
    "amount": "10000000000000",
    "from": "0x356db816602c85e2075774bb77d13995c8bab023",
    "onBehalfOf": "0x356db816602c85e2075774bb77d13995c8bab023",
    "gas": "520000",
    "gasPriority": "low"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x356db816602c85e2075774bb77d13995c8bab023",
        "to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "value": "0",
        "gas": "520000",
        "data": "0xe8eda9df0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000009184e72a000000000000000000000000000356db816602c85e2075774bb77d13995c8bab0230000000000000000000000000000000000000000000000000000000000000000",
        "gasPrice": "3459319856",
        "referenceId": "240aa659656d499699de5fa6ff05fefa"
    }
}

With ofacCheck:

{
    "lendborrowId": "1000",
    "asset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
    "amount": "10000000000000",
    "from": "0x356db816602c85e2075774bb77d13995c8bab023",
    "onBehalfOf": "0x356db816602c85e2075774bb77d13995c8bab023",
    "gas": "520000",
    "gasPriority": "low",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x356db816602c85e2075774bb77d13995c8bab023",
        "to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "value": "0",
        "gas": "520000",
        "data": "0xe8eda9df0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000009184e72a000000000000000000000000000356db816602c85e2075774bb77d13995c8bab0230000000000000000000000000000000000000000000000000000000000000000",
        "gasPrice": "384728685",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "af286ef7ab8c409586f536b6489d29f7"
    }
}

/repay

Trigger the repay transaction from the given protocol.

POST https://api.expand.network/lendborrow/repay

Request Body

Name
Type
Description

lendborrowId

String

asset*

String

Token address to repay.

interestRateMode*

String

Interest mode as per Aave. 0 for static and 1 for variable.

onBehalfOf*

String

Required in case repay need to be done on behalf of other public address.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for the transaction.

amount*

String

Number of tokens to repay.

rpc

String

Remote procedural call URL.

gasPriority

String

low, medium, or high.

ofacCheck

Boolean

if true,provides insights of the contract and tokens involved in the transaction. By Default, false Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet

{
    "lendborrowId": "1000",
    "asset": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
    "amount": "100000",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "onBehalfOf": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "interestRateMode": "2",
    "gas": "408298"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "value": "0",
        "gas": "408298",
        "data": "0x573ade81000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006",
        "referenceId": "40901b075cf4426bb13daa25adb69d72"
    }
}

With gasPriority (medium):

{
    "lendborrowId": "1000",
    "asset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
    "amount": "10000000000",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "onBehalfOf": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "interestRateMode": "2",
    "gas": "408298",
    "gasPriority":"medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "value": "0",
        "gas": "408298",
        "data": "0x573ade810000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000002540be4000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000fae7d9854995e28beb1b1da864ee2a1e2ec17f07",
        "gasPrice": "3904209506",
        "referenceId": "d37a6d9d3a084066a980aaafd2ca5e61"
    }
}

With ofacCheck:

{
    "lendborrowId": "1000",
    "asset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
    "amount": "10000000000",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "onBehalfOf": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "interestRateMode": "2",
    "gas": "408298",
    "gasPriority":"medium",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "value": "0",
        "gas": "408298",
        "data": "0x573ade810000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000002540be4000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000fae7d9854995e28beb1b1da864ee2a1e2ec17f07",
        "gasPrice": "461163496",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "942d5ff766cc49ae8104a8ed07f57b84"
    }
}

/withdraw

Trigger the withdraw transaction from the given protocol.

POST https://api.expand.network/lendborrow/withdraw

Request Body

Name
Type
Description

lendborrowId

String

asset*

String

Token address to be withdraw.

amount*

String

Number of tokens to withdraw.

to*

String

Recipient public address.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for the transaction.

rpc

String

Remote procedural call URL.

gasPriority

String

low, medium, or high.

ofacCheck

Boolean

if true,provides insights of the contract and tokens involved in the transaction. By Default, false Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet

{
    "lendborrowId": "1000",
    "asset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
    "amount": "1000000000000000000",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "408298"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "value": "0",
        "gas": "408298",
        "data": "0x69328dec0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006",
        "referenceId": "3fd62ffec3264f33962ef2978b6e0892"
    }
}

With gasPriority (low):

{
    "lendborrowId": "1000",
    "asset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
    "amount": "100000000000",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "to": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "gas": "408298",
    "gasPriority":"low"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "value": "0",
        "gas": "408298",
        "data": "0x69328dec0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000174876e800000000000000000000000000fae7d9854995e28beb1b1da864ee2a1e2ec17f07",
        "gasPrice": "3312899520",
        "referenceId": "d7fd42b08f9344b79511bf4fc13970f9"
    }
}

With ofacCheck:

{
    "lendborrowId": "1000",
    "asset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
    "amount": "100000000000",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "to": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "gas": "408298",
    "gasPriority":"low",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
        "value": "0",
        "gas": "408298",
        "data": "0x69328dec0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000174876e800000000000000000000000000fae7d9854995e28beb1b1da864ee2a1e2ec17f07",
        "gasPrice": "401744783",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "28005778acee4946a2f40b9eb8c8473c"
    }
}

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

⛓️
⚡
lendborrowID
/
getpoolGET
/
getpools
getuseraccountdata
/getuserpositions
/borrow
/d
eposit
/r
epay
/
withdraw
back to top
back to top
back to top
back to top
back to top
back to top
back to top
back to top
lend borrow Id
lend borrow Id
Lend and Borrow ID
Lend and Borrow ID
Lend and Borrow ID
Lend and Borrow ID
lend borrow Id
Lend and Borrow ID