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
  • /getbalance
  • /getvaults
  • /depositvault
  • /withdrawvault
  • /depositpool
  • /withdrawpool
  1. INTEGRATIONS
  2. Yield Aggregators

Harvest Finance

/getbalance

For /getbalance, the user can either pass the tokenAddress or the vaultAddress and poolAddress along with the required parameters.

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

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
{
    "status": 200,
    "msg": "success",
    "data": {
        "vaultBalance": "0",
        "poolBalance": "0"
    }
}

/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

https://api.expand.network/yieldaggregator/getvaults?tokenAddress=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&yieldAggregatorId=5100
{
    "status": 200,
    "msg": "success",
    "data": {
        "tokenVaults": [
            {
                "vaultAddress": "0xFE09e53A81Fe2808bc493ea64319109B5bAa573e",
                "apy": "4.08",
                "poolAddress": "0x3DA9D911301f8144bdF5c3c67886e5373DCdff8e"
            }
        ]
    }
}

/depositvault

For /depositvault, the user can either pass the tokenAddress or the vaultAddress along with the required parameters.

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

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"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0xFE09e53A81Fe2808bc493ea64319109B5bAa573e",
        "value": "0",
        "gas": "2307200",
        "data": "0xb6b55f25000000000000000000000000000000000000000000000000000000000007a120",
        "referenceId": "d33bc36f30ff49e385388ba332f67594"
    }
}

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 gasPriority-

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0xFE09e53A81Fe2808bc493ea64319109B5bAa573e",
        "value": "0",
        "gas": "2307200",
        "data": "0xb6b55f250000000000000000000000000000000000000000000000000000000000989680",
        "gasPrice": "6690562274",
        "referenceId": "92a80144e7e649bab4815e0edb773cbb"
    }
}

With ofacCheck:

{
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "vaultAddress": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
    "amount": "4881310",
    "gas": "2307200",
    "gasPriority":"high",
    "yieldAggregatorId": "5000",
    "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"
    }
}

/withdrawvault

For /withdrawvault, the user can either pass the tokenAddress or the vaultAddress along with the required parameters.

Trigger the withdraw transaction for the given vault.

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

Request Body

Name
Type
Description

yieldAggregatorId*

String

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"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0xFE09e53A81Fe2808bc493ea64319109B5bAa573e",
        "value": "0",
        "gas": "2307200",
        "data": "0x2e1a7d4d000000000000000000000000000000000000000000000000000000000007a120",
        "referenceId": "7250fb68fbfa4411901e2a77b1e06974"
    }
}

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 gasPriority

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
        "to": "0xFE09e53A81Fe2808bc493ea64319109B5bAa573e",
        "value": "0",
        "gas": "2307200",
        "data": "0x2e1a7d4d000000000000000000000000000000000000000000000000000000000007a120",
        "gasPrice": "6627449509",
        "referenceId": "c3f3f1465e344a36b88e4cf432bb07e8"
    }
}

With ofacCheck:

{
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "vaultAddress": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
    "amount": "4881310",
    "gas": "2307200",
    "gasPriority":"high",
    "yieldAggregatorId": "5000",
    "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"
    }
}

/depositpool

For /depositpool, the user can either pass the tokenAddress or the poolAddress along with the required parameters.

Trigger the deposit transaction for the given pool.

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

Request Body

Name
Type
Description

yieldAggregatorId*

String

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"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x3DA9D911301f8144bdF5c3c67886e5373DCdff8e",
        "value": "0",
        "gas": "2307200",
        "data": "0xa694fc3a00000000000000000000000000000000000000000000000000000000004b4a52",
        "referenceId": "9fdce4b6184e442cbe52d0c3249c7657"
    }
}

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 gasPriority (low):

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x3DA9D911301f8144bdF5c3c67886e5373DCdff8e",
        "value": "0",
        "gas": "230720",
        "data": "0xa694fc3a00000000000000000000000000000000000000000000000000000000004b4a52",
        "gasPrice": "2212407039",
        "referenceId": "16319479f0fd4a8aa334abaa2752d983"
    }
}

With ofacCheck:

{
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "vaultAddress": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
    "amount": "4881310",
    "gas": "2307200",
    "gasPriority":"high",
    "yieldAggregatorId": "5000",
    "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"
    }
}

/withdrawpool

For /withdrawpool, the user can either pass the tokenAddress or the poolAddress along with the required parameters.

Trigger the withdraw transaction for the given pool.

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

Request Body

Name
Type
Description

yieldAggregatorId*

String

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"
}
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x3DA9D911301f8144bdF5c3c67886e5373DCdff8e",
        "value": "0",
        "gas": "2307200",
        "data": "0x2e1a7d4d00000000000000000000000000000000000000000000000000000000004b4a52",
        "referenceId": "cb96c9dc2c9e4ba7804b037f1c799059"
    }
}

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 gasPriority (medium)

{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x3DA9D911301f8144bdF5c3c67886e5373DCdff8e",
        "value": "0",
        "gas": "230720",
        "data": "0x2e1a7d4d00000000000000000000000000000000000000000000000000000000004b4a52",
        "gasPrice": "2914164274",
        "referenceId": "9dadcac44a4241419ed09356c1a25060"
    }
}

With ofacCheck:

{
    "from": "0xfAE7D9854995E28BEB1B1da864ee2A1E2EC17f07",
    "vaultAddress": "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
    "amount": "4881310",
    "gas": "2307200",
    "gasPriority":"high",
    "yieldAggregatorId": "5000",
    "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"
    }
}
PreviousYearn Finance V2NextPendle

Last updated 1 month 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.

⛓️
⚡
Yield Aggregator ID
Yield Aggregator ID
Yield Aggregator ID
Yield Aggregator ID
Yield Aggregator ID
Yield Aggregator ID