---
title: POST /v1/leaderboard/settings
---

# `POST /v1/leaderboard/settings`

Update leaderboard settings

Opt out or in, and claim a display name for the account's public identity.

Money, price, rate and count fields cross the wire as decimal strings; units are shown beside each field ([Wire encoding](/api/wire-encoding)). Group: [Leaderboard](/api/reference/leaderboard/).

**Auth:** API key (`x-api-key`)

**Scope:** `admin-sessions`

**Rate limit:** the `read` budget ([Rate limits](/api/rate-limits))

**Effect:** `write`: changes orders or account state

**Idempotency key:** `any`: any fresh unique key, reused only to retry the same request

## Parameters

- <span id="param-idempotency-key"></span>`idempotency-key` (header) · string · required: Required on this mutating endpoint. A client-chosen unique key that makes the write safe to retry; reusing a key with a DIFFERENT body is refused (409 idempotency_key_reused), except on credential-minting and treasury approve/execute routes, which replay as before. What the value must be is the operation's `x-hardbasis-idempotency-key`: `order-id` = the client order id (it BECOMES the order/bracket/trigger id, 1..64 chars of [A-Za-z0-9._:-]); `quote-id` = the body's quoteId (any other value is refused, 400); `any` = any fresh unique key.

## Request

- <span id="req-optedOut"></span>`optedOut` · boolean · optional
- <span id="req-displayName"></span>`displayName` · string \| null · optional

```bash [curl]
curl -fsS -X POST "$HB/v1/leaderboard/settings" \
  -H "x-api-key: $HB_KEY" \
  -H "idempotency-key: $(uuidgen)" \
  -H "content-type: application/json" \
  -d '{
    "optedOut": false,
    "displayName": "satstacker"
  }'
```

```python [Python]
import os
import uuid

import requests

HB = os.environ.get("HB", "https://testnet.hardbasis.com")

resp = requests.post(
    f"{HB}/v1/leaderboard/settings",
    headers={
        "x-api-key": os.environ["HB_KEY"],
        "idempotency-key": str(uuid.uuid4()),
    },
    json={
        "optedOut": False,
        "displayName": "satstacker",
    },
)
resp.raise_for_status()
print(resp.json())
```

```ts [TypeScript]
const HB = process.env.HB ?? "https://testnet.hardbasis.com";

const res = await fetch(`${HB}/v1/leaderboard/settings`, {
  method: "POST",
  headers: {
    "x-api-key": process.env.HB_KEY!,
    "idempotency-key": crypto.randomUUID(),
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "optedOut": false,
    "displayName": "satstacker"
  }),
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
console.log(await res.json());
```

## Responses

- **200**: OK
  - <span id="res-200-optedOut"></span>`optedOut` · boolean · required
  - <span id="res-200-handle"></span>`handle` · string \| null · required
  - <span id="res-200-displayName"></span>`displayName` · string \| null · required
  - <span id="res-200-placements"></span>`placements` · object[] · required
    - <span id="res-200-placements-board"></span>`board` · enum(`pnl`, `roi`) · required
    - <span id="res-200-placements-window"></span>`window` · enum(`7d`, `30d`, `all`) · required
    - <span id="res-200-placements-rank"></span>`rank` · string · unit `int` · required
    - <span id="res-200-placements-pnlMsat"></span>`pnlMsat` · string · unit `msat` · required
    - <span id="res-200-placements-roiQ9"></span>`roiQ9` · string · unit `q9` · required
    - <span id="res-200-placements-volumeContracts"></span>`volumeContracts` · string · unit `contracts` · required
    - <span id="res-200-placements-trades"></span>`trades` · string · unit `int` · required
    - <span id="res-200-placements-winRateQ9"></span>`winRateQ9` · string \| null · unit `q9` · required
    - <span id="res-200-placements-maxDrawdownQ9"></span>`maxDrawdownQ9` · string · unit `q9` · required
  - <span id="res-200-eligibility"></span>`eligibility` · object[] · required
    - <span id="res-200-eligibility-window"></span>`window` · enum(`7d`, `30d`, `all`) · required
    - <span id="res-200-eligibility-eligible"></span>`eligible` · boolean · required
    - <span id="res-200-eligibility-reason"></span>`reason` · enum(`gates_failed`, `insufficient_history`, `coverage_gap`, `window_unserved`) \| null · optional
    - <span id="res-200-eligibility-eligibleAtMs"></span>`eligibleAtMs` · string \| null · unit `ms` · optional
    - <span id="res-200-eligibility-checks"></span>`checks` · object[] · required

Example `200` response:

```json
{
  "optedOut": true,
  "handle": "string",
  "displayName": "string",
  "placements": [
    {
      "board": "pnl",
      "window": "7d",
      "rank": "100000",
      "pnlMsat": "100000",
      "roiQ9": "100000",
      "volumeContracts": "100000",
      "trades": "100000",
      "winRateQ9": "100000",
      "maxDrawdownQ9": "100000"
    }
  ],
  "eligibility": [
    {
      "window": "7d",
      "eligible": true,
      "reason": "gates_failed",
      "eligibleAtMs": "100000",
      "checks": [
        {
          "gate": "string",
          "ok": true,
          "thresholdMsat": "100000",
          "threshold": "100000",
          "valueMsat": "100000",
          "value": "100000"
        }
      ]
    }
  ]
}
```

## Errors

Every refusal carries a stable `code` from [`ErrorCode`](/api/reference/all#errorcode) beside human `error` prose; match on the code. See [Errors](/api/errors).

- **401**: A refusal carrying a stable machine `code` (ErrorCode) beside human `error` prose.
- **403**: A refusal carrying a stable machine `code` (ErrorCode) beside human `error` prose.
- **429**: A token bucket is exhausted.
