# Withdraw

**Apply for Withdrawal** **POST**\
`https://openapi.fokawa.com/sapi/v1/withdraw/apply`

**Headers:**

* `X-CH-APIKEY*`: String (Your API-key)
* `X-CH-SIGN*`: String (Sign)
* `X-CH-TS*`: Integer (Timestamp)

**Request Body:**

* `withdrawOrderId*`: String (Custom withdrawal ID, guaranteed to be unique)
* `amount*`: String (Quantity)
* `address*`: String (Withdrawal address)
* `label`: String (Some currencies such as XRP, XMR allow filling of secondary address labels)
* `symbol`: String (Currency name, for coins that support multiple mainchains, the actual currency name needs to be transmitted)

**Response Example:**

```json
{
    "code": "Ѳ",
    "msg": "success",
    "data": {
        "id": 518353 // Platform withdrawal ID
    }
}
```

**Weight (IP/UID):** 100

**Withdrawal Record Query** **POST**\
`https://openapi.fokawa.com/sapi/v1/withdraw/query`

**Headers:**

* `X-CH-APIKEY*`: String (Your API-key)
* `X-CH-SIGN*`: String (Sign)
* `X-CH-TS*`: String (Timestamp)

**Request Body:**

* `symbol`: String (Currency name, for coins that support multiple mainchains, the actual currency name needs to be transmitted)
* `withdrawId`: String (Platform withdrawal ID)
* `withdrawOrderId`: String (Custom withdrawal ID)
* `startTime`: String (Start time, timestamp, default 90 days ago)
* `endTime`: String (End time, timestamp, default current time)
* `page`: String (Page number, starting at 1)

**Response Example:**

```json
{
    "code": "0",
    "msg": "成功",
    "data": {
        "withdrawList": [
            {
                "symbol": "TUSDT",
                "amount": 19.99999,
                "address": "TFFrjNfBAagmFWypE3Hnv6zPKAFhd3VcDf",
                "withdrawOrderId": "abc123",
                "fee": 0.00001,
                "ctime": 1605585397000,
                "txId": "749864_20201117115930",
                "id": 749864,
                "applyTime": 1666754820000,
                "status": 5,
                "info": ""
            },
            {
                "symbol": "TUSDT",
                "amount": 10.50999,
                "address": "TYsTiVVDU5VmnUPufzGD52CD1hSbPATT3Q",
                "withdrawOrderId": "abc456",
                "fee": 0.00001,
                "ctime": 1607089149000,
                "txId": "764294_20201204094130",
                "id": 764294,
                "applyTime": 1666754820000,
                "status": 5,
                "info": ""
            }
        ],
        "count": 2
    }
}
```

**Responses Parameters:**

* `symbol`: String (Withdrawal currency)
* `amount`: Number (Quantity)
* `address`: String (Withdrawal address)
* `withdrawOrderId`: String (Custom withdrawal ID)
* `fee`: Number (Fee)
* `ctime`: Number (Creation time)
* `txId`: String (Withdrawal transaction ID)
* `id`: Number (Platform withdrawal ID)
* `applyTime`: Number (On-chain time)
* `status`: Number (Withdrawal status: 0-unapproved, 1-approved, 2-approved rejected, 3-payment, 4-payment failed, 5-completed, 6-revoked)
* `info`: String (Withdrawal address error, review rejection reasons)
