# Read your rank

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

API: Nexus.

Your own member rank, the one on your profile: tier, division, EP, progress to the next tier, any series or shield.

- Ranks are on for every member. If they're ever switched off, it answers `200` with `data` `{"enabled": false}` and no figures.
- This is your own member rank. `account=agent` or any `port` answers `400 bad_request`: your bot's rank is `GET /api/nexus/v1/agent/rank` and its Edge `GET /api/nexus/v1/agent/edge`.
- A figure not measured yet is left out or `null`, never `0`. Before placement there is no `tier`, `ep` or `p`; `n` says how many positions were counted.
- Read only. It reads only your own rank.

```bash
curl -s "https://app.skylit.ai/api/nexus/v1/ranks/me" \
  -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 |
| --- | --- | --- | --- | --- |
| `account` | query | string | no | Leave it out, or send `main`. This is yours as a member, not an account's: `agent` answers `400 bad_request`, and so does `port`. (one of `main`) |

## Example request

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

## Responses

### 200

Your rank, or `{"enabled": false}` if ranks are switched off.

A real answer: Theta IV after 12 counted positions.:

```json
{
  "data": {
    "enabled": true,
    "mode": "on",
    "methodVersion": "ranks-v3.0",
    "tier": "theta",
    "tierName": "Theta",
    "division": 4,
    "divisionLabel": "IV",
    "ep": 53,
    "p": 0.13,
    "n": 12,
    "nCounted": 12,
    "edgeR": 0.23,
    "sdR": 0.98,
    "netRor": 0.2287,
    "activeDays": 12,
    "lower": {
      "l80": -0.02,
      "l90": -0.16,
      "l95": -0.28,
      "lob": {
        "l90": -0.28,
        "l95": -0.39
      }
    },
    "state": "ranked",
    "placement": {
      "done": 10,
      "total": 10
    },
    "series": null,
    "shield": null,
    "next": {
      "tier": "delta",
      "needN": 25,
      "conf": null,
      "needLower": null,
      "needMean": 0,
      "nProgress": 0.13,
      "lowerProgress": 1,
      "meanProgress": 1,
      "needNetRor": 0,
      "needDays": 10,
      "netProgress": 1,
      "daysProgress": 1
    },
    "oracleSeat": null,
    "dormant": false,
    "streak": 1,
    "verified": {
      "sealed": false,
      "n": 0,
      "edgeR": null,
      "lower": {
        "l80": null,
        "l90": null,
        "l95": null
      }
    },
    "season": {
      "id": "fcafa009-d731-4c2c-b5c0-a411c9d68780",
      "peakTier": "theta"
    },
    "celebration": null
  },
  "meta": {
    "account": "main",
    "port": null
  }
}
```

### 400

Code: `bad_request`. `account=agent` or a `port` was sent (your bot's rank is `GET /api/nexus/v1/agent/rank`), `account` is something else, `range` isn't `3m`, `1y` or `all`, or `after` isn't an event id. The message says which.

account=agent or a port.:

```json
{
  "error": {
    "code": "bad_request",
    "message": "This is your own rank. Your bot's rank is GET /api/nexus/v1/agent/rank and its Edge GET /api/nexus/v1/agent/edge."
  }
}
```

### 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."
  }
}
```

### 404

Code: `user_not_found`. This Skylit account hasn't used Nexus yet, so there's nothing to read.

No Nexus account yet.:

```json
{
  "error": {
    "code": "user_not_found",
    "message": "This Skylit account hasn't used Nexus yet, so it has no journal."
  }
}
```

### 429

Over a rate limit. Wait `Retry-After` seconds, then retry. Codes: `rate_limited`, and `stream_limit_reached` (too many live streams open: 3 per key, 6 per account).

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."
  }
}
```

### 500

Something went wrong on our side. If you sent a `clientOrderId`, retry with the same one. Code: `internal_error`.

Retry with the same clientOrderId.:

```json
{
  "error": {
    "code": "internal_error",
    "message": "Something went wrong on our side. If you sent a clientOrderId, retry with the same one (it can't fill twice). Otherwise check your account before retrying."
  }
}
```

### 503

Try again in a moment (honour `Retry-After` when it's sent). Codes: `stale_quote` (the quote, or a stock's last trade, is more than 15 seconds old, so nothing filled), `no_live_price`, `rules_pending`, `unavailable`, `auth_unavailable`, `access_check_unavailable`, `api_keys_unavailable`, `trades_api_disabled`, `stream_unavailable` (the live stream isn't on, or the server is restarting: try again shortly, or poll the reads).

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."
  }
}
```
