> From TickerLayer docs, Futures CFDs: https://tickerlayer.com/docs/products/futures#futures-contracts
> REST base URL https://api.tickerlayer.com, API key in the `x-api-key` header. WebSocket wss://stream.tickerlayer.com?apiKey=YOUR_API_KEY. Full API reference: https://tickerlayer.com/llms-full.txt

## Contract months

**Endpoint:** `GET /futures/contracts`

Every dated month we carry, with its place in the chain and its calendar: last trading day, roll date, first notice date and roll window. Open to any valid key.

### Query parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `base` | string | One product, for example US500. Leave it out for every product. |

### Request

```bash
curl -sS "https://api.tickerlayer.com/futures/contracts?base=US500" \
  -H "x-api-key: <YOUR_API_KEY>"
```

```python
import requests

res = requests.get(
    "https://api.tickerlayer.com/futures/contracts?base=US500",
    headers={"x-api-key": "<YOUR_API_KEY>"},
)
print(res.json())
```

```javascript
const res = await fetch("https://api.tickerlayer.com/futures/contracts?base=US500", {
  headers: { "x-api-key": "<YOUR_API_KEY>" },
});
const data = await res.json();
console.log(data);
```

```go
req, _ := http.NewRequest("GET", "https://api.tickerlayer.com/futures/contracts?base=US500", nil)
req.Header.Set("x-api-key", "<YOUR_API_KEY>")
```

### Response

```json
{
  "contracts": [
    {
      "symbol": "US500.DEC26",
      "base": "US500",
      "contract_month": "2026-12",
      "rank": 1,
      "in_chain": true,
      "last_trade_date": "2026-12-18",
      "roll_date": "2026-12-18",
      "first_notice_date": "2026-11-30",
      "roll_window_start": "2026-11-05T23:00:00.000Z",
      "roll_window_end": "2026-11-12T22:00:00.000Z",
      "days_to_expiry": 56,
      "market_status": "open"
    },
    {
      "symbol": "US500.SEP27",
      "base": "US500",
      "contract_month": "2027-09",
      "rank": null,
      "in_chain": true,
      "last_trade_date": "2027-09-17",
      "roll_date": "2027-09-17",
      "first_notice_date": "2027-08-31",
      "roll_window_start": "2027-08-05T22:00:00.000Z",
      "roll_window_end": "2027-08-12T21:00:00.000Z",
      "days_to_expiry": 329,
      "market_status": "open"
    }
  ],
  "count": 5
}
```

### Notes

`rank` is the month’s chain position (1 is `C1`), or `null` beyond `C3` or outside the cycle. Dates are UTC calendar days; `roll_window_start` and `roll_window_end` are the open of the first window session and the close of the last. `days_to_expiry` counts calendar days from the current trade date to the last trading day. An unknown base answers `404 unknown futures product`.
