Source: https://cryptanio.com/es/docs/reference/list-events/
Contract / release / updated: v1 / 1.0.0 62 / 2026-10-10

[Referencia de la API](https://cryptanio.com/es/docs.html#reference)

# Listar eventos

GET `/v1/events`

Contrato v1 / 1.0.0 62 / 2026-10-10

[Markdown](https://cryptanio.com/es/docs/reference/list-events/index.md) [OpenAPI](https://cryptanio.com/openapi.json)

Historial de eventos dentro del ámbito de la clave, conservado durante 30 días. Sin filtro de fecha; pagina con before. Las claves de un servicio restringen los resultados a dicho servicio. Los eventos sin pago tienen payment:null; no se devuelve un cuerpo contract/notice adicional.

Permisos de la clave: `events` / read.

## Parámetros

| Parámetro | Entrante | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `project` | query | No | ID del proyecto. Obligatorio para listar o crear vigilancias salvo que la clave esté limitada a un proyecto. Para las demás operaciones, la omisión usa el contexto de cuenta/proyecto de la operación; indícalo explícitamente.; `string` |
| `watch_id` | query | No | ID de vigilancia del proyecto.; `string` |
| `chain` | query | No | Filtro de código de red.; `string` |
| `type` | query | No | Tipo de evento, como payment.confirmed.; `string` |
| `address` | query | No | Dirección.; `string` |
| `tx_id` | query | No | ID de transacción.; `string` |
| `limit` | query | No | Tamaño de página: máximo 200. Los valores inválidos usan el predeterminado; los superiores a 200 se limitan.; `integer` Predeterminado: `25`; minimum: `1`; maximum: `200` |
| `before` | query | No | Cursor de next_before o del ID del último elemento de la página anterior; los más recientes primero.; `string` minLength: `1` |

## Ejemplos de solicitudes

Los ejemplos realizan una operación real en tu cuenta. Configura las variables de entorno indicadas en el código. Mantén tu clave privada; las solicitudes de escritura no se reintentan automáticamente.



### Shell / cURL

```bash
#!/usr/bin/env bash
set -euo pipefail
: "${CRYPTANIO_PROJECT_ID:?Set CRYPTANIO_PROJECT_ID}"
: "${CRYPTANIO_API_KEY:?Set CRYPTANIO_API_KEY}"
response_file="$(mktemp)"
trap 'rm -f "$response_file"' EXIT
transfer_status=0
http_status="$(curl \
  --silent --show-error --max-time 30 --request GET \
  --header "Authorization: Bearer $CRYPTANIO_API_KEY" \
  --header 'Accept: application/json' \
  --get \
  --data-urlencode "project=$CRYPTANIO_PROJECT_ID" \
  --data-urlencode 'limit=25' \
  "https://api.cryptanio.com/v1/events" \
  --output "$response_file" --write-out '%{http_code}')" || transfer_status=$?
if [[ "$http_status" == 2?? ]]; then
  cat "$response_file"
  exit "$transfer_status"
fi
printf 'HTTP %s\n' "$http_status" >&2
cat "$response_file" >&2
exit 1
```



[Descargar ejemplo](https://cryptanio.com/files/examples/api/list-events.sh)



### Go

```go
// Go; standard library only. Run: go run request.go
package main

import (
    "fmt"
    "io"
    "net/http"
    "net/url"
    "os"
    "time"
)

func env(name string) string {
    value := os.Getenv(name)
    if value == "" { fmt.Fprintln(os.Stderr, "Set", name); os.Exit(1) }
    return value
}
func run() error {
    path := "/v1/events"

    endpoint, err := url.Parse("https://api.cryptanio.com" + path)
    if err != nil { return err }
    query := endpoint.Query()
    query.Set("project", env("CRYPTANIO_PROJECT_ID"))
    query.Set("limit", "25")
    endpoint.RawQuery = query.Encode()

    request, err := http.NewRequest("GET", endpoint.String(), nil)
    if err != nil { return err }
    request.Header.Set("Authorization", "Bearer " + env("CRYPTANIO_API_KEY"))
    request.Header.Set("Accept", "application/json")
    client := &http.Client{Timeout: 30 * time.Second, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
    response, err := client.Do(request)
    if err != nil { return err }
    defer response.Body.Close()
    if response.StatusCode < 200 || response.StatusCode >= 300 {
        body, err := io.ReadAll(response.Body)
        if err != nil { return err }
        return fmt.Errorf("HTTP %d: %s", response.StatusCode, body)
    }
    _, err = io.Copy(os.Stdout, response.Body)
    return err
}
func main() {
    if err := run(); err != nil { fmt.Fprintln(os.Stderr, err); os.Exit(1) }
}
```



[Descargar ejemplo](https://cryptanio.com/files/examples/api/list-events.go)



### Rust

```rust
// Cargo.toml dependencies:
// reqwest = { version = "=0.12.24", features = ["blocking", "json"] }
// serde_json = "=1.0.145"
use std::{error::Error, io, time::Duration};
use reqwest::{blocking::Client, redirect::Policy, Method, Url};

fn env(name: &str) -> Result<String, Box<dyn Error>> {
    let value = std::env::var(name)?;
    if value.is_empty() { return Err(format!("Set {name}").into()); }
    Ok(value)
}
fn run() -> Result<(), Box<dyn Error>> {
    let mut url = Url::parse("https://api.cryptanio.com")?;
    {
        let mut segments = url.path_segments_mut().map_err(|_| "Invalid base URL")?;
        segments.clear();
        segments.push("v1");
        segments.push("events");
    }
    url.query_pairs_mut()
        .append_pair("project", &env("CRYPTANIO_PROJECT_ID")?)
        .append_pair("limit", &"25".to_owned());
    let client = Client::builder().timeout(Duration::from_secs(30)).redirect(Policy::none()).build()?;
    let request = client.request(Method::GET, url)
        .header("Authorization", format!("Bearer {}", env("CRYPTANIO_API_KEY")?))
        .header("Accept", "application/json".to_owned());
    let mut response = request.send()?;
    let status = response.status();
    if !status.is_success() { return Err(format!("HTTP {}: {}", status.as_u16(), response.text()?).into()); }
    io::copy(&mut response, &mut io::stdout())?;
    Ok(())
}
fn main() {
    if let Err(error) = run() { eprintln!("{error}"); std::process::exit(1); }
}
```



[Descargar ejemplo](https://cryptanio.com/files/examples/api/list-events.rs)



### PHP

```php
<?php
// PHP 8 with the cURL extension. Run this on your server.
function env(string $name): string {
    $value = getenv($name);
    if ($value === false || $value === '') throw new RuntimeException('Set ' . $name);
    return $value;
}
try {
    $path = '/v1/events';

    $query = [
        'project' => env('CRYPTANIO_PROJECT_ID'),
        'limit' => '25',
    ];
    $url = 'https://api.cryptanio.com' . $path . ($query ? '?' . http_build_query($query, '', '&', PHP_QUERY_RFC3986) : '');
    $headers = [
        'Authorization: ' . 'Bearer ' . env('CRYPTANIO_API_KEY'),
        'Accept: ' . 'application/json',
    ];
    $curl = curl_init($url);
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'GET',
        CURLOPT_HTTPHEADER => $headers,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_FOLLOWLOCATION => false,
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_TIMEOUT => 30,
    ]);
    $response = curl_exec($curl);
    if ($response === false) throw new RuntimeException(curl_error($curl));
    $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
    if ($status < 200 || $status >= 300) throw new RuntimeException('HTTP ' . $status . ': ' . $response);
    echo $response;
} catch (Throwable $error) {
    fwrite(STDERR, $error->getMessage() . PHP_EOL);
    exit(1);
}
```



[Descargar ejemplo](https://cryptanio.com/files/examples/api/list-events.php)



### Python

```python
# Python 3; standard library only.
import json
import os
import sys
from urllib.error import HTTPError, URLError
from urllib.parse import quote, urlencode
from urllib.request import HTTPRedirectHandler, Request, build_opener

def env(name):
    result = os.environ.get(name)
    if not result:
        raise ValueError("Set " + name)
    return result

class NoRedirect(HTTPRedirectHandler):
    def redirect_request(self, req, fp, code, msg, headers, newurl):
        return None

try:
    path = "/v1/events"

    query = {
        "project": env("CRYPTANIO_PROJECT_ID"),
        "limit": "25",
    }
    url = "https://api.cryptanio.com" + path + ("?" + urlencode(query) if query else "")
    headers = {
        "Authorization": "Bearer " + env("CRYPTANIO_API_KEY"),
        "Accept": "application/json",
    }
    data = None
    request = Request(url, data=data, headers=headers, method="GET")
    with build_opener(NoRedirect()).open(request, timeout=30) as response:
        if not 200 <= response.status < 300:
            raise ValueError("HTTP " + str(response.status))
        sys.stdout.buffer.write(response.read())
except HTTPError as error:
    print("HTTP " + str(error.code) + ": " + error.read().decode("utf-8", errors="replace"), file=sys.stderr)
    sys.exit(1)
except (ValueError, URLError, OSError) as error:
    print(str(error), file=sys.stderr)
    sys.exit(1)
```



[Descargar ejemplo](https://cryptanio.com/files/examples/api/list-events.py)



### Node.js

```javascript
// Node.js 18+. Run on your server, never in a browser.
const env = name => {
  const result = process.env[name];
  if (!result) throw new Error(`Set ${name}`);
  return result;
};
try {
  let path = "/v1/events";

  const url = new URL(path, "https://api.cryptanio.com");
  url.searchParams.set("project", env("CRYPTANIO_PROJECT_ID"));
  url.searchParams.set("limit", "25");
  const headers = {
    "Authorization": "Bearer " + env("CRYPTANIO_API_KEY"),
    "Accept": "application/json",
  };
  const response = await fetch(url, {
    method: "GET", headers, redirect: "manual",
    signal: AbortSignal.timeout(30_000),
  });
  if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
  if (response.body) {
    for await (const chunk of response.body) process.stdout.write(chunk);
  }
} catch (error) {
  console.error(error.message);
  process.exitCode = 1;
}
```



[Descargar ejemplo](https://cryptanio.com/files/examples/api/list-events.mjs)

## Respuestas y errores

### 200 Respuesta correcta.

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `data` | `object[]` | Sí |  |
| `next_before` | `string` | No | Cursor de la página siguiente; solo aparece si hay más páginas.; minLength: `1` |

### 401 No hay una clave API activa válida (unauthorized).

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `error` | `object` | Sí |  |



### 401 application/json

```json
{
  "error": {
    "code": "forbidden",
    "message": "this API key is read-only"
  }
}
```



### 403 La clave no permite la operación, el proyecto, el servicio o la IP; correo sin confirmar.

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `error` | `object` | Sí |  |



### 403 application/json

```json
{
  "error": {
    "code": "forbidden",
    "message": "this API key is read-only"
  }
}
```



### 429 Demasiadas solicitudes (rate_limited); reintenta después de Retry-After.

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `error` | `object` | Sí |  |



### 429 application/json

```json
{
  "error": {
    "code": "forbidden",
    "message": "this API key is read-only"
  }
}
```



### 500 Error interno (internal).

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `error` | `object` | Sí |  |



### 500 application/json

```json
{
  "error": {
    "code": "forbidden",
    "message": "this API key is read-only"
  }
}
```



### 503 Indisponibilidad temporal (unavailable); reintenta con espera progresiva.

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `error` | `object` | Sí |  |



### 503 application/json

```json
{
  "error": {
    "code": "forbidden",
    "message": "this API key is read-only"
  }
}
```



[Gestión de errores y reintentos seguros](https://cryptanio.com/es/docs.html#errors)

## Objetos anidados

### `EventList`

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `data` | `object[]` | Sí |  |
| `next_before` | `string` | No | Cursor de la página siguiente; solo aparece si hay más páginas.; minLength: `1` |

### `Event`

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `event_id` | `string` | Sí | Identificador opaco; consérvalo como cadena.; minLength: `1` |
| `event_type` | `string` | Sí | Tipo de evento; pueden añadirse nuevos tipos. |
| `chain` | `string` | Sí | Código de red. |
| `service` | `string` | No | Servicio, si se conoce. |
| `watch_id` | `string` | No | ID de vigilancia del proyecto, si está vinculado a una vigilancia.; minLength: `1` |
| `occurred_at` | `string` | Sí | Fecha y hora UTC en RFC 3339.; `date-time` |
| `payment` | `object \| null` | Sí | Documento de pago, o null para un evento sin pago. GET /events no devuelve contenidos contract/notice. |
| `sandbox` | `boolean` | No | Evento de prueba; la omisión significa false. |

### `ID`

Identificador opaco. Su formato no está garantizado; no lo conviertas a número.

`string` Identificador opaco. Su formato no está garantizado; no lo conviertas a número.

### `EventPayment`

Documento de pago REST/SSE. Los campos dependen del evento y la red; no es la estructura normalizada de webhook v1.

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `tx_id` | `string` | No | Identificador de transacción. |
| `index` | `integer` | No | Índice de transferencia dentro de la transacción.; minimum: `0` |
| `height` | `integer` | No | Altura del bloque, cuando se conoce.; minimum: `0` |
| `address` | `string` | No | Dirección observada. |
| `asset` | `string` | No | Activo REST/SSE: identificador de cadena, no el objeto asset del webhook. |
| `amount_raw` | `string` | No | Importe entero en la unidad mínima como cadena.; pattern: `^[0-9]+$` |
| `amount` | `string` | No | Importe decimal exacto como cadena; no uses coma flotante.; pattern: `^[0-9]+(?:\.[0-9]+)?$` |
| `decimals` | `integer` | No | Decimales.; minimum: `0` |
| `confirmations` | `integer` | No | Confirmaciones.; minimum: `0` |
| `revision` | `integer` | No | Revisión del estado de transferencia.; minimum: `0` |
| `direction` | `string` | No | Dirección respecto a la dirección observada.; `in`, `out` |
| `simulated` | `boolean` | No | Evento simulado. |
| `late` | `boolean` | No | Transferencia detectada tarde. |
| `block_hash` | `string` | No | Hash del bloque. |
| `match_key` | `string` | No | Identificador de coincidencia, cuando lo utiliza la red. |
| `meta` | `object` | No |  |
| `invoice` | `object` | No |  |
| `customer` | `object` | No |  |
| `product` | `object` | No |  |
| `payer` | `object` | No |  |
| `metadata` | `object` | No |  |

### `RawAmount`

`string`

### `Decimal`

`string`

### `StringMap`

`object`

### `Customer`

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `id` | `string` | Sí | Identificador del cliente en tu sistema.; maxLength: `120` |

### `Product`

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `id` | `string` | No | Identificador del producto en tu sistema.; maxLength: `120` |
| `name` | `string` | No | Nombre del producto.; maxLength: `200` |
| `quantity` | `integer` | No | Cantidad.; minimum: `1`; maximum: `1000000` |

### `Payer`

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `comment` | `string` | Sí | Comentario del pagador.; maxLength: `500` |

### `Error`

| Campo | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `error` | `object` | Sí |  |
