---
description: Clients can deposit fiat and assets into into the exchange
---

# DEPOSIT & WITHDRAW

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}
```
