Compound V3

/getassetinfo

Get the details of a specified asset like liquidation and borrow collateral factor, index and the price feed address.

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

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 address to get the details of.

market

String

USDC, WETH standard choice.

by default it is USDC.

https://api.expand.network/lendborrow/getassetinfo?lendborrowId=1300&asset=0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984

/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.

market

String

USDC, WETH standard choice.

by default it is USDC.

asset

String

The asset value equals the market value, with USDC as default if market value is not provided; users can pass 'asset' as both key and value.

https://api.expand.network/lendborrow/getpool?address=0x6Fb447Ae94F5180254D436A693907a1f57696900&lendborrowId=1300&asset=asset

/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 and Borrow ID page for details.

address*

String

Public address of sender.

market

String

USDC, WETH standard choice.

by default it is USDC.

asset

String

The asset value equals the market value, with USDC as default if market value is not provided; users can pass 'asset' as both key and value.

https://api.expand.network/lendborrow/getuseraccountdata?address=0x6Fb447Ae94F5180254D436A693907a1f57696900&market=WETH&lendborrowId=1300&asset=WETH

/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 and Borrow ID page for details.

https://api.expand.network/lendborrow/getuserpositions?address=0x5Fb0A30278C1b6Ee4681A48F2A23bd84c2762835&lendborrowId=1300

/getclaimedrewards

Get the rewards claimed by the specified account on the protocol.

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

address*

String

Public address of sender.

market

String

USDC, WETH standard choice.

by default it is USDC.

https://api.expand.network/lendborrow/getclaimedrewards?lendborrowId=1300&address=0xEa70DBf1F353C53254Cf7d76B0791c03E258f629

/getmaxamounts

Get the max withdrawable amount and the max borrowable amount of the base token for a given asset in the protocol for the specified account.

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

address*

String

Public address of sender.

asset*

String

Token's address to get the details of.

market

String

USDC, WETH standard choice.

by default it is USDC.

https://api.expand.network/lendborrow/getmaxamounts?address=0xEa70DBf1F353C53254Cf7d76B0791c03E258f629&lendborrowId=1300&asset=0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599&market=USDC

/getgovernordata

Get the protocol and governor-related data for a market.

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

market

String

USDC, WETH standard choice.

by default it is USDC.

https://api.expand.network/lendborrow/getgovernordata?lendborrowId=1300&market=WETH

/allow

Trigger a transaction to allow or disallow the specified address to withdraw or transfer on behalf of the sender’s address.

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

Body Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

manager*

String

The address of the account that can have manager permissions over another.

isAllowed*

Boolean

"true" to add the manager and "false" to remove the manager. By default, true

from*

String

Public address of sender

gas*

String

Maximum gas to be approved for the transaction.

gasPriority

String

low, medium or high.

market

String

USDC, WETH standard choice.

by default it is USDC.

{
    "lendborrowId": "1300",
    "isAllowed": "true",
    "manager": "0xc3d688B66703497DAA19211EEdff47f25384cdc3",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "50000"
}

With gasPriority:

{
    "lendborrowId": "1300",
    "isAllowed": "true",
    "manager": "0xc3d688B66703497DAA19211EEdff47f25384cdc3",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "50000",
    "gasPriority": "high"
}

/borrow

Trigger a transaction to borrow the base token from the specified market.

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

Body Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

amount*

String

Number of tokens to be borrowed.

from*

String

Public address of sender.

gas*

String

Maximum gas to be approved for the transaction.

gasPriority

String

low, medium or high.

market

String

USDC, WETH standard choice.

by default it is USDC.

{
    "lendborrowId": "1300",
    "amount": "1000000",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "50000"
}

With gasPriority:

{
    "lendborrowId": "1300",
    "amount": "1000000",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "50000",
    "gasPriority": "high"
}

/claimrewards

Trigger a transaction to allow an account to claim rewards from the protocol.

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

Body Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

from*

String

Public address of sender

gas*

String

Maximum gas to be approved for the transaction.

gasPriority

String

low, medium or high.

market

String

USDC, WETH standard choice.

by default it is USDC.

{
    "lendborrowId": "1300",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "5300000"
}

With gasPriority:

{
    "lendborrowId": "1300",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "5300000",
    "gasPriority": "low"
}

/deposit

Trigger a transaction to deposit an asset to the protocol and update it to the account’s balance.

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

Body Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

from*

String

Public address of sender.

asset*

String

Token's address to get the details of.

amount*

String

Number of tokens to be borrowed.

to

String

