SDK Functions
The Carbon DeFi SDK's main point of interaction is exposed through the functions in index.ts:
Name | Description |
---|---|
Initializes the SDK. | |
Fetches event data to create a representation of all Carbon DeFi strategies. | |
Gets a list of all active token pairs. | |
Checks if a pair currently has liquidity in one or more strategies. | |
Returns the total amount of liquidity in Carbon DeFi strategies for a given pair. | |
Gets the list of strategies owned by an address. | |
Generates and returns a trade route for a trade, including an unsigned transaction to execute the trade. | |
Creates an unsigned trade transaction for trading by target amount. | |
Creates an unsigned trade transaction for trading by source amount. | |
Creates a Carbon DeFi strategy, formatted for smart contract input, and generates an unsigned transaction. | |
Generates an unsigned transaction with updated order parameters. | |
Generates an unsigned transaction to delete a strategy. | |
This returns the amount of liquidity available for a token pair at a specific trade-rate. | |
Gets the current lowest trade price for a given token pair. | |
Gets the current highest trade price for a given token pair. |
Last updated