Value of the API
- Instant Interaction: These APIs allow developers to quickly prepare and execute transactions with third-party DeFi protocols without needing to understand the underlying complexities of each protocol.
- Standardization: By providing a standardized way to prepare transaction fields and generate payloads, these APIs reduce the risk of errors and improve the efficiency of integrating with multiple DeFi protocols.
- Flexibility: Developers can easily switch between different protocols and action types, making it easier to build versatile DeFi applications that can interact with various services.
- Enhanced User Experience: These APIs streamline the user experience by automating the preparation of transaction fields and payloads. This allows users to focus on their investment strategies rather than the technical details of transaction construction.
How to use?
1. Prepare Transaction Fields for DEFI Actions-
Endpoint:
/v2/farming/tx/prepare
- Description: This API prepares the necessary transaction fields required for various DeFi actions based on the specified protocol and action type. It ensures that the client knows what parameters are needed for the transaction.
- Usage:
Get started
-
Endpoint:
/v2/farming/tx/payload
-
Description: This API generates the transaction payload based on the operation type and parameters provided. It uses the required fields determined by the
/v2/farming/tx/prepare
API. - Usage:
Get started
- Description: Sign and Execute Transaction from API generates transaction payload.
- Usage:
Get started
-
Supported Protocols
alpha-fi
navi
scallop
suilend
native-staking
-
Supported Actions
LENDING
: Borrowing assets from a liquidity pool.BORROW
: Taking a loan against collateral.REPAY
: Paying back a borrowed amount.ADD_LP
: Adding liquidity to a liquidity pool.REMOVE_LP
: Removing liquidity from a liquidity pool.STAKING
: Locking assets to earn rewards.UNSTAKING
: Unlocking staked assets.LENDING_WITHDRAW
: Withdrawing lent assets from a pool.