# Get output

`GET https://api.cryptohopper.com/v1/hopper/{id}/output`

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

Returns the output log of the hopper for a period, newest first by default.

OAuth scope: `read`

log_type is info, warning or error and log_time is a Unix timestamp in seconds. offset and count only apply to log lines from before 22 December 2018; for newer lines narrow dateFrom and dateTo instead. The request body in the model is not read; use the query parameters.

## 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. |

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `sortOrder` | string | no | ASC or DESC. Default DESC. |
| `count` | string | no | Maximum number of log lines, 1 to 500. Default 500. |
| `offset` | string | no | Number of log lines to skip. Default 0. |
| `dateTo` | string | no | End of the period as a date and time, e.g. 2026-09-25 10:00:00. Default now. |
| `dateFrom` | string | no | Start of the period as a date and time, e.g. 2026-09-25 08:00:00. Default two hours ago. |
| `entryType` | string | no | info returns all lines, error returns only errors. Default info. |
| `sortBy` | string | no | entry_date or entry_type. Default entry_date. |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `search_opts` | array of object | no |  |
| &nbsp;&nbsp;`date_from` | string | no |  |
| &nbsp;&nbsp;`date_to` | string | no |  |
| &nbsp;&nbsp;`entry_type` | string | no | One of: error, info. |
| &nbsp;&nbsp;`sort_field` | string | no | One of: entry_date, entry_type. |
| &nbsp;&nbsp;`sort_order` | string | no | One of: asc, desc. |
| &nbsp;&nbsp;`page` | integer | no |  |
| &nbsp;&nbsp;`perPage` | integer | no |  |

## Example request

```bash
curl "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/output" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"search_opts":[{"date_from":"string","date_to":"string","entry_type":"error","sort_field":"entry_date","sort_order":"asc","page":0,"perPage":0}]}'
```

## Response

Example response (illustrative values):

```json
{
    "data": [
        {
            "log_type": "info",
            "log_output": "Checking open positions.",
            "log_time": 1758794100.512
        },
        {
            "log_type": "warning",
            "log_output": "Not enough balance to buy ETH.",
            "log_time": 1758794040.103
        }
    ]
}
```

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.
