How to Start/Stop Order with Smart Contract
Last updated
Last updated
You are trading on the decentralized Godex.ai exchange which allows you to interact Start/Stop directly on the Arbitrum blockchain environment through Smart contract.
Step 1: Go to Godex smart contract via link - https://arbiscan.io/address/0x2CF0a497b743472934470DaE958E81e629E92762
Step 2: Connect your wallet (Use the wallet You are trading on Godex)
Step 1: Find the createOrder (0xaba8b0e8)
The parameters are as follows:
amountIn | Investment amount in USDT + 6 "0" digits (Ex: $500 = 500000000 digits |
amountOutMin | 0 |
path | ["0xCC233302FC4116B0926d0BEDbc9A86fD7Ee113A6","0x4c0DeD3A1fCB7697Ad57c558Bfe55a5B41d453A6"] |
to | Your wallet address |
deadline | https://www.epochconverter.com: Get current timestamp in seconds (10 digits) |
Step 1: You need to find out where the newly created order is located in the blockchain.
address | Your wallet address |
page | 0 |
limit | 10000 |
Step 2: As of now I have 432 records. The $500 order I just created in the previous step is at order number 432.
You need to pay attention to the bold parameters.
[0xFb1a5c554731D2Fc73b340d4c478928231edF820,400000000,6000000000,0x4c0DeD3A1fCB7697Ad57c558Bfe55a5B41d453A6,500000000,127897525906806751853,0,0,500000000,0,273658895,0,0]]
["address", "stopLoss", "takeProfit", "gdAddress", "amountIn", "amountOutStart", ""]
amountOutStart: Amount of collateral tokens received when creating an order
Step 3: When we have enough information about the Order. We go back to Write as Proxy to Stop the Order.
amountIn | Investment amount in GDX collateral token (Ex: 127897525906806751853) |
amountOutMin | 0 |
path | ["0xCC233302FC4116B0926d0BEDbc9A86fD7Ee113A6","0x4c0DeD3A1fCB7697Ad57c558Bfe55a5B41d453A6"] |
to | Your wallet address |
deadline | https://www.epochconverter.com: Get current timestamp in seconds (10 digits) |
index | Order number of the order being traded that needs to be Stopped (ex: 430) |
Approve the transaction from your Wallet. Done.✔❤️