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

Refer to the Lend and Borrow ID page for details.

asset*

String

Token's symbol to get the details of.

https://api.expand.network/lendborrow/getpool?lendborrowId=1100&asset=usdc

/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

Refer to the lend borrow Id page for details.

assets*

String

Comma-separated values of token address.

https://api.expand.network/lendborrow/getpools?lendborrowId=1100&assets=USDT,usDC,rep

/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

Refer to the lend borrow Id page for details.

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

/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

Refer to the lend borrow Id page for details.

https://api.expand.network/lendborrow/getuserpositions?address=0x6Fb447Ae94F5180254D436A693907a1f57696900&lendborrowId=1100

/entermarketstatus

Checks whether the user approved before depositing.

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

Query Parameters

Name
Type
Description

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

rpc

String

Remote procedural call URL.

account*

String

Public address of the user.

https://api.expand.network/lendborrow/entermarketstatus?account=0x6Fb447Ae94F5180254D436A693907a1f57696900&lendborrowId=1100

/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

Refer to the Lend and Borrow ID page for details.

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"
}

With gasPriority:

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

With ofacCheck:

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

/borrow

Trigger the withdraw transaction from the given protocol.

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

Request Body

Name
Type
Description

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

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"
}

With gasPriority (medium):

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

With ofacCheck :

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

/deposit

Trigger the deposit transaction from the given protocol.

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

Request Body

Name
Type
Description

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

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"
}

With gasPriority (medium):

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

With ofacCheck:

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

/repay

Trigger the repay transaction from the given protocol.

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

Request Body

Name
Type
Description

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

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"
}

With gasPriority (medium):

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

With ofacCheck:

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

/withdraw

Trigger the withdraw transaction from the given protocol.

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

Request Body

Name
Type
Description

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

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"
}

With gasPriority (medium):

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

With ofacCheck:

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

/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

Refer to the Lend and Borrow ID page for details.

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"
}

With gasPriority (medium):

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

With ofacCheck:

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

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

Last updated