# How to Start/Stop Order with Smart Contract

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.

## Connect your wallet to Smart Contract

**Step 1:** Go to Godex smart contract via link - <https://arbiscan.io/address/0x2CF0a497b743472934470DaE958E81e629E92762>

<figure><img src="/files/ryaGl9zmJO9jBgbCCxqD" alt=""><figcaption></figcaption></figure>

**Step 2:** Connect your wallet (Use the wallet You are trading on Godex)

<figure><img src="/files/rbbyVqMIJvRVIXvJmKdI" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/dGCoxL3Qy4CwkGj2XCpx" alt=""><figcaption></figcaption></figure>

#### After connecting your wallet, you have become the ownership of Godex and have full rights to use it.

## Lesson 1: Create a transaction order

**Step 1:** Find the createOrder (0xaba8b0e8)

<figure><img src="/files/yAs8279t77oeUNYp95ro" alt=""><figcaption></figcaption></figure>

The parameters are as follows:

<table data-header-hidden><thead><tr><th width="168"></th><th></th></tr></thead><tbody><tr><td>amountIn</td><td>Investment amount in USDT  + 6 "0" digits (Ex: $500 = 500000000 digits</td></tr><tr><td>amountOutMin</td><td>0</td></tr><tr><td>path</td><td>["0xCC233302FC4116B0926d0BEDbc9A86fD7Ee113A6","0x4c0DeD3A1fCB7697Ad57c558Bfe55a5B41d453A6"]</td></tr><tr><td>to</td><td>Your wallet address</td></tr><tr><td>deadline</td><td><a href="https://www.epochconverter.com">https://www.epochconverter.com</a>: Get current timestamp in seconds (10 digits)</td></tr></tbody></table>

<figure><img src="/files/RZqmmENkqxgDvBsFBZOm" alt=""><figcaption><p>Timestamp: is the time for you to decide to place an order. +10,000 seconds will ensure you operate for a long time.</p></figcaption></figure>

<figure><img src="/files/90FI2oFQEiw1v8e1jvo7" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/YoKvjIZYbmlVFomwOsXu" alt=""><figcaption></figcaption></figure>

## Lesson 2: Stop order

* **Step 1:** You need to find out where the newly created order is located in the blockchain.&#x20;

<figure><img src="/files/sbnSqZYgiNdc0GVR1xQK" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="133"></th><th></th></tr></thead><tbody><tr><td>address</td><td>Your wallet address</td></tr><tr><td>page</td><td>0</td></tr><tr><td>limit</td><td>10000</td></tr></tbody></table>

* **Step 2:** As of now I have 432 records. The $500 order I just created in the previous step is at order number 432.&#x20;

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.

<figure><img src="/files/gToiu8ojGqA6skIydUG5" alt=""><figcaption></figcaption></figure>

<table data-header-hidden><thead><tr><th width="168"></th><th></th></tr></thead><tbody><tr><td>amountIn</td><td>Investment amount in GDX collateral token (Ex: <strong>127897525906806751853)</strong></td></tr><tr><td>amountOutMin</td><td>0</td></tr><tr><td>path</td><td>["0xCC233302FC4116B0926d0BEDbc9A86fD7Ee113A6","0x4c0DeD3A1fCB7697Ad57c558Bfe55a5B41d453A6"]</td></tr><tr><td>to</td><td>Your wallet address</td></tr><tr><td>deadline</td><td><a href="https://www.epochconverter.com">https://www.epochconverter.com</a>: Get current timestamp in seconds (10 digits)</td></tr><tr><td>index</td><td>Order number of the order being traded that needs to be Stopped <br>(ex: 430)</td></tr></tbody></table>

<figure><img src="/files/hHyj7EEjdyqTNQo8eEPD" alt=""><figcaption></figcaption></figure>

Approve the transaction from your Wallet. Done.✔❤️


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.godex.ai/user-guide/use-guideline/how-to-start-stop-order-with-smart-contract.md?ask=<question>
```

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.

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.
