> 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/history/get-transaction-history.md).

# Get Transaction History

Retrieve transaction history with optional filters.

**Endpoint:** `POST /history`

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

| Parameter | Type    | Required | Description                                                              |
| --------- | ------- | -------- | ------------------------------------------------------------------------ |
| token     | string  | No       | Token name (e.g., eth)                                                   |
| email     | string  | Yes      | User email                                                               |
| network   | string  | No       | Network (e.g., trc20) - currently not applicable                         |
| direction | string  | No       | Direction of transaction (credit/debit)                                  |
| timestamp | string  | No       | From when a transaction was inserted (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS) |
| status    | integer | No       | Transaction status (0 or 1) for success or failure                       |

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

```
curl -X POST https://service.roqqu.com/v1/history \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "email=test@business.com" \
  -d "token=eth" \
  -d "direction=credit" \
  -d "timestamp=2023-08-29" \
  -d "status=1"
```

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

```
{
  "status": "success",
  "message": "history retrieved successfully",
  "data": {
    "history": [
      {
        "id": 4158,
        "status": 1,
        "direction": "debit",
        "balance_before": 0,
        "balance_after": 0,
        "email": "test@business.com",
        "token": "usdt",
        "amount": 2,
        "created_at": "2023-08-29T18:06:28.000Z",
        "updated_at": "2023-08-29T18:06:30.000Z",
        "deleted_at": null
      }
    ]
  }
}
```

<br>
