🏦Opening / Closing trades

This guide shows the steps on opening and closing the trade via the gains.trade frontend. To discover how to do this using the smart contracts directly, please refer to Interacting with the contract.

To open and close trades on gTrade you will need:

  1. A Web3 wallet e.g. Metamask which is connected to gTrade.

  2. MATIC for Polygon/ETH for Arbitrum in that wallet to pay for transaction fees.

  3. DAI, USDC, or WETH in that wallet to use as collateral.

Interface Overview

These are the different areas of trading UI that this guide will be using.

Opening a trade

1. Go to our platform.

2. Click "Connect Wallet" in the top right. You might need to refresh the page for the website to detect your wallet, if it wasn't unlocked yet.

3. If this is your first trade, you will need to approve the contract to be able to use the collateral that you want it to. Click approve and submit the transaction to Polygon or Arbitrum.

4. Use the "Add Pair +" button to select the pair you want to trade on. Favourite it if you want to save it into your trading interface. You will notice below that "Hide closed" is ticked - hiding forex and commodities markets when they are closed.

5. Now, you can set your trade parameters:

  1. Trade Type and whether it is long (buy) or short (sell).

    1. Market: To be used to open a trade immediately. It will open at the market price (+ spread).

    2. Limit: To be used when you want to go long at a lower price than present, or to go short if the price reaches a higher price than present. Executes at exact price set if price reaches threshold + spread.

    3. Stop Limit: To be used when you want to go long if the price reaches a higher price than present, or to go short if the price reaches a lower price than present. You might want to use this to long a breakout, or short a breakdown. The execution price is the current market price + spread.

  2. Collateral: maximum amount you are risking if you are liquidated. Your collateral x leverage must be above the minimum position size. For example on cryptos, it should be above 1,500 USD. This means you can for example open a trade with 50 DAI collateral at 30x, or with 300 DAI at 5x leverage, etc. Or if opening a trade with .1 ETH at market value of $2500 ETH / USD, you would need minimum 6 leverage.

  3. Leverage: multiply the volatility of the price up and down, to increase exposure.

  4. Max slippage: Used to cancel a market order automatically if the price moved too fast in the direction of the trade before it was opened. For example if you wish to market long the current price but before your trade is opened the price moved up 1%, it will cancel automatically.

  5. Your Stop Loss and Take Profit. You are not obligated to use a stop loss, but your trade will be liquidated if it is at <= -90% PnL. The maximum profit on a trade is 900% PnL, so if you don't put any take profit, it will put one automatically at 900% PnL. Please note that Stop Losses for crypto are guaranteed, and in times of high network congestion your Stop Loss might not immediately trigger. It is important that you don't manually close your order since this will void the guaranteed Stop Loss (at your set price) and count as a Market Close (at the price when it gets triggered).

You can then click on the order execution button, which displays the order type and direction you will be executing. In our case it says "MARKET LONG". This brings up the Web3 popup to send the transaction to Polygon or Arbitrum and open the order. High gas is automatically suggested to ensure that trades are executed quickly.

After the transaction is submitted you will see the number of confirmations required to display it on the front end. Once 2 blocks have passed, it is displayed in the section named "Your Open Trades".

Order Initiated: This is the moment that your request to execute an order reaches the network. Executed: This is the moment your trade is executed, when our Chainlink DON returns the current price. In the below example the price has just been returned.

You can read more about the block confirmations here.

Viewing the details of an Open Trade & Updating TP/SL

Now your trade is open, you can view its details by clicking on it under Your Open Trades. You can also see the liquidation price marked in blue on the chart, and if you have them set you will see TP/SL lines in green/red respectively.

By clicking on your trade, you can view its details. If you click on the TP/SL price you will see the prompt to update these - you can input the price desired to TP/SL and it will show you what % that would be in relation to your collateral. If you don't have a TP/SL it will show "None".

More details on fees can be found here.

Closing a trade

  1. Click on the X to the right hand side of your trade in Your Open Trades

  1. Confirm in Metamask to send the closure to Polygon or Arbitrum.

  2. Await Trade Closure Confirmation - This is what you receive to your wallet.

Last updated