Harvest Finance

/getbalance

Get balance of the user in a given Vault or Pool

GET https://api.expand.network/yieldaggregator/getbalance

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL

address*

String

Public Address of the owner.

tokenAddress

String

The address of the token.

poolAddress

String

The address of the pool.

yieldAggregatorId*

String

Refer to the Yield Aggregator ID page for details.

vaultAddress

String

The address of the vault.

With tokenAddress:

https://api.expand.network/yieldaggregator/getbalance?address=0xC7565379C190014449eE83CF9FD7475206E59f9e&tokenAddress=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&yieldAggregatorId=5100

With vaultAddress and poolAddress:

https://api.expand.network/yieldaggregator/getbalance?address=0xC7565379C190014449eE83CF9FD7475206E59f9e&vaultAddress=0xFE09e53A81Fe2808bc493ea64319109B5bAa573e&yieldAggregatorId=5100&poolAddress=0x3DA9D911301f8144bdF5c3c67886e5373DCdff8e

/getvaults

Get the number of the vaults along with the respective vault APY.

GET https://api.expand.network/yieldaggregator/getvaults

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL

tokenAddress*

String

The address of the token.

yieldAggregatorId*

String

Refer to the Yield Aggregator ID page for details.

https://api.expand.network/yieldaggregator/getvaults?tokenAddress=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&yieldAggregatorId=5100

/depositvault

Trigger the deposit transaction for the given vault.

POST https://api.expand.network/yieldaggregator/depositvault

Request Body

Name
Type
Description

amount*

String

The amount of token to deposit.

tokenAddress

String

The address of the token.

from*

String

Address of the sender of the token.

gas

String

Maximum gas limit provided by the sender, for the transaction.

vaultAddress

String

The address of the vault.

yieldAggregatorId*

String

Refer to the Yield Aggregator ID page for details.

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

With tokenAddress:

{ 
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "amount": "500000",
    "gas": "2307200",
    "yieldAggregatorId": "5100"
}

With vaultAddress:

{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "vaultAddress": "0xFE09e53A81Fe2808bc493ea64319109B5bAa573e",
    "amount": "500000",
    "gas": "2307200",
    "yieldAggregatorId": "5100"
}

With gasPriority (medium)-

1. With tokenAddress:

{
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "amount": "10000000",
    "gas": "2307200",
    "gasPriority":"medium",
    "yieldAggregatorId": "5100"
}

2. With vaultAddress:

{
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "vaultAddress": "0xFE09e53A81Fe2808bc493ea64319109B5bAa573e",
    "amount": "500000",
    "gas": "2307200",
    "gasPriority":"medium",
    "yieldAggregatorId": "5100"
}

With ofacCheck:

{
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "vaultAddress": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
    "amount": "4881310",
    "gas": "2307200",
    "gasPriority":"high",
    "yieldAggregatorId": "5000",
    "ofacCheck": true
}

/withdrawvault

Trigger the withdraw transaction for the given vault.

POST https://api.expand.network/yieldaggregator/withdrawvault

Request Body

Name
Type
Description

yieldAggregatorId*

String

Refer to the Yield Aggregator ID page for details.

amount*

String

Amount to be withdrawn.

from*

String

Address of the withdrawer of the token.

gas

String

Maximum gas limit provided by the sender, for the transaction.

tokenAddress

String

The address of the the token.

vaultAddress

String

The address of the vault.

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

With tokenAddress:

{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "amount": "500000",
    "gas": "2307200",
    "yieldAggregatorId": "5100"
}

With vaultAddress:

{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "amount": "4934226",
    "gas": "2307200",
    "vaultAddress": "0xFE09e53A81Fe2808bc493ea64319109B5bAa573e",
    "yieldAggregatorId": "5100"
}

With gasPriority (medium)-

1. With tokenAddress:

{
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "amount": "500000",
    "gas": "2307200",
    "gasPriority":"medium",
    "yieldAggregatorId": "5100"
}

2. With vaultAddress:

{
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "vaultAddress": "0xFE09e53A81Fe2808bc493ea64319109B5bAa573e",
    "amount": "500000",
    "gas": "2307200",
    "gasPriority":"medium",
    "yieldAggregatorId": "5100"
}

With ofacCheck:

{
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "vaultAddress": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
    "amount": "4881310",
    "gas": "2307200",
    "gasPriority":"high",
    "yieldAggregatorId": "5000",
    "ofacCheck": true
}

/depositpool

Trigger the deposit transaction for the given pool.

POST https://api.expand.network/yieldaggregator/depositpool

Request Body

Name
Type
Description

yieldAggregatorId*

String

Refer to the Yield Aggregator ID page for details.

amount*

String

The amount of token to deposit.

from*

String

Address of the sender of the token.

gas

String

Maximum gas limit provided by the sender, for the transaction.

tokenAddress

String

The address of the token.

poolAddress

String

The address of the pool.

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

With tokenAddress:

{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "amount": "4934226",
    "gas": "2307200",
    "yieldAggregatorId": "5100"
}

With poolAddress:

{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "poolAddress": "0x3DA9D911301f8144bdF5c3c67886e5373DCdff8e",
    "amount": "4934226",
    "gas": "2307200",
    "yieldAggregatorId": "5100"
}

With gasPriority (low)

1. With tokenAddress:

{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "amount": "4934226",
    "gas": "230720",
    "gasPriority": "low",
    "yieldAggregatorId": "5100"
}

2. With poolAddress:

{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "poolAddress": "0x3DA9D911301f8144bdF5c3c67886e5373DCdff8e",
    "amount": "4934226",
    "gas": "230720",
    "gasPriority": "low",
    "yieldAggregatorId": "5100"
}

With ofacCheck:

{
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "vaultAddress": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
    "amount": "4881310",
    "gas": "2307200",
    "gasPriority":"high",
    "yieldAggregatorId": "5000",
    "ofacCheck": true
}

/withdrawpool

Trigger the withdraw transaction for the given pool.

POST https://api.expand.network/yieldaggregator/withdrawpool

Request Body

Name
Type
Description

yieldAggregatorId*

String

Refer to the Yield Aggregator ID page for details.

amount*

String

Amount to be withdrawn.

from*

String

Address of the withdrawer of the token.

gas

String

Maximum gas limit provided by the sender, for the transaction.

tokenAddress

String

The address of the token.

poolAddress

String

The address of the pool.

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

With tokenAddress:

{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "amount": "4934226",
    "gas": "2307200",
    "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "yieldAggregatorId": "5100"
}

With poolAddress:

{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "poolAddress": "0x3DA9D911301f8144bdF5c3c67886e5373DCdff8e",
    "amount": "4934226",
    "gas": "2307200",
    "yieldAggregatorId": "5100"
}

With gasPriority (medium)

1. With tokenAddress:

{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "amount": "4934226",
    "gas": "230720",
    "gasPriority": "medium",
    "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "yieldAggregatorId": "5100"
}

2. With poolAddress:

{
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "amount": "4934226",
    "gas": "230720",
    "gasPriority": "medium",
    "poolAddress": "0x3DA9D911301f8144bdF5c3c67886e5373DCdff8e",
    "yieldAggregatorId": "5100"
}

With ofacCheck:

{
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "vaultAddress": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
    "amount": "4881310",
    "gas": "2307200",
    "gasPriority":"high",
    "yieldAggregatorId": "5000",
    "ofacCheck": true
}

Last updated