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
  • /getpool
  • /getpools
  • /getuseraccountdata
  • /getuserpositions
  • /entermarketstatus
  • /entermarket
  • /borrow
  • /deposit
  • /repay
  • /withdraw
  • /exitmarket
  • Following is the list of supported tokens :
  1. INTEGRATIONS
  2. Lending Protocols

Compound V2

/getpool

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

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

asset*

String

Token's symbol to get the details of.

https://api.expand.network/lendborrow/getpool?lendborrowId=1100&asset=usdc
{
    "status": 200,
    "msg": "success",
    "data": {
        "tokenAddress": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
        "poolAddress": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
        "variableBorrowRate": "0",
        "stableBorrowRate": "15.317159470377728",
        "variableSupplyRate": "0",
        "stableSupplyRate": "5.076408388218856",
        "ltv": "85.5",
        "availableLiquidity": "27577473960885",
        "reserveSize": "18717058035630"
    }
}

/getpools

Get the list of supply and borrow APYs of the mentioned assets.

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

Query Parameters

Name
Type
Description

lendBorrowId*

String

assets*

String

Comma-separated values of token address.

https://api.expand.network/lendborrow/getpools?lendborrowId=1100&assets=USDT,usDC,rep
{
  "status": 200,
  "msg": "success",
  "data": {
    "USDC": {
      "tokenAddress": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
      "poolAddress": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
      "variableBorrowRate": "0",
      "stableBorrowRate": "15.317159470377728",
      "variableSupplyRate": "0",
      "stableSupplyRate": "5.076408388218856",
      "ltv": "85.5",
      "availableLiquidity": "27577473960885",
      "reserveSize": "18717058035630"
    },
    "REP": {
      "tokenAddress": "0x158079ee67fce2f58472a96584a73c7ab9ac95c1",
      "poolAddress": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
      "variableBorrowRate": "0",
      "stableBorrowRate": "4.560470927786797",
      "variableSupplyRate": "0",
      "stableSupplyRate": "0",
      "ltv": "0",
      "availableLiquidity": "1014353018766752581455",
      "reserveSize": "3549421684597720326"
    },
    "USDT": {
      "tokenAddress": "0xf650c3d88d12db855b8bf7d11be6c55a4e07dcc9",
      "poolAddress": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
      "variableBorrowRate": "0",
      "stableBorrowRate": "13.938973764802665",
      "variableSupplyRate": "0",
      "stableSupplyRate": "10.934276001927245",
      "ltv": "0",
      "availableLiquidity": "31414050451046",
      "reserveSize": "4507835539299"
    }
  }
}

/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's symbol to get detail of.

address*

String

Public address of sender.

https://api.expand.network/lendborrow/getuseraccountdata?address=0x6Fb447Ae94F5180254D436A693907a1f57696900&lendborrowId=1100&asset=DAI
{
    "status": 200,
    "msg": "success",
    "data": {
        "tokenAddress": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "repayAmount": "0",
        "borrowAmount": "3977431061236148758",
        "withdrawAmount": "1052289347511965358",
        "healthFactor": "0"
    }
}

/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=1100
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "cToken": "0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643",
            "underlyingAsset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
            "scaledCTokenBalance": "4504491746",
            "usageAsCollateralEnabledOnUser": true
        },
        {
            "cToken": "0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5",
            "underlyingAsset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
            "scaledCTokenBalance": "4980469",
            "usageAsCollateralEnabledOnUser": true
        },
        {
            "cToken": "0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9",
            "underlyingAsset": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
            "scaledCTokenBalance": "0",
            "usageAsCollateralEnabledOnUser": true
        },
        {
            "cToken": "0xFAce851a4921ce59e912d19329929CE6da6EB0c7",
            "underlyingAsset": "0x514910771AF9Ca656af840dff83E8264EcF986CA",
            "scaledCTokenBalance": "59526195",
            "usageAsCollateralEnabledOnUser": true
        }
    ]
}

/entermarketstatus

Checks whether the user approved before depositing.

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

Query Parameters

Name
Type
Description

lendBorrowId*

String

rpc

String

Remote procedural call URL.

account*

String

Public address of the user.

