# Withdraw assets from paper trader

`POST https://api.cryptohopper.com/v1/hopper/{id}/papertrading/withdraw`

Part of [Hoppers](https://www.cryptohopper.com/api-documentation/api-reference/hoppers.md) in the Cryptohopper API reference.

Removes funds of one currency from the paper trading account of the hopper and refreshes its balances.

Only for hoppers with paper trading enabled.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `access-token` | string | yes | The OAuth access token of the user. |

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Hopper ID. |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `coin` | string | yes |  |
| `amount` | number | yes | Minimum 0. |

## Example request

```bash
curl -X POST "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/papertrading/withdraw" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"coin":"BTC","amount":0.5}'
```

## Response

Example response (illustrative values):

```json
{
    "data": "0.5 BTC successfully withdrawn."
}
```

Status codes: 200. Errors return JSON with `status`, `error` and `message`, plus a numeric `code` when the error comes from the API itself rather than the gateway.