Public address of receiver.

gas*

String

Maximum gas to be approved for the transaction.

gasPriority

String

low, medium or high.

market

String

USDC, WETH standard choice.

by default it is USDC.

{
    "lendborrowId": "1300",
    "amount": "1000000",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "50000",
    "asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
}

With gasPriority:

{
    "lendborrowId": "1300",
    "amount": "1000000",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "50000",
    "gasPriority": "high",
    "asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
}

/repay

Trigger a transaction to repay the borrowed amount of the base asset to the protocol.

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

Body Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

from*

String

Public address of sender.

amount*

String

Number of tokens to be repayed.

gas*

String

Maximum gas to be approved for the transaction.

gasPriority

String

low, medium or high.

market

String

USDC, WETH standard choice.

by default it is USDC.

{
    "lendborrowId": "1300",
    "amount": "1000000",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "50000",
    "market": "USDC"
}

With gasPriority:

{
    "lendborrowId": "1300",
    "amount": "1000000",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "50000",
    "gasPriority": "high",
    "market": "USDC"
}

/transfer

Trigger a transaction to transfer an asset, within the protocol, to another account.

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

Body Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

from*

String

Public address of sender.

asset*

String

Address of token to be transferred.

to*

String

Public address of receiver.

amount*

String

Number of tokens to be repayed.

gas*

String

Maximum gas to be approved for the transaction.

gasPriority

String

low, medium or high.

market

String

USDC, WETH standard choice.

by default it is USDC.

{
    "lendborrowId": "1300",
    "amount": "1000000",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "50000",
    "to": "0x6Fb447Ae94F5180254D436A693907a1f57696900"
}

With gasPriority:

{
    "lendborrowId": "1300",
    "amount": "1000000",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "50000",
    "gasPriority": "high",
    "to": "0x6Fb447Ae94F5180254D436A693907a1f57696900"
}

/withdraw

Trigger the withdrawal transaction from the given protocol.

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

Body Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

from*

String

Public address of sender.

asset*

String

Address of token to be transferred.

to

String

Public address of receiver.

amount*

String

Number of tokens to withdraw.

gas*

String

Maximum gas to be approved for the transaction.

gasPriority

String

low, medium or high.

market

String

USDC, WETH standard choice.

by default it is USDC.

{
    "lendborrowId": "1300",
    "amount": "1000000",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "50000",
    "asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
}

With gasPriority:

{
    "lendborrowId": "1300",
    "amount": "1000000",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "gas": "50000",
    "gasPriority": "high",
    "asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
}

/bundleactions

Trigger a transaction, to pass an array of action codes and calldatas that are executed, one by one, in a single transaction.

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

Body Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

lendBorrowId*

String

Refer to the Lend and Borrow ID page for details.

actions*

Array

An array of strings that correspond to the actions. Refer here for details.

data*

Array

An array of calldatas for each action to be called in the invoke transaction. Refer here for details.

from*

String

Public address of sender.

gas*

String

Maximum gas to be approved for the transaction.

gasPriority

String

low, medium or high.

market

String

USDC, WETH standard choice.

by default it is USDC.

{
    "lendborrowId": "1300",
    "market": "USDC",
    "actions": [
        "ACTION_SUPPLY_NATIVE_TOKEN",
        "ACTION_SUPPLY_NATIVE_TOKEN"
    ],
    "data": [
        [
            "0xc3d688B66703497DAA19211EEdff47f25384cdc3",
            "0x6Fb447Ae94F5180254D436A693907a1f57696900",
            "00000100000000"
        ],
        [
            "0xc3d688B66703497DAA19211EEdff47f25384cdc3",
            "0x6Fb447Ae94F5180254D436A693907a1f57696900",
            "23000000"
        ]
    ],
    "gas": "500000",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900"
}

With gasPriority:

{
    "lendborrowId": "1300",
    "market": "USDC",
    "actions": [
        "ACTION_SUPPLY_NATIVE_TOKEN",
        "ACTION_SUPPLY_NATIVE_TOKEN"
    ],
    "data": [
        [
            "0xc3d688B66703497DAA19211EEdff47f25384cdc3",
            "0x6Fb447Ae94F5180254D436A693907a1f57696900",
            "00000100000000"
        ],
        [
            "0xc3d688B66703497DAA19211EEdff47f25384cdc3",
            "0x6Fb447Ae94F5180254D436A693907a1f57696900",
            "23000000"
        ]
    ],
    "gas": "500000",
    "gasPriority": "medium",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900"
}

Last updated