https://api.expand.network/lendborrow/entermarketstatus?account=0x6Fb447Ae94F5180254D436A693907a1f57696900&lendborrowId=1100
{
    "status": 200,
    "msg": "success",
    "data": {
        "enterMarketStatus": [
            "0x20572e4c090f15667cF7378e16FaD2eA0e2f3EfF",
            "0x822397d9a55d0fefd20F5c4bCaB33C5F65bd28Eb",
            "0xCEC4a43eBB02f9B80916F1c718338169d6d5C1F0"
        ]
    }
}

/entermarket

Compound needs the user to approve before they can start deposit.

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

asset*

String

Token's symbol to get the details of.

from*

String

Sender public address.

gas*

String

Maximum gas to be approved for the transaction.

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": "1100",
    "asset": "DAI",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "298800"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
        "value": "0",
        "gas": "298800",
        "data": "0xc2998238000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "referenceId": "b2975c19e2594dcabbf193d25b4b6100"
    }
}

With gasPriority:

{
    "lendborrowId": "1100",
    "asset": "DAI",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "298800",
    "gasPriority": "medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
        "value": "0",
        "gas": "298800",
        "data": "0xc2998238000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "gasPrice": "4124373646",
        "referenceId": "d3596cbd688b452fba6aa0185a948869"
    }
}

With ofacCheck:

{
    "lendborrowId": "1100",
    "asset": "DAI",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "298800",
    "gasPriority": "medium",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
        "value": "0",
        "gas": "298800",
        "data": "0xc2998238000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "gasPrice": "448938049",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "14d13cf25d184178afa59ba3d519fc98"
    }
}

/borrow

Trigger the withdraw transaction from the given protocol.

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

Request Body

Name
Type
Description

lendBorrowId*

String

asset*

String

Token's symbol to borrow.

amount*

String

Number of tokens to be borrowed.

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": "1100",
    "asset": "DAI",
    "amount": "100000",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "442020"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "value": "0",
        "gas": "442020",
        "data": "0xc5ebeaec00000000000000000000000000000000000000000000000000000000000186a0",
        "referenceId": "bf5abab50f85428b86d08cc1e06bf193"
    }
}

With gasPriority (medium):

{
    "lendborrowId": "1100",
    "asset": "DAI",
    "amount": "100000000000000",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "gas": "192020",
    "gasPriority":"medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "value": "0",
        "gas": "192020",
        "data": "0xc5ebeaec00000000000000000000000000000000000000000000000000005af3107a4000",
        "gasPrice": "4050857834",
        "referenceId": "6123347ffa3648a2b81110ab098d0ced"
    }
}

With ofacCheck :

{
    "lendborrowId": "1100",
    "asset": "DAI",
    "amount": "100000000000000",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "gas": "192020",
    "gasPriority":"medium",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "value": "0",
        "gas": "192020",
        "data": "0xa0712d6800000000000000000000000000000000000000000000000000005af3107a4000",
        "gasPrice": "445876376",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "4c3de09ac30642e68df4c36443e1402b"
    }
}

/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's symbol to deposit.

amount*

String

Number of tokens to be deposited.

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": "1100",
    "asset": "DAI",
    "amount": "1000000000000000000",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "192020"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "value": "0",
        "gas": "192020",
        "data": "0xa0712d680000000000000000000000000000000000000000000000000de0b6b3a7640000",
        "referenceId": "337e28b9a35e45138e41d38b49d4f957"
    }
}

With gasPriority (medium):

{
    "lendborrowId": "1100",
    "asset": "DAI",
    "amount": "100000000000000",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "gas": "192020",
    "gasPriority":"medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "value": "0",
        "gas": "192020",
        "data": "0xa0712d6800000000000000000000000000000000000000000000000000005af3107a4000",
        "gasPrice": "4152465976",
        "referenceId": "e97309d3381e4ac79dd9addc9b58ae50"
    }
}

With ofacCheck:

{
   "lendborrowId": "1100",
    "asset": "DAI",
    "amount": "100000000000000",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "gas": "192020",
    "gasPriority":"medium",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "value": "0",
        "gas": "192020",
        "data": "0xa0712d6800000000000000000000000000000000000000000000000000005af3107a4000",
        "gasPrice": "445223472",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "273328770acc424fafd20858b8a7cbc2"
    }
}

/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's symbol to be repaid.

amount*

String

Number of tokens to be repaid.

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": "1100",
    "asset": "DAI",
    "amount": "100000",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "152020"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "value": "0",
        "gas": "152020",
        "data": "0x0e75270200000000000000000000000000000000000000000000000000000000000186a0",
        "referenceId": "853ac7eba20b4002a739568ac0a362e0"
    }
}

