> For the complete documentation index, see [llms.txt](https://roqqu-api-services.gitbook.io/ras/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://roqqu-api-services.gitbook.io/ras/wallets/send-coin.md).

# Send Coin

Send cryptocurrency to an address.

**Endpoint:** `POST /wallets/send`

**Authentication:** Required (`x-api-key` for live, `x-staging-api-key` for test)

**Fees**

Fees are taken from the token you are sending.

#### Request Parameters <a href="#request-parameters-3" id="request-parameters-3"></a>

| Parameter | Type    | Required | Description                                                          |
| --------- | ------- | -------- | -------------------------------------------------------------------- |
| amount    | integer | Yes      | Amount of token to send (must be greater than 0)                     |
| network   | string  | Yes      | Network code to parse in requests (e.g. `trc20`, `bep20`, `bitcoin`) |
| to        | string  | Yes      | Destination address                                                  |
| token     | string  | Yes      | Token symbol to send (e.g. `usdt`, `btc`)                            |

#### Example Request <a href="#example-request-4" id="example-request-4"></a>

```
curl -X POST https://service.roqqu.com/v1/wallets/send \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "amount=2" \
  -d "network=trc20" \
  -d "to=TUyR2sEjzDZNmbnac2ZkJ54h64m6TmVN71" \
  -d "token=usdt"
```

#### Example Response <a href="#example-response-4" id="example-response-4"></a>

```
{
  "status": "success",
  "message": "send operation successful",
  "data": {
    "refid": "10704380386654367514"
  }
}
```

> `data` is the queued send record. On-chain confirmation is delivered later via the `token_sent` webhook.

#### **Error Responses**

**Invalid token:**

```
{
  "status": "fail",
  "message": "invalid token symbol parsed"
}
```

**Send disabled for token:**

```
{
  "status": "fail",
  "message": "send is disabled for token"
}
```

**Send disabled for network:**

```
{
  "status": "fail",
  "message": "send is disabled for network"
}
```

**Invalid network:**

```
{
  "status": "fail",
  "message": "invalid network parsed"
}
```

**Network not available for token:**

```
{
  "status": "fail",
  "message": "network not available for token"
}
```

**Address / network mismatch:**

```
{
  "status": "fail",
  "message": "invalid network parsed for address"
}
```

**Cannot detect network for address:**

```
{
  "status": "fail",
  "message": "cannot find any network for address parsed"
}
```

**Insufficient balance:**

```
{
  "status": "fail",
  "message": "insufficient USDT balance"
}
```

> Message uses the token you are sending (e.g. `insufficient BTC balance` when sending BTC).

**Below minimum send:**

```
{
  "status": "fail",
  "message": "minimum send is <minimum_amount>"
}
```

**Above maximum send:**

```
{
  "status": "fail",
  "message": "maximum send is <maximum_amount>"
}
```

**Amount must be positive:**

```
{
  "status": "fail",
  "message": "amount must be greater than 0"
}
```

**Queue failure:**

```
{
  "status": "fail",
  "message": "send failed, please try again"
}
```
