> For the complete documentation index, see [llms.txt](https://docs.shieldex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shieldex.io/tutorials/trading-api-references/how-to-instructions/how-to-monitor-opening-and-closing-orders.md).

# How to monitor opening and closing orders?

## Description

By scanning all the blocks, we can get the logs of each transaction, parse the topics, and determine the corresponding contract address, find the corresponding transaction parameters, and then perform the next data processing operation according to the business requirements.

## Events Emitted in Transactions

### Deposit Funds

|      **Title**      |                                         Content                                         |
| :-----------------: | :-------------------------------------------------------------------------------------: |
|  **Event Emitted**  | event DDSDeposit(address indexed sender, address indexed toAddr, uint256 motageAmount); |
| **Event Signature** |            0x8741a00229f2b8b24379b60f7a4ba3a3f3d92f328280c47a38cd03504ac72c42           |

### Withdraw Funds

|      **Title**      |                                          Content                                         |
| :-----------------: | :--------------------------------------------------------------------------------------: |
|  **Event Emitted**  | event DDSWithdraw(address indexed sender, address indexed toAddr, uint256 motageAmount); |
| **Event Signature** |            0x9319767067544c146c859088bc69f38236cad434eb28957e8574a56d4173f89f            |

### Deposit DAI into Public Pool

|      **Title**      |                                    Content                                   |
| :-----------------: | :--------------------------------------------------------------------------: |
|  **Event Emitted**  | event Provide(address indexed account, uint256 amount, uint256 writeAmount); |
| **Event Signature** |      0x4089141ea5e4c16575f5ebf65f1786497ea07c175846fc7745ef8d8986a4ff65      |

### Deposit DAI into Private Pool

|      **Title**      |                               Content                              |
| :-----------------: | :----------------------------------------------------------------: |
|  **Event Emitted**  |     event ProvideLP2(address indexed account, uint256 amount);     |
| **Event Signature** | 0x26a27ab2f158d9fe04dea4c221634a0d50bdbb2a9fcdcc1960567eefa9c2ed0a |

### Withdraw DAI from Public/Private Pool

|      **Title**      |                               Content                              |
| :-----------------: | :----------------------------------------------------------------: |
|  **Event Emitted**  |      event Withdraw(address indexed account, uint256 amount);      |
| **Event Signature** | 0x884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.shieldex.io/tutorials/trading-api-references/how-to-instructions/how-to-monitor-opening-and-closing-orders.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