With gasPriority (medium):

{
    "lendborrowId": "1100",
    "asset": "USDC",
    "amount": "100000000000000",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "gas": "192020",
    "gasPriority":"medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
        "value": "0",
        "gas": "192020",
        "data": "0x0e75270200000000000000000000000000000000000000000000000000005af3107a4000",
        "gasPrice": "3952066622",
        "referenceId": "57030a6f5aa84526a1081543fe566e0c"
    }
}

With ofacCheck:

{
    "lendborrowId": "1100",
    "asset": "USDC",
    "amount": "100000000000000",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "gas": "192020",
    "gasPriority": "medium",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x39aa39c021dfbae8fac545936693ac917d5e7563",
        "value": "0",
        "gas": "192020",
        "data": "0x0e75270200000000000000000000000000000000000000000000000000005af3107a4000",
        "gasPrice": "487306898",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "80ecbd4fe67d4d41a06b6ed8ba9d5750"
    }
}

/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's symbol to withdraw.

amount*

String

Number of tokens to withdraw.

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": "1100",
    "asset": "DAI",
    "amount": "1000000000000000000",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "312020"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "value": "0",
        "gas": "312020",
        "data": "0x852a12e30000000000000000000000000000000000000000000000000de0b6b3a7640000",
        "referenceId": "b6e17376297348ebbe4e82fd5429b267"
    }
}

With gasPriority (medium):

{
    "lendborrowId": "1100",
    "asset": "DAI",
    "amount": "100000000000",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "gas": "192020",
    "gasPriority":"medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "value": "0",
        "gas": "192020",
        "data": "0x852a12e3000000000000000000000000000000000000000000000000000000174876e800",
        "gasPrice": "4091632147",
        "referenceId": "512d96edebab41b692a408d508c96ffc"
    }
}

With ofacCheck:

{
    "lendborrowId": "1100",
    "asset": "DAI",
    "amount": "100000000000",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "gas": "192020",
    "gasPriority":"medium",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "value": "0",
        "gas": "192020",
        "data": "0x852a12e3000000000000000000000000000000000000000000000000000000174876e800",
        "gasPrice": "461700210",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "d08f2d5f06a4451782dfb1df220f44e7"
    }
}

/exitmarket

Trigger the exit market transaction for the given protocol

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

Request Body

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

asset*

String

Token's symbol.

gas*

String

Maximum gas to be approved for the transaction.

from*

String

Sender's public address.

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": "1100",
    "asset": "dai",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "40000"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
        "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
        "value": "0",
        "gas": "40000",
        "data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "referenceId": "2a7d6bd372b14b20b4d854daa01487b3"
    }
}

With gasPriority (medium):

{
    "lendborrowId": "1100",
    "asset": "DAI",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "gas": "40000",
    "gasPriority":"medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
        "value": "0",
        "gas": "40000",
        "data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "gasPrice": "4248417967",
        "referenceId": "8d28cea2f5c84704831bfbcbeba4cedb"
    }
}

With ofacCheck:

{
    "lendborrowId": "1100",
    "asset": "DAI",
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "gas": "40000",
    "gasPriority": "medium",
    "ofacCheck": true
}

With ofacCheck:

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
        "value": "0",
        "gas": "40000",
        "data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
        "gasPrice": "499498318",
        "estimationCheck": true,
        "insights": {
            "asset": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            },
            "to": {
                "issues": [],
                "verdict": {
                    "code": 0,
                    "label": "NO_ISSUES"
                }
            }
        },
        "referenceId": "e9bfe6229a844227a92a2f6669aa1da0"
    }
}

Following is the list of supported tokens :

Token List - Mainnet
  • AAVE

  • BAT

  • COMP

  • DAI

  • ETH

  • FEI

  • LINK

  • MKR

  • REP

  • SAI

  • SUSHI

  • TUSD

  • UNI

  • USDC

  • USDP

  • USDT

  • WBTC

  • WBTC2

  • YFI

  • ZRX

Token List - Testnet
  • DAI

  • USDC

PreviousAave V3NextCompound V3

Last updated 23 days ago

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.

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

⛓️
⚡
Lend and Borrow ID
lend borrow Id
lend borrow Id
lend borrow Id
Lend and Borrow ID
Lend and Borrow ID
Lend and Borrow ID
Lend and Borrow ID
Lend and Borrow ID
Lend and Borrow ID
Lend and Borrow ID