### Dynamic Documentation Query Example Source: https://docs.defisaver.com/actions/checkers/morphoaavev2ratiocheck Example of how to perform a GET request to query documentation dynamically using the 'ask' and 'goal' parameters. ```http GET https://docs.defisaver.com/actions/checkers/morphoaavev2ratiocheck.md?ask=&goal= ``` -------------------------------- ### Dynamic Documentation Query Example Source: https://docs.defisaver.com/actions/chicken-bonds/fetchbondid Example of how to query documentation dynamically using an HTTP GET request. This is useful for retrieving information not explicitly present on the page. ```http GET https://docs.defisaver.com/actions/chicken-bonds/fetchbondid.md?ask=&goal= ``` -------------------------------- ### Querying Documentation with GET Request Source: https://docs.defisaver.com/protocol/triggers This example shows how to query the documentation dynamically using an HTTP GET request. It includes parameters for asking a question and specifying an end goal. ```http GET https://docs.defisaver.com/protocol/triggers.md?ask=&goal= ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.defisaver.com/triggers/morphooptimizers/morphoaavev2ratiotrigger This example shows how to query the documentation dynamically using an HTTP GET request. Include your question in the 'ask' parameter and optionally specify a broader 'goal' for tailored answers. ```http GET https://docs.defisaver.com/triggers/morphooptimizers/morphoaavev2ratiotrigger.md?ask=&goal= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.defisaver.com/triggers/liquityv2/liquityv2quotepricetrigger Example of how to perform an HTTP GET request to query documentation dynamically using the 'ask' and optional 'goal' query parameters. ```http GET https://docs.defisaver.com/triggers/liquityv2/liquityv2quotepricetrigger.md?ask=&goal= ``` -------------------------------- ### Querying Documentation with Ask Parameter Source: https://docs.defisaver.com/actions/compound-v3/compv3borrow Example of how to query documentation dynamically using the 'ask' and 'goal' query parameters in an HTTP GET request. ```http GET https://docs.defisaver.com/actions/compound-v3/compv3borrow.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/aave-v2/aaveclaimaave Illustrates how to query documentation dynamically using an HTTP GET request with 'ask' and optional 'goal' parameters. ```http GET https://docs.defisaver.com/actions/aave-v2/aaveclaimaave.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/aave-v3/aavev3collateralswitch Demonstrates how to query documentation dynamically using an HTTP GET request with 'ask' and optional 'goal' parameters. ```http GET https://docs.defisaver.com/actions/aave-v3/aavev3collateralswitch.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/aave-v2/aavesupply Demonstrates how to query documentation dynamically using an HTTP GET request with 'ask' and optional 'goal' query parameters. ```http GET https://docs.defisaver.com/actions/aave-v2/aavesupply.md?ask=&goal= ``` -------------------------------- ### Dynamic Documentation Querying (HTTP GET) Source: https://docs.defisaver.com/actions/compound-v3/compv3withdraw Demonstrates how to query documentation dynamically using an HTTP GET request. Include the `ask` parameter for your question and optionally the `goal` parameter for broader context. ```http GET https://docs.defisaver.com/actions/compound-v3/compv3withdraw.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/aave-v3/aavev3borrow Example of how to query documentation dynamically using an HTTP GET request. This is useful for retrieving specific information or clarification not explicitly present on the page. ```http GET https://docs.defisaver.com/actions/aave-v3/aavev3borrow.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/liquityv2/liquityv2spdeposit Demonstrates how to query documentation dynamically using an HTTP GET request. Includes parameters for the question and an optional end goal. ```http GET https://docs.defisaver.com/actions/liquityv2/liquityv2spdeposit.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/reflexer/reflexeropen Demonstrates how to query DeFi Saver documentation dynamically using an HTTP GET request with 'ask' and optional 'goal' parameters. ```http GET https://docs.defisaver.com/actions/reflexer/reflexeropen.md?ask=&goal= ``` -------------------------------- ### Querying Documentation (HTTP GET) Source: https://docs.defisaver.com/actions/llamalend/llamalendselfliquidatewithcoll Demonstrates how to query documentation dynamically using an HTTP GET request. This is useful for retrieving information not explicitly present on the page or for clarification. ```http GET https://docs.defisaver.com/actions/llamalend/llamalendselfliquidatewithcoll.md?ask=&goal= ``` -------------------------------- ### Querying Documentation with GET Request Source: https://docs.defisaver.com/actions/aave-v2/aaveunstake Demonstrates how to query documentation dynamically using a GET request with 'ask' and optional 'goal' query parameters. This is useful for retrieving information not explicitly present on the page. ```http GET https://docs.defisaver.com/actions/aave-v2/aaveunstake.md?ask=&goal= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.defisaver.com/triggers/spark/sparkquotepricetrigger Demonstrates how to perform an HTTP GET request to query the documentation with 'ask' and optional 'goal' parameters. ```http GET https://docs.defisaver.com/triggers/spark/sparkquotepricetrigger.md?ask=&goal= ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.defisaver.com/triggers/aavev4/aavev4ratiotrigger Use this GET request to query the documentation dynamically. Include your question in the 'ask' parameter and an optional 'goal' parameter for tailored answers. ```http GET https://docs.defisaver.com/triggers/aavev4/aavev4ratiotrigger.md?ask=&goal= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.defisaver.com/actions/checkers/curveusdcollratiocheck Demonstrates how to query documentation dynamically using an HTTP GET request with 'ask' and optional 'goal' parameters. This is useful for retrieving specific information or clarification not directly present on the page. ```http GET https://docs.defisaver.com/actions/checkers/curveusdcollratiocheck.md?ask=&goal= ``` -------------------------------- ### Querying Documentation with `ask` and `goal` Parameters Source: https://docs.defisaver.com/actions/liquity/liquityclose Demonstrates how to perform a GET request to query documentation dynamically using the `ask` and optional `goal` query parameters. ```http GET https://docs.defisaver.com/actions/liquity/liquityclose.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/aave-v2/aavecollateralswitch Demonstrates how to query documentation dynamically using an HTTP GET request. Include the 'ask' parameter for your question and optionally the 'goal' parameter for broader context. ```http GET https://docs.defisaver.com/actions/aave-v2/aavecollateralswitch.md?ask=&goal= ``` -------------------------------- ### Querying Documentation (HTTP GET) Source: https://docs.defisaver.com/actions/utils/changeproxyowner Demonstrates how to query DeFi Saver's documentation dynamically using an HTTP GET request. This is useful for retrieving information not explicitly present on the page or for clarification. ```http GET https://docs.defisaver.com/actions/utils/changeproxyowner.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/eulerv2/eulerv2paybackwithshares Demonstrates how to query documentation dynamically using an HTTP GET request with 'ask' and optional 'goal' query parameters. Useful for retrieving specific information or clarifications not explicitly present on the page. ```http GET https://docs.defisaver.com/actions/eulerv2/eulerv2paybackwithshares.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/checkers/mcdratiocheck Illustrates how to query the documentation dynamically using an HTTP GET request. Include your question in the 'ask' parameter and optionally specify an 'endgoal' for tailored answers. ```http GET https://docs.defisaver.com/actions/checkers/mcdratiocheck.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/aave-v2/aaveborrow Demonstrates how to query DeFi Saver documentation dynamically using an HTTP GET request. Include your question in the 'ask' parameter and an optional goal in the 'goal' parameter. ```http GET https://docs.defisaver.com/actions/aave-v2/aaveborrow.md?ask=&goal= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.defisaver.com/triggers/curveusd/curveusdcollratiotrigger Demonstrates how to query the documentation dynamically using an HTTP GET request. This is useful for retrieving specific information not immediately apparent on the page or for broader context. ```http GET https://docs.defisaver.com/triggers/curveusd/curveusdcollratiotrigger.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET (Bash) Source: https://docs.defisaver.com/actions/checkers/aavev3openratiocheck Illustrates how to query the documentation dynamically using an HTTP GET request with 'ask' and optional 'goal' parameters. This is useful for retrieving specific information or clarification not explicitly present on the page. ```bash GET https://docs.defisaver.com/actions/checkers/aavev3openratiocheck.md?ask=&goal= ``` -------------------------------- ### Querying Documentation with GET Request Source: https://docs.defisaver.com/actions/aave-v2 To get information not explicitly on the page, make a GET request to the page URL with 'ask' and optional 'goal' query parameters. 'ask' is for the specific question, and 'goal' is for the broader objective. ```http GET https://docs.defisaver.com/actions/aave-v2.md?ask=&goal= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.defisaver.com/triggers/reflexer/reflexerratiotrigger Use this endpoint to dynamically query the documentation. Include your question in the 'ask' parameter and an optional 'goal' parameter to guide the AI's response. This is useful for retrieving information not explicitly present on the current page. ```http GET https://docs.defisaver.com/triggers/reflexer/reflexerratiotrigger.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via API Source: https://docs.defisaver.com/actions/aave-v2/aavewithdraw Demonstrates how to query documentation dynamically using a GET request with 'ask' and optional 'goal' parameters. ```http GET https://docs.defisaver.com/actions/aave-v2/aavewithdraw.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/maker/untitled To get information not directly on the page, make an HTTP GET request to the page URL with 'ask' and optional 'goal' query parameters. The response includes an answer and relevant documentation excerpts. ```http GET https://docs.defisaver.com/actions/maker/untitled.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP Source: https://docs.defisaver.com/actions/utils/permittoken Demonstrates how to query this documentation dynamically using an HTTP GET request with 'ask' and optional 'goal' parameters. ```http GET https://docs.defisaver.com/actions/utils/permittoken.md?ask=&goal= ``` -------------------------------- ### Query Documentation with AI Source: https://docs.defisaver.com/triggers/aavev4 Use this GET request to query the documentation dynamically. Include your specific question in the 'ask' parameter and an optional broader goal in the 'goal' parameter to get tailored answers from GitBook's AI. ```http GET https://docs.defisaver.com/triggers/aavev4.md?ask=&goal= ``` -------------------------------- ### Query Documentation with Ask and Goal Parameters Source: https://docs.defisaver.com/actions/compound-v3 Use this GET request to query the documentation dynamically. Include an 'ask' parameter for your specific question and an optional 'goal' parameter for broader context. ```HTTP GET https://docs.defisaver.com/actions/compound-v3.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/utils/gasfeetakerl2 Use this mechanism to query documentation dynamically by performing an HTTP GET request with 'ask' and optional 'goal' query parameters. This is useful when information is not explicitly present or requires clarification. ```http GET https://docs.defisaver.com/actions/utils/gasfeetakerl2.md?ask=&goal= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.defisaver.com/actions/llamalend/llamalendcreate Use this mechanism to query documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the `ask` query parameter. ```http GET https://docs.defisaver.com/actions/llamalend/llamalendcreate.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/morphooptimizers/aavev2/morphoaavev2payback Use this endpoint to dynamically query the documentation. Append `?ask=&goal=` to the page URL to get specific answers tailored to your objective. ```http GET https://docs.defisaver.com/actions/morphooptimizers/aavev2/morphoaavev2payback.md?ask=&goal= ``` -------------------------------- ### Query Documentation with Ask Parameter Source: https://docs.defisaver.com/triggers/utils/closepricetrigger Use this GET request to query the documentation dynamically. Include your question in the 'ask' parameter and an optional 'goal' parameter for context. ```http GET https://docs.defisaver.com/triggers/utils/closepricetrigger.md?ask=&goal= ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.defisaver.com/protocol/security-and-audits/admin-access-control Use this GET request to ask specific questions or define broader goals when information is not directly available on the page. The 'ask' parameter is for the immediate question, and 'goal' is optional for tailoring the answer. ```http GET https://docs.defisaver.com/protocol/security-and-audits/admin-access-control.md?ask=&goal= ``` -------------------------------- ### Query Documentation with Ask Parameter Source: https://docs.defisaver.com/triggers/spark/sparkratiotriggre Use this GET request to query documentation dynamically. Include your question in the 'ask' parameter and an optional 'goal' parameter for context. ```http GET https://docs.defisaver.com/triggers/spark/sparkratiotriggre.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/protocol/core/strategy-executor Demonstrates how to query the documentation dynamically using an HTTP GET request. This method is useful for retrieving specific information, clarifications, or related documentation sections not explicitly present on the current page. ```http GET https://docs.defisaver.com/protocol/core/strategy-executor.md?ask=&goal= ``` -------------------------------- ### Querying Documentation with ASK API Source: https://docs.defisaver.com/actions/morphoblue/morphoblueborrow Demonstrates how to query documentation dynamically using the ASK API by making a GET request with 'ask' and optional 'goal' query parameters. ```http GET https://docs.defisaver.com/actions/morphoblue/morphoblueborrow.md?ask=&goal= ``` -------------------------------- ### Querying Documentation with Ask Parameter Source: https://docs.defisaver.com/actions/curve/curvewithdraw Use this GET request format to query the documentation dynamically. The 'ask' parameter specifies the question, and 'goal' is an optional parameter to tailor the answer. ```http GET https://docs.defisaver.com/actions/curve/curvewithdraw.md?ask=&goal= ``` -------------------------------- ### Query Documentation Endpoint Source: https://docs.defisaver.com/actions/utils/tokenbalance Demonstrates how to query the documentation dynamically using an HTTP GET request. Include the 'ask' parameter for your question and optionally the 'goal' parameter for broader context. ```http GET https://docs.defisaver.com/actions/utils/tokenbalance.md?ask=&goal= ``` -------------------------------- ### Querying Liquity Documentation Source: https://docs.defisaver.com/actions/liquity Use this GET request to dynamically query the documentation. Include your specific question in the 'ask' parameter and an optional broader goal in the 'goal' parameter. ```HTTP GET https://docs.defisaver.com/actions/liquity.md?ask=&goal= ``` -------------------------------- ### Querying Documentation Source: https://docs.defisaver.com/actions/curveusd/curveusdborrow To query this documentation dynamically, perform an HTTP GET request to the page URL with the `ask` query parameter and an optional `goal` parameter. ```http GET https://docs.defisaver.com/actions/curveusd/curveusdborrow.md?ask=&goal= ``` -------------------------------- ### Querying Documentation API Source: https://docs.defisaver.com/actions/compound-v3/compv3transfer Demonstrates how to query documentation dynamically using a GET request with 'ask' and optional 'goal' parameters. Useful for retrieving specific information or clarification. ```http GET https://docs.defisaver.com/actions/compound-v3/compv3transfer.md?ask=&goal= ``` -------------------------------- ### Querying Documentation with GitBook API Source: https://docs.defisaver.com/actions/convex/convexclaim Demonstrates how to query the documentation dynamically using a GET request to the page URL with 'ask' and optional 'goal' query parameters. ```http GET https://docs.defisaver.com/actions/convex/convexclaim.md?ask=&goal= ``` -------------------------------- ### Querying Documentation with GitBook Source: https://docs.defisaver.com/actions/bprotocol/bprotocolliquityspwithdraw Demonstrates how to query documentation dynamically using GitBook. Send a GET request to the page URL with `ask` and optional `goal` query parameters to retrieve specific information or related documentation. ```http GET https://docs.defisaver.com/actions/bprotocol/bprotocolliquityspwithdraw.md?ask=&goal= ``` -------------------------------- ### Query Documentation Endpoint Source: https://docs.defisaver.com/triggers/chicken-bonds/cbreboundtrigger Demonstrates how to query the documentation dynamically using an HTTP GET request. This is useful for retrieving information not explicitly present on the page or for clarification. ```http GET https://docs.defisaver.com/triggers/chicken-bonds/cbreboundtrigger.md?ask=&goal= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.defisaver.com/triggers/aavev3 Use this HTTP GET request to query the documentation dynamically. Include your specific question in the 'ask' parameter and an optional broader goal in the 'goal' parameter. ```http GET https://docs.defisaver.com/triggers/aavev3.md?ask=&goal= ``` -------------------------------- ### CompV3Allow Action SDK Usage Source: https://docs.defisaver.com/actions/compound-v3/compv3allow Example of how to use the CompoundV3AllowAction in the DeFi Saver SDK. ```APIDOC ## CompV3Allow Action SDK Usage ### Description Allows or disallows a manager for Compound V3. The manager will be able to perform actions on behalf of the user. ### SDK Action ```ts const compoundV3AllowAction = new dfs.actions.compoundV3.CompoundV3AllowAction( market, manager, isAllowed ); ``` ### Input Parameters ```solidity /// @param market Main Comet proxy contract that is different for each compound market /// @param manager Address of the manager /// @param isAllowed True for allow, false for disallow struct Params { address market; address manager; bool isAllowed; } ``` ### Return Value ```solidity return bytes32(uint256(isAllowed ? 1 : 0)); ``` ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/maker/untitled-3 Use this mechanism to ask questions about the documentation dynamically. Provide a specific question in the 'ask' parameter and an optional broader goal in the 'goal' parameter. ```http GET https://docs.defisaver.com/actions/maker/untitled-3.md?ask=&goal= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.defisaver.com/actions/morphooptimizers/aavev3 Use this HTTP GET request to query the documentation dynamically. Include your specific question in the 'ask' parameter and an optional broader goal in the 'goal' parameter. The response will provide a direct answer and relevant excerpts. ```HTTP GET https://docs.defisaver.com/actions/morphooptimizers/aavev3.md?ask=&goal= ``` -------------------------------- ### Query Documentation API Source: https://docs.defisaver.com/triggers/aavev4/aavev4quotepricerangetrigger Demonstrates how to query the documentation dynamically using an HTTP GET request. This is useful for retrieving information not explicitly present on the page or for clarification. ```http GET https://docs.defisaver.com/triggers/aavev4/aavev4quotepricerangetrigger.md?ask=&goal= ``` -------------------------------- ### Query Documentation API Source: https://docs.defisaver.com/actions/llamalend/llamalendgetdebt Demonstrates how to query the documentation dynamically using an HTTP GET request with 'ask' and optional 'goal' parameters. This is useful for retrieving information not explicitly present on the page. ```http GET https://docs.defisaver.com/actions/llamalend/llamalendgetdebt.md?ask=&goal= ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.defisaver.com/actions/aave-v2/aaveclaimstkaave Use this mechanism to ask questions about the documentation dynamically. Include your question in the 'ask' query parameter and an optional broader goal in the 'goal' parameter. ```http GET https://docs.defisaver.com/actions/aave-v2/aaveclaimstkaave.md?ask=&goal= ``` -------------------------------- ### Query Documentation Source: https://docs.defisaver.com/actions/morphooptimizers You can query this documentation dynamically by performing an HTTP GET request on the page URL with the `ask` query parameter and an optional `goal` parameter. This is useful for retrieving specific information or clarification not explicitly present on the page. ```http GET https://docs.defisaver.com/actions/morphooptimizers.md?ask=&goal= ``` -------------------------------- ### Query CompoundV3 Documentation Source: https://docs.defisaver.com/triggers/compoundv3 Use this GET request to query the CompoundV3 documentation page dynamically. Include your specific question in the 'ask' parameter and an optional broader goal in the 'goal' parameter. ```HTTP GET https://docs.defisaver.com/triggers/compoundv3.md?ask=&goal= ``` -------------------------------- ### Query Documentation with AI Agent Source: https://docs.defisaver.com/protocol/actions Use this endpoint to ask questions about the documentation. Provide a specific question in the 'ask' parameter and an optional broader goal in the 'goal' parameter to get tailored answers and relevant excerpts. ```http GET https://docs.defisaver.com/protocol/actions.md?ask=&goal= ``` -------------------------------- ### Query Ether.Fi Documentation Source: https://docs.defisaver.com/actions/ether.fi Use this GET request to query the Ether.Fi documentation page dynamically. Include your specific question in the 'ask' parameter and an optional broader goal in the 'goal' parameter. ```http GET https://docs.defisaver.com/actions/ether.fi.md?ask=&goal= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.defisaver.com/readme Use this method to ask questions about the documentation when the answer is not explicitly present on the current page. The 'ask' parameter is mandatory for specifying the question, and 'goal' is optional for providing broader context. ```http GET https://docs.defisaver.com/readme.md?ask=&goal= ``` -------------------------------- ### Querying Documentation Source: https://docs.defisaver.com/triggers/curveusd/curveusdborrowratetrigger Explains how to dynamically query the documentation using an HTTP GET request. This is useful for retrieving information not explicitly present on the current page or for getting clarification. ```APIDOC ## Querying This Documentation Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter: ``` GET https://docs.defisaver.com/triggers/curveusd/curveusdborrowratetrigger.md?ask=&goal= ``` ### Parameters - **ask** (string) - Required - The specific question you want to ask about the documentation. - **goal** (string) - Optional - The broader end goal you are trying to accomplish, which helps tailor the answer. ### Response The response will contain a direct answer to your question, along with relevant excerpts and sources from the documentation. ``` -------------------------------- ### Query Documentation with Ask Parameter Source: https://docs.defisaver.com/triggers/liquity/liquitydebtinfrontwithlimittrigger Demonstrates how to query the documentation dynamically using the `ask` query parameter for specific questions and an optional `goal` parameter for broader context. ```http GET https://docs.defisaver.com/triggers/liquity/liquitydebtinfrontwithlimittrigger.md?ask=&goal= ``` -------------------------------- ### Query Documentation with Agent Instructions Source: https://docs.defisaver.com/actions/dydx Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter. ```http GET https://docs.defisaver.com/actions/dydx.md?ask=&goal= ``` -------------------------------- ### LiquityV2Open SDK Action Source: https://docs.defisaver.com/actions/liquityv2/liquityv2open Instantiate the LiquityV2OpenAction with market, addresses, amounts, hints, and interest rate. ```APIDOC ## LiquityV2Open SDK Action ### Description Instantiate the LiquityV2OpenAction with market, addresses, amounts, hints, and interest rate. ### SDK Action ```ts const liquityV2OpenAction = new dfs.actions.liquityV2.LiquityV2OpenAction( market, from, to, collToken, interestBatchManager, ownerIndex, collAmount, boldAmount, upperHint, lowerHint, annualInterestRate, maxUpfrontFee ); ``` ``` -------------------------------- ### Get Paginated Strategies Source: https://docs.defisaver.com/protocol/core/strategy-storage Retrieves a paginated list of strategies. ```APIDOC ## GET /getPaginatedStrategies ### Description Retrieves a paginated list of strategies. ### Method GET ### Endpoint /getPaginatedStrategies ### Parameters #### Path Parameters None #### Query Parameters - **_page** (uint) - Required - The page number to retrieve. - **_perPage** (uint) - Required - The number of strategies per page. #### Request Body None ### Request Example ```json { "_page": 1, "_perPage": 5 } ``` ### Response #### Success Response (200) - **strategies** (Strategy[] memory) - An array of strategy memory structs. #### Response Example ```json { "strategies": [ { "name": "Strategy A", "creator": "0x1111111111111111111111111111111111111111", "triggerIds": ["0xaaaaaaaa"], "actionIds": ["0xbbbbbbbb"], "paramMapping": [[1, 2]], "continuous": false }, { "name": "Strategy B", "creator": "0x2222222222222222222222222222222222222222", "triggerIds": ["0xcccccccc"], "actionIds": ["0xdddddddd"], "paramMapping": [[3, 4]], "continuous": true } ] } ``` ``` -------------------------------- ### Get Strategy Source: https://docs.defisaver.com/protocol/core/strategy-storage Retrieves the details of a specific strategy by its ID. ```APIDOC ## GET /getStrategy ### Description Retrieves the details of a specific strategy by its ID. ### Method GET ### Endpoint /getStrategy ### Parameters #### Path Parameters None #### Query Parameters - **_strategyId** (uint) - Required - The ID of the strategy to retrieve. #### Request Body None ### Request Example ```json { "_strategyId": 1 } ``` ### Response #### Success Response (200) - **strategy** (Strategy memory) - The memory struct containing the strategy details. - **name** (string) - Name of the strategy. - **creator** (address) - Address of the user which created the strategy. - **triggerIds** (bytes4[]) - Array of identifiers for trigger. - **actionIds** (bytes4[]) - Array of identifiers for actions. - **paramMapping** (uint8[][]) - Describes how inputs to functions are piped from return/subbed values. - **continuous** (bool) - If the action is repeated (continuos) or one time. #### Response Example ```json { "strategy": { "name": "Example Strategy", "creator": "0x1234567890abcdef1234567890abcdef12345678", "triggerIds": ["0x12345678"], "actionIds": ["0xabcdef01"], "paramMapping": [[0, 1]], "continuous": true } } ``` ``` -------------------------------- ### Querying Documentation with `ask` parameter Source: https://docs.defisaver.com/actions/liquityv2/liquityv2adjust Illustrates how to query documentation dynamically using the `ask` query parameter. This is useful for retrieving specific information or clarifications not explicitly present on the page. ```http GET https://docs.defisaver.com/actions/liquityv2/liquityv2adjust.md?ask=&goal= ``` -------------------------------- ### Get Strategy Count Source: https://docs.defisaver.com/protocol/core/strategy-storage Retrieves the total number of strategies currently stored. ```APIDOC ## GET /getStrategyCount ### Description Retrieves the total number of strategies currently stored. ### Method GET ### Endpoint /getStrategyCount ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **strategyCount** (uint256) - The total number of strategies. #### Response Example ```json { "strategyCount": 10 } ``` ``` -------------------------------- ### SDaiUnwrap Action SDK Usage Source: https://docs.defisaver.com/actions/utils/sdaiunwrap Example of how to use the SDaiUnwrap action in the SDK. ```APIDOC ## SDaiUnwrap Action SDK Usage ### Description This snippet shows how to instantiate the `SDaiUnwrapAction` class from the DeFi Saver SDK. ### Method `new dfs.actions.basic.SDaiUnwrapAction(amount, from, to)` ### Parameters - **amount** (uint256) - Amount of sDai to redeem. - **from** (address) - Address from which the tokens will be pulled. - **to** (address) - Address that will receive the dai. ``` -------------------------------- ### SDK Action Initialization Source: https://docs.defisaver.com/actions/liquity/liquityethgaintotrove Instantiate the LiquityEthGainToTrove action with necessary parameters for withdrawing ETH gains. ```typescript const liquityEthGainToTroveAction = new dfs.actions.liquity.LiquityEthGainToTroveAction( lqtyTo, upperHint, lowerHint ); ``` -------------------------------- ### MorphoBlueSetAuthWithSig SDK Usage Source: https://docs.defisaver.com/actions/morphoblue/morphobluesetauthwithsig Example of how to instantiate the MorphoBlueSetAuthWithSig action using the DeFiSaver SDK. ```APIDOC ## MorphoBlueSetAuthWithSig SDK Action ```ts const morphoBlueSetAuthWithSigAction = new dfs.actions.morpho-blue.MorphoBlueSetAuthWithSigAction( authorizer, authorized, isAuthorized, nonce, deadline, v, r, s ); ``` ``` -------------------------------- ### EulerV2Supply Action Source: https://docs.defisaver.com/actions/eulerv2/eulerv2supply Supplies assets to a Euler vault and gets eTokens vault shares. The action ID is `0xc9533e95`. ```APIDOC ## EulerV2Supply Action ### Description Supply assets to a Euler vault and gets eTokens vault shares. ### Action ID `0xc9533e95` ### SDK Action ```ts const eulerV2SupplyAction = new dfs.actions.eulerV2.EulerV2SupplyAction( vault, tokenAddress, account, from, amount, enableAsColl ); ``` ### Input Parameters ```solidity struct Params { address vault; // The address of the supply vault address account; // The address of the Euler account, defaults to user's wallet address from; // The address from which to pull tokens to be supplied uint256 amount; // The amount of assets to supply bool enableAsColl; // Whether to enable supply vault as collateral } ``` ### Return Value ```solidity return bytes32(supplyAmount); ``` ### Events and Logs ```solidity emit ActionEvent("EulerV2Supply", logData); logger.logActionDirectEvent("EulerV2Supply", logData); bytes memory logData = abi.encode(params); ``` ``` -------------------------------- ### Querying LlamaLendSupply Documentation Source: https://docs.defisaver.com/actions/llamalend/llamalendsupply Demonstrates how to perform an HTTP GET request to query this documentation page dynamically for specific information. ```APIDOC ## Querying LlamaLendSupply Documentation ### Description Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter to dynamically query the documentation. ### Method `GET` ### Endpoint `https://docs.defisaver.com/actions/llamalend/llamalendsupply.md?ask=&goal=` ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question, specific, self-contained, and in natural language. - **goal** (string) - Optional - The broader end goal to tailor the answer towards. ``` -------------------------------- ### Query Documentation with Ask and Goal Parameters Source: https://docs.defisaver.com/triggers/fluid Use this endpoint to ask questions about the documentation. The 'goal' parameter helps tailor the response to a broader objective. ```HTTP GET https://docs.defisaver.com/triggers/fluid.md?ask=&goal= ``` -------------------------------- ### CompV3Supply Action Source: https://docs.defisaver.com/actions/compound-v3/compv3supply This snippet shows how to instantiate the CompV3Supply action using the DeFi Saver SDK. ```APIDOC ## CompV3Supply Action ### Description Supply a token to CompoundV3. ### SDK Action ```ts const compoundV3SupplyAction = new dfs.actions.compoundV3.CompoundV3SupplyAction( market, tokenAddr, amount, from, onBehalf ); ``` ### Input Parameters ```solidity /// @param market Main Comet proxy contract that is different for each compound market /// @param tokenAddr Address of the token we are supplying /// @param amount Amount in wei of tokens we are supplying /// @param from Address from which we are pulling the tokens /// @param onBehalf Address where we are supplying the tokens to struct Params { address market; address tokenAddr; uint256 amount; address from; address onBehalf; } ``` ### Return Value ```solidity return bytes32(withdrawAmount); ``` ``` -------------------------------- ### FLAction Solidity Event Emission Source: https://docs.defisaver.com/actions/flash-loans/flaction An example of an event emission for the FLAction, logging the provider name and flash loan parameters. ```solidity emit ActionEvent("FLAction", abi.encode("", flParams)); ``` -------------------------------- ### Instantiate TokenBalance Action Source: https://docs.defisaver.com/actions/utils/tokenbalance Instantiates the TokenBalance action with the token and holder addresses. This is a basic setup for retrieving token balances. ```typescript const tokenBalanceAction = new dfs.actions.basic.TokenBalanceAction( tokenAddr, holderAddr ); ``` -------------------------------- ### TrailingStopTrigger Subscription Parameters Source: https://docs.defisaver.com/triggers/utils/trailingstoptrigger Defines the parameters required for subscribing to the TrailingStopTrigger, including token address, percentage, and starting round ID. ```APIDOC ## TrailingStopTrigger Subscription Parameters These are the parameters used when subscribing to the TrailingStopTrigger. ### Structure ```solidity struct SubParams { address tokenAddr; uint256 percentage; uint80 startRoundId; } ``` ### Fields - **tokenAddr** (address) - The address of the token. - **percentage** (uint256) - The percentage of the price that represents the triggerable point. - **startRoundId** (uint80) - The starting round ID of the token. ``` -------------------------------- ### LiquityV2NewInterestRateChecker Event Logging (Solidity) Source: https://docs.defisaver.com/actions/checkers/liquityv2newinterestratechecker Demonstrates how to emit an ActionEvent for the LiquityV2NewInterestRateChecker action in Solidity, including encoding the parameters. ```solidity emit ActionEvent("LiquityV2NewInterestRateChecker", logData); bytes memory logData = abi.encode(params); ``` -------------------------------- ### Querying Documentation Dynamically Source: https://docs.defisaver.com/actions/checkers/mcdratiocheck Explains how to query the documentation dynamically using an HTTP GET request with `ask` and optional `goal` query parameters. ```APIDOC ## Querying This Documentation Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter: ``` GET https://docs.defisaver.com/actions/checkers/mcdratiocheck.md?ask=&goal= ``` `ask` is the immediate question: it should be specific, self-contained, and written in natural language. `goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. ``` -------------------------------- ### Querying TrailingStopTrigger Documentation Source: https://docs.defisaver.com/triggers/utils/trailingstoptrigger This section explains how to query the documentation dynamically using an HTTP GET request with `ask` and optional `goal` query parameters. ```APIDOC ## Querying This Documentation To get information not explicitly present on this page, you can perform an HTTP GET request to the page URL with query parameters. ### Method `GET` ### Endpoint `https://docs.defisaver.com/triggers/utils/trailingstoptrigger.md?ask=&goal=` ### Query Parameters - **ask** (string) - Required - The specific question you want to ask about the documentation. - **goal** (string) - Optional - The broader end goal you are trying to accomplish, used to tailor the answer. ``` -------------------------------- ### Query Documentation with Ask and Goal Parameters Source: https://docs.defisaver.com/actions/yearn Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections. 'ask' is the immediate question; it should be specific, self-contained, and written in natural language. 'goal' is optional and describes the broader end goal you are ultimately trying to accomplish. ```HTTP GET https://docs.defisaver.com/actions/yearn.md?ask=&goal= ``` -------------------------------- ### Querying LiquityRatioIncreaseCheck Documentation Source: https://docs.defisaver.com/actions/checkers/liquityratioincreasecheck Explains how to dynamically query the documentation for the LiquityRatioIncreaseCheck page using an HTTP GET request with `ask` and optional `goal` parameters. ```APIDOC ## Querying LiquityRatioIncreaseCheck Documentation ### Description This section describes how to perform an HTTP GET request to the documentation page to ask questions dynamically. ### Method `GET` ### Endpoint `https://docs.defisaver.com/actions/checkers/liquityratioincreasecheck.md?ask=&goal=` ### Query Parameters - **ask** (string) - Required - The specific question to ask about the documentation. - **goal** (string) - Optional - The broader end goal the user is trying to accomplish. ``` -------------------------------- ### Fetch Contract Address Source: https://docs.defisaver.com/protocol/core/dfs-registry Example of how to fetch a contract address from the registry using its ID. Ensure you have the necessary utility functions for hashing and byte conversion. ```javascript const contractAddr = await registry.getAddr(bytes4(utils.keccak256(utils.toUtf8Bytes(contractName)))); ``` -------------------------------- ### Maker DSR Deposit Event Logging Source: https://docs.defisaver.com/actions/maker/mcddsrdeposit Provides examples of how to log events for the McdDsrDeposit action in Solidity, including encoding parameters and emitting ActionEvent. ```solidity emit ActionEvent("McdDsrDeposit", logData); logger.logActionDirectEvent("McdDsrDeposit", logData); bytes memory logData = abi.encode(params); ``` -------------------------------- ### TrailingStopTrigger Subscription Parameters Source: https://docs.defisaver.com/triggers/utils/trailingstoptrigger Defines the parameters required for subscribing to the TrailingStopTrigger. Includes the token address, the trigger percentage, and the starting Chainlink round ID. ```solidity /// @param tokenAddr address of the token /// @param percentage percentage of the price that represents the triggerable point /// @param startRoundId start round id of the token struct SubParams { address tokenAddr; uint256 percentage; uint80 startRoundId; } ``` -------------------------------- ### EulerV2Supply Event Logging (Solidity) Source: https://docs.defisaver.com/actions/eulerv2/eulerv2supply Illustrates how to log events and data for the EulerV2Supply action in Solidity using ActionEvent and abi.encode. ```solidity emit ActionEvent("EulerV2Supply", logData); logger.logActionDirectEvent("EulerV2Supply", logData); bytes memory logData = abi.encode(params); ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.defisaver.com/triggers/liquity/liquityratiotrigger Demonstrates how to query the documentation using GitBook's API. This is useful for retrieving information not explicitly present on the page or for clarification. ```http GET https://docs.defisaver.com/triggers/liquity/liquityratiotrigger.md?ask=&goal= ``` -------------------------------- ### Initialize LiquityV2QuotePriceTrigger SDK Source: https://docs.defisaver.com/triggers/liquityv2/liquityv2quotepricetrigger Instantiate the LiquityV2QuotePriceTrigger contract using the SDK. Requires market address, price threshold, and state. ```typescript const liquityV2QuotePriceTrigger = new dfs.triggers.LiquityV2QuotePriceTrigger( market, price, state ); ``` -------------------------------- ### Query Spark Documentation Source: https://docs.defisaver.com/actions/spark Use this GET request to query the Spark documentation dynamically. Include your question in the 'ask' parameter and an optional broader goal in the 'goal' parameter. ```http GET https://docs.defisaver.com/actions/spark.md?ask=&goal= ``` -------------------------------- ### EulerV2Payback Events and Logs (Solidity) Source: https://docs.defisaver.com/actions/eulerv2/eulerv2payback Illustrates how to log events and data for the EulerV2Payback action using Solidity. This includes emitting an `ActionEvent` and logging direct event data. ```solidity emit ActionEvent("EulerV2Payback", logData); logger.logActionDirectEvent("EulerV2Payback", logData); bytes memory logData = abi.encode(params); ```