# What this key can trade right now

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

API: Nexus.

The asset classes, order types, futures contracts and futures accounts this key can trade right now, plus your per-key limits. Call it when your bot starts, so it asks instead of guessing.

Options and stocks always list `market` as their only order type. The futures block is there only when your account has futures paper trading. When it doesn't, the futures entry under `assetClasses` says why. The first call creates your futures practice account if you don't have one yet, as Nexus does when you open the futures ticket.

## Authentication

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

## Example request

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

## Responses

### 200

What you can trade.

A member with futures, the market open, a practice account and one evaluation.:

```json
{
  "data": {
    "assetClasses": [
      {
        "assetClass": "options",
        "available": true,
        "orderTypes": [
          "market"
        ]
      },
      {
        "assetClass": "stocks",
        "available": true,
        "orderTypes": [
          "market"
        ]
      },
      {
        "assetClass": "futures",
        "available": true,
        "orderTypes": [
          "market",
          "limit",
          "stop"
        ]
      }
    ],
    "orderTypes": [
      "market"
    ],
    "testOrders": true,
    "futures": {
      "marketOpen": true,
      "maxOrderQuantity": 100,
      "orderTypes": [
        "market",
        "limit",
        "stop"
      ],
      "bracket": [
        "stopLoss",
        "takeProfit",
        "trailingStop"
      ],
      "modify": [
        "price"
      ],
      "contracts": [
        {
          "root": "NQ",
          "name": "E-mini Nasdaq-100",
          "symbol": "NQZ26",
          "tickSize": 0.25,
          "tickValueCents": 500,
          "pointValueCents": 2000,
          "commissionPerSideCents": 214,
          "livePrice": true
        },
        {
          "root": "MNQ",
          "name": "Micro E-mini Nasdaq-100",
          "symbol": "MNQZ26",
          "tickSize": 0.25,
          "tickValueCents": 50,
          "pointValueCents": 200,
          "commissionPerSideCents": 62,
          "livePrice": true
        }
      ],
      "accounts": [
        {
          "id": "3c2b1a90-5e4d-4f3a-8b2c-1d0e9f8a7b6c",
          "kind": "practice",
          "name": "Paper",
          "status": "active",
          "balanceCents": 5000000,
          "tradable": true,
          "allowed": [
            "read",
            "open",
            "reduce",
            "close",
            "limit",
            "stop",
            "bracket",
            "cancel",
            "modify"
          ]
        },
        {
          "id": "8d7c6b5a-4e3f-4a2b-9c1d-0e1f2a3b4c5d",
          "kind": "evaluation",
          "name": "50K Evaluation",
          "status": "active",
          "balanceCents": 5012500,
          "tradable": true,
          "allowed": [
            "read",
            "open",
            "reduce",
            "close",
            "limit",
            "stop",
            "bracket",
            "cancel",
            "modify"
          ]
        }
      ]
    },
    "limits": {
      "writesPerMinute": 30,
      "readsPerMinute": 120
    }
  }
}
```

### 401

No key, or a key that isn't valid. Codes: `missing_api_key`, `invalid_api_key`.

No key sent.:

```json
{
  "error": {
    "code": "missing_api_key",
    "message": "Send your Skylit API key in the Authorization header: Authorization: Bearer YOUR_SKYLIT_API_KEY."
  }
}
```

### 403

The key works but the account can't do this. Codes: `account_suspended`, `nexus_access_denied`, `futures_access_denied`.

The account doesn't include Nexus.:

```json
{
  "error": {
    "code": "nexus_access_denied",
    "message": "This Skylit account doesn't include Nexus, so it can't place Nexus trades."
  }
}
```

### 429

Over a rate limit. Wait `Retry-After` seconds, then retry. Code: `rate_limited`.

Headers: `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`.

Too many writes from this key.:

```json
{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests (limit 30). Slow down and retry in 12 seconds."
  }
}
```

### 503

Try again in a moment (honour `Retry-After` when it's sent). Codes: `stale_quote`, `no_live_price`, `rules_pending`, `unavailable`, `auth_unavailable`, `access_check_unavailable`, `api_keys_unavailable`, `trades_api_disabled`.

Headers: `Retry-After`.

No live price right now.:

```json
{
  "error": {
    "code": "no_live_price",
    "message": "There's no live price for this contract right now, so nothing was filled. Try again in a moment."
  }
}
```
