> For the complete documentation index, see [llms.txt](https://fundamental-interactions-inc.gitbook.io/websocket-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fundamental-interactions-inc.gitbook.io/websocket-api/deposit-and-withdraw.md).

# DEPOSIT & WITHDRAW

Clients can deposit fiat and assets into into the exchange

Administrator can make deposit or withdraw from client accounts.

**SAMPLE REQUEST DEPOSIT & WITHDRAWAL**

```
{“type”:”deposit”, “userid”:”0002”, “security”:”BTC”,”amount”:0.01}
{“type”:”withdraw”, “userid”:”0002”, “security”:”BTC”,”amount”:0.001}
```

For withdraw, you can provide optional input field “externaccount” for crypto blockchain transactio&#x6E;**.**

**SAMPLE RESPONSE SUCCESSS OR FAILURE**

```
{“amount”:0.01,”result”:”account
not found”,”userid”:”0002”,”security”:”BTC”,”type”:”deposit”}
```

```
{“amount”:0.01,”result”:”OK”,”userid”:”0004”,”security”:”BTC”,”type”:”deposit”}
{“amount”:0.001,”result”:”OK”,”userid”:”0004”,”security”:”BTC”,”type”:”withdraw”}
```

On return, if there is commission charged for action, “comm” field will show you how much you were charge&#x64;**.**

**QUERY DEPOSIT**

**SAMPLE REQUEST DEPOSIT**

```
{“type”:”querydeposit”, “userid”:”0002”, “fromtime”:”1555522543000”}
```

Only administrator can specify “userid” field.

* `“fromtime`” field is optional, if set, it is to specify cutofftime to query
* `“comm”`, optional, if there is commission for corresponding action, it will show you how much you were charged.

**SAMPLE RESPONSE ON SUCCESS OR FAILURE**

* `“total_rec”` tells you how many records there are.

For each record, there is “rec\_no”, this is just for counting. Total number of records received should match value in “total\_rec” field. It should be sort by “time”.

If there are more than 100 records, system can send you multiple response, each will have100 records.

```
{“result”:”OK”,”userid”:”0003”,”type”:”querydeposit”,”total_rec”:0}
{“result”:”OK”,”data”:[{“amount”:”0.001”,”time”:”1555522584928”,”secur
ity”:”BTC”,”rec_no”:1,”type”:”withdraw”},{“amount”:”0.01”,”time”:”1555522555008”
,”security”:”BTC”,”rec_no”:2,”type”:”deposit”}],”userid”:”0004”,”type”:”querydep
osit”,”total_rec”:2}
```


---

# 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://fundamental-interactions-inc.gitbook.io/websocket-api/deposit-and-withdraw.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.
