### Query Documentation with HTTP GET Source: https://docs.storm.tg/for-developers Use this method to dynamically query the documentation. Include your question as the 'ask' query parameter in the GET request. ```http GET https://docs.storm.tg/for-developers.md?ask= ``` -------------------------------- ### Query Storm Academy Documentation via HTTP GET Source: https://docs.storm.tg/storm-academy Perform an HTTP GET request on a documentation URL with the `ask` query parameter to dynamically query the documentation. Use this when the answer is not explicitly present, for clarification, or to retrieve related sections. ```http GET https://docs.storm.tg/storm-academy.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.storm.tg/trading-concepts/triggered_orders Perform an HTTP GET request to a documentation URL with the `ask` query parameter to ask a specific question. The response will contain a direct answer and relevant excerpts. ```HTTP GET https://docs.storm.tg/trading-concepts/triggered_orders.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.storm.tg/getting-started To get additional information not present on the current page, perform an HTTP GET request to the page URL with the 'ask' query parameter. The question should be specific and in natural language. Use this for clarifications or to retrieve related documentation. ```HTTP GET https://docs.storm.tg/getting-started.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.storm.tg/protocol-mechanics Use this mechanism to dynamically query the documentation. Perform an HTTP GET request on the current page URL with the `ask` query parameter. The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. ```http GET https://docs.storm.tg/protocol-mechanics.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.storm.tg/rewards-and-incentives Perform an HTTP GET request to the current page URL with the 'ask' query parameter to dynamically query the documentation. Use this when the answer is not explicitly present, for clarification, or to retrieve related sections. ```HTTP GET https://docs.storm.tg/rewards-and-incentives.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.storm.tg/links Use this HTTP GET request to query the documentation dynamically. Include your question as the value for the 'ask' query parameter. The response will contain a direct answer and relevant excerpts. ```HTTP GET https://docs.storm.tg/links.md?ask= ``` -------------------------------- ### Query Documentation with 'ask' Parameter Source: https://docs.storm.tg/trading-mechanics/ton_margin_trading To get more information not present on the page, perform an HTTP GET request with the 'ask' query parameter. The question should be specific and in natural language. ```http GET https://docs.storm.tg/trading-mechanics/ton_margin_trading.md?ask= ``` -------------------------------- ### Query Documentation with `ask` Parameter Source: https://docs.storm.tg/introduction/readme To get additional information not directly present on the page, perform an HTTP GET request to the current page URL with the `ask` query parameter. The question should be specific and self-contained. ```http GET https://docs.storm.tg/introduction/readme.md?ask= ``` -------------------------------- ### Example Fee Calculation Source: https://docs.storm.tg/trading-mechanics/ton_margin_trading Illustrates the step-by-step calculation of opening and closing fees for a trade with specific margin and leverage. ```plaintext Opening Fee: 0.2% * (100 * 10) = 2 TON Adjusted Margin for Closing: 100 TON - 2 TON = 98 TON Closing Fee: 0.2% * (98 * 10) = 1.96 TON ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.storm.tg/introduction Use this GET request to query the documentation with a natural language question. The response includes direct answers and relevant excerpts. ```http GET https://docs.storm.tg/introduction.md?ask= ``` -------------------------------- ### Perform HTTP GET Request with 'ask' Parameter Source: https://docs.storm.tg/rewards-and-incentives/mining_rp Use this method to query documentation dynamically when information is not directly available. The question should be specific and self-contained. ```http GET https://docs.storm.tg/rewards-and-incentives/mining_rp.md?ask= ``` -------------------------------- ### Query Documentation Page Source: https://docs.storm.tg/for-developers/api Perform an HTTP GET request to the documentation page with an 'ask' query parameter to dynamically query the documentation. The question should be specific and self-contained. ```http GET https://docs.storm.tg/for-developers/api.md?ask= ``` -------------------------------- ### Example PnL Calculation Source: https://docs.storm.tg/trading-mechanics/ton_margin_trading Demonstrates the PnL calculation using specific trade parameters for a long position. ```plaintext PnL = 1 * 100 * 2 * 10 * (1/2 - 1/4) = 2000 * 0.25 = 500 TON ``` -------------------------------- ### Opening Fee Calculation Source: https://docs.storm.tg/trading-mechanics/ton_margin_trading Formula for calculating the initial fee when opening a coin-margin position. ```plaintext Opening Fee = 0.2% * (Margin * Leverage) ``` -------------------------------- ### Realized PnL Calculation with Fees Source: https://docs.storm.tg/trading-concepts/pl_and_roi Calculates the final realized PnL by adjusting unrealized PnL with closing fees and funding fees. ```javascript Realized PnL = Unrealized PnL - Closing fee + Funding fee ``` -------------------------------- ### Calculate Liquidation Price for Short Position Source: https://docs.storm.tg/trading-concepts/changing_margin Use this formula to calculate the liquidation price for a short position in perpetual futures. It considers entry price, initial margin rate, and maintenance margin rate. Trading fees and funding rates are not included. ```javascript Liquidation Price (LP) = Entry Price × (1 + Initial Margin Rate - Maintenance Margin Rate) Liquidation Price (LP) = $50,000 × (1 + 0.05 - 0.01) = 52,000 $ ``` -------------------------------- ### PNL Calculation Formula Source: https://docs.storm.tg/trading-mechanics/ton_margin_trading Use this formula to calculate Profit and Loss for coin-margin trades. It accounts for trade direction, margin, prices, and leverage. ```plaintext PNL = Trade Direction * Margin * Entry Price * Leverage * (1 / Entry Price - 1 / Exit Price) ``` -------------------------------- ### Funding Fee Calculation Source: https://docs.storm.tg/trading-concepts/pl_and_roi Calculates funding fees based on collateral, leverage, funding rate, and holding period. This fee can be income or an expense depending on market conditions. ```javascript Funding Fee = (Collateral amount - Opening fee) * Leverage size * 0.0018% * Number of hours ``` -------------------------------- ### Trading Fee Calculation Source: https://docs.storm.tg/trading-mechanics/ton_margin_trading Calculate the trading fees for coin-margin pairs. The fee is 0.2% of the margin multiplied by leverage. ```plaintext 0.2% * (Margin * Leverage) ``` -------------------------------- ### Position Closing Fee Calculation Source: https://docs.storm.tg/trading-concepts/pl_and_roi Calculates the commission incurred when closing a trading position, based on the total value of the position after accounting for fees and PnL. ```javascript Commission for closing a position = ((Collateral Amount - Opening Commission) * Leverage Size + Unrealized PnL + Funding Commission) * 0.12% ``` -------------------------------- ### Closing Fee Calculation Source: https://docs.storm.tg/trading-mechanics/ton_margin_trading Formula for calculating the fee when closing a coin-margin position, using the adjusted margin. ```plaintext Closing Fee = 0.2% * (Adjusted Margin * Leverage) ``` -------------------------------- ### Long Position Unrealized PnL Calculation Source: https://docs.storm.tg/trading-concepts/pl_and_roi Calculates unrealized PnL for a long position, considering current market price, entry price, collateral, opening fees, and leverage. ```javascript Unrealized PnL = (Current Market Price / Entry Price - 1) * (Collateral amount - Opening fee) * Leverage size ``` -------------------------------- ### Calculate Liquidation Price for Long Position Source: https://docs.storm.tg/trading-concepts/changing_margin Use this formula to calculate the liquidation price for a long position in perpetual futures. It considers entry price, initial margin rate, and maintenance margin rate. Trading fees and funding rates are not included. ```javascript Liquidation Price (LP) = Entry Price × (1 - Initial Margin Rate + Maintenance Margin Rate) Liquidation Price (LP) = 50,000 $ × (1 - 0.05 + 0.01) = 48,000 $ ``` -------------------------------- ### Adjusted Margin for Closing Fee Source: https://docs.storm.tg/trading-mechanics/ton_margin_trading Calculate the adjusted margin used for determining the closing fee after the opening fee has been deducted. ```plaintext Adjusted Margin = Margin - Opening Fee ``` -------------------------------- ### ROI Calculation Formula Source: https://docs.storm.tg/trading-concepts/pl_and_roi Formula for calculating Return on Investment (ROI) to assess trading strategy profitability relative to initial capital. ```javascript ROI = ((Final Value - Initial Investment) / Initial Investment) * 100 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.