# Withdrawing funds

{% hint style="danger" %}
Only use this method if the DMEX website is down or not functioning properly. Otherwise withdraw your funds through the website.
{% endhint %}

Any user can withdraw his/her funds from the contract at any time, even if the DMEX website is down. To do that the user must follow the following steps:

1. Navigate to the contract explorer: [**https://blockscout.com/poa/xdai/address/0xd840f57b84Eb281fb045FC271c07d37C3cf4E206/read-contract**](https://blockscout.com/poa/xdai/address/0xd840f57b84Eb281fb045FC271c07d37C3cf4E206/read-contract)
2. Go to item number 5 (availableBalanceOf)
3. Enter your wallet address and the token:\
   ETH: **0x0000000000000000000000000000000000000000**\
   BTC: **0x5228a22e72ccC52d415EcFd199F99D0665E7733b**\
   DAI: **0x6B175474E89094C44Da98b954EedeAC495271d0F**
4. Press "Query" to get your available balance and save the amount
5. Navigate to the "Write Contract" tab:\
   [**https://blockscout.com/poa/xdai/address/0xd840f57b84Eb281fb045FC271c07d37C3cf4E206/write-contract**](https://blockscout.com/poa/xdai/address/0xd840f57b84Eb281fb045FC271c07d37C3cf4E206/write-contract)
6. Go to item 27 "withdraw"
7. Enter the token and amount (saved in step 4)
8. Press "Write". Make sure you have MetaMask unlocked with your wallet imported
9. Confirm the transaction in MetaMask and get the transaction hash
10. Navigate to the AMMB Bridge:\
    [**https://alm-xdai.herokuapp.com/**](https://alm-xdai.herokuapp.com/)
11. Paste in the transaction hash from MetaMask
12. Once your transaction is loaded, press "Execute Manually" and confirm in MetaMask.
13. Once the transaction is confirmed you will have the funds in your wallet.


---

# 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.dmex.app/contracts/withdrawing-funds.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.
