### Query Documentation Dynamically Source: https://docs.goosefx.io/goosefx-amm/gamma/faqs.md Use this GET request to ask questions about the documentation. The response includes a direct answer and relevant excerpts. ```bash GET https://docs.goosefx.io/goosefx-amm/gamma/faqs.md?ask= ``` -------------------------------- ### Querying Documentation with GET Request Source: https://docs.goosefx.io/goosefx-amm/gamma/dynamic-fee.md Demonstrates how to query the documentation dynamically using an HTTP GET request with the 'ask' query parameter. This is useful for retrieving specific information or clarifications not explicitly present on the page. ```http GET https://docs.goosefx.io/goosefx-amm/gamma/dynamic-fee.md?ask= ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.goosefx.io/goosefx-amm/developer-docs.md To ask questions about the documentation, perform an HTTP GET request to the page URL with the 'ask' query parameter. The question should be specific and in natural language. ```http GET https://docs.goosefx.io/goosefx-amm/developer-docs.md?ask= ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.goosefx.io/goosefx-amm/gamma/audit.md To get additional information not directly available on the page, perform an HTTP GET request to the page URL with the 'ask' query parameter. The question should be specific and in natural language. ```http GET https://docs.goosefx.io/goosefx-amm/gamma/audit.md?ask= ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.goosefx.io/risks.md Use this method to ask specific questions about the documentation. The response includes a direct answer and relevant excerpts. ```bash GET https://docs.goosefx.io/risks.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.goosefx.io/goosefx-amm/gamma-for-lps/how-to-add-liquidity.md Use this HTTP GET request to ask questions about the documentation. The response includes direct answers and relevant excerpts. ```HTTP GET https://docs.goosefx.io/goosefx-amm/gamma-for-lps/how-to-add-liquidity.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.goosefx.io/goosefx-amm/gamma-for-lps/how-to-claim-yield.md To get information not explicitly found on a page, make an HTTP GET request to the page URL with an 'ask' query parameter. The question should be specific and in natural language. ```HTTP GET https://docs.goosefx.io/goosefx-amm/gamma-for-lps/how-to-claim-yield.md?ask= ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.goosefx.io/goosefx-amm/gamma/program-instructions.md Use this method to ask questions about the documentation when the answer is not explicitly present. The question should be specific and self-contained. ```http GET https://docs.goosefx.io/goosefx-amm/gamma/program-instructions.md?ask= ``` -------------------------------- ### Query Documentation API Source: https://docs.goosefx.io/tokenomics/validator.md To get information not directly available on a page, make an HTTP GET request to the page URL with the 'ask' query parameter. The question should be specific and in natural language. ```bash GET https://docs.goosefx.io/tokenomics/validator.md?ask= ``` -------------------------------- ### Query Documentation Source: https://docs.goosefx.io/goosefx-amm/gamma-for-lps/how-to-migrate-liquidity.md To ask questions about the documentation, perform an HTTP GET request on the page URL with the 'ask' query parameter. The question should be in natural language. ```bash GET https://docs.goosefx.io/goosefx-amm/gamma-for-lps/how-to-migrate-liquidity.md?ask= ``` -------------------------------- ### initialize Source: https://docs.goosefx.io/goosefx-amm/gamma/program-instructions.md Initializes a pool for a token pair with an initial price. ```APIDOC ## initialize ### Description Initializes a pool for a token pair with an initial price. ### Parameters - **init_amount_0** (any) - Required - Initial amount of token_0. - **init_amount_1** (any) - Required - Initial amount of token_1. - **open_time** (any) - Required - Timestamp when swapping is enabled. ### Context Accounts - **token_0_vault** (account) - Token 0 vault. - **token_1_vault** (account) - Token 1 vault. - **lp_mint** (account) - LP mint account. - **lp_vault** (account) - LP vault. - **observation_state** (account) - Observation state. - **amm_config** (account) - AMM configuration. - **system_program** (system program) - System program reference. - **token_program** (token program) - Token program reference. ``` -------------------------------- ### swap_base_output Source: https://docs.goosefx.io/goosefx-amm/gamma/program-instructions.md Swaps tokens in the pool based on the output amount. ```APIDOC ## swap_base_output ### Description Swaps tokens in the pool based on the output amount. ### Parameters - **max_amount_in** (any) - Required - Maximum amount of input tokens to transfer to prevent excessive slippage. - **amount_out** (any) - Required - Amount of output tokens to receive. ### Context Accounts - **token_in_vault** (account) - Input token vault. - **token_out_vault** (account) - Output token vault. - **pool_state** (account) - Pool state. - **observation_state** (account) - Observation state. - **amm_config** (account) - AMM configuration. - **token_program** (token program) - Token program reference. ``` -------------------------------- ### deposit Source: https://docs.goosefx.io/goosefx-amm/gamma/program-instructions.md Deposits liquidity into the pool and mints LP tokens in return. ```APIDOC ## deposit ### Description Deposits liquidity into the pool and mints LP tokens in return. ### Parameters - **lp_token_amount** (any) - Required - Pool token amount to transfer. - **maximum_token_0_amount** (any) - Required - Maximum token 0 amount to deposit to prevent excessive slippage. - **maximum_token_1_amount** (any) - Required - Maximum token 1 amount to deposit to prevent excessive slippage. ### Context Accounts - **liquidity_provider** (signer) - Signer who is the liquidity provider. - **token_0_vault** (account) - Token 0 vault. - **token_1_vault** (account) - Token 1 vault. - **lp_mint** (account) - LP mint account. - **lp_vault** (account) - LP vault. - **pool_state** (account) - Pool state. - **amm_config** (account) - AMM configuration. - **token_program** (token program) - Token program reference. ``` -------------------------------- ### create_amm_config Source: https://docs.goosefx.io/goosefx-amm/gamma/program-instructions.md Creates and configures the AMM protocol parameters including trade fees, protocol fees, and more. ```APIDOC ## create_amm_config ### Description Creates and configures the AMM protocol parameters including trade fees, protocol fees, and more. ### Parameters - **index** (any) - Required - Index of the AMM configuration. - **trade_fee_rate** (any) - Required - Rate for trade fees. - **protocol_fee_rate** (any) - Required - Rate for protocol fees. - **fund_fee_rate** (any) - Required - Rate for fund fees. - **create_pool_fee** (any) - Required - Fee for creating a pool. ### Context Accounts - **owner** (signer) - Signer who is the address to be set as the protocol owner. - **amm_config** (account) - Account to initialize and store protocol owner address and fee rates. - **system_program** (system program) - System program reference. ``` -------------------------------- ### swap_base_input Source: https://docs.goosefx.io/goosefx-amm/gamma/program-instructions.md Swaps tokens in the pool based on the input amount. ```APIDOC ## swap_base_input ### Description Swaps tokens in the pool based on the input amount. ### Parameters - **amount_in** (any) - Required - Amount of input tokens to transfer. - **minimum_amount_out** (any) - Required - Minimum amount of output tokens to receive to prevent excessive slippage. ### Context Accounts - **token_in_vault** (account) - Input token vault. - **token_out_vault** (account) - Output token vault. - **pool_state** (account) - Pool state. - **observation_state** (account) - Observation state. - **amm_config** (account) - AMM configuration. - **token_program** (token program) - Token program reference. ``` -------------------------------- ### withdraw Source: https://docs.goosefx.io/goosefx-amm/gamma/program-instructions.md Withdraws liquidity from the pool and burns LP tokens. ```APIDOC ## withdraw ### Description Withdraws liquidity from the pool and burns LP tokens. ### Parameters - **lp_token_amount** (any) - Required - Amount of pool tokens to burn. - **minimum_token_0_amount** (any) - Required - Minimum amount of token 0 to receive to prevent excessive slippage. - **minimum_token_1_amount** (any) - Required - Minimum amount of token 1 to receive to prevent excessive slippage. ### Context Accounts - **liquidity_provider** (signer) - Signer who is the liquidity provider. - **token_0_vault** (account) - Token 0 vault. - **token_1_vault** (account) - Token 1 vault. - **lp_mint** (account) - LP mint account. - **lp_vault** (account) - LP vault. - **pool_state** (account) - Pool state. - **amm_config** (account) - AMM configuration. - **token_program** (token program) - Token program reference. ``` -------------------------------- ### Dynamic Fee Formula Source: https://docs.goosefx.io/goosefx-amm/gamma/dynamic-fee.md The core formula for calculating the dynamic fee rate, incorporating base fee, a volatility component, and recent price volatility. ```plaintext dynamic_fee_rate = base_fee + volatility_component + recent_price_volatility ``` -------------------------------- ### collect_protocol_fee Source: https://docs.goosefx.io/goosefx-amm/gamma/program-instructions.md Collects the protocol fee accrued in the pool. ```APIDOC ## collect_protocol_fee ### Description Collects the protocol fee accrued in the pool. ### Parameters - **amount_0_requested** (any) - Required - Maximum amount of token_0 to collect. - **amount_1_requested** (any) - Required - Maximum amount of token_1 to collect. ### Context Accounts - **owner** (signer) - Signer. - **authority** (signer) - Signer. - **pool_state** (account) - Pool state. - **amm_config** (account) - AMM configuration. - **token_0_vault** (account) - Token 0 vault. - **token_1_vault** (account) - Token 1 vault. - **token_0_mint** (account) - Token 0 mint account. - **token_1_mint** (account) - Token 1 mint account. - **token_0_recipient** (account) - Token 0 recipient account. - **token_1_recipient** (account) - Token 1 recipient account. ``` -------------------------------- ### Recent Price Volatility Calculation Source: https://docs.goosefx.io/goosefx-amm/gamma/dynamic-fee.md Defines how recent price volatility is calculated, using the difference between the maximum and minimum price over a period, divided by the average price. This is presented within an HTML pre tag with language specified as 'html' and line numbers enabled. ```html recent_price_volatility = (max_price - min_price) / avg_price over the last N observations ``` -------------------------------- ### update_amm_config Source: https://docs.goosefx.io/goosefx-amm/gamma/program-instructions.md Updates the AMM configuration owner or fee rates. ```APIDOC ## update_amm_config ### Description Updates the AMM configuration owner or fee rates. ### Parameters - **param** (any) - Required - Parameter to update (0: trade fee, 1: protocol fee, 2: fund fee, 3: new owner, 4: new fund owner). - **value** (any) - Required - New value for the specified parameter. ### Context Accounts - **owner** (signer) - Signer who is the AMM config owner or admin. - **amm_config** (account) - Account storing the AMM configuration. ``` -------------------------------- ### Volatility Component Calculation Source: https://docs.goosefx.io/goosefx-amm/gamma/dynamic-fee.md Calculates the volatility component of the dynamic fee, capped by a maximum volatility fee and scaled by a volatility factor and recent price volatility. This snippet is from a code block with line numbers enabled. ```plaintext volatility_component = min(max_volatility_fee, volatility_factor * recent_price_volatility) ``` -------------------------------- ### update_pool_status Source: https://docs.goosefx.io/goosefx-amm/gamma/program-instructions.md Updates the status of a pool (e.g., active, paused). ```APIDOC ## update_pool_status ### Description Updates the status of a pool (e.g., active, paused). ### Parameters - **status** (any) - Required - New status value for the pool. ### Context Accounts - **authority** (signer) - Signer who is the admin. - **pool_state** (accountloader) - AccountLoader for the pool state. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.