> ## Documentation Index
> Fetch the complete documentation index at: https://docs.4mica.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the active cycle

> Read the settlement cycle a new payment for an asset must be signed for.

`GET /core/cycles/active`

Every asset has its own settlement cycle. A payment request carries the on-chain ID of the active cycle for its asset, and core refuses one signed for any other cycle. The SDKs read this endpoint before they sign.

## Authorization

**Authorization** `string` *required*

`Bearer <access_token>`. Any valid access token.

## Query parameters

**asset** `string` *required*

Token address. Use the zero address for native ETH.

## Responses

**cycle\_id** `string` *required*

On-chain cycle ID, 32 bytes as hex. This is the `cycle_id` a payment request is signed with.

**cycle\_id\_text** `string` *required*

Core's text ID for the cycle: the lowercase asset address, a colon, and `period_start`. The clearing endpoints take this form.

**asset\_address** `string` *required*

**period\_start** `number` *required*

Unix seconds.

**period\_end** `number` *required*

Unix seconds.

**server\_time** `number` *required*

Core's clock in Unix seconds. Compare it with your own before you stamp a payment.

**max\_uncheckpointed** `number` *required*

How many guarantees a payer may hold in the cycle past its latest checkpoint before core asks for a new [checkpoint](https://docs.4mica.io/api-reference/operator/submit-checkpoint.md).

```bash cURL theme={null}
curl "https://base.sepolia.api.4mica.io/core/cycles/active?asset=0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

```javascript title="Fetch" theme={null}
const response = await fetch("https://base.sepolia.api.4mica.io/core/cycles/active?asset=0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", {
  headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` },
});
console.log(await response.json());
```

```python Python theme={null}
import os
import requests
url = "https://base.sepolia.api.4mica.io/core/cycles/active?asset=0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f"
print(requests.get(url, headers={"Authorization": f"Bearer {os.environ['ACCESS_TOKEN']}"}).json())
```

```json 200 OK theme={null}
{
  "cycle_id": "0x4444444444444444444444444444444444444444444444444444444444444444",
  "cycle_id_text": "0xba50cd2a20f6da35d788639e581bca8d0b5d4d5f:1796256000",
  "asset_address": "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f",
  "period_start": 1796256000,
  "period_end": 1796342400,
  "server_time": 1796292000,
  "max_uncheckpointed": 64
}
```

```json 401 Unauthorized theme={null}
{ "error": "missing authorization" }
```

## Status codes

| Code | Description |
| - | - |
| `200` | The active cycle for the asset. |
| `400` | `asset` is not an address; the body is `{ "error": "<message>" }`. A missing `asset` is also `400`, but the request parser answers it before core does, with a plain-text body that starts `Failed to deserialize query string`, not JSON. |
| `401` | The bearer token is missing or invalid. |
| `500` | Core could not load the cycle. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.