# Your open spreads

`GET https://app.skylit.ai/api/nexus/v1/spreads`

API: Nexus.

Your open multi-leg spreads on your main simulated account: each leg, its last mark, what you opened it for, what it makes at the marks, the collateral it holds and its exit plan. Read only: nothing here places, changes or closes a spread.

Spreads live on your main account only. Leave `account` and `port` out (or send `account=main`); anything else answers `422 port_unsupported`.

You can read your open spreads whenever the desk shows them to you: while spreads are open to members, or while you still hold one. Otherwise the answer is `403 feature_disabled`: spreads aren't open to you right now.

A figure that hasn't been measured is `null`, never `0`: `markPrice` and `unrealizedPnl` stay `null` until every leg has a mark, and `exit` is `null` with no stop or target set.

```bash
curl -s "https://app.skylit.ai/api/nexus/v1/spreads" \
  -H "Authorization: Bearer $SKYLIT_API_KEY"
```

## Authentication

Send your Skylit API key as a bearer token: `Authorization: Bearer <key>`. No other header is accepted.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no | How many to return, 1 to 200 (more is read as 200). (default `50`; min 1; max 200) |
| `offset` | query | integer | no | How many to skip first. (default `0`; min 0) |
| `account` | query | string | no | `main` or left out. Spreads are on your main account only. (one of `main`) |

## Example request

```bash
curl "https://app.skylit.ai/api/nexus/v1/spreads" \
  -H "Authorization: Bearer $SKYLIT_API_KEY"
```

## Responses

### 200

Your open spreads, by underlying and expiration.

One open vertical spread (a local run of the route).:

```json
{
  "data": [
    {
      "spreadId": "87461156-7f94-4264-8922-45a45aa80fe4",
      "account": "main",
      "strategy": "VERTICAL",
      "underlying": "SPY",
      "netEffect": "DEBIT",
      "quantity": 1,
      "openPrice": 1.9,
      "markPrice": 1.7,
      "unrealizedPnl": -20,
      "realizedPnl": 0,
      "collateral": 0,
      "exit": null,
      "legs": [
        {
          "assetClass": "options",
          "ticker": "SPY",
          "expiration": "2030-12-31",
          "strike": 775,
          "direction": "call",
          "side": "BUY",
          "ratio": 1,
          "quantity": 1,
          "multiplier": 100,
          "openPrice": 3.1,
          "markPrice": 3
        },
        {
          "assetClass": "options",
          "ticker": "SPY",
          "expiration": "2030-12-31",
          "strike": 780,
          "direction": "call",
          "side": "SELL",
          "ratio": 1,
          "quantity": 1,
          "multiplier": 100,
          "openPrice": 1.2,
          "markPrice": 1.3
        }
      ]
    }
  ],
  "meta": {
    "total": 1,
    "limit": 50,
    "offset": 0
  }
}
```

### 400

`bad_request`: limit or offset out of range.

### 401

Missing or invalid key.

### 403

`feature_disabled`: spreads are not open to you right now.

### 422

`port_unsupported`: spreads are on your main account only.

### 503

`unavailable`: spreads are not available on this server right now.
