diff --git a/CHANGELOG.md b/CHANGELOG.md
index 516ac02..5c467a0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,40 @@
All notable changes to kalshi-sdk will be documented in this file.
+## 7.4.0 — 2026-07-26
+
+Reconciles upstream core OpenAPI content under version string **3.26.0**
+(paths 92→93, 103→105 operations; 104 mapped) for the settlement-advance
+subaccount surface (Closes #486). Additive only — no breaking public-API
+removals.
+
+### Added
+
+- **`subaccounts.lock_settlement_advance()` / `unlock_settlement_advance()`**
+ (sync + async) — `PUT` / `DELETE`
+ `/portfolio/subaccounts/settlement-advance-lock`. Lock cancels resting
+ orders, prevents trading, and returns
+ `LockSubaccountForSettlementAdvanceResponse.settlement_advance_state`
+ (UUID CAS token). Unlock returns `None` (empty success body) and is
+ rejected while an outstanding settlement advance remains. Body:
+ required `subaccount_number`, optional `exchange_index`. Auth required.
+ Request models: `LockSubaccountForSettlementAdvanceRequest`,
+ `UnlockSubaccountForSettlementAdvanceRequest` (`extra="forbid"`).
+- **`SubaccountBalance.voluntarily_locked`** (`bool`, required) — whether
+ the subaccount is voluntarily locked for settlement-advance computation.
+- **`SubaccountBalance.settlement_advance`** (`DollarDecimal`, required) —
+ outstanding settlement advance in dollars.
+- **`SubaccountBalance.settlement_advance_state`** (`UUID | None`) —
+ current CAS token when one has been established.
+
+### Spec notes
+
+- Core OpenAPI `info.version` still **3.26.0** (content-only change; paths
+ 92→93, 105 operations / 104 mapped). Still unimplemented:
+ `POST /portfolio/intra_exchange_instance_transfer` (use
+ `PerpsClient.transfers.transfer_instance()` on the margin product).
+- Perps OpenAPI / AsyncAPI / SCM specs unchanged for this release.
+
## 7.3.0 — 2026-07-23
Syncs the upstream core OpenAPI **3.25.0 → 3.26.0** and closes the remaining
diff --git a/CLAUDE.md b/CLAUDE.md
index a6c536c..f4afa17 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -122,7 +122,7 @@ tests/
## API Reference
-- OpenAPI spec: https://docs.kalshi.com/openapi.yaml (v3.26.0, 103 operations; 102 mapped in the core SDK — `POST /portfolio/intra_exchange_instance_transfer` is currently not available upstream)
+- OpenAPI spec: https://docs.kalshi.com/openapi.yaml (v3.26.0, 105 operations; 104 mapped in the core SDK — `POST /portfolio/intra_exchange_instance_transfer` is currently not available upstream)
- AsyncAPI spec: https://docs.kalshi.com/asyncapi.yaml (13 WebSocket channels)
- Base URL: https://api.elections.kalshi.com/trade-api/v2
- Demo URL: https://demo-api.kalshi.co/trade-api/v2
diff --git a/README.md b/README.md
index 53b36ac..27e9fef 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ A professional, spec-first Python SDK for the [Kalshi](https://kalshi.com) predi
[](LICENSE)
[](https://mypy.readthedocs.io/)
-- **Full coverage** of the Kalshi REST API (102 operations across 19 resources, OpenAPI v3.26.0) and WebSocket API (12 typed `subscribe_*` channels + 2 escape-hatch).
+- **Full coverage** of the Kalshi REST API (104 operations across 19 resources, OpenAPI v3.26.0) and WebSocket API (12 typed `subscribe_*` channels + 2 escape-hatch).
- **Perps (margin) API**: standalone `PerpsClient` / `AsyncPerpsClient` + `PerpsWebSocket` for the perpetual-futures exchange (34 REST operations, 6 WS channels), plus a `KlearClient` for the Self-Clearing-Member "Klear" settlement API (11 operations). See [Perps (margin) trading](#perps-margin-trading).
- **FIX protocol**: an async-first FIX engine (FIXT.1.1 / FIX50SP2) for both products — order-entry, drop-copy, market-data, post-trade (prediction), and RFQ (prediction) sessions (plus order-group management over the order-entry session) with typed message models, sequence recovery, and order-book / settlement reassembly. `from kalshi import FixClient` / `MarginFixClient`. See [FIX protocol](#fix-protocol-low-latency-trading).
- **V2 event-market orders**: `create_v2` / `amend_v2` / `decrease_v2` / `cancel_v2` plus batched variants on `/portfolio/events/orders/*` — the only order-write surface.
diff --git a/ROADMAP.md b/ROADMAP.md
index 184442e..0df5a5c 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -2,6 +2,10 @@
## Shipped
+- **v7.4.0 (2026-07-26)** — OpenAPI 3.26.0 content reconcile (#486). Additive:
+ `subaccounts.lock_settlement_advance()` / `unlock_settlement_advance()`, and
+ `SubaccountBalance` settlement-advance fields (`voluntarily_locked`,
+ `settlement_advance`, `settlement_advance_state`).
- **v7.3.0 (2026-07-23)** — OpenAPI sync 3.25.0 → 3.26.0 (#484). Additive:
`historical.positions()` / `positions_all()` (`GET /historical/positions`),
`HistoricalCutoff.market_positions_last_updated_ts`, and Klear
diff --git a/docs/index.md b/docs/index.md
index 5fe1105..7136c3e 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -3,7 +3,7 @@
A professional, spec-first Python SDK for the [Kalshi](https://kalshi.com) prediction
markets API.
-- **Full REST coverage** — 102 operations across 19 resources (OpenAPI v3.26.0),
+- **Full REST coverage** — 104 operations across 19 resources (OpenAPI v3.26.0),
every kwarg drift-tested against the spec.
- **V2 event-market orders** — new `create_v2` / `amend_v2` / `decrease_v2` /
`cancel_v2` family on `/portfolio/events/orders/*`. Legacy `/portfolio/orders`
diff --git a/docs/migration.md b/docs/migration.md
index 1a09467..510a80c 100644
--- a/docs/migration.md
+++ b/docs/migration.md
@@ -1,5 +1,33 @@
# Migration
+## v7.3 → v7.4.0
+
+Reconciles upstream core OpenAPI content under version string **3.26.0** for
+the settlement-advance subaccount surface (Closes #486). **No breaking
+public-API removals.** Response parsing for `list_balances()` now expects the
+new required balance fields from the live API.
+
+### Added
+
+- **`subaccounts.lock_settlement_advance()` / `unlock_settlement_advance()`**
+ (sync + async) — lock/unlock a subaccount for settlement-advance work.
+- **`SubaccountBalance.voluntarily_locked`**, **`settlement_advance`**,
+ optional **`settlement_advance_state`**.
+
+```python
+lock = client.subaccounts.lock_settlement_advance(subaccount_number=1)
+print(lock.settlement_advance_state)
+
+resp = client.subaccounts.list_balances()
+for bal in resp.subaccount_balances:
+ print(bal.voluntarily_locked, bal.settlement_advance)
+
+client.subaccounts.unlock_settlement_advance(subaccount_number=1)
+```
+
+See the [changelog](https://github.com/TexasCoding/kalshi-python-sdk/blob/main/CHANGELOG.md)
+for the full list.
+
## v7.2 → v7.3.0
Syncs the SDK to core OpenAPI **3.26.0** and closes residual Klear settlement
diff --git a/docs/request-models.md b/docs/request-models.md
index 9451f3f..e7e8ad4 100644
--- a/docs/request-models.md
+++ b/docs/request-models.md
@@ -68,7 +68,10 @@ exposed by each resource method stays in lockstep with the OpenAPI spec.
| `client.order_groups.create` | `CreateOrderGroupRequest` |
| `client.order_groups.update_limit` | `UpdateOrderGroupLimitRequest` |
| `client.subaccounts.transfer` | `ApplySubaccountTransferRequest` |
+| `client.subaccounts.transfer_position` | `ApplySubaccountPositionTransferRequest` |
| `client.subaccounts.update_netting` | `UpdateSubaccountNettingRequest` |
+| `client.subaccounts.lock_settlement_advance` | `LockSubaccountForSettlementAdvanceRequest` |
+| `client.subaccounts.unlock_settlement_advance` | `UnlockSubaccountForSettlementAdvanceRequest` |
All are importable from the top-level `kalshi` package.
diff --git a/docs/resources/subaccounts.md b/docs/resources/subaccounts.md
index 979c2c6..3914067 100644
--- a/docs/resources/subaccounts.md
+++ b/docs/resources/subaccounts.md
@@ -15,6 +15,8 @@ primary; `1`–`63` are numbered extras. Auth required throughout.
| `list_all_transfers(*, limit=None, max_pages=None)` | walks `list_transfers` |
| `update_netting(*, subaccount_number, enabled)` | `PUT /portfolio/subaccounts/netting` |
| `get_netting()` | `GET /portfolio/subaccounts/netting` |
+| `lock_settlement_advance(*, subaccount_number, exchange_index=None)` | `PUT /portfolio/subaccounts/settlement-advance-lock` |
+| `unlock_settlement_advance(*, subaccount_number, exchange_index=None)` | `DELETE /portfolio/subaccounts/settlement-advance-lock` |
## Create a subaccount
@@ -77,11 +79,41 @@ print(resp.position_transfer_id)
```python
resp = client.subaccounts.list_balances()
for bal in resp.subaccount_balances:
- print(bal.subaccount_number, bal.balance, bal.updated_ts)
+ print(
+ bal.subaccount_number,
+ bal.balance,
+ bal.updated_ts,
+ bal.voluntarily_locked,
+ bal.settlement_advance,
+ bal.settlement_advance_state,
+ )
```
-`bal.balance` is a `DollarDecimal` (dollars). `bal.updated_ts` is Unix seconds
-(not ISO datetime).
+`bal.balance` and `bal.settlement_advance` are `DollarDecimal` (dollars).
+`bal.updated_ts` is Unix seconds (not ISO datetime). `bal.voluntarily_locked`
+is whether the subaccount is locked for settlement-advance computation;
+`bal.settlement_advance_state` is the optional CAS token (`UUID | None`).
+
+## Settlement advance lock
+
+Lock a subaccount before settlement-advance work (cancels resting orders and
+prevents trading). Unlock is rejected while an outstanding settlement advance
+remains.
+
+```python
+lock = client.subaccounts.lock_settlement_advance(
+ subaccount_number=1,
+ exchange_index=0, # optional; defaults to 0 server-side
+)
+print(lock.settlement_advance_state) # UUID CAS token
+
+# After the advance is cleared:
+client.subaccounts.unlock_settlement_advance(subaccount_number=1)
+```
+
+Both methods also accept a pre-built request model
+(`LockSubaccountForSettlementAdvanceRequest` /
+`UnlockSubaccountForSettlementAdvanceRequest`). Auth required.
## List transfers
diff --git a/kalshi/__init__.py b/kalshi/__init__.py
index b15752b..8c67feb 100644
--- a/kalshi/__init__.py
+++ b/kalshi/__init__.py
@@ -112,6 +112,8 @@
IncentiveProgramTypeLiteral,
IndexedBalance,
LiveData,
+ LockSubaccountForSettlementAdvanceRequest,
+ LockSubaccountForSettlementAdvanceResponse,
LookupTickersForMarketInMultivariateEventCollectionRequest,
LookupTickersResponse,
MaintenanceWindow,
@@ -164,6 +166,7 @@
TimeInForceLiteral,
TotalRestingOrderValue,
Trade,
+ UnlockSubaccountForSettlementAdvanceRequest,
UpdateOrderGroupLimitRequest,
UpdateSubaccountNettingRequest,
UserDataTimestamp,
@@ -311,6 +314,8 @@
"KlearClient",
"KlearConfig",
"LiveData",
+ "LockSubaccountForSettlementAdvanceRequest",
+ "LockSubaccountForSettlementAdvanceResponse",
"LookupTickersForMarketInMultivariateEventCollectionRequest",
"LookupTickersResponse",
"MaintenanceWindow",
@@ -371,6 +376,7 @@
"TimeInForceLiteral",
"TotalRestingOrderValue",
"Trade",
+ "UnlockSubaccountForSettlementAdvanceRequest",
"UpdateOrderGroupLimitRequest",
"UpdateSubaccountNettingRequest",
"UserDataTimestamp",
@@ -379,4 +385,4 @@
"Withdrawal",
]
-__version__ = "7.3.0"
+__version__ = "7.4.0"
diff --git a/kalshi/_contract_map.py b/kalshi/_contract_map.py
index bfdbbe4..ccc72bc 100644
--- a/kalshi/_contract_map.py
+++ b/kalshi/_contract_map.py
@@ -160,7 +160,10 @@ class ContractEntry:
ContractEntry(
sdk_model="kalshi.models.subaccounts.SubaccountBalance",
spec_schema="SubaccountBalance",
- notes="balance uses DollarDecimal; updated_ts is Unix int",
+ notes=(
+ "balance + settlement_advance use DollarDecimal; updated_ts is Unix int; "
+ "settlement_advance_state is UUID | None"
+ ),
),
ContractEntry(
sdk_model="kalshi.models.subaccounts.SubaccountTransfer",
@@ -182,6 +185,19 @@ class ContractEntry:
sdk_model="kalshi.models.subaccounts.ApplySubaccountPositionTransferResponse",
spec_schema="ApplySubaccountPositionTransferResponse",
),
+ ContractEntry(
+ sdk_model="kalshi.models.subaccounts.LockSubaccountForSettlementAdvanceRequest",
+ spec_schema="LockSubaccountForSettlementAdvanceRequest",
+ ),
+ ContractEntry(
+ sdk_model="kalshi.models.subaccounts.LockSubaccountForSettlementAdvanceResponse",
+ spec_schema="LockSubaccountForSettlementAdvanceResponse",
+ notes="settlement_advance_state is UUID",
+ ),
+ ContractEntry(
+ sdk_model="kalshi.models.subaccounts.UnlockSubaccountForSettlementAdvanceRequest",
+ spec_schema="UnlockSubaccountForSettlementAdvanceRequest",
+ ),
ContractEntry(
sdk_model="kalshi.models.subaccounts.CreateSubaccountRequest",
spec_schema="CreateSubaccountRequest",
diff --git a/kalshi/models/__init__.py b/kalshi/models/__init__.py
index 3c1907a..67b9eaa 100644
--- a/kalshi/models/__init__.py
+++ b/kalshi/models/__init__.py
@@ -172,9 +172,12 @@
CreateSubaccountResponse,
GetSubaccountBalancesResponse,
GetSubaccountNettingResponse,
+ LockSubaccountForSettlementAdvanceRequest,
+ LockSubaccountForSettlementAdvanceResponse,
SubaccountBalance,
SubaccountNettingConfig,
SubaccountTransfer,
+ UnlockSubaccountForSettlementAdvanceRequest,
UpdateSubaccountNettingRequest,
)
@@ -266,6 +269,8 @@
"IncentiveProgramTypeLiteral",
"IndexedBalance",
"LiveData",
+ "LockSubaccountForSettlementAdvanceRequest",
+ "LockSubaccountForSettlementAdvanceResponse",
"LookupTickersForMarketInMultivariateEventCollectionRequest",
"LookupTickersResponse",
"MaintenanceWindow",
@@ -318,6 +323,7 @@
"TimeInForceLiteral",
"TotalRestingOrderValue",
"Trade",
+ "UnlockSubaccountForSettlementAdvanceRequest",
"UpdateOrderGroupLimitRequest",
"UpdateSubaccountNettingRequest",
"UserDataTimestamp",
diff --git a/kalshi/models/subaccounts.py b/kalshi/models/subaccounts.py
index f42eeff..08161eb 100644
--- a/kalshi/models/subaccounts.py
+++ b/kalshi/models/subaccounts.py
@@ -105,6 +105,11 @@ class SubaccountBalance(BaseModel):
``format: date-time`` and surface as ``datetime``; subaccount
timestamps follow the spec's int wire format. Callers wanting a
``datetime`` can ``datetime.fromtimestamp(obj.updated_ts, tz=timezone.utc)``.
+
+ Spec content under OpenAPI 3.26.0 (2026-07-25) added settlement-advance
+ fields: ``voluntarily_locked`` / ``settlement_advance`` (required) and
+ optional ``settlement_advance_state`` (CAS token from
+ :meth:`~kalshi.resources.subaccounts.SubaccountsResource.lock_settlement_advance`).
"""
subaccount_number: int
@@ -112,6 +117,10 @@ class SubaccountBalance(BaseModel):
exchange_index: int
balance: DollarDecimal
updated_ts: int
+ # Settlement-advance surface (OpenAPI 3.26.0 content, 2026-07-25).
+ voluntarily_locked: bool
+ settlement_advance: DollarDecimal
+ settlement_advance_state: UUID | None = None
model_config = {"extra": "allow"}
@@ -124,6 +133,46 @@ class GetSubaccountBalancesResponse(BaseModel):
model_config = {"extra": "allow"}
+class LockSubaccountForSettlementAdvanceRequest(BaseModel):
+ """Body for PUT /portfolio/subaccounts/settlement-advance-lock.
+
+ Locks a subaccount for settlement-advance computation (cancels resting
+ orders and prevents trading). ``subaccount_number`` uses ``0`` for the
+ primary account; ``exchange_index`` defaults to ``0`` when omitted.
+ """
+
+ subaccount_number: StrictInt = Field(ge=0)
+ exchange_index: StrictInt | None = Field(default=None, ge=0)
+
+ model_config = {"extra": "forbid"}
+
+
+class LockSubaccountForSettlementAdvanceResponse(BaseModel):
+ """Response from PUT /portfolio/subaccounts/settlement-advance-lock.
+
+ ``settlement_advance_state`` is the new compare-and-swap token for
+ subsequent settlement-advance requests.
+ """
+
+ settlement_advance_state: UUID
+
+ model_config = {"extra": "allow"}
+
+
+class UnlockSubaccountForSettlementAdvanceRequest(BaseModel):
+ """Body for DELETE /portfolio/subaccounts/settlement-advance-lock.
+
+ Unlock is rejected while the subaccount has an outstanding settlement
+ advance. Same ``subaccount_number`` / ``exchange_index`` semantics as
+ :class:`LockSubaccountForSettlementAdvanceRequest`.
+ """
+
+ subaccount_number: StrictInt = Field(ge=0)
+ exchange_index: StrictInt | None = Field(default=None, ge=0)
+
+ model_config = {"extra": "forbid"}
+
+
class SubaccountTransfer(BaseModel):
"""A past **cash** transfer between subaccounts.
diff --git a/kalshi/resources/subaccounts.py b/kalshi/resources/subaccounts.py
index 4cdf6be..60f3c4b 100644
--- a/kalshi/resources/subaccounts.py
+++ b/kalshi/resources/subaccounts.py
@@ -16,7 +16,10 @@
CreateSubaccountResponse,
GetSubaccountBalancesResponse,
GetSubaccountNettingResponse,
+ LockSubaccountForSettlementAdvanceRequest,
+ LockSubaccountForSettlementAdvanceResponse,
SubaccountTransfer,
+ UnlockSubaccountForSettlementAdvanceRequest,
UpdateSubaccountNettingRequest,
)
from kalshi.resources._base import (
@@ -148,6 +151,54 @@ def _build_update_netting_body(
return request.model_dump(exclude_none=True, by_alias=True, mode="json")
+def _build_lock_settlement_advance_body(
+ request: LockSubaccountForSettlementAdvanceRequest | None,
+ *,
+ subaccount_number: int | None,
+ exchange_index: int | None,
+) -> dict[str, Any]:
+ _check_request_exclusive(
+ request,
+ subaccount_number=subaccount_number,
+ exchange_index=exchange_index,
+ )
+ if request is None:
+ if subaccount_number is None:
+ raise TypeError(
+ "lock_settlement_advance() requires `subaccount_number` "
+ "(or pass `request=...`)"
+ )
+ request = LockSubaccountForSettlementAdvanceRequest(
+ subaccount_number=subaccount_number,
+ exchange_index=exchange_index,
+ )
+ return request.model_dump(exclude_none=True, by_alias=True, mode="json")
+
+
+def _build_unlock_settlement_advance_body(
+ request: UnlockSubaccountForSettlementAdvanceRequest | None,
+ *,
+ subaccount_number: int | None,
+ exchange_index: int | None,
+) -> dict[str, Any]:
+ _check_request_exclusive(
+ request,
+ subaccount_number=subaccount_number,
+ exchange_index=exchange_index,
+ )
+ if request is None:
+ if subaccount_number is None:
+ raise TypeError(
+ "unlock_settlement_advance() requires `subaccount_number` "
+ "(or pass `request=...`)"
+ )
+ request = UnlockSubaccountForSettlementAdvanceRequest(
+ subaccount_number=subaccount_number,
+ exchange_index=exchange_index,
+ )
+ return request.model_dump(exclude_none=True, by_alias=True, mode="json")
+
+
class SubaccountsResource(SyncResource):
"""Sync subaccounts API.
@@ -348,6 +399,87 @@ def get_netting(
data = self._get("/portfolio/subaccounts/netting", extra_headers=extra_headers)
return GetSubaccountNettingResponse.model_validate(data)
+ @overload
+ def lock_settlement_advance(
+ self,
+ *,
+ request: LockSubaccountForSettlementAdvanceRequest,
+ extra_headers: dict[str, str] | None = None,
+ ) -> LockSubaccountForSettlementAdvanceResponse: ...
+ @overload
+ def lock_settlement_advance(
+ self,
+ *,
+ subaccount_number: int,
+ exchange_index: int | None = None,
+ extra_headers: dict[str, str] | None = None,
+ ) -> LockSubaccountForSettlementAdvanceResponse: ...
+ def lock_settlement_advance(
+ self,
+ *,
+ request: LockSubaccountForSettlementAdvanceRequest | None = None,
+ subaccount_number: int | None = None,
+ exchange_index: int | None = None,
+ extra_headers: dict[str, str] | None = None,
+ ) -> LockSubaccountForSettlementAdvanceResponse:
+ """Lock a subaccount for settlement-advance computation.
+
+ Cancels resting orders, prevents trading, and returns a new
+ ``settlement_advance_state`` CAS token. Auth required.
+ """
+ self._require_auth()
+ body = _build_lock_settlement_advance_body(
+ request,
+ subaccount_number=subaccount_number,
+ exchange_index=exchange_index,
+ )
+ data = self._put(
+ "/portfolio/subaccounts/settlement-advance-lock",
+ json=body,
+ extra_headers=extra_headers,
+ )
+ return LockSubaccountForSettlementAdvanceResponse.model_validate(data)
+
+ @overload
+ def unlock_settlement_advance(
+ self,
+ *,
+ request: UnlockSubaccountForSettlementAdvanceRequest,
+ extra_headers: dict[str, str] | None = None,
+ ) -> None: ...
+ @overload
+ def unlock_settlement_advance(
+ self,
+ *,
+ subaccount_number: int,
+ exchange_index: int | None = None,
+ extra_headers: dict[str, str] | None = None,
+ ) -> None: ...
+ def unlock_settlement_advance(
+ self,
+ *,
+ request: UnlockSubaccountForSettlementAdvanceRequest | None = None,
+ subaccount_number: int | None = None,
+ exchange_index: int | None = None,
+ extra_headers: dict[str, str] | None = None,
+ ) -> None:
+ """Unlock a subaccount previously locked for settlement advance.
+
+ Rejected while the subaccount has an outstanding settlement advance.
+ Auth required. Returns ``None`` (empty success body).
+ """
+ self._require_auth()
+ body = _build_unlock_settlement_advance_body(
+ request,
+ subaccount_number=subaccount_number,
+ exchange_index=exchange_index,
+ )
+ self._delete_with_body(
+ "/portfolio/subaccounts/settlement-advance-lock",
+ json=body,
+ extra_headers=extra_headers,
+ )
+
class AsyncSubaccountsResource(AsyncResource):
"""Async subaccounts API."""
@@ -538,3 +670,82 @@ async def get_netting(
self._require_auth()
data = await self._get("/portfolio/subaccounts/netting", extra_headers=extra_headers)
return GetSubaccountNettingResponse.model_validate(data)
+
+ @overload
+ async def lock_settlement_advance(
+ self,
+ *,
+ request: LockSubaccountForSettlementAdvanceRequest,
+ extra_headers: dict[str, str] | None = None,
+ ) -> LockSubaccountForSettlementAdvanceResponse: ...
+ @overload
+ async def lock_settlement_advance(
+ self,
+ *,
+ subaccount_number: int,
+ exchange_index: int | None = None,
+ extra_headers: dict[str, str] | None = None,
+ ) -> LockSubaccountForSettlementAdvanceResponse: ...
+ async def lock_settlement_advance(
+ self,
+ *,
+ request: LockSubaccountForSettlementAdvanceRequest | None = None,
+ subaccount_number: int | None = None,
+ exchange_index: int | None = None,
+ extra_headers: dict[str, str] | None = None,
+ ) -> LockSubaccountForSettlementAdvanceResponse:
+ """Lock a subaccount for settlement-advance computation.
+
+ Async counterpart of :meth:`SubaccountsResource.lock_settlement_advance`.
+ """
+ self._require_auth()
+ body = _build_lock_settlement_advance_body(
+ request,
+ subaccount_number=subaccount_number,
+ exchange_index=exchange_index,
+ )
+ data = await self._put(
+ "/portfolio/subaccounts/settlement-advance-lock",
+ json=body,
+ extra_headers=extra_headers,
+ )
+ return LockSubaccountForSettlementAdvanceResponse.model_validate(data)
+
+ @overload
+ async def unlock_settlement_advance(
+ self,
+ *,
+ request: UnlockSubaccountForSettlementAdvanceRequest,
+ extra_headers: dict[str, str] | None = None,
+ ) -> None: ...
+ @overload
+ async def unlock_settlement_advance(
+ self,
+ *,
+ subaccount_number: int,
+ exchange_index: int | None = None,
+ extra_headers: dict[str, str] | None = None,
+ ) -> None: ...
+ async def unlock_settlement_advance(
+ self,
+ *,
+ request: UnlockSubaccountForSettlementAdvanceRequest | None = None,
+ subaccount_number: int | None = None,
+ exchange_index: int | None = None,
+ extra_headers: dict[str, str] | None = None,
+ ) -> None:
+ """Unlock a subaccount previously locked for settlement advance.
+
+ Async counterpart of :meth:`SubaccountsResource.unlock_settlement_advance`.
+ """
+ self._require_auth()
+ body = _build_unlock_settlement_advance_body(
+ request,
+ subaccount_number=subaccount_number,
+ exchange_index=exchange_index,
+ )
+ await self._delete_with_body(
+ "/portfolio/subaccounts/settlement-advance-lock",
+ json=body,
+ extra_headers=extra_headers,
+ )
diff --git a/pyproject.toml b/pyproject.toml
index 435b0d3..d344f5d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "kalshi-sdk"
-version = "7.3.0"
+version = "7.4.0"
description = "A professional Python SDK for the Kalshi prediction markets and Perps (margin) APIs"
readme = "README.md"
license = { text = "MIT" }
diff --git a/specs/openapi.yaml b/specs/openapi.yaml
index 3d68fb8..d9f5cfc 100644
--- a/specs/openapi.yaml
+++ b/specs/openapi.yaml
@@ -2,8 +2,9 @@ openapi: 3.0.0
info:
title: Kalshi Trade API Manual Endpoints
version: 3.26.0
- description: Manually defined OpenAPI spec for endpoints being migrated to spec-first approach
-
+ description: >-
+ Manually defined OpenAPI spec for endpoints being migrated to spec-first
+ approach
servers:
- url: https://external-api.kalshi.com/trade-api/v2
description: Production Trade API server
@@ -13,7 +14,6 @@ servers:
description: Demo Trade API server
- url: https://demo-api.kalshi.co/trade-api/v2
description: Demo shared API server, also supported
-
paths:
/exchange/status:
get:
@@ -47,7 +47,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ExchangeStatus'
-
/series/fee_changes:
get:
operationId: GetSeriesFeeChanges
@@ -79,7 +78,6 @@ paths:
$ref: '#/components/responses/BadRequestError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/exchange/schedule:
get:
operationId: GetExchangeSchedule
@@ -96,7 +94,6 @@ paths:
$ref: '#/components/schemas/GetExchangeScheduleResponse'
'500':
description: Internal server error
-
/exchange/user_data_timestamp:
get:
operationId: GetUserDataTimestamp
@@ -113,14 +110,19 @@ paths:
$ref: '#/components/schemas/GetUserDataTimestampResponse'
'500':
description: Internal server error
-
/series/{series_ticker}/markets/{ticker}/candlesticks:
get:
operationId: GetMarketCandlesticks
summary: Get Market Candlesticks
- description: |
- Time period length of each candlestick in minutes. Valid values: 1 (1 minute), 60 (1 hour), 1440 (1 day).
- Candlesticks for markets that settled before the historical cutoff are only available via `GET /historical/markets/{ticker}/candlesticks`. See [Historical Data](https://docs.kalshi.com/getting_started/historical_data) for details.
+ description: >
+ Time period length of each candlestick in minutes. Valid values: 1 (1
+ minute), 60 (1 hour), 1440 (1 day).
+
+ Candlesticks for markets that settled before the historical cutoff are
+ only available via `GET /historical/markets/{ticker}/candlesticks`. See
+ [Historical
+ Data](https://docs.kalshi.com/getting_started/historical_data) for
+ details.
tags:
- market
parameters:
@@ -139,38 +141,53 @@ paths:
- name: start_ts
in: query
required: true
- description: Start timestamp (Unix timestamp). Candlesticks will include those ending on or after this time.
+ description: >-
+ Start timestamp (Unix timestamp). Candlesticks will include those
+ ending on or after this time.
schema:
type: integer
format: int64
- name: end_ts
in: query
required: true
- description: End timestamp (Unix timestamp). Candlesticks will include those ending on or before this time.
+ description: >-
+ End timestamp (Unix timestamp). Candlesticks will include those
+ ending on or before this time.
schema:
type: integer
format: int64
- name: period_interval
in: query
required: true
- description: Time period length of each candlestick in minutes. Valid values are 1 (1 minute), 60 (1 hour), or 1440 (1 day).
+ description: >-
+ Time period length of each candlestick in minutes. Valid values are
+ 1 (1 minute), 60 (1 hour), or 1440 (1 day).
schema:
type: integer
- enum: [1, 60, 1440]
+ enum:
+ - 1
+ - 60
+ - 1440
x-enum-varnames:
- GetMarketCandlesticksParamsPeriodIntervalN1
- GetMarketCandlesticksParamsPeriodIntervalN60
- GetMarketCandlesticksParamsPeriodIntervalN1440
x-oapi-codegen-extra-tags:
- validate: "required,oneof=1 60 1440"
+ validate: required,oneof=1 60 1440
- name: include_latest_before_start
in: query
required: false
- description: |
- If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by:
+ description: >
+ If true, prepends the latest candlestick available before the
+ start_ts. This synthetic candlestick is created by:
+
1. Finding the most recent real candlestick before start_ts
- 2. Projecting it forward to the first period boundary (calculated as the next period interval after start_ts)
- 3. Setting all OHLC prices to null, and `previous_price` to the close price from the real candlestick
+
+ 2. Projecting it forward to the first period boundary (calculated as
+ the next period interval after start_ts)
+
+ 3. Setting all OHLC prices to null, and `previous_price` to the
+ close price from the real candlestick
schema:
type: boolean
default: false
@@ -187,13 +204,21 @@ paths:
description: Not found
'500':
description: Internal server error
-
/markets/trades:
get:
operationId: GetTrades
summary: Get Trades
- description: |
- Endpoint for getting all trades for all markets. A trade represents a completed transaction between two users on a specific market. Each trade includes the market ticker, price, quantity, and timestamp information. Block trades are included in the response by default and identified by the `is_block_trade` field; use the `is_block_trade` query parameter to filter by block / non-block. This endpoint returns a paginated response. Use the 'limit' parameter to control page size (1-1000, defaults to 100). The response includes a 'cursor' field - pass this value in the 'cursor' parameter of your next request to get the next page. An empty cursor indicates no more pages are available.
+ description: >
+ Endpoint for getting all trades for all markets. A trade represents a
+ completed transaction between two users on a specific market. Each trade
+ includes the market ticker, price, quantity, and timestamp information.
+ Block trades are included in the response by default and identified by
+ the `is_block_trade` field; use the `is_block_trade` query parameter to
+ filter by block / non-block. This endpoint returns a paginated response.
+ Use the 'limit' parameter to control page size (1-1000, defaults to
+ 100). The response includes a 'cursor' field - pass this value in the
+ 'cursor' parameter of your next request to get the next page. An empty
+ cursor indicates no more pages are available.
tags:
- market
parameters:
@@ -214,7 +239,6 @@ paths:
description: Bad request
'500':
description: Internal server error
-
/markets/{ticker}/orderbook:
get:
operationId: GetMarketOrderbook
@@ -230,7 +254,9 @@ paths:
- $ref: '#/components/parameters/TickerPath'
- name: depth
in: query
- description: Depth of the orderbook to retrieve (0 or negative means all levels, 1-100 for specific depth)
+ description: >-
+ Depth of the orderbook to retrieve (0 or negative means all levels,
+ 1-100 for specific depth)
required: false
schema:
type: integer
@@ -252,12 +278,20 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/markets/orderbooks:
get:
operationId: GetMarketOrderbooks
summary: Get Multiple Market Orderbooks
- description: 'Endpoint for getting the current order books for multiple markets in a single request. The order book shows all active bid orders for both yes and no sides of a binary market. It returns yes bids and no bids only (no asks are returned). This is because in binary markets, a bid for yes at price X is equivalent to an ask for no at price (100-X). For example, a yes bid at 7¢ is the same as a no ask at 93¢, with identical contract sizes. Each side shows price levels with their corresponding quantities and order counts, organized from best to worst prices. Returns one orderbook per requested market ticker.'
+ description: >-
+ Endpoint for getting the current order books for multiple markets in a
+ single request. The order book shows all active bid orders for both yes
+ and no sides of a binary market. It returns yes bids and no bids only
+ (no asks are returned). This is because in binary markets, a bid for yes
+ at price X is equivalent to an ask for no at price (100-X). For example,
+ a yes bid at 7¢ is the same as a no ask at 93¢, with identical contract
+ sizes. Each side shows price levels with their corresponding quantities
+ and order counts, organized from best to worst prices. Returns one
+ orderbook per requested market ticker.
tags:
- market
security:
@@ -293,7 +327,6 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/series/{series_ticker}:
get:
operationId: GetSeries
@@ -315,7 +348,9 @@ paths:
type: boolean
default: false
x-go-type-skip-optional-pointer: true
- description: If true, includes the total volume traded across all events in this series.
+ description: >-
+ If true, includes the total volume traded across all events in this
+ series.
responses:
'200':
description: Series retrieved successfully
@@ -327,7 +362,6 @@ paths:
$ref: '#/components/responses/BadRequestError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/series:
get:
operationId: GetSeriesList
@@ -362,11 +396,15 @@ paths:
type: boolean
default: false
x-go-type-skip-optional-pointer: true
- description: If true, includes the total volume traded across all events in each series.
+ description: >-
+ If true, includes the total volume traded across all events in each
+ series.
- name: min_updated_ts
in: query
required: false
- description: Filter series with metadata updated after this Unix timestamp (in seconds). Use this to efficiently poll for changes.
+ description: >-
+ Filter series with metadata updated after this Unix timestamp (in
+ seconds). Use this to efficiently poll for changes.
schema:
type: integer
format: int64
@@ -381,25 +419,24 @@ paths:
$ref: '#/components/responses/BadRequestError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/markets:
get:
operationId: GetMarkets
summary: Get Markets
- description: |
- Filter by market status. Possible values: `unopened`, `open`, `closed`, `settled`. Leave empty to return markets with any status.
- - Only one `status` filter may be supplied at a time.
- - Timestamp filters will be mutually exclusive from other timestamp filters and certain status filters.
-
- | Compatible Timestamp Filters | Additional Status Filters| Extra Notes |
- |------------------------------|--------------------------|-------------|
- | min_created_ts, max_created_ts | `unopened`, `open`, *empty* | |
- | min_close_ts, max_close_ts | `closed`, *empty* | |
- | min_settled_ts, max_settled_ts | `settled`, *empty* | |
- | min_updated_ts | *empty* | Incompatible with all filters besides `mve_filter=exclude`. May be combined with `series_ticker`, which requires `mve_filter=exclude` |
-
- Markets that settled before the historical cutoff are only available via `GET /historical/markets`. See [Historical Data](https://docs.kalshi.com/getting_started/historical_data) for details.
-
+ description: >
+ Filter by market status. Possible values: `unopened`, `open`, `closed`,
+ `settled`. Leave empty to return markets with any status.
+ - Only one `status` filter may be supplied at a time.
+ - Timestamp filters will be mutually exclusive from other timestamp filters and certain status filters.
+
+ | Compatible Timestamp Filters | Additional Status Filters| Extra Notes |
+ |------------------------------|--------------------------|-------------|
+ | min_created_ts, max_created_ts | `unopened`, `open`, *empty* | |
+ | min_close_ts, max_close_ts | `closed`, *empty* | |
+ | min_settled_ts, max_settled_ts | `settled`, *empty* | |
+ | min_updated_ts | *empty* | Incompatible with all filters besides `mve_filter=exclude`. May be combined with `series_ticker`, which requires `mve_filter=exclude` |
+
+ Markets that settled before the historical cutoff are only available via `GET /historical/markets`. See [Historical Data](https://docs.kalshi.com/getting_started/historical_data) for details.
tags:
- market
parameters:
@@ -430,7 +467,6 @@ paths:
description: Unauthorized
'500':
description: Internal server error
-
/markets/{ticker}:
get:
operationId: GetMarket
@@ -453,18 +489,22 @@ paths:
description: Not found
'500':
description: Internal server error
-
/markets/candlesticks:
get:
operationId: BatchGetMarketCandlesticks
summary: Batch Get Market Candlesticks
- description: |
+ description: >
Endpoint for retrieving candlestick data for multiple markets.
+
- Accepts up to 100 market tickers per request
+
- Returns up to 10,000 candlesticks total across all markets
+
- Returns candlesticks grouped by market_id
- - Optionally includes a synthetic initial candlestick for price continuity (see `include_latest_before_start` parameter)
+
+ - Optionally includes a synthetic initial candlestick for price
+ continuity (see `include_latest_before_start` parameter)
tags:
- market
parameters:
@@ -499,11 +539,17 @@ paths:
- name: include_latest_before_start
in: query
required: false
- description: |
- If true, prepends the latest candlestick available before the start_ts. This synthetic candlestick is created by:
+ description: >
+ If true, prepends the latest candlestick available before the
+ start_ts. This synthetic candlestick is created by:
+
1. Finding the most recent real candlestick before start_ts
- 2. Projecting it forward to the first period boundary (calculated as the next period interval after start_ts)
- 3. Setting all OHLC prices to null, and `previous_price` to the close price from the real candlestick
+
+ 2. Projecting it forward to the first period boundary (calculated as
+ the next period interval after start_ts)
+
+ 3. Setting all OHLC prices to null, and `previous_price` to the
+ close price from the real candlestick
schema:
type: boolean
default: false
@@ -520,7 +566,6 @@ paths:
description: Unauthorized
'500':
description: Internal server error
-
/series/{series_ticker}/events/{ticker}/candlesticks:
get:
operationId: GetMarketCandlesticksByEvent
@@ -549,7 +594,7 @@ paths:
type: integer
format: int64
x-oapi-codegen-extra-tags:
- validate: "required"
+ validate: required
- name: end_ts
in: query
required: true
@@ -558,17 +603,22 @@ paths:
type: integer
format: int64
x-oapi-codegen-extra-tags:
- validate: "required"
+ validate: required
- name: period_interval
in: query
required: true
- description: Specifies the length of each candlestick period, in minutes. Must be one minute, one hour, or one day.
+ description: >-
+ Specifies the length of each candlestick period, in minutes. Must be
+ one minute, one hour, or one day.
schema:
type: integer
format: int32
- enum: [1, 60, 1440]
+ enum:
+ - 1
+ - 60
+ - 1440
x-oapi-codegen-extra-tags:
- validate: "required,oneof=1 60 1440"
+ validate: required,oneof=1 60 1440
responses:
'200':
description: Event candlesticks retrieved successfully
@@ -582,22 +632,27 @@ paths:
description: Unauthorized
'500':
description: Internal server error
-
/events:
get:
operationId: GetEvents
summary: Get Events
- description: |
+ description: >
Get all events. This endpoint excludes multivariate events.
- To retrieve multivariate events, use the GET /events/multivariate endpoint.
- All events are accessible through this endpoint, even if their associated markets are older than the historical cutoff.
+
+ To retrieve multivariate events, use the GET /events/multivariate
+ endpoint.
+
+ All events are accessible through this endpoint, even if their
+ associated markets are older than the historical cutoff.
tags:
- events
parameters:
- name: limit
in: query
required: false
- description: Parameter to specify the number of results per page. Defaults to 200. Maximum value is 200.
+ description: >-
+ Parameter to specify the number of results per page. Defaults to
+ 200. Maximum value is 200.
schema:
type: integer
minimum: 1
@@ -606,13 +661,21 @@ paths:
- name: cursor
in: query
required: false
- description: Parameter to specify the pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
+ description: >-
+ Parameter to specify the pagination cursor. Use the cursor value
+ returned from the previous response to get the next page of results.
+ Leave empty for the first page.
schema:
type: string
- name: with_nested_markets
in: query
required: false
- description: Parameter to specify if nested markets should be included in the response. When true, each event will include a 'markets' field containing a list of Market objects associated with that event. Historical markets settled before the historical cutoff will not be included.
+ description: >-
+ Parameter to specify if nested markets should be included in the
+ response. When true, each event will include a 'markets' field
+ containing a list of Market objects associated with that event.
+ Historical markets settled before the historical cutoff will not be
+ included.
schema:
type: boolean
default: false
@@ -628,23 +691,33 @@ paths:
- name: status
in: query
required: false
- description: Filter by event status. Possible values are 'unopened', 'open', 'closed', 'settled'. Leave empty to return events with any status.
+ description: >-
+ Filter by event status. Possible values are 'unopened', 'open',
+ 'closed', 'settled'. Leave empty to return events with any status.
schema:
type: string
- enum: ['unopened', 'open', 'closed', 'settled']
+ enum:
+ - unopened
+ - open
+ - closed
+ - settled
- $ref: '#/components/parameters/SeriesTickerQuery'
- $ref: '#/components/parameters/EventTickersQuery'
- name: min_close_ts
in: query
required: false
- description: Filter events with at least one market with close timestamp greater than this Unix timestamp (in seconds).
+ description: >-
+ Filter events with at least one market with close timestamp greater
+ than this Unix timestamp (in seconds).
schema:
type: integer
format: int64
- name: min_updated_ts
in: query
required: false
- description: Filter events with metadata updated after this Unix timestamp (in seconds). Use this to efficiently poll for changes.
+ description: >-
+ Filter events with metadata updated after this Unix timestamp (in
+ seconds). Use this to efficiently poll for changes.
schema:
type: integer
format: int64
@@ -661,12 +734,14 @@ paths:
description: Unauthorized
'500':
description: Internal server error
-
/events/multivariate:
get:
operationId: GetMultivariateEvents
summary: Get Multivariate Events
- description: 'Retrieve multivariate (combo) events. These are dynamically created events from multivariate event collections. Supports filtering by series and collection ticker.'
+ description: >-
+ Retrieve multivariate (combo) events. These are dynamically created
+ events from multivariate event collections. Supports filtering by series
+ and collection ticker.
tags:
- events
parameters:
@@ -682,20 +757,28 @@ paths:
- name: cursor
in: query
required: false
- description: Pagination cursor. Use the cursor value returned from the previous response to get the next page of results.
+ description: >-
+ Pagination cursor. Use the cursor value returned from the previous
+ response to get the next page of results.
schema:
type: string
- $ref: '#/components/parameters/SeriesTickerQuery'
- name: collection_ticker
in: query
required: false
- description: Filter events by collection ticker. Returns only multivariate events belonging to the specified collection. Cannot be used together with series_ticker.
+ description: >-
+ Filter events by collection ticker. Returns only multivariate events
+ belonging to the specified collection. Cannot be used together with
+ series_ticker.
schema:
type: string
- name: with_nested_markets
in: query
required: false
- description: Parameter to specify if nested markets should be included in the response. When true, each event will include a 'markets' field containing a list of Market objects associated with that event.
+ description: >-
+ Parameter to specify if nested markets should be included in the
+ response. When true, each event will include a 'markets' field
+ containing a list of Market objects associated with that event.
schema:
type: boolean
default: false
@@ -712,13 +795,14 @@ paths:
description: Unauthorized
'500':
description: Internal server error
-
/events/fee_changes:
get:
operationId: GetEventFeeChanges
summary: Get Event Fee Changes
- description: |
- Event fees are an override layered on top of the parent series' fee structure. If `fee_type_override` and `fee_multiplier_override` are null, that indicates the override is cleared.
+ description: >
+ Event fees are an override layered on top of the parent series' fee
+ structure. If `fee_type_override` and `fee_multiplier_override` are
+ null, that indicates the override is cleared.
tags:
- events
parameters:
@@ -741,15 +825,20 @@ paths:
$ref: '#/components/responses/BadRequestError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/events/{event_ticker}:
get:
operationId: GetEvent
summary: Get Event
- description: |
- Endpoint for getting data about an event by its ticker. An event represents a real-world occurrence that can be traded on, such as an election, sports game, or economic indicator release.
- Events contain one or more markets where users can place trades on different outcomes.
- All events are accessible through this endpoint, even if their associated markets are older than the historical cutoff.
+ description: >
+ Endpoint for getting data about an event by its ticker. An event
+ represents a real-world occurrence that can be traded on, such as an
+ election, sports game, or economic indicator release.
+
+ Events contain one or more markets where users can place trades on
+ different outcomes.
+
+ All events are accessible through this endpoint, even if their
+ associated markets are older than the historical cutoff.
tags:
- events
parameters:
@@ -762,7 +851,11 @@ paths:
- name: with_nested_markets
in: query
required: false
- description: If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. Historical markets settled before the historical cutoff will not be included.
+ description: >-
+ If true, markets are included within the event object. If false
+ (default), markets are returned as a separate top-level field in the
+ response. Historical markets settled before the historical cutoff
+ will not be included.
schema:
type: boolean
default: false
@@ -776,13 +869,12 @@ paths:
$ref: '#/components/schemas/GetEventResponse'
'400':
description: Bad request
- '404':
- description: Event not found
'401':
description: Unauthorized
+ '404':
+ description: Event not found
'500':
description: Internal server error
-
/events/{event_ticker}/metadata:
get:
operationId: GetEventMetadata
@@ -806,18 +898,19 @@ paths:
$ref: '#/components/schemas/GetEventMetadataResponse'
'400':
description: Bad request
- '404':
- description: Event not found
'401':
description: Unauthorized
+ '404':
+ description: Event not found
'500':
description: Internal server error
-
/series/{series_ticker}/events/{ticker}/forecast_percentile_history:
get:
operationId: GetEventForecastPercentilesHistory
summary: Get Event Forecast Percentile History
- description: Endpoint for getting the historical raw and formatted forecast numbers for an event at specific percentiles.
+ description: >-
+ Endpoint for getting the historical raw and formatted forecast numbers
+ for an event at specific percentiles.
tags:
- events
security:
@@ -868,32 +961,44 @@ paths:
- name: period_interval
in: query
required: true
- description: Specifies the length of each forecast period, in minutes. 0 for 5-second intervals, or 1, 60, or 1440 for minute-based intervals.
+ description: >-
+ Specifies the length of each forecast period, in minutes. 0 for
+ 5-second intervals, or 1, 60, or 1440 for minute-based intervals.
schema:
type: integer
format: int32
- enum: [0, 1, 60, 1440]
+ enum:
+ - 0
+ - 1
+ - 60
+ - 1440
responses:
'200':
description: Event forecast percentile history retrieved successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/GetEventForecastPercentilesHistoryResponse'
+ $ref: >-
+ #/components/schemas/GetEventForecastPercentilesHistoryResponse
'400':
description: Bad request
'401':
description: Unauthorized
'500':
description: Internal server error
-
/portfolio/orders:
get:
operationId: GetOrders
summary: Get Orders
- description: |
- Restricts the response to orders that have a certain status: resting, canceled, or executed.
- Orders that have been canceled or fully executed before the historical cutoff are only available via `GET /historical/orders`. Resting orders will always be available through this endpoint. See [Historical Data](https://docs.kalshi.com/getting_started/historical_data) for details.
+ description: >
+ Restricts the response to orders that have a certain status: resting,
+ canceled, or executed.
+
+ Orders that have been canceled or fully executed before the historical
+ cutoff are only available via `GET /historical/orders`. Resting orders
+ will always be available through this endpoint. See [Historical
+ Data](https://docs.kalshi.com/getting_started/historical_data) for
+ details.
tags:
- orders
security:
@@ -922,16 +1027,19 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/orders/{order_id}:
get:
operationId: GetOrder
summary: Get Order
description: ' Endpoint for getting a single order.'
x-mint:
- content: |
+ content: >
- **Rate limit:** 2 tokens per request. See `GET /trade-api/v2/account/endpoint_costs` for current non-default endpoint costs.
+
+ **Rate limit:** 2 tokens per request. See `GET
+ /trade-api/v2/account/endpoint_costs` for current non-default endpoint
+ costs.
+
tags:
- orders
@@ -954,7 +1062,6 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/orders/queue_positions:
get:
operationId: GetOrderQueuePositions
@@ -991,7 +1098,6 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/orders/{order_id}/queue_position:
get:
operationId: GetOrderQueuePosition
@@ -1018,12 +1124,16 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/events/orders:
post:
operationId: CreateOrderV2
summary: Create Order (V2)
- description: 'Endpoint for submitting event-market orders using the V2 request/response shape (single-book `bid`/`ask` side and fixed-point dollar prices). The legacy `/portfolio/orders` endpoint will be deprecated no earlier than May 6, 2026 — clients should migrate to this path.'
+ description: >-
+ Endpoint for submitting event-market orders using the V2
+ request/response shape (single-book `bid`/`ask` side and fixed-point
+ dollar prices). The legacy `/portfolio/orders` endpoint will be
+ deprecated no earlier than May 6, 2026 — clients should migrate to this
+ path.
tags:
- orders
security:
@@ -1053,16 +1163,24 @@ paths:
$ref: '#/components/responses/RateLimitError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/events/orders/batched:
post:
operationId: BatchCreateOrdersV2
summary: Batch Create Orders (V2)
- description: 'Endpoint for submitting a batch of event-market orders using the V2 request/response shape. The maximum batch size scales with your tier''s write budget — see [Rate Limits and Tiers](/getting_started/rate_limits).'
+ description: >-
+ Endpoint for submitting a batch of event-market orders using the V2
+ request/response shape. The maximum batch size scales with your tier's
+ write budget — see [Rate Limits and
+ Tiers](/getting_started/rate_limits).
x-mint:
- content: |
+ content: >
- **Rate limit:** 10 tokens per order in the batch — billed per item, so total cost for a batch of N orders is N × 10. See `GET /trade-api/v2/account/endpoint_costs` for current non-default endpoint costs.
+
+ **Rate limit:** 10 tokens per order in the batch — billed per item, so
+ total cost for a batch of N orders is N × 10. See `GET
+ /trade-api/v2/account/endpoint_costs` for current non-default endpoint
+ costs.
+
tags:
- orders
@@ -1091,15 +1209,22 @@ paths:
$ref: '#/components/responses/ForbiddenError'
'500':
$ref: '#/components/responses/InternalServerError'
-
delete:
operationId: BatchCancelOrdersV2
summary: Batch Cancel Orders (V2)
- description: 'Endpoint for cancelling a batch of event-market orders using the V2 response shape. The maximum batch size scales with your tier''s write budget — see [Rate Limits and Tiers](/getting_started/rate_limits).'
+ description: >-
+ Endpoint for cancelling a batch of event-market orders using the V2
+ response shape. The maximum batch size scales with your tier's write
+ budget — see [Rate Limits and Tiers](/getting_started/rate_limits).
x-mint:
- content: |
+ content: >
- **Rate limit:** 2 tokens per order in the batch — billed per item, so total cost for a batch of N cancels is N × 2. See `GET /trade-api/v2/account/endpoint_costs` for current non-default endpoint costs.
+
+ **Rate limit:** 2 tokens per order in the batch — billed per item, so
+ total cost for a batch of N cancels is N × 2. See `GET
+ /trade-api/v2/account/endpoint_costs` for current non-default endpoint
+ costs.
+
tags:
- orders
@@ -1128,16 +1253,22 @@ paths:
$ref: '#/components/responses/ForbiddenError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/events/orders/{order_id}:
delete:
operationId: CancelOrderV2
summary: Cancel Order (V2)
- description: 'Endpoint for cancelling event-market orders using the V2 response shape. Returns `{order_id, client_order_id, reduced_by}` rather than a full order object.'
+ description: >-
+ Endpoint for cancelling event-market orders using the V2 response shape.
+ Returns `{order_id, client_order_id, reduced_by}` rather than a full
+ order object.
x-mint:
- content: |
+ content: >
- **Rate limit:** 2 tokens per request. See `GET /trade-api/v2/account/endpoint_costs` for current non-default endpoint costs.
+
+ **Rate limit:** 2 tokens per request. See `GET
+ /trade-api/v2/account/endpoint_costs` for current non-default endpoint
+ costs.
+
tags:
- orders
@@ -1168,16 +1299,25 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/events/orders/{order_id}/amend:
post:
operationId: AmendOrderV2
summary: Amend Order (V2)
- description: 'Endpoint for amending the price and/or max fillable count of an existing event-market order using the V2 request/response shape. The request `count` is the updated total/max fillable count, equal to already filled count plus desired resting remaining count. This behavior matches the v1 amend endpoints; only the request/response shape differs.'
+ description: >-
+ Endpoint for amending the price and/or max fillable count of an existing
+ event-market order using the V2 request/response shape. The request
+ `count` is the updated total/max fillable count, equal to already filled
+ count plus desired resting remaining count. This behavior matches the v1
+ amend endpoints; only the request/response shape differs.
x-mint:
- content: |
+ content: >
- Amending a resting order preserves queue position only when the amendment decreases size. All other amendments — like increasing size or changing price forfeit queue position and place the order at the back of the queue.
+
+ Amending a resting order preserves queue position only when the
+ amendment decreases size. All other amendments — like increasing size
+ or changing price forfeit queue position and place the order at the
+ back of the queue.
+
tags:
- orders
@@ -1209,12 +1349,14 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/events/orders/{order_id}/decrease:
post:
operationId: DecreaseOrderV2
summary: Decrease Order (V2)
- description: 'Endpoint for decreasing the remaining count of an existing event-market order using the V2 request/response shape. Exactly one of `reduce_by` or `reduce_to` must be provided.'
+ description: >-
+ Endpoint for decreasing the remaining count of an existing event-market
+ order using the V2 request/response shape. Exactly one of `reduce_by` or
+ `reduce_to` must be provided.
tags:
- orders
security:
@@ -1245,7 +1387,6 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/order_groups:
get:
operationId: GetOrderGroups
@@ -1272,7 +1413,6 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/order_groups/create:
post:
operationId: CreateOrderGroup
@@ -1303,7 +1443,6 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/order_groups/{order_group_id}:
get:
operationId: GetOrderGroup
@@ -1358,7 +1497,6 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/order_groups/{order_group_id}/reset:
put:
operationId: ResetOrderGroup
@@ -1393,7 +1531,6 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/order_groups/{order_group_id}/trigger:
put:
operationId: TriggerOrderGroup
@@ -1428,7 +1565,6 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/order_groups/{order_group_id}/limit:
put:
operationId: UpdateOrderGroupLimit
@@ -1464,13 +1600,14 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
- # Portfolio endpoints
/portfolio/balance:
get:
operationId: GetBalance
summary: Get Balance
- description: "Endpoint for getting the balance and portfolio value of a member. Both values are returned in cents. This endpoint also accepts API keys with the 'read::portfolio_balance' scope."
+ description: >-
+ Endpoint for getting the balance and portfolio value of a member. Both
+ values are returned in cents. This endpoint also accepts API keys with
+ the 'read::portfolio_balance' scope.
tags:
- portfolio
security:
@@ -1491,12 +1628,13 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/intra_exchange_instance_transfer:
post:
operationId: IntraExchangeInstanceTransfer
summary: Intra Account Transfer
- description: 'Endpoint for transferring funds within the same account. This endpoint is currently not available.'
+ description: >-
+ Endpoint for transferring funds within the same account. This endpoint
+ is currently not available.
tags:
- portfolio
security:
@@ -1524,12 +1662,15 @@ paths:
$ref: '#/components/responses/ForbiddenError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/subaccounts:
post:
operationId: CreateSubaccount
summary: Create Subaccount
- description: 'Creates a new subaccount for the authenticated user. This endpoint is available to all users on the Advanced API tier and above. Subaccounts are numbered sequentially starting from 1. Maximum 63 numbered subaccounts per user (64 including the primary account).'
+ description: >-
+ Creates a new subaccount for the authenticated user. This endpoint is
+ available to all users on the Advanced API tier and above. Subaccounts
+ are numbered sequentially starting from 1. Maximum 63 numbered
+ subaccounts per user (64 including the primary account).
tags:
- portfolio
security:
@@ -1555,12 +1696,15 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/subaccounts/transfer:
post:
operationId: ApplySubaccountTransfer
summary: Transfer Between Subaccounts
- description: 'Transfers funds between the authenticated user''s subaccounts. Use 0 for the primary account, or 1-63 for numbered subaccounts. Set exchange_index to apply the transfer on a specific exchange shard (defaults to 0).'
+ description: >-
+ Transfers funds between the authenticated user's subaccounts. Use 0 for
+ the primary account, or 1-63 for numbered subaccounts. Set
+ exchange_index to apply the transfer on a specific exchange shard
+ (defaults to 0).
tags:
- portfolio
security:
@@ -1586,21 +1730,89 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
+ /portfolio/subaccounts/settlement-advance-lock:
+ put:
+ operationId: LockSubaccountForSettlementAdvance
+ summary: Lock Subaccount for Settlement Advance
+ description: >-
+ Locks a subaccount for settlement advance computation. Locking cancels
+ resting orders, prevents trading, and returns a new state token.
+ tags:
+ - portfolio
+ security:
+ - kalshiAccessKey: []
+ kalshiAccessSignature: []
+ kalshiAccessTimestamp: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LockSubaccountForSettlementAdvanceRequest'
+ responses:
+ '200':
+ description: Subaccount locked successfully
+ content:
+ application/json:
+ schema:
+ $ref: >-
+ #/components/schemas/LockSubaccountForSettlementAdvanceResponse
+ '400':
+ $ref: '#/components/responses/BadRequestError'
+ '401':
+ $ref: '#/components/responses/UnauthorizedError'
+ '409':
+ $ref: '#/components/responses/ConflictError'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
+ delete:
+ operationId: UnlockSubaccountForSettlementAdvance
+ summary: Unlock Subaccount for Settlement Advance
+ description: >-
+ Unlocks a subaccount. Unlocking is rejected while the subaccount has an
+ outstanding settlement advance.
+ tags:
+ - portfolio
+ security:
+ - kalshiAccessKey: []
+ kalshiAccessSignature: []
+ kalshiAccessTimestamp: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UnlockSubaccountForSettlementAdvanceRequest'
+ responses:
+ '200':
+ description: Subaccount unlocked successfully
+ content:
+ application/json:
+ schema:
+ $ref: >-
+ #/components/schemas/UnlockSubaccountForSettlementAdvanceResponse
+ '400':
+ $ref: '#/components/responses/BadRequestError'
+ '401':
+ $ref: '#/components/responses/UnauthorizedError'
+ '409':
+ $ref: '#/components/responses/ConflictError'
+ '500':
+ $ref: '#/components/responses/InternalServerError'
/portfolio/subaccounts/positions/transfer:
post:
- # Pulled from the public docs until launch (endpoint is gated off in
- # svc-api2); x-excluded only affects Mintlify rendering, not codegen.
x-excluded: true
operationId: ApplySubaccountPositionTransfer
summary: Transfer Position Between Subaccounts
description: >-
- Moves an existing position between two of the authenticated user's own subaccounts.
- Use 0 for the primary account, or 1-63 for numbered subaccounts.
- The transfer is idempotent on `client_transfer_id`: retrying with the same value returns 409.
- `price` is the per-contract transfer price as a fixed-point dollar string, and is always the YES-side price
- regardless of `side` — the receiving subaccount pays the sending subaccount for the position at that price.
- See the [Subaccounts](/getting_started/subaccounts) page for worked examples.
+ Moves an existing position between two of the authenticated user's own
+ subaccounts. Use 0 for the primary account, or 1-63 for numbered
+ subaccounts. The transfer is idempotent on `client_transfer_id`:
+ retrying with the same value returns 409. `price` is the per-contract
+ transfer price as a fixed-point dollar string, and is always the
+ YES-side price regardless of `side` — the receiving subaccount pays the
+ sending subaccount for the position at that price. See the
+ [Subaccounts](/getting_started/subaccounts) page for worked examples.
tags:
- portfolio
security:
@@ -1628,12 +1840,11 @@ paths:
$ref: '#/components/responses/ConflictError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/subaccounts/balances:
get:
operationId: GetSubaccountBalances
summary: Get All Subaccount Balances
- description: 'Gets balances for all subaccounts including the primary account.'
+ description: Gets balances for all subaccounts including the primary account.
tags:
- portfolio
security:
@@ -1651,12 +1862,13 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/subaccounts/transfers:
get:
operationId: GetSubaccountTransfers
summary: Get Subaccount Transfers
- description: 'Gets a paginated list of all transfers between subaccounts for the authenticated user.'
+ description: >-
+ Gets a paginated list of all transfers between subaccounts for the
+ authenticated user.
tags:
- portfolio
security:
@@ -1677,12 +1889,13 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/subaccounts/netting:
put:
operationId: UpdateSubaccountNetting
summary: Update Subaccount Netting
- description: 'Updates the netting enabled setting for a specific subaccount. Use 0 for the primary account, or 1-63 for numbered subaccounts.'
+ description: >-
+ Updates the netting enabled setting for a specific subaccount. Use 0 for
+ the primary account, or 1-63 for numbered subaccounts.
tags:
- portfolio
security:
@@ -1707,7 +1920,7 @@ paths:
get:
operationId: GetSubaccountNetting
summary: Get Subaccount Netting
- description: 'Gets the netting enabled settings for all subaccounts.'
+ description: Gets the netting enabled settings for all subaccounts.
tags:
- portfolio
security:
@@ -1725,12 +1938,14 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/positions:
get:
operationId: GetPositions
summary: Get Positions
- description: 'Restricts the positions to those with any of following fields with non-zero values, as a comma separated list. The following values are accepted: position, total_traded'
+ description: >-
+ Restricts the positions to those with any of following fields with
+ non-zero values, as a comma separated list. The following values are
+ accepted: position, total_traded
tags:
- portfolio
security:
@@ -1757,7 +1972,6 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/settlements:
get:
operationId: GetSettlements
@@ -1790,12 +2004,11 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/deposits:
get:
operationId: GetDeposits
summary: Get Deposits
- description: 'Endpoint for getting the member''s deposit history.'
+ description: Endpoint for getting the member's deposit history.
tags:
- portfolio
security:
@@ -1818,12 +2031,11 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/withdrawals:
get:
operationId: GetWithdrawals
summary: Get Withdrawals
- description: 'Endpoint for getting the member''s withdrawal history.'
+ description: Endpoint for getting the member's withdrawal history.
tags:
- portfolio
security:
@@ -1846,7 +2058,6 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/summary/total_resting_order_value:
get:
operationId: GetPortfolioRestingOrderTotalValue
@@ -1864,19 +2075,24 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/GetPortfolioRestingOrderTotalValueResponse'
+ $ref: >-
+ #/components/schemas/GetPortfolioRestingOrderTotalValueResponse
'401':
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/portfolio/fills:
get:
operationId: GetFills
summary: Get Fills
- description: |
- Endpoint for getting all fills for the member. A fill is when a trade you have is matched.
- Fills that occurred before the historical cutoff are only available via `GET /historical/fills`. See [Historical Data](https://docs.kalshi.com/getting_started/historical_data) for details.
+ description: >
+ Endpoint for getting all fills for the member. A fill is when a trade
+ you have is matched.
+
+ Fills that occurred before the historical cutoff are only available via
+ `GET /historical/fills`. See [Historical
+ Data](https://docs.kalshi.com/getting_started/historical_data) for
+ details.
tags:
- portfolio
security:
@@ -1904,7 +2120,6 @@ paths:
description: Unauthorized
'500':
description: Internal server error
-
/communications/id:
get:
operationId: GetCommunicationsID
@@ -1927,7 +2142,6 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/communications/block-trade-proposals:
get:
operationId: GetBlockTradeProposals
@@ -1944,7 +2158,9 @@ paths:
- $ref: '#/components/parameters/MarketTickerQuery'
- name: limit
in: query
- description: Parameter to specify the number of results per page. Defaults to 100.
+ description: >-
+ Parameter to specify the number of results per page. Defaults to
+ 100.
schema:
type: integer
format: int32
@@ -1969,7 +2185,6 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
post:
operationId: ProposeBlockTrade
summary: Propose Block Trade
@@ -2001,7 +2216,6 @@ paths:
$ref: '#/components/responses/ForbiddenError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/communications/block-trade-proposals/{block_trade_proposal_id}/accept:
post:
operationId: AcceptBlockTradeProposal
@@ -2037,7 +2251,6 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/communications/rfqs:
get:
operationId: GetRFQs
@@ -2056,7 +2269,9 @@ paths:
- $ref: '#/components/parameters/SubaccountQuery'
- name: limit
in: query
- description: Parameter to specify the number of results per page. Defaults to 100.
+ description: >-
+ Parameter to specify the number of results per page. Defaults to
+ 100.
schema:
type: integer
format: int32
@@ -2081,7 +2296,7 @@ paths:
$ref: '#/components/schemas/UserFilter'
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
- validate: "omitempty,oneof=self"
+ validate: omitempty,oneof=self
responses:
'200':
description: RFQs retrieved successfully
@@ -2093,7 +2308,6 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
post:
operationId: CreateRFQ
summary: Create RFQ
@@ -2125,7 +2339,6 @@ paths:
$ref: '#/components/responses/ConflictError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/communications/rfqs/{rfq_id}:
get:
operationId: GetRFQ
@@ -2152,7 +2365,6 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
delete:
operationId: DeleteRFQ
summary: Delete RFQ
@@ -2174,16 +2386,19 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/communications/rfqs/{rfq_id}/quotes/{quote_id}:
get:
operationId: GetRFQQuote
summary: Get RFQ Quote
description: ' Endpoint for getting a particular quote scoped to its RFQ.'
x-mint:
- content: |
+ content: >
- **Rate limit:** 2 tokens per request. See `GET /trade-api/v2/account/endpoint_costs` for current non-default endpoint costs.
+
+ **Rate limit:** 2 tokens per request. See `GET
+ /trade-api/v2/account/endpoint_costs` for current non-default endpoint
+ costs.
+
tags:
- communications
@@ -2207,15 +2422,18 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
delete:
operationId: DeleteRFQQuote
summary: Delete RFQ Quote
description: ' Endpoint for deleting a quote scoped to its RFQ, which means it can no longer be accepted.'
x-mint:
- content: |
+ content: >
- **Rate limit:** 2 tokens per request. See `GET /trade-api/v2/account/endpoint_costs` for current non-default endpoint costs.
+
+ **Rate limit:** 2 tokens per request. See `GET
+ /trade-api/v2/account/endpoint_costs` for current non-default endpoint
+ costs.
+
tags:
- communications
@@ -2235,7 +2453,6 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/communications/rfqs/{rfq_id}/quotes/{quote_id}/accept:
put:
operationId: AcceptRFQQuote
@@ -2267,7 +2484,6 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/communications/rfqs/{rfq_id}/quotes/{quote_id}/confirm:
put:
operationId: ConfirmRFQQuote
@@ -2297,7 +2513,6 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/communications/quotes:
get:
operationId: GetQuotes
@@ -2313,19 +2528,25 @@ paths:
- $ref: '#/components/parameters/CursorQuery'
- name: min_ts
in: query
- description: Restricts the response to quotes last updated after a timestamp, formatted as a Unix Timestamp
+ description: >-
+ Restricts the response to quotes last updated after a timestamp,
+ formatted as a Unix Timestamp
schema:
type: integer
format: int64
- name: max_ts
in: query
- description: Restricts the response to quotes last updated before a timestamp, formatted as a Unix Timestamp
+ description: >-
+ Restricts the response to quotes last updated before a timestamp,
+ formatted as a Unix Timestamp
schema:
type: integer
format: int64
- name: limit
in: query
- description: Parameter to specify the number of results per page. Defaults to 500.
+ description: >-
+ Parameter to specify the number of results per page. Defaults to
+ 500.
schema:
type: integer
format: int32
@@ -2353,16 +2574,18 @@ paths:
$ref: '#/components/schemas/UserFilter'
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
- validate: "omitempty,oneof=self"
+ validate: omitempty,oneof=self
- name: rfq_user_filter
in: query
required: false
- description: Filter for quotes responding to RFQs created by the authenticated user.
+ description: >-
+ Filter for quotes responding to RFQs created by the authenticated
+ user.
schema:
$ref: '#/components/schemas/UserFilter'
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
- validate: "omitempty,oneof=self"
+ validate: omitempty,oneof=self
- name: rfq_creator_user_id
in: query
description: Filter quotes by RFQ creator user ID
@@ -2393,15 +2616,18 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
post:
operationId: CreateQuote
summary: Create Quote
description: ' Endpoint for creating a quote in response to an RFQ'
x-mint:
- content: |
+ content: >
- **Rate limit:** 2 tokens per request. See `GET /trade-api/v2/account/endpoint_costs` for current non-default endpoint costs.
+
+ **Rate limit:** 2 tokens per request. See `GET
+ /trade-api/v2/account/endpoint_costs` for current non-default endpoint
+ costs.
+
tags:
- communications
@@ -2428,21 +2654,30 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/communications/quotes/{quote_id}:
get:
operationId: GetQuote
summary: Get Quote
deprecated: true
- description: 'DEPRECATED: Use GET /communications/rfqs/{rfq_id}/quotes/{quote_id} instead. Endpoint for getting a particular quote.'
+ description: >-
+ DEPRECATED: Use GET /communications/rfqs/{rfq_id}/quotes/{quote_id}
+ instead. Endpoint for getting a particular quote.
x-mint:
- content: |
+ content: >
- This endpoint is deprecated. Use `GET /communications/rfqs/{rfq_id}/quotes/{quote_id}` instead.
+
+ This endpoint is deprecated. Use `GET
+ /communications/rfqs/{rfq_id}/quotes/{quote_id}` instead.
+
+
- **Rate limit:** 2 tokens per request. See `GET /trade-api/v2/account/endpoint_costs` for current non-default endpoint costs.
+
+ **Rate limit:** 2 tokens per request. See `GET
+ /trade-api/v2/account/endpoint_costs` for current non-default endpoint
+ costs.
+
tags:
- communications
@@ -2465,20 +2700,30 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
delete:
operationId: DeleteQuote
summary: Delete Quote
deprecated: true
- description: 'DEPRECATED: Use DELETE /communications/rfqs/{rfq_id}/quotes/{quote_id} instead. Endpoint for deleting a quote, which means it can no longer be accepted.'
+ description: >-
+ DEPRECATED: Use DELETE /communications/rfqs/{rfq_id}/quotes/{quote_id}
+ instead. Endpoint for deleting a quote, which means it can no longer be
+ accepted.
x-mint:
- content: |
+ content: >
- This endpoint is deprecated. Use `DELETE /communications/rfqs/{rfq_id}/quotes/{quote_id}` instead.
+
+ This endpoint is deprecated. Use `DELETE
+ /communications/rfqs/{rfq_id}/quotes/{quote_id}` instead.
+
+
- **Rate limit:** 2 tokens per request. See `GET /trade-api/v2/account/endpoint_costs` for current non-default endpoint costs.
+
+ **Rate limit:** 2 tokens per request. See `GET
+ /trade-api/v2/account/endpoint_costs` for current non-default endpoint
+ costs.
+
tags:
- communications
@@ -2497,17 +2742,22 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/communications/quotes/{quote_id}/accept:
put:
operationId: AcceptQuote
summary: Accept Quote
deprecated: true
- description: 'DEPRECATED: Use PUT /communications/rfqs/{rfq_id}/quotes/{quote_id}/accept instead. Endpoint for accepting a quote. This will require the quoter to confirm.'
+ description: >-
+ DEPRECATED: Use PUT
+ /communications/rfqs/{rfq_id}/quotes/{quote_id}/accept instead. Endpoint
+ for accepting a quote. This will require the quoter to confirm.
x-mint:
- content: |
+ content: >
- This endpoint is deprecated. Use `PUT /communications/rfqs/{rfq_id}/quotes/{quote_id}/accept` instead.
+
+ This endpoint is deprecated. Use `PUT
+ /communications/rfqs/{rfq_id}/quotes/{quote_id}/accept` instead.
+
tags:
- communications
@@ -2534,17 +2784,23 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/communications/quotes/{quote_id}/confirm:
put:
operationId: ConfirmQuote
summary: Confirm Quote
deprecated: true
- description: 'DEPRECATED: Use PUT /communications/rfqs/{rfq_id}/quotes/{quote_id}/confirm instead. Endpoint for confirming a quote. This will start a timer for order execution.'
+ description: >-
+ DEPRECATED: Use PUT
+ /communications/rfqs/{rfq_id}/quotes/{quote_id}/confirm instead.
+ Endpoint for confirming a quote. This will start a timer for order
+ execution.
x-mint:
- content: |
+ content: >
- This endpoint is deprecated. Use `PUT /communications/rfqs/{rfq_id}/quotes/{quote_id}/confirm` instead.
+
+ This endpoint is deprecated. Use `PUT
+ /communications/rfqs/{rfq_id}/quotes/{quote_id}/confirm` instead.
+
tags:
- communications
@@ -2569,8 +2825,6 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
- # Multivariate Event Collections endpoints
/api_keys:
get:
operationId: GetApiKeys
@@ -2593,7 +2847,6 @@ paths:
description: Unauthorized
'500':
description: Internal server error
-
post:
operationId: CreateApiKey
summary: Create API Key
@@ -2625,7 +2878,6 @@ paths:
description: Forbidden - insufficient API usage level
'500':
description: Internal server error
-
/api_keys/generate:
post:
operationId: GenerateApiKey
@@ -2656,7 +2908,6 @@ paths:
description: Unauthorized
'500':
description: Internal server error
-
/api_keys/{api_key}:
delete:
operationId: DeleteApiKey
@@ -2686,12 +2937,14 @@ paths:
description: API key not found
'500':
description: Internal server error
-
/account/limits:
get:
operationId: GetAccountApiLimits
- summary: Get Account API Limits
- description: 'Endpoint to retrieve the authenticated user''s Predictions API usage tier and token-bucket limits. Public Predictions tiers include Basic, Advanced, Expert, Premier, Paragon, Prime, and Prestige.'
+ summary: Get Account API Limits
+ description: >-
+ Endpoint to retrieve the authenticated user's Predictions API usage tier
+ and token-bucket limits. Public Predictions tiers include Basic,
+ Advanced, Expert, Premier, Paragon, Prime, and Prestige.
tags:
- account
security:
@@ -2709,16 +2962,23 @@ paths:
description: Unauthorized
'500':
description: Internal server error
-
/account/api_usage_level/upgrade:
post:
operationId: UpgradeAccountApiUsageLevel
summary: Upgrade Account API Usage Level
- description: 'Grants a permanent Advanced API usage-level grant. Currently only the Predictions exchange instance is supported. Criteria: at least 1 of the user''s last 100 Predictions orders was created via API. Use Get Account API Limits to inspect the resulting usage tier and grants.'
+ description: >-
+ Grants a permanent Advanced API usage-level grant. Currently only the
+ Predictions exchange instance is supported. Criteria: at least 1 of the
+ user's last 100 Predictions orders was created via API. Use Get Account
+ API Limits to inspect the resulting usage tier and grants.
x-mint:
- content: |
+ content: >
- **Rate limit:** 30 tokens per request. See `GET /trade-api/v2/account/endpoint_costs` for current non-default endpoint costs.
+
+ **Rate limit:** 30 tokens per request. See `GET
+ /trade-api/v2/account/endpoint_costs` for current non-default endpoint
+ costs.
+
tags:
- account
@@ -2732,17 +2992,24 @@ paths:
'401':
description: Unauthorized
'403':
- description: No API-created order was found in the user's latest 100 Predictions orders
+ description: >-
+ No API-created order was found in the user's latest 100 Predictions
+ orders
'429':
- description: Rate limit exceeded. This endpoint costs 30 tokens and uses the Predictions Write bucket.
+ description: >-
+ Rate limit exceeded. This endpoint costs 30 tokens and uses the
+ Predictions Write bucket.
'500':
description: Internal server error
-
/account/api_usage_level/volume_progress:
get:
operationId: GetAccountApiUsageLevelVolumeProgress
summary: Get Account API Usage Level Volume Progress
- description: 'Returns the authenticated user''s latest cron-computed trading volume progress toward volume-based API usage tiers for the predictions (event_contract) lane. Volume figures are reported as fixed-point contract counts.'
+ description: >-
+ Returns the authenticated user's latest cron-computed trading volume
+ progress toward volume-based API usage tiers for the predictions
+ (event_contract) lane. Volume figures are reported as fixed-point
+ contract counts.
tags:
- account
security:
@@ -2755,17 +3022,19 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/GetAccountApiUsageLevelVolumeProgressResponse'
+ $ref: >-
+ #/components/schemas/GetAccountApiUsageLevelVolumeProgressResponse
'401':
description: Unauthorized
'500':
description: Internal server error
-
/account/endpoint_costs:
get:
operationId: GetAccountEndpointCosts
summary: List Non-Default Endpoint Costs
- description: 'Lists API v2 endpoints whose configured token cost differs from the default cost. Endpoints that use the default cost are omitted.'
+ description: >-
+ Lists API v2 endpoints whose configured token cost differs from the
+ default cost. Endpoints that use the default cost are omitted.
tags:
- account
responses:
@@ -2777,15 +3046,16 @@ paths:
$ref: '#/components/schemas/GetAccountEndpointCostsResponse'
'500':
description: Internal server error
-
/search/tags_by_categories:
get:
operationId: GetTagsForSeriesCategories
summary: Get Tags for Series Categories
- description: |
+ description: >
Retrieve tags organized by series categories.
- This endpoint returns a mapping of series categories to their associated tags, which can be used for filtering and search functionality.
+
+ This endpoint returns a mapping of series categories to their associated
+ tags, which can be used for filtering and search functionality.
tags:
- search
responses:
@@ -2799,15 +3069,17 @@ paths:
description: Unauthorized
'500':
description: Internal server error
-
/search/filters_by_sport:
get:
operationId: GetFiltersForSports
summary: Get Filters for Sports
- description: |
+ description: >
Retrieve available filters organized by sport.
- This endpoint returns filtering options available for each sport, including scopes and competitions. It also provides an ordered list of sports for display purposes.
+
+ This endpoint returns filtering options available for each sport,
+ including scopes and competitions. It also provides an ordered list of
+ sports for display purposes.
tags:
- search
responses:
@@ -2821,7 +3093,6 @@ paths:
description: Unauthorized
'500':
description: Internal server error
-
/live_data/milestone/{milestone_id}:
get:
operationId: GetLiveDataByMilestone
@@ -2840,9 +3111,11 @@ paths:
in: query
required: false
description: >-
- When true, includes player-level statistics in the live data response.
- Supported for Pro Football, Pro Basketball, and College Men's Basketball milestones that have player ID mappings configured.
- Has no effect for other sports or milestones without player mappings.
+ When true, includes player-level statistics in the live data
+ response. Supported for Pro Football, Pro Basketball, and College
+ Men's Basketball milestones that have player ID mappings configured.
+ Has no effect for other sports or milestones without player
+ mappings.
schema:
type: boolean
default: false
@@ -2857,12 +3130,14 @@ paths:
description: Live data not found
'500':
description: Internal server error
-
/live_data/{type}/milestone/{milestone_id}:
get:
operationId: GetLiveData
summary: Get Live Data (with type)
- description: Get live data for a specific milestone. This is the legacy endpoint that requires a type path parameter. Prefer using `/live_data/milestone/{milestone_id}` instead.
+ description: >-
+ Get live data for a specific milestone. This is the legacy endpoint that
+ requires a type path parameter. Prefer using
+ `/live_data/milestone/{milestone_id}` instead.
tags:
- live-data
parameters:
@@ -2882,9 +3157,11 @@ paths:
in: query
required: false
description: >-
- When true, includes player-level statistics in the live data response.
- Supported for Pro Football, Pro Basketball, and College Men's Basketball milestones that have player ID mappings configured.
- Has no effect for other sports or milestones without player mappings.
+ When true, includes player-level statistics in the live data
+ response. Supported for Pro Football, Pro Basketball, and College
+ Men's Basketball milestones that have player ID mappings configured.
+ Has no effect for other sports or milestones without player
+ mappings.
schema:
type: boolean
default: false
@@ -2899,7 +3176,6 @@ paths:
description: Live data not found
'500':
description: Internal server error
-
/live_data/batch:
get:
operationId: GetLiveDatas
@@ -2923,9 +3199,11 @@ paths:
in: query
required: false
description: >-
- When true, includes player-level statistics in the live data response.
- Supported for Pro Football, Pro Basketball, and College Men's Basketball milestones that have player ID mappings configured.
- Has no effect for other sports or milestones without player mappings.
+ When true, includes player-level statistics in the live data
+ response. Supported for Pro Football, Pro Basketball, and College
+ Men's Basketball milestones that have player ID mappings configured.
+ Has no effect for other sports or milestones without player
+ mappings.
schema:
type: boolean
default: false
@@ -2938,15 +3216,16 @@ paths:
$ref: '#/components/schemas/GetLiveDatasResponse'
'500':
description: Internal server error
-
/live_data/milestone/{milestone_id}/game_stats:
get:
operationId: GetGameStats
summary: Get Game Stats
description: >-
- Get play-by-play game statistics for a specific milestone.
- Supported sports: Pro Football, College Football, Pro Basketball, College Men's Basketball, College Women's Basketball, WNBA, Soccer, Pro Hockey, and Pro Baseball.
- Returns null for unsupported milestone types or milestones without a Sportradar ID.
+ Get play-by-play game statistics for a specific milestone. Supported
+ sports: Pro Football, College Football, Pro Basketball, College Men's
+ Basketball, College Women's Basketball, WNBA, Soccer, Pro Hockey, and
+ Pro Baseball. Returns null for unsupported milestone types or milestones
+ without a Sportradar ID.
tags:
- live-data
parameters:
@@ -2967,8 +3246,6 @@ paths:
description: Game stats not found
'500':
description: Internal server error
-
-
/structured_targets:
get:
operationId: GetStructuredTargets
@@ -2979,7 +3256,9 @@ paths:
parameters:
- name: ids
in: query
- description: Filter by specific structured target IDs. Pass multiple IDs by repeating the parameter (e.g. `?ids=uuid1&ids=uuid2`).
+ description: >-
+ Filter by specific structured target IDs. Pass multiple IDs by
+ repeating the parameter (e.g. `?ids=uuid1&ids=uuid2`).
required: false
schema:
type: array
@@ -2997,7 +3276,9 @@ paths:
example: basketball_player
- name: competition
in: query
- description: 'Filter by competition. Matches against the league, conference, division, or tour in the structured target details.'
+ description: >-
+ Filter by competition. Matches against the league, conference,
+ division, or tour in the structured target details.
required: false
schema:
type: string
@@ -3029,7 +3310,6 @@ paths:
description: Unauthorized
'500':
description: Internal server error
-
/structured_targets/{structured_target_id}:
get:
operationId: GetStructuredTarget
@@ -3057,7 +3337,6 @@ paths:
description: Not found
'500':
description: Internal server error
-
/milestones/{milestone_id}:
get:
operationId: GetMilestone
@@ -3087,7 +3366,6 @@ paths:
description: Not Found
'500':
description: Internal Server Error
-
/milestones:
get:
operationId: GetMilestones
@@ -3113,14 +3391,18 @@ paths:
format: date-time
- name: category
in: query
- description: 'Filter by milestone category. E.g. Sports, Elections, Esports, Crypto.'
+ description: >-
+ Filter by milestone category. E.g. Sports, Elections, Esports,
+ Crypto.
required: false
schema:
type: string
example: Sports
- name: competition
in: query
- description: 'Filter by competition. E.g. Pro Football, Pro Basketball (M), Pro Baseball, Pro Hockey, College Football.'
+ description: >-
+ Filter by competition. E.g. Pro Football, Pro Basketball (M), Pro
+ Baseball, Pro Hockey, College Football.
required: false
schema:
type: string
@@ -3133,7 +3415,10 @@ paths:
type: string
- name: type
in: query
- description: 'Filter by milestone type. E.g. football_game, basketball_game, soccer_tournament_multi_leg, baseball_game, hockey_match, political_race.'
+ description: >-
+ Filter by milestone type. E.g. football_game, basketball_game,
+ soccer_tournament_multi_leg, baseball_game, hockey_match,
+ political_race.
required: false
schema:
type: string
@@ -3146,14 +3431,18 @@ paths:
type: string
- name: cursor
in: query
- description: Pagination cursor. Use the cursor value returned from the previous response to get the next page of results
+ description: >-
+ Pagination cursor. Use the cursor value returned from the previous
+ response to get the next page of results
required: false
schema:
type: string
- name: min_updated_ts
in: query
required: false
- description: Filter milestones with metadata updated after this Unix timestamp (in seconds). Use this to efficiently poll for changes.
+ description: >-
+ Filter milestones with metadata updated after this Unix timestamp
+ (in seconds). Use this to efficiently poll for changes.
schema:
type: integer
format: int64
@@ -3170,8 +3459,6 @@ paths:
description: Unauthorized
'500':
description: Internal Server Error
-
- # Communications endpoints
/multivariate_event_collections/{collection_ticker}:
get:
operationId: GetMultivariateEventCollection
@@ -3202,7 +3489,10 @@ paths:
post:
operationId: CreateMarketInMultivariateEventCollection
summary: Create Market In Multivariate Event Collection
- description: 'Endpoint for creating an individual market in a multivariate event collection. This endpoint must be hit at least once before trading or looking up a market. Users are limited to 5000 creations per week.'
+ description: >-
+ Endpoint for creating an individual market in a multivariate event
+ collection. This endpoint must be hit at least once before trading or
+ looking up a market. Users are limited to 5000 creations per week.
tags:
- multivariate
security:
@@ -3221,14 +3511,16 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/CreateMarketInMultivariateEventCollectionRequest'
+ $ref: >-
+ #/components/schemas/CreateMarketInMultivariateEventCollectionRequest
responses:
'200':
description: Market created successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/CreateMarketInMultivariateEventCollectionResponse'
+ $ref: >-
+ #/components/schemas/CreateMarketInMultivariateEventCollectionResponse
'400':
$ref: '#/components/responses/BadRequestError'
'401':
@@ -3237,7 +3529,6 @@ paths:
$ref: '#/components/responses/RateLimitError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/multivariate_event_collections:
get:
operationId: GetMultivariateEventCollections
@@ -3248,10 +3539,15 @@ paths:
parameters:
- name: status
in: query
- description: Only return collections of a certain status. Can be unopened, open, or closed.
+ description: >-
+ Only return collections of a certain status. Can be unopened, open,
+ or closed.
schema:
type: string
- enum: [unopened, open, closed]
+ enum:
+ - unopened
+ - open
+ - closed
- name: associated_event_ticker
in: query
description: Only return collections associated with a particular event ticker.
@@ -3272,7 +3568,11 @@ paths:
maximum: 200
- name: cursor
in: query
- description: The Cursor represents a pointer to the next page of records in the pagination. This optional parameter, when filled, should be filled with the cursor string returned in a previous request to this end-point.
+ description: >-
+ The Cursor represents a pointer to the next page of records in the
+ pagination. This optional parameter, when filled, should be filled
+ with the cursor string returned in a previous request to this
+ end-point.
schema:
type: string
responses:
@@ -3286,21 +3586,33 @@ paths:
$ref: '#/components/responses/BadRequestError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/multivariate_event_collections/{collection_ticker}/lookup:
put:
operationId: LookupTickersForMarketInMultivariateEventCollection
summary: Lookup Tickers For Market In Multivariate Event Collection
deprecated: true
- description: 'DEPRECATED: This endpoint predates RFQs and should not be used for new integrations. Endpoint for looking up an individual market in a multivariate event collection. If CreateMarketInMultivariateEventCollection has never been hit with that variable combination before, this will return a 404.'
+ description: >-
+ DEPRECATED: This endpoint predates RFQs and should not be used for new
+ integrations. Endpoint for looking up an individual market in a
+ multivariate event collection. If
+ CreateMarketInMultivariateEventCollection has never been hit with that
+ variable combination before, this will return a 404.
x-mint:
- content: |
+ content: >
- This endpoint is deprecated and predates RFQs. Do not use it for new integrations.
+
+ This endpoint is deprecated and predates RFQs. Do not use it for new
+ integrations.
+
+
- **Rate limit:** 2 tokens per request. See `GET /trade-api/v2/account/endpoint_costs` for current non-default endpoint costs.
+
+ **Rate limit:** 2 tokens per request. See `GET
+ /trade-api/v2/account/endpoint_costs` for current non-default endpoint
+ costs.
+
tags:
- multivariate
@@ -3320,14 +3632,16 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/LookupTickersForMarketInMultivariateEventCollectionRequest'
+ $ref: >-
+ #/components/schemas/LookupTickersForMarketInMultivariateEventCollectionRequest
responses:
'200':
description: Market looked up successfully
content:
application/json:
schema:
- $ref: '#/components/schemas/LookupTickersForMarketInMultivariateEventCollectionResponse'
+ $ref: >-
+ #/components/schemas/LookupTickersForMarketInMultivariateEventCollectionResponse
'400':
$ref: '#/components/responses/BadRequestError'
'401':
@@ -3347,17 +3661,29 @@ paths:
- name: status
in: query
required: false
- description: 'Status filter. Can be "all", "active", "upcoming", "closed", or "paid_out". Default is "all".'
+ description: >-
+ Status filter. Can be "all", "active", "upcoming", "closed", or
+ "paid_out". Default is "all".
schema:
type: string
- enum: [all, active, upcoming, closed, paid_out]
+ enum:
+ - all
+ - active
+ - upcoming
+ - closed
+ - paid_out
- name: type
in: query
required: false
- description: 'Type filter. Can be "all", "liquidity", or "volume". Default is "all".'
+ description: >-
+ Type filter. Can be "all", "liquidity", or "volume". Default is
+ "all".
schema:
type: string
- enum: [all, liquidity, volume]
+ enum:
+ - all
+ - liquidity
+ - volume
- name: incentive_description
in: query
required: false
@@ -3397,14 +3723,15 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
-
/fcm/orders:
get:
operationId: GetFCMOrders
summary: Get FCM Orders
- description: |
+ description: >
Endpoint for FCM members to get orders filtered by subtrader ID.
- This endpoint requires FCM member access level and allows filtering orders by subtrader ID.
+
+ This endpoint requires FCM member access level and allows filtering
+ orders by subtrader ID.
tags:
- fcm
security:
@@ -3415,7 +3742,9 @@ paths:
- name: subtrader_id
in: query
required: true
- description: Restricts the response to orders for a specific subtrader (FCM members only)
+ description: >-
+ Restricts the response to orders for a specific subtrader (FCM
+ members only)
schema:
type: string
- $ref: '#/components/parameters/CursorQuery'
@@ -3423,13 +3752,17 @@ paths:
- $ref: '#/components/parameters/TickerQuery'
- name: min_ts
in: query
- description: Restricts the response to orders after a timestamp, formatted as a Unix Timestamp
+ description: >-
+ Restricts the response to orders after a timestamp, formatted as a
+ Unix Timestamp
schema:
type: integer
format: int64
- name: max_ts
in: query
- description: Restricts the response to orders before a timestamp, formatted as a Unix Timestamp
+ description: >-
+ Restricts the response to orders before a timestamp, formatted as a
+ Unix Timestamp
schema:
type: integer
format: int64
@@ -3438,7 +3771,10 @@ paths:
description: Restricts the response to orders that have a certain status
schema:
type: string
- enum: [resting, canceled, executed]
+ enum:
+ - resting
+ - canceled
+ - executed
- name: limit
in: query
description: Parameter to specify the number of results per page. Defaults to 100
@@ -3461,14 +3797,16 @@ paths:
description: Not found
'500':
description: Internal server error
-
/fcm/positions:
get:
operationId: GetFCMPositions
summary: Get FCM Positions
- description: |
- Endpoint for FCM members to get market positions filtered by subtrader ID.
- This endpoint requires FCM member access level and allows filtering positions by subtrader ID.
+ description: >
+ Endpoint for FCM members to get market positions filtered by subtrader
+ ID.
+
+ This endpoint requires FCM member access level and allows filtering
+ positions by subtrader ID.
tags:
- fcm
security:
@@ -3479,7 +3817,9 @@ paths:
- name: subtrader_id
in: query
required: true
- description: Restricts the response to positions for a specific subtrader (FCM members only)
+ description: >-
+ Restricts the response to positions for a specific subtrader (FCM
+ members only)
schema:
type: string
- name: ticker
@@ -3496,7 +3836,9 @@ paths:
x-go-type-skip-optional-pointer: true
- name: count_filter
in: query
- description: Restricts the positions to those with any of following fields with non-zero values, as a comma separated list
+ description: >-
+ Restricts the positions to those with any of following fields with
+ non-zero values, as a comma separated list
schema:
type: string
- name: settlement_status
@@ -3504,7 +3846,10 @@ paths:
description: Settlement status of the markets to return. Defaults to unsettled
schema:
type: string
- enum: [all, unsettled, settled]
+ enum:
+ - all
+ - unsettled
+ - settled
- name: limit
in: query
description: Parameter to specify the number of results per page. Defaults to 100
@@ -3514,7 +3859,9 @@ paths:
maximum: 1000
- name: cursor
in: query
- description: The Cursor represents a pointer to the next page of records in the pagination
+ description: >-
+ The Cursor represents a pointer to the next page of records in the
+ pagination
schema:
type: string
responses:
@@ -3532,19 +3879,32 @@ paths:
description: Not found
'500':
description: Internal server error
-
/historical/cutoff:
get:
operationId: GetHistoricalCutoff
summary: Get Historical Cutoff Timestamps
- description: |
- Returns the cutoff timestamps that define the boundary between **live** and **historical** data.
+ description: >
+ Returns the cutoff timestamps that define the boundary between **live**
+ and **historical** data.
+
## Cutoff fields
- - `market_settled_ts` : Markets that **settled** before this timestamp, and their candlesticks, must be accessed via `GET /historical/markets` and `GET /historical/markets/{ticker}/candlesticks`.
- - `trades_created_ts` : Trades that were **filled** before this timestamp must be accessed via `GET /historical/fills`.
- - `orders_updated_ts` : Orders that were **canceled or fully executed** before this timestamp must be accessed via `GET /historical/orders`. Resting (active) orders are always available in `GET /portfolio/orders`.
- - `market_positions_last_updated_ts` : Settled positions **archived from the live data set** before this timestamp must be accessed via `GET /historical/positions`. Unsettled positions are always available in `GET /portfolio/positions`.
+
+ - `market_settled_ts` : Markets that **settled** before this timestamp,
+ and their candlesticks, must be accessed via `GET /historical/markets`
+ and `GET /historical/markets/{ticker}/candlesticks`.
+
+ - `trades_created_ts` : Trades that were **filled** before this
+ timestamp must be accessed via `GET /historical/fills`.
+
+ - `orders_updated_ts` : Orders that were **canceled or fully executed**
+ before this timestamp must be accessed via `GET /historical/orders`.
+ Resting (active) orders are always available in `GET /portfolio/orders`.
+
+ - `market_positions_last_updated_ts` : Settled positions **archived from
+ the live data set** before this timestamp must be accessed via `GET
+ /historical/positions`. Unsettled positions are always available in `GET
+ /portfolio/positions`.
tags:
- historical
responses:
@@ -3556,7 +3916,6 @@ paths:
$ref: '#/components/schemas/GetHistoricalCutoffResponse'
'500':
description: Internal server error
-
/historical/markets/{ticker}/candlesticks:
get:
operationId: GetMarketCandlesticksHistorical
@@ -3574,26 +3933,35 @@ paths:
- name: start_ts
in: query
required: true
- description: Start timestamp (Unix timestamp). Candlesticks will include those ending on or after this time.
+ description: >-
+ Start timestamp (Unix timestamp). Candlesticks will include those
+ ending on or after this time.
schema:
type: integer
format: int64
- name: end_ts
in: query
required: true
- description: End timestamp (Unix timestamp). Candlesticks will include those ending on or before this time.
+ description: >-
+ End timestamp (Unix timestamp). Candlesticks will include those
+ ending on or before this time.
schema:
type: integer
format: int64
- name: period_interval
in: query
required: true
- description: Time period length of each candlestick in minutes. Valid values are 1 (1 minute), 60 (1 hour), or 1440 (1 day).
+ description: >-
+ Time period length of each candlestick in minutes. Valid values are
+ 1 (1 minute), 60 (1 hour), or 1440 (1 day).
schema:
type: integer
- enum: [1, 60, 1440]
+ enum:
+ - 1
+ - 60
+ - 1440
x-oapi-codegen-extra-tags:
- validate: "required,oneof=1 60 1440"
+ validate: required,oneof=1 60 1440
responses:
'200':
description: Candlesticks retrieved successfully
@@ -3607,7 +3975,6 @@ paths:
description: Not found
'500':
description: Internal server error
-
/historical/fills:
get:
operationId: GetFillsHistorical
@@ -3639,12 +4006,11 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
description: Internal server error
-
/historical/orders:
get:
operationId: GetHistoricalOrders
summary: Get Historical Orders
- description: ' Endpoint for getting orders that have been archived to the historical database.'
+ description: ' Endpoint for getting orders that have been archived to the historical database.'
tags:
- historical
security:
@@ -3669,7 +4035,6 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/historical/positions:
get:
operationId: GetHistoricalPositions
@@ -3699,7 +4064,6 @@ paths:
$ref: '#/components/responses/UnauthorizedError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/historical/trades:
get:
operationId: GetTradesHistorical
@@ -3727,13 +4091,13 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/historical/markets:
get:
operationId: GetHistoricalMarkets
summary: Get Historical Markets
- description: |
- Endpoint for getting markets that have been archived to the historical database. Filters are mutually exclusive.
+ description: >
+ Endpoint for getting markets that have been archived to the historical
+ database. Filters are mutually exclusive.
tags:
- historical
parameters:
@@ -3754,7 +4118,6 @@ paths:
$ref: '#/components/responses/BadRequestError'
'500':
$ref: '#/components/responses/InternalServerError'
-
/historical/markets/{ticker}:
get:
operationId: GetHistoricalMarket
@@ -3775,7 +4138,6 @@ paths:
$ref: '#/components/responses/NotFoundError'
'500':
$ref: '#/components/responses/InternalServerError'
-
components:
securitySchemes:
kalshiAccessKey:
@@ -3793,7 +4155,6 @@ components:
in: header
name: KALSHI-ACCESS-TIMESTAMP
description: Request timestamp in milliseconds
-
responses:
BadRequestError:
description: Bad request - invalid input
@@ -3832,12 +4193,13 @@ components:
schema:
$ref: '#/components/schemas/ErrorResponse'
RateLimitError:
- description: 'Rate limit exceeded. The default cost is 10 tokens per request. Use GET /trade-api/v2/account/endpoint_costs to list non-default endpoint costs.'
+ description: >-
+ Rate limit exceeded. The default cost is 10 tokens per request. Use GET
+ /trade-api/v2/account/endpoint_costs to list non-default endpoint costs.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
-
parameters:
LimitQuery:
name: limit
@@ -3850,8 +4212,7 @@ components:
maximum: 1000
default: 100
x-oapi-codegen-extra-tags:
- validate: "omitempty,min=1,max=1000"
-
+ validate: omitempty,min=1,max=1000
WithdrawalLimitQuery:
name: limit
in: query
@@ -3863,8 +4224,7 @@ components:
maximum: 500
default: 100
x-oapi-codegen-extra-tags:
- validate: "omitempty,min=1,max=500"
-
+ validate: omitempty,min=1,max=500
MarketLimitQuery:
name: limit
in: query
@@ -3877,22 +4237,22 @@ components:
default: 100
x-oapi-codegen-extra-tags:
validate: omitempty,gte=0,lte=1000
-
CursorQuery:
name: cursor
in: query
- description: Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
+ description: >-
+ Pagination cursor. Use the cursor value returned from the previous
+ response to get the next page of results. Leave empty for the first
+ page.
schema:
type: string
x-go-type-skip-optional-pointer: true
-
StatusQuery:
name: status
in: query
description: Filter by status. Possible values depend on the endpoint.
schema:
type: string
-
OrderGroupIdPath:
name: order_group_id
in: path
@@ -3900,7 +4260,6 @@ components:
description: Order group ID
schema:
type: string
-
RfqIdPath:
name: rfq_id
in: path
@@ -3908,7 +4267,6 @@ components:
description: RFQ ID
schema:
type: string
-
QuoteIdPath:
name: quote_id
in: path
@@ -3916,7 +4274,6 @@ components:
description: Quote ID
schema:
type: string
-
MarketTickerQuery:
name: market_ticker
in: query
@@ -3924,7 +4281,6 @@ components:
schema:
type: string
x-go-type-skip-optional-pointer: true
-
TickerQuery:
name: ticker
in: query
@@ -3932,15 +4288,15 @@ components:
schema:
type: string
x-go-type-skip-optional-pointer: true
-
IsBlockTradeQuery:
name: is_block_trade
in: query
- description: |
- Filter trades by whether they are block trades. Omit to return all trades. Set to `true` to return only block trades. Set to `false` to return only non-block trades.
+ description: >
+ Filter trades by whether they are block trades. Omit to return all
+ trades. Set to `true` to return only block trades. Set to `false` to
+ return only non-block trades.
schema:
type: boolean
-
SingleEventTickerQuery:
name: event_ticker
in: query
@@ -3948,7 +4304,6 @@ components:
schema:
type: string
x-go-type-skip-optional-pointer: true
-
MultipleEventTickerQuery:
name: event_ticker
in: query
@@ -3956,14 +4311,15 @@ components:
schema:
type: string
x-go-type-skip-optional-pointer: true
-
PositionsCursorQuery:
name: cursor
in: query
- description: The Cursor represents a pointer to the next page of records in the pagination. Use the value returned from the previous response to get the next page.
+ description: >-
+ The Cursor represents a pointer to the next page of records in the
+ pagination. Use the value returned from the previous response to get the
+ next page.
schema:
type: string
-
PositionsLimitQuery:
name: limit
in: query
@@ -3974,14 +4330,15 @@ components:
minimum: 1
maximum: 1000
default: 100
-
CountFilterQuery:
name: count_filter
in: query
- description: Restricts the positions to those with any of following fields with non-zero values, as a comma separated list. The following values are accepted - position, total_traded
+ description: >-
+ Restricts the positions to those with any of following fields with
+ non-zero values, as a comma separated list. The following values are
+ accepted - position, total_traded
schema:
type: string
-
OrderIdQuery:
name: order_id
in: query
@@ -3989,7 +4346,6 @@ components:
schema:
type: string
x-go-type-skip-optional-pointer: true
-
MinTsQuery:
name: min_ts
in: query
@@ -3997,7 +4353,6 @@ components:
schema:
type: integer
format: int64
-
MaxTsQuery:
name: max_ts
in: query
@@ -4005,28 +4360,26 @@ components:
schema:
type: integer
format: int64
-
SubaccountQuery:
name: subaccount
in: query
- description: Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts.
+ description: >-
+ Subaccount number (0 for primary, 1-63 for subaccounts). If omitted,
+ defaults to all subaccounts.
schema:
type: integer
-
SubaccountQueryDefaultPrimary:
name: subaccount
in: query
description: Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0.
schema:
type: integer
-
ExchangeIndexQuery:
name: exchange_index
in: query
schema:
$ref: '#/components/schemas/ExchangeIndex'
x-go-type-skip-optional-pointer: true
-
OrderIdPath:
name: order_id
in: path
@@ -4034,7 +4387,6 @@ components:
description: Order ID
schema:
type: string
-
TickerPath:
name: ticker
in: path
@@ -4042,7 +4394,6 @@ components:
description: Market ticker
schema:
type: string
-
SeriesTickerQuery:
name: series_ticker
in: query
@@ -4050,7 +4401,6 @@ components:
schema:
type: string
x-go-type-skip-optional-pointer: true
-
MinCreatedTsQuery:
name: min_created_ts
in: query
@@ -4058,7 +4408,6 @@ components:
schema:
type: integer
format: int64
-
MaxCreatedTsQuery:
name: max_created_ts
in: query
@@ -4066,15 +4415,17 @@ components:
schema:
type: integer
format: int64
-
MinUpdatedTsQuery:
name: min_updated_ts
in: query
- description: Return markets with metadata updated later than this Unix timestamp. Tracks non-trading changes only. Incompatible with any other filters except mve_filter=exclude. May be combined with series_ticker, which requires mve_filter=exclude.
+ description: >-
+ Return markets with metadata updated later than this Unix timestamp.
+ Tracks non-trading changes only. Incompatible with any other filters
+ except mve_filter=exclude. May be combined with series_ticker, which
+ requires mve_filter=exclude.
schema:
type: integer
format: int64
-
MaxCloseTsQuery:
name: max_close_ts
in: query
@@ -4082,7 +4433,6 @@ components:
schema:
type: integer
format: int64
-
MinCloseTsQuery:
name: min_close_ts
in: query
@@ -4090,7 +4440,6 @@ components:
schema:
type: integer
format: int64
-
MinSettledTsQuery:
name: min_settled_ts
in: query
@@ -4098,7 +4447,6 @@ components:
schema:
type: integer
format: int64
-
MaxSettledTsQuery:
name: max_settled_ts
in: query
@@ -4106,73 +4454,92 @@ components:
schema:
type: integer
format: int64
-
MarketStatusQuery:
name: status
in: query
description: Filter by market status. Leave empty to return markets with any status.
schema:
type: string
- enum: [unopened, open, paused, closed, settled]
-
+ enum:
+ - unopened
+ - open
+ - paused
+ - closed
+ - settled
TickersQuery:
name: tickers
in: query
- description: Filter by specific market tickers. Comma-separated list of market tickers to retrieve.
+ description: >-
+ Filter by specific market tickers. Comma-separated list of market
+ tickers to retrieve.
schema:
type: string
-
EventTickersQuery:
name: tickers
in: query
- description: Filter by specific event tickers. Comma-separated list of event tickers to retrieve.
+ description: >-
+ Filter by specific event tickers. Comma-separated list of event tickers
+ to retrieve.
schema:
type: string
-
MveFilterQuery:
name: mve_filter
in: query
- description: Filter by multivariate events (combos). 'only' returns only multivariate events, 'exclude' excludes multivariate events.
+ description: >-
+ Filter by multivariate events (combos). 'only' returns only multivariate
+ events, 'exclude' excludes multivariate events.
schema:
type: string
- enum: ['only', 'exclude']
-
+ enum:
+ - only
+ - exclude
MveHistoricalFilterQuery:
name: mve_filter
in: query
- description: Filter by multivariate events (combos). By default, MVE markets are included.
+ description: >-
+ Filter by multivariate events (combos). By default, MVE markets are
+ included.
schema:
type: string
- enum: ['exclude']
+ enum:
+ - exclude
nullable: true
default: null
-
schemas:
- # Common schemas
FixedPointDollars:
type: string
- description: US dollar amount as a fixed-point decimal string with up to 6 decimal places of precision. This is the maximum supported precision; valid quote intervals for a given market are constrained by that market's price level structure.
- example: "0.5600"
-
+ description: >-
+ US dollar amount as a fixed-point decimal string with up to 6 decimal
+ places of precision. This is the maximum supported precision; valid
+ quote intervals for a given market are constrained by that market's
+ price level structure.
+ example: '0.5600'
FixedPointCount:
type: string
- description: Fixed-point contract count string (2 decimals, e.g., "10.00"; referred to as "fp" in field names). Requests accept 0-2 decimal places (e.g., "10", "10.0", "10.00"); responses always emit 2 decimals. Fractional contract values (e.g., "2.50") are supported; the minimum granularity is 0.01 contracts.
- example: "10.00"
-
+ description: >-
+ Fixed-point contract count string (2 decimals, e.g., "10.00"; referred
+ to as "fp" in field names). Requests accept 0-2 decimal places (e.g.,
+ "10", "10.0", "10.00"); responses always emit 2 decimals. Fractional
+ contract values (e.g., "2.50") are supported; the minimum granularity is
+ 0.01 contracts.
+ example: '10.00'
ExchangeIndex:
type: integer
- description: "Identifier for an exchange shard. Defaults to 0 if unspecified. Note: currently only 0 supported."
+ description: >-
+ Identifier for an exchange shard. Defaults to 0 if unspecified. Note:
+ currently only 0 supported.
example: 0
-
FeeType:
type: string
- enum: [quadratic, quadratic_with_maker_fees, flat]
+ enum:
+ - quadratic
+ - quadratic_with_maker_fees
+ - flat
x-enum-varnames:
- FeeTypeQuadratic
- FeeTypeQuadraticWithMakerFees
- FeeTypeFlat
description: Fee type for a series or scheduled fee override.
-
GetMarketCandlesticksHistoricalResponse:
type: object
required:
@@ -4187,7 +4554,6 @@ components:
description: Array of candlestick data points for the specified time range.
items:
$ref: '#/components/schemas/MarketCandlestickHistorical'
-
MarketCandlestickHistorical:
type: object
required:
@@ -4204,20 +4570,29 @@ components:
description: Unix timestamp for the inclusive end of the candlestick period.
yes_bid:
$ref: '#/components/schemas/BidAskDistributionHistorical'
- description: Open, high, low, close (OHLC) data for YES buy offers on the market during the candlestick period.
+ description: >-
+ Open, high, low, close (OHLC) data for YES buy offers on the market
+ during the candlestick period.
yes_ask:
$ref: '#/components/schemas/BidAskDistributionHistorical'
- description: Open, high, low, close (OHLC) data for YES sell offers on the market during the candlestick period.
+ description: >-
+ Open, high, low, close (OHLC) data for YES sell offers on the market
+ during the candlestick period.
price:
$ref: '#/components/schemas/PriceDistributionHistorical'
- description: Open, high, low, close (OHLC) and more data for trade YES contract prices on the market during the candlestick period.
+ description: >-
+ Open, high, low, close (OHLC) and more data for trade YES contract
+ prices on the market during the candlestick period.
volume:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of contracts bought on the market during the candlestick period.
+ description: >-
+ String representation of the number of contracts bought on the
+ market during the candlestick period.
open_interest:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of contracts bought on the market by end of the candlestick period (end_period_ts).
-
+ description: >-
+ String representation of the number of contracts bought on the
+ market by end of the candlestick period (end_period_ts).
BidAskDistributionHistorical:
type: object
required:
@@ -4228,17 +4603,24 @@ components:
properties:
open:
$ref: '#/components/schemas/FixedPointDollars'
- description: Offer price on the market at the start of the candlestick period (in dollars).
+ description: >-
+ Offer price on the market at the start of the candlestick period (in
+ dollars).
low:
$ref: '#/components/schemas/FixedPointDollars'
- description: Lowest offer price on the market during the candlestick period (in dollars).
+ description: >-
+ Lowest offer price on the market during the candlestick period (in
+ dollars).
high:
$ref: '#/components/schemas/FixedPointDollars'
- description: Highest offer price on the market during the candlestick period (in dollars).
+ description: >-
+ Highest offer price on the market during the candlestick period (in
+ dollars).
close:
$ref: '#/components/schemas/FixedPointDollars'
- description: Offer price on the market at the end of the candlestick period (in dollars).
-
+ description: >-
+ Offer price on the market at the end of the candlestick period (in
+ dollars).
PriceDistributionHistorical:
type: object
required:
@@ -4253,33 +4635,44 @@ components:
allOf:
- $ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Price of the first trade during the candlestick period (in dollars). Null if no trades occurred.
+ description: >-
+ Price of the first trade during the candlestick period (in dollars).
+ Null if no trades occurred.
low:
allOf:
- $ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Lowest trade price during the candlestick period (in dollars). Null if no trades occurred.
+ description: >-
+ Lowest trade price during the candlestick period (in dollars). Null
+ if no trades occurred.
high:
allOf:
- $ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Highest trade price during the candlestick period (in dollars). Null if no trades occurred.
+ description: >-
+ Highest trade price during the candlestick period (in dollars). Null
+ if no trades occurred.
close:
allOf:
- $ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Price of the last trade during the candlestick period (in dollars). Null if no trades occurred.
+ description: >-
+ Price of the last trade during the candlestick period (in dollars).
+ Null if no trades occurred.
mean:
allOf:
- $ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Volume-weighted average price during the candlestick period (in dollars). Null if no trades occurred.
+ description: >-
+ Volume-weighted average price during the candlestick period (in
+ dollars). Null if no trades occurred.
previous:
allOf:
- $ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Close price from the previous candlestick period (in dollars). Null if this is the first candlestick or no prior trade exists.
-
+ description: >-
+ Close price from the previous candlestick period (in dollars). Null
+ if this is the first candlestick or no prior trade exists.
ErrorResponse:
type: object
properties:
@@ -4295,40 +4688,74 @@ components:
service:
type: string
description: The name of the service that generated the error
-
SelfTradePreventionType:
type: string
- enum: ['taker_at_cross', 'maker']
- description: |
- The self-trade prevention type for orders. `taker_at_cross` cancels the taker order when it would trade against another order from the same user; execution stops and any partial fills already matched are executed. `maker` cancels the resting maker order and continues matching.
-
+ enum:
+ - taker_at_cross
+ - maker
+ description: >
+ The self-trade prevention type for orders. `taker_at_cross` cancels the
+ taker order when it would trade against another order from the same
+ user; execution stops and any partial fills already matched are
+ executed. `maker` cancels the resting maker order and continues
+ matching.
BookSide:
type: string
- enum: ['bid', 'ask']
- description: 'Side of the book for an order or trade. For event markets, this refers to the YES leg only: `bid` means buy YES, `ask` means sell YES. (Selling YES is economically equivalent to buying NO at `1 - price`, but this endpoint quotes everything from the YES side.)'
-
+ enum:
+ - bid
+ - ask
+ description: >-
+ Side of the book for an order or trade. For event markets, this refers
+ to the YES leg only: `bid` means buy YES, `ask` means sell YES. (Selling
+ YES is economically equivalent to buying NO at `1 - price`, but this
+ endpoint quotes everything from the YES side.)
OrderStatus:
type: string
- enum: ['resting', 'canceled', 'executed']
+ enum:
+ - resting
+ - canceled
+ - executed
description: The status of an order
-
ExchangeInstance:
type: string
- enum: ['event_contract', 'margined']
+ enum:
+ - event_contract
+ - margined
description: The exchange instance type
-
UserFilter:
type: string
- enum: ['self']
- x-enum-varnames: ['UserFilterSelf']
- description: Omit or leave empty to return all results. Use `self` to filter by the authenticated user.
-
+ enum:
+ - self
+ x-enum-varnames:
+ - UserFilterSelf
+ description: >-
+ Omit or leave empty to return all results. Use `self` to filter by the
+ authenticated user.
ApiKeyScope:
type: string
- enum: ['read', 'write', 'read::block_trade_accept', 'read::portfolio_balance', 'write::trade', 'write::transfer', 'write::block_trade_accept']
- x-enum-varnames: ['ApiKeyScopeRead', 'ApiKeyScopeWrite', 'ApiKeyScopeReadBlockTradeAccept', 'ApiKeyScopeReadPortfolioBalance', 'ApiKeyScopeWriteTrade', 'ApiKeyScopeWriteTransfer', 'ApiKeyScopeWriteBlockTradeAccept']
- description: Scope granted to an API key. Parent scopes grant broad access; for example, `read` grants all read endpoints and `write` grants all write endpoints. Child scopes such as `read::block_trade_accept`, `read::portfolio_balance`, `write::trade`, `write::transfer`, and `write::block_trade_accept` grant only their specific endpoint group and can be granted without the parent scope.
-
+ enum:
+ - read
+ - write
+ - read::block_trade_accept
+ - read::portfolio_balance
+ - write::trade
+ - write::transfer
+ - write::block_trade_accept
+ x-enum-varnames:
+ - ApiKeyScopeRead
+ - ApiKeyScopeWrite
+ - ApiKeyScopeReadBlockTradeAccept
+ - ApiKeyScopeReadPortfolioBalance
+ - ApiKeyScopeWriteTrade
+ - ApiKeyScopeWriteTransfer
+ - ApiKeyScopeWriteBlockTradeAccept
+ description: >-
+ Scope granted to an API key. Parent scopes grant broad access; for
+ example, `read` grants all read endpoints and `write` grants all write
+ endpoints. Child scopes such as `read::block_trade_accept`,
+ `read::portfolio_balance`, `write::trade`, `write::transfer`, and
+ `write::block_trade_accept` grant only their specific endpoint group and
+ can be granted without the parent scope.
ApiKey:
type: object
required:
@@ -4352,8 +4779,10 @@ components:
nullable: true
minimum: 0
maximum: 63
- description: If set, the API key is restricted to this single sub-account and may only read and trade on it. Absent/null means the key is unrestricted.
-
+ description: >-
+ If set, the API key is restricted to this single sub-account and may
+ only read and trade on it. Absent/null means the key is
+ unrestricted.
GetApiKeysResponse:
type: object
required:
@@ -4364,7 +4793,6 @@ components:
description: List of all API keys associated with the user
items:
$ref: '#/components/schemas/ApiKey'
-
CreateApiKeyRequest:
type: object
required:
@@ -4376,18 +4804,28 @@ components:
description: Name for the API key. This helps identify the key's purpose
public_key:
type: string
- description: RSA public key in PEM format. This will be used to verify signatures on API requests
+ description: >-
+ RSA public key in PEM format. This will be used to verify signatures
+ on API requests
scopes:
type: array
- description: List of scopes to grant to the API key. If the broad `write` parent scope is included, `read` must also be included. Child scopes may be granted without the broad parent scope. Defaults to full access (`read`, `write`) if not provided.
+ description: >-
+ List of scopes to grant to the API key. If the broad `write` parent
+ scope is included, `read` must also be included. Child scopes may be
+ granted without the broad parent scope. Defaults to full access
+ (`read`, `write`) if not provided.
items:
$ref: '#/components/schemas/ApiKeyScope'
subaccount:
type: integer
minimum: 0
maximum: 63
- description: If set, restricts the API key to a single sub-account (0-63) that you own. A restricted key may only read and trade on that sub-account; it cannot act on other sub-accounts, transfer funds between sub-accounts, or create sub-accounts. Omit to leave the key unrestricted.
-
+ description: >-
+ If set, restricts the API key to a single sub-account (0-63) that
+ you own. A restricted key may only read and trade on that
+ sub-account; it cannot act on other sub-accounts, transfer funds
+ between sub-accounts, or create sub-accounts. Omit to leave the key
+ unrestricted.
CreateApiKeyResponse:
type: object
required:
@@ -4396,7 +4834,6 @@ components:
api_key_id:
type: string
description: Unique identifier for the newly created API key
-
GenerateApiKeyRequest:
type: object
required:
@@ -4407,15 +4844,23 @@ components:
description: Name for the API key. This helps identify the key's purpose
scopes:
type: array
- description: List of scopes to grant to the API key. If the broad `write` parent scope is included, `read` must also be included. Child scopes may be granted without the broad parent scope. Defaults to full access (`read`, `write`) if not provided.
+ description: >-
+ List of scopes to grant to the API key. If the broad `write` parent
+ scope is included, `read` must also be included. Child scopes may be
+ granted without the broad parent scope. Defaults to full access
+ (`read`, `write`) if not provided.
items:
$ref: '#/components/schemas/ApiKeyScope'
subaccount:
type: integer
minimum: 0
maximum: 63
- description: If set, restricts the API key to a single sub-account (0-63) that you own. A restricted key may only read and trade on that sub-account; it cannot act on other sub-accounts, transfer funds between sub-accounts, or create sub-accounts. Omit to leave the key unrestricted.
-
+ description: >-
+ If set, restricts the API key to a single sub-account (0-63) that
+ you own. A restricted key may only read and trade on that
+ sub-account; it cannot act on other sub-accounts, transfer funds
+ between sub-accounts, or create sub-accounts. Omit to leave the key
+ unrestricted.
GenerateApiKeyResponse:
type: object
required:
@@ -4427,8 +4872,9 @@ components:
description: Unique identifier for the newly generated API key
private_key:
type: string
- description: RSA private key in PEM format. This must be stored securely and cannot be retrieved again after this response
-
+ description: >-
+ RSA private key in PEM format. This must be stored securely and
+ cannot be retrieved again after this response
GetTagsForSeriesCategoriesResponse:
type: object
required:
@@ -4441,7 +4887,6 @@ components:
type: array
items:
type: string
-
ScopeList:
type: object
required:
@@ -4452,7 +4897,6 @@ components:
description: List of scopes
items:
type: string
-
SportFilterDetails:
type: object
required:
@@ -4469,7 +4913,6 @@ components:
description: Mapping of competitions to their scope lists
additionalProperties:
$ref: '#/components/schemas/ScopeList'
-
GetFiltersBySportsResponse:
type: object
required:
@@ -4486,7 +4929,6 @@ components:
description: Ordered list of sports for display
items:
type: string
-
BucketLimit:
type: object
description: |
@@ -4510,7 +4952,6 @@ components:
headroom that idle clients accumulate and can spend in a single
pulse (e.g. write buckets at non-Basic tiers hold two seconds of
budget).
-
GetAccountApiLimitsResponse:
type: object
required:
@@ -4521,7 +4962,10 @@ components:
properties:
usage_tier:
type: string
- description: User's effective Predictions API usage tier for these limits (for example, basic, advanced, expert, premier, paragon, prime, or prestige).
+ description: >-
+ User's effective Predictions API usage tier for these limits (for
+ example, basic, advanced, expert, premier, paragon, prime, or
+ prestige).
example: expert
read:
$ref: '#/components/schemas/BucketLimit'
@@ -4529,10 +4973,12 @@ components:
$ref: '#/components/schemas/BucketLimit'
grants:
type: array
- description: The caller's active API usage level grants across exchange lanes, where each grant applies to its exchange_instance and usage_tier reflects the effective tier for the lane reported by this endpoint.
+ description: >-
+ The caller's active API usage level grants across exchange lanes,
+ where each grant applies to its exchange_instance and usage_tier
+ reflects the effective tier for the lane reported by this endpoint.
items:
$ref: '#/components/schemas/ApiUsageLevelGrant'
-
ApiUsageLevelGrant:
type: object
required:
@@ -4544,17 +4990,22 @@ components:
$ref: '#/components/schemas/ExchangeInstance'
level:
type: string
- description: API usage level this grant confers (for example, expert, premier, paragon, prime, or prestige).
+ description: >-
+ API usage level this grant confers (for example, expert, premier,
+ paragon, prime, or prestige).
example: prestige
expires_ts:
type: integer
format: int64
nullable: true
- description: Unix timestamp (seconds) when the grant expires. Absent for permanent grants.
+ description: >-
+ Unix timestamp (seconds) when the grant expires. Absent for
+ permanent grants.
source:
type: string
- description: 'How the grant was created: "volume" (earned from trading volume) or "manual" (assigned by Kalshi).'
-
+ description: >-
+ How the grant was created: "volume" (earned from trading volume) or
+ "manual" (assigned by Kalshi).
GetAccountApiUsageLevelVolumeProgressResponse:
type: object
required:
@@ -4562,10 +5013,12 @@ components:
properties:
volume_progress:
type: array
- description: Latest cron-computed trading volume progress toward volume-based API usage tiers for the predictions (event_contract) lane. Volume-based public tiers are Expert, Premier, Paragon, Prime, and Prestige.
+ description: >-
+ Latest cron-computed trading volume progress toward volume-based API
+ usage tiers for the predictions (event_contract) lane. Volume-based
+ public tiers are Expert, Premier, Paragon, Prime, and Prestige.
items:
$ref: '#/components/schemas/AccountApiUsageLevelVolumeProgress'
-
AccountApiUsageLevelVolumeProgress:
type: object
required:
@@ -4576,14 +5029,16 @@ components:
computed_ts:
type: integer
format: int64
- description: 'Unix timestamp (seconds) when this progress was computed; trailing_30d_volume_fp covers the trailing 30 days ending at this time.'
+ description: >-
+ Unix timestamp (seconds) when this progress was computed;
+ trailing_30d_volume_fp covers the trailing 30 days ending at this
+ time.
trailing_30d_volume_fp:
$ref: '#/components/schemas/FixedPointCount'
goals:
type: array
items:
$ref: '#/components/schemas/AccountApiUsageLevelVolumeGoal'
-
AccountApiUsageLevelVolumeGoal:
type: object
required:
@@ -4599,7 +5054,6 @@ components:
$ref: '#/components/schemas/FixedPointCount'
keep_volume_goal_fp:
$ref: '#/components/schemas/FixedPointCount'
-
EndpointTokenCost:
type: object
required:
@@ -4615,8 +5069,9 @@ components:
description: API route path for the endpoint.
cost:
type: integer
- description: Configured token cost for an endpoint whose cost differs from the default cost.
-
+ description: >-
+ Configured token cost for an endpoint whose cost differs from the
+ default cost.
GetAccountEndpointCostsResponse:
type: object
required:
@@ -4625,13 +5080,16 @@ components:
properties:
default_cost:
type: integer
- description: Default token cost applied to endpoints that are not listed in `endpoint_costs`. This is currently 10.
+ description: >-
+ Default token cost applied to endpoints that are not listed in
+ `endpoint_costs`. This is currently 10.
endpoint_costs:
type: array
- description: API v2 endpoints whose configured token cost differs from `default_cost`. Endpoints that use the default cost are omitted.
+ description: >-
+ API v2 endpoints whose configured token cost differs from
+ `default_cost`. Endpoints that use the default cost are omitted.
items:
$ref: '#/components/schemas/EndpointTokenCost'
-
ExchangeStatus:
type: object
required:
@@ -4640,24 +5098,36 @@ components:
properties:
exchange_active:
type: boolean
- description: False if the core Kalshi exchange is no longer taking any state changes at all. This includes but is not limited to trading, new users, and transfers. True unless we are under maintenance.
+ description: >-
+ False if the core Kalshi exchange is no longer taking any state
+ changes at all. This includes but is not limited to trading, new
+ users, and transfers. True unless we are under maintenance.
trading_active:
type: boolean
- description: True if we are currently permitting trading on the exchange. This is true during trading hours and false outside exchange hours. Kalshi reserves the right to pause at any time in case issues are detected.
+ description: >-
+ True if we are currently permitting trading on the exchange. This is
+ true during trading hours and false outside exchange hours. Kalshi
+ reserves the right to pause at any time in case issues are detected.
intra_exchange_transfers_active:
type: boolean
- description: True if intra-exchange transfers are currently permitted. False when transfers are temporarily blocked.
+ description: >-
+ True if intra-exchange transfers are currently permitted. False when
+ transfers are temporarily blocked.
exchange_estimated_resume_time:
type: string
format: date-time
- description: Estimated downtime for the current exchange maintenance window. However, this is not guaranteed and can be extended.
+ description: >-
+ Estimated downtime for the current exchange maintenance window.
+ However, this is not guaranteed and can be extended.
nullable: true
exchange_index_statuses:
type: array
- description: Status of each exchange index. The top-level fields above reflect the default exchange index (0). Absent when the per-index breakdown is unavailable.
+ description: >-
+ Status of each exchange index. The top-level fields above reflect
+ the default exchange index (0). Absent when the per-index breakdown
+ is unavailable.
items:
$ref: '#/components/schemas/ExchangeIndexStatus'
-
ExchangeIndexStatus:
type: object
required:
@@ -4670,14 +5140,19 @@ components:
$ref: '#/components/schemas/ExchangeIndex'
exchange_active:
type: boolean
- description: False if this exchange index is no longer taking any state changes at all. True unless under maintenance.
+ description: >-
+ False if this exchange index is no longer taking any state changes
+ at all. True unless under maintenance.
trading_active:
type: boolean
- description: True if trading is currently permitted on this exchange index. False outside exchange hours or during pauses.
+ description: >-
+ True if trading is currently permitted on this exchange index. False
+ outside exchange hours or during pauses.
intra_exchange_transfers_active:
type: boolean
- description: True if intra-exchange transfers are currently permitted on this exchange index. False when transfers are temporarily blocked.
-
+ description: >-
+ True if intra-exchange transfers are currently permitted on this
+ exchange index. False when transfers are temporarily blocked.
GetExchangeScheduleResponse:
type: object
required:
@@ -4685,7 +5160,6 @@ components:
properties:
schedule:
$ref: '#/components/schemas/Schedule'
-
Schedule:
type: object
required:
@@ -4694,15 +5168,18 @@ components:
properties:
standard_hours:
type: array
- description: The standard operating hours of the exchange. All times are expressed in ET. Outside of these times trading will be unavailable.
+ description: >-
+ The standard operating hours of the exchange. All times are
+ expressed in ET. Outside of these times trading will be unavailable.
items:
$ref: '#/components/schemas/WeeklySchedule'
maintenance_windows:
type: array
- description: Scheduled maintenance windows, during which the exchange may be unavailable.
+ description: >-
+ Scheduled maintenance windows, during which the exchange may be
+ unavailable.
items:
$ref: '#/components/schemas/MaintenanceWindow'
-
WeeklySchedule:
type: object
required:
@@ -4723,7 +5200,9 @@ components:
end_time:
type: string
format: date-time
- description: End date and time for when this weekly schedule is no longer effective.
+ description: >-
+ End date and time for when this weekly schedule is no longer
+ effective.
monday:
type: array
description: Trading hours for Monday. May contain multiple sessions.
@@ -4759,7 +5238,6 @@ components:
description: Trading hours for Sunday. May contain multiple sessions.
items:
$ref: '#/components/schemas/DailySchedule'
-
DailySchedule:
type: object
required:
@@ -4772,7 +5250,6 @@ components:
close_time:
type: string
description: Closing time in ET (Eastern Time) format HH:MM.
-
MaintenanceWindow:
type: object
required:
@@ -4787,7 +5264,6 @@ components:
type: string
format: date-time
description: End date and time of the maintenance window.
-
GetHistoricalCutoffResponse:
type: object
required:
@@ -4798,24 +5274,32 @@ components:
market_settled_ts:
type: string
format: date-time
- description: |
- Cutoff based on **market settlement time**. Markets and their candlesticks that settled before this timestamp must be accessed via `GET /historical/markets` and `GET /historical/markets/{ticker}/candlesticks`.
+ description: >
+ Cutoff based on **market settlement time**. Markets and their
+ candlesticks that settled before this timestamp must be accessed via
+ `GET /historical/markets` and `GET
+ /historical/markets/{ticker}/candlesticks`.
trades_created_ts:
type: string
format: date-time
- description: |
- Cutoff based on **trade fill time**. Fills that occurred before this timestamp must be accessed via `GET /historical/fills`.
+ description: >
+ Cutoff based on **trade fill time**. Fills that occurred before this
+ timestamp must be accessed via `GET /historical/fills`.
orders_updated_ts:
type: string
format: date-time
- description: |
- Cutoff based on **order cancellation or execution time**. Orders canceled or fully executed before this timestamp must be accessed via `GET /historical/orders`. Resting (active) orders are always available in `GET /portfolio/orders`.
+ description: >
+ Cutoff based on **order cancellation or execution time**. Orders
+ canceled or fully executed before this timestamp must be accessed
+ via `GET /historical/orders`. Resting (active) orders are always
+ available in `GET /portfolio/orders`.
market_positions_last_updated_ts:
type: string
format: date-time
- description: |
- Cutoff based on **position last-update time**. Settled positions archived from the live data set before this timestamp are served through the historical section of position reads.
-
+ description: >
+ Cutoff based on **position last-update time**. Settled positions
+ archived from the live data set before this timestamp are served
+ through the historical section of position reads.
GetUserDataTimestampResponse:
type: object
required:
@@ -4825,7 +5309,6 @@ components:
type: string
format: date-time
description: Timestamp when user data was last updated.
-
GetMarketCandlesticksResponse:
type: object
required:
@@ -4840,7 +5323,6 @@ components:
description: Array of candlestick data points for the specified time range.
items:
$ref: '#/components/schemas/MarketCandlestick'
-
GetEventCandlesticksResponse:
type: object
required:
@@ -4855,7 +5337,9 @@ components:
type: string
market_candlesticks:
type: array
- description: Array of market candlestick arrays, one for each market in the event.
+ description: >-
+ Array of market candlestick arrays, one for each market in the
+ event.
items:
type: array
items:
@@ -4863,8 +5347,9 @@ components:
adjusted_end_ts:
type: integer
format: int64
- description: Adjusted end timestamp if the requested candlesticks would be larger than maxAggregateCandidates.
-
+ description: >-
+ Adjusted end timestamp if the requested candlesticks would be larger
+ than maxAggregateCandidates.
BatchGetMarketCandlesticksResponse:
type: object
required:
@@ -4875,7 +5360,6 @@ components:
description: Array of market candlestick data, one entry per requested market.
items:
$ref: '#/components/schemas/MarketCandlesticksResponse'
-
MarketCandlesticksResponse:
type: object
required:
@@ -4887,10 +5371,11 @@ components:
description: Market ticker string (e.g., 'INXD-24JAN01').
candlesticks:
type: array
- description: Array of candlestick data points for the market. Includes an initial data point at the start timestamp when available.
+ description: >-
+ Array of candlestick data points for the market. Includes an initial
+ data point at the start timestamp when available.
items:
$ref: '#/components/schemas/MarketCandlestick'
-
MarketCandlestick:
type: object
required:
@@ -4907,20 +5392,29 @@ components:
description: Unix timestamp for the inclusive end of the candlestick period.
yes_bid:
$ref: '#/components/schemas/BidAskDistribution'
- description: Open, high, low, close (OHLC) data for YES buy offers on the market during the candlestick period.
+ description: >-
+ Open, high, low, close (OHLC) data for YES buy offers on the market
+ during the candlestick period.
yes_ask:
$ref: '#/components/schemas/BidAskDistribution'
- description: Open, high, low, close (OHLC) data for YES sell offers on the market during the candlestick period.
+ description: >-
+ Open, high, low, close (OHLC) data for YES sell offers on the market
+ during the candlestick period.
price:
$ref: '#/components/schemas/PriceDistribution'
- description: Open, high, low, close (OHLC) and more data for trade YES contract prices on the market during the candlestick period.
+ description: >-
+ Open, high, low, close (OHLC) and more data for trade YES contract
+ prices on the market during the candlestick period.
volume_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of contracts bought on the market during the candlestick period.
+ description: >-
+ String representation of the number of contracts bought on the
+ market during the candlestick period.
open_interest_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of contracts bought on the market by end of the candlestick period (end_period_ts).
-
+ description: >-
+ String representation of the number of contracts bought on the
+ market by end of the candlestick period (end_period_ts).
BidAskDistribution:
type: object
required:
@@ -4931,54 +5425,81 @@ components:
properties:
open_dollars:
$ref: '#/components/schemas/FixedPointDollars'
- description: Offer price on the market at the start of the candlestick period (in dollars).
+ description: >-
+ Offer price on the market at the start of the candlestick period (in
+ dollars).
low_dollars:
$ref: '#/components/schemas/FixedPointDollars'
- description: Lowest offer price on the market during the candlestick period (in dollars).
+ description: >-
+ Lowest offer price on the market during the candlestick period (in
+ dollars).
high_dollars:
$ref: '#/components/schemas/FixedPointDollars'
- description: Highest offer price on the market during the candlestick period (in dollars).
+ description: >-
+ Highest offer price on the market during the candlestick period (in
+ dollars).
close_dollars:
$ref: '#/components/schemas/FixedPointDollars'
- description: Offer price on the market at the end of the candlestick period (in dollars).
-
+ description: >-
+ Offer price on the market at the end of the candlestick period (in
+ dollars).
PriceDistribution:
type: object
properties:
open_dollars:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: First traded YES contract price on the market during the candlestick period (in dollars). May be null if there was no trade during the period.
+ description: >-
+ First traded YES contract price on the market during the candlestick
+ period (in dollars). May be null if there was no trade during the
+ period.
low_dollars:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Lowest traded YES contract price on the market during the candlestick period (in dollars). May be null if there was no trade during the period.
+ description: >-
+ Lowest traded YES contract price on the market during the
+ candlestick period (in dollars). May be null if there was no trade
+ during the period.
high_dollars:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Highest traded YES contract price on the market during the candlestick period (in dollars). May be null if there was no trade during the period.
+ description: >-
+ Highest traded YES contract price on the market during the
+ candlestick period (in dollars). May be null if there was no trade
+ during the period.
close_dollars:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Last traded YES contract price on the market during the candlestick period (in dollars). May be null if there was no trade during the period.
+ description: >-
+ Last traded YES contract price on the market during the candlestick
+ period (in dollars). May be null if there was no trade during the
+ period.
mean_dollars:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Mean traded YES contract price on the market during the candlestick period (in dollars). May be null if there was no trade during the period.
+ description: >-
+ Mean traded YES contract price on the market during the candlestick
+ period (in dollars). May be null if there was no trade during the
+ period.
previous_dollars:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Last traded YES contract price on the market before the candlestick period (in dollars). May be null if there were no trades before the period.
+ description: >-
+ Last traded YES contract price on the market before the candlestick
+ period (in dollars). May be null if there were no trades before the
+ period.
min_dollars:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Minimum close price of any market during the candlestick period (in dollars).
+ description: >-
+ Minimum close price of any market during the candlestick period (in
+ dollars).
max_dollars:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
- description: Maximum close price of any market during the candlestick period (in dollars).
-
- # Live Data schemas
+ description: >-
+ Maximum close price of any market during the candlestick period (in
+ dollars).
LiveData:
type: object
required:
@@ -4996,7 +5517,6 @@ components:
milestone_id:
type: string
description: Milestone ID
-
GetLiveDataResponse:
type: object
required:
@@ -5004,7 +5524,6 @@ components:
properties:
live_data:
$ref: '#/components/schemas/LiveData'
-
GetLiveDatasResponse:
type: object
required:
@@ -5014,13 +5533,11 @@ components:
type: array
items:
$ref: '#/components/schemas/LiveData'
-
GetGameStatsResponse:
type: object
properties:
pbp:
$ref: '#/components/schemas/PlayByPlay'
-
PlayByPlay:
type: object
description: Play-by-play data organized by period.
@@ -5035,7 +5552,6 @@ components:
items:
type: object
additionalProperties: true
-
IndexedBalance:
type: object
required:
@@ -5046,7 +5562,6 @@ components:
$ref: '#/components/schemas/ExchangeIndex'
balance:
$ref: '#/components/schemas/FixedPointDollars'
-
GetBalanceResponse:
type: object
required:
@@ -5058,14 +5573,20 @@ components:
balance:
type: integer
format: int64
- description: Member's available balance in cents. This represents the amount available for trading.
+ description: >-
+ Member's available balance in cents. This represents the amount
+ available for trading.
balance_dollars:
$ref: '#/components/schemas/FixedPointDollars'
- description: Member's available balance as a fixed-point dollar string. This represents the amount available for trading.
+ description: >-
+ Member's available balance as a fixed-point dollar string. This
+ represents the amount available for trading.
portfolio_value:
type: integer
format: int64
- description: Member's portfolio value in cents. This is the current value of all positions held.
+ description: >-
+ Member's portfolio value in cents. This is the current value of all
+ positions held.
updated_ts:
type: integer
format: int64
@@ -5075,18 +5596,16 @@ components:
items:
$ref: '#/components/schemas/IndexedBalance'
description: Balance broken down per exchange index.
-
CreateSubaccountRequest:
type: object
properties:
exchange_index:
allOf:
- $ref: '#/components/schemas/ExchangeIndex'
- description: "Identifier for an exchange shard. Defaults to 0 if unspecified."
+ description: Identifier for an exchange shard. Defaults to 0 if unspecified.
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
- validate: "gte=0"
-
+ validate: gte=0
CreateSubaccountResponse:
type: object
required:
@@ -5095,7 +5614,6 @@ components:
subaccount_number:
type: integer
description: The sequential number assigned to this subaccount (1-63).
-
ApplySubaccountTransferRequest:
type: object
required:
@@ -5109,13 +5627,17 @@ components:
format: uuid
description: Unique client-provided transfer ID for idempotency.
x-oapi-codegen-extra-tags:
- validate: "required"
+ validate: required
from_subaccount:
type: integer
- description: Source subaccount number (0 for primary, 1-63 for numbered subaccounts).
+ description: >-
+ Source subaccount number (0 for primary, 1-63 for numbered
+ subaccounts).
to_subaccount:
type: integer
- description: Destination subaccount number (0 for primary, 1-63 for numbered subaccounts).
+ description: >-
+ Destination subaccount number (0 for primary, 1-63 for numbered
+ subaccounts).
amount_cents:
type: integer
format: int64
@@ -5123,15 +5645,61 @@ components:
exchange_index:
allOf:
- $ref: '#/components/schemas/ExchangeIndex'
- description: "Identifier for an exchange shard. Defaults to 0 if unspecified."
+ description: Identifier for an exchange shard. Defaults to 0 if unspecified.
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
- validate: "gte=0"
-
+ validate: gte=0
ApplySubaccountTransferResponse:
type: object
description: Empty response indicating successful transfer.
-
+ LockSubaccountForSettlementAdvanceRequest:
+ type: object
+ required:
+ - subaccount_number
+ properties:
+ subaccount_number:
+ type: integer
+ nullable: true
+ description: Subaccount number (0 for primary, 1-63 for numbered subaccounts).
+ x-oapi-codegen-extra-tags:
+ validate: required
+ exchange_index:
+ allOf:
+ - $ref: '#/components/schemas/ExchangeIndex'
+ description: Identifier for an exchange shard. Defaults to 0 if unspecified.
+ x-go-type-skip-optional-pointer: true
+ x-oapi-codegen-extra-tags:
+ validate: gte=0
+ LockSubaccountForSettlementAdvanceResponse:
+ type: object
+ required:
+ - settlement_advance_state
+ properties:
+ settlement_advance_state:
+ type: string
+ format: uuid
+ description: New state token for settlement advance compare-and-swap requests.
+ UnlockSubaccountForSettlementAdvanceRequest:
+ type: object
+ required:
+ - subaccount_number
+ properties:
+ subaccount_number:
+ type: integer
+ nullable: true
+ description: Subaccount number (0 for primary, 1-63 for numbered subaccounts).
+ x-oapi-codegen-extra-tags:
+ validate: required
+ exchange_index:
+ allOf:
+ - $ref: '#/components/schemas/ExchangeIndex'
+ description: Identifier for an exchange shard. Defaults to 0 if unspecified.
+ x-go-type-skip-optional-pointer: true
+ x-oapi-codegen-extra-tags:
+ validate: gte=0
+ UnlockSubaccountForSettlementAdvanceResponse:
+ type: object
+ description: Empty response indicating the subaccount was unlocked successfully.
ApplySubaccountPositionTransferRequest:
type: object
required:
@@ -5146,47 +5714,57 @@ components:
client_transfer_id:
type: string
format: uuid
- description: Unique client-provided transfer ID for idempotency. Retrying with the same value returns 409.
+ description: >-
+ Unique client-provided transfer ID for idempotency. Retrying with
+ the same value returns 409.
x-oapi-codegen-extra-tags:
- validate: "required"
+ validate: required
from_subaccount:
type: integer
nullable: true
- description: Source subaccount number (0 for primary, 1-63 for numbered subaccounts).
+ description: >-
+ Source subaccount number (0 for primary, 1-63 for numbered
+ subaccounts).
x-oapi-codegen-extra-tags:
- validate: "required"
+ validate: required
to_subaccount:
type: integer
nullable: true
- description: Destination subaccount number (0 for primary, 1-63 for numbered subaccounts).
+ description: >-
+ Destination subaccount number (0 for primary, 1-63 for numbered
+ subaccounts).
x-oapi-codegen-extra-tags:
- validate: "required"
+ validate: required
market_ticker:
type: string
- description: Ticker of the market whose position is being moved. The market must be on exchange shard 0; markets on any other shard are rejected.
+ description: >-
+ Ticker of the market whose position is being moved. The market must
+ be on exchange shard 0; markets on any other shard are rejected.
x-oapi-codegen-extra-tags:
- validate: "required"
+ validate: required
side:
type: string
- enum: ["yes", "no"]
+ enum:
+ - 'yes'
+ - 'no'
description: Side of the position to move.
x-oapi-codegen-extra-tags:
- validate: "required"
+ validate: required
count:
type: integer
nullable: true
description: Number of contracts to move (must be greater than 0).
x-oapi-codegen-extra-tags:
- validate: "required"
+ validate: required
price:
$ref: '#/components/schemas/FixedPointDollars'
description: >-
- Per-contract price in fixed-point dollars (0 to 1.00 inclusive): the cash consideration the receiving
- subaccount pays the sending subaccount for the position.
- Always the YES-side price, even when `side` is `no`; a NO position transferred at `price` p carries a
+ Per-contract price in fixed-point dollars (0 to 1.00 inclusive): the
+ cash consideration the receiving subaccount pays the sending
+ subaccount for the position. Always the YES-side price, even when
+ `side` is `no`; a NO position transferred at `price` p carries a
per-contract NO-side value of 1.00 − p.
x-go-type-skip-optional-pointer: true
-
ApplySubaccountPositionTransferResponse:
type: object
required:
@@ -5195,7 +5773,6 @@ components:
position_transfer_id:
type: string
description: Server-generated identifier for the position transfer.
-
GetSubaccountBalancesResponse:
type: object
required:
@@ -5205,7 +5782,6 @@ components:
type: array
items:
$ref: '#/components/schemas/SubaccountBalance'
-
SubaccountBalance:
type: object
required:
@@ -5213,6 +5789,8 @@ components:
- exchange_index
- balance
- updated_ts
+ - voluntarily_locked
+ - settlement_advance
properties:
subaccount_number:
type: integer
@@ -5227,7 +5805,18 @@ components:
type: integer
format: int64
description: Unix timestamp of last balance update.
-
+ voluntarily_locked:
+ type: boolean
+ description: >-
+ Whether this subaccount is voluntarily locked for settlement advance
+ computation.
+ settlement_advance_state:
+ type: string
+ format: uuid
+ description: Current settlement advance state token, if one has been established.
+ settlement_advance:
+ $ref: '#/components/schemas/FixedPointDollars'
+ description: Outstanding settlement advance in dollars.
GetSubaccountTransfersResponse:
type: object
required:
@@ -5240,7 +5829,6 @@ components:
cursor:
type: string
description: Cursor for the next page of results.
-
SubaccountTransfer:
type: object
required:
@@ -5271,7 +5859,6 @@ components:
exchange_index:
type: integer
description: Exchange index the transfer was applied on.
-
UpdateSubaccountNettingRequest:
type: object
required:
@@ -5284,7 +5871,6 @@ components:
enabled:
type: boolean
description: Whether netting is enabled for this subaccount.
-
GetSubaccountNettingResponse:
type: object
required:
@@ -5294,7 +5880,6 @@ components:
type: array
items:
$ref: '#/components/schemas/SubaccountNettingConfig'
-
SubaccountNettingConfig:
type: object
required:
@@ -5311,8 +5896,6 @@ components:
exchange_index:
type: integer
description: Exchange index of the subaccount.
-
- # Portfolio schemas (specific to portfolio endpoints, not shared with IB)
GetSettlementsResponse:
type: object
required:
@@ -5324,7 +5907,6 @@ components:
$ref: '#/components/schemas/Settlement'
cursor:
type: string
-
Settlement:
type: object
required:
@@ -5347,36 +5929,47 @@ components:
description: The event ticker symbol of the market that was settled.
market_result:
type: string
- enum: ['yes', 'no', 'scalar']
- description: The outcome of the market settlement. 'yes' = market resolved to YES, 'no' = market resolved to NO, 'scalar' = scalar market settled at a specific value.
+ enum:
+ - 'yes'
+ - 'no'
+ - scalar
+ description: >-
+ The outcome of the market settlement. 'yes' = market resolved to
+ YES, 'no' = market resolved to NO, 'scalar' = scalar market settled
+ at a specific value.
yes_count_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of YES contracts owned at the time of settlement.
+ description: >-
+ String representation of the number of YES contracts owned at the
+ time of settlement.
yes_total_cost_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: Total cost basis of all YES contracts in fixed-point dollars.
no_count_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of NO contracts owned at the time of settlement.
+ description: >-
+ String representation of the number of NO contracts owned at the
+ time of settlement.
no_total_cost_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: Total cost basis of all NO contracts in fixed-point dollars.
revenue:
type: integer
- description: Total revenue earned from this settlement in cents (winning contracts pay out 100 cents each).
+ description: >-
+ Total revenue earned from this settlement in cents (winning
+ contracts pay out 100 cents each).
settled_time:
type: string
format: date-time
description: Timestamp when the market was settled and payouts were processed.
fee_cost:
$ref: '#/components/schemas/FixedPointDollars'
- example: "0.3400"
+ example: '0.3400'
description: Total fees paid in fixed point dollars.
value:
type: integer
nullable: true
description: Payout of a single yes contract in cents.
-
GetPortfolioRestingOrderTotalValueResponse:
type: object
required:
@@ -5385,7 +5978,6 @@ components:
total_resting_order_value:
type: integer
description: Total value of resting orders in cents
-
GetDepositsResponse:
type: object
required:
@@ -5397,7 +5989,6 @@ components:
$ref: '#/components/schemas/Deposit'
cursor:
type: string
-
Deposit:
type: object
required:
@@ -5418,7 +6009,9 @@ components:
- applied
- failed
- returned
- description: Current status of the deposit. 'applied' means funds are reflected in balance.
+ description: >-
+ Current status of the deposit. 'applied' means funds are reflected
+ in balance.
type:
type: string
enum:
@@ -5444,8 +6037,9 @@ components:
type: integer
format: int64
nullable: true
- description: Unix timestamp of when the deposit was finalized (applied, failed, or returned).
-
+ description: >-
+ Unix timestamp of when the deposit was finalized (applied, failed,
+ or returned).
GetWithdrawalsResponse:
type: object
required:
@@ -5457,7 +6051,6 @@ components:
$ref: '#/components/schemas/Withdrawal'
cursor:
type: string
-
Withdrawal:
type: object
required:
@@ -5478,7 +6071,9 @@ components:
- applied
- failed
- returned
- description: Current status of the withdrawal. 'applied' means funds have been deducted from balance.
+ description: >-
+ Current status of the withdrawal. 'applied' means funds have been
+ deducted from balance.
type:
type: string
enum:
@@ -5504,9 +6099,9 @@ components:
type: integer
format: int64
nullable: true
- description: Unix timestamp of when the withdrawal was finalized (applied, failed, or returned).
-
- # FCM schemas
+ description: >-
+ Unix timestamp of when the withdrawal was finalized (applied,
+ failed, or returned).
Order:
type: object
required:
@@ -5539,36 +6134,64 @@ components:
type: string
side:
type: string
- enum: ['yes', 'no']
+ enum:
+ - 'yes'
+ - 'no'
deprecated: true
x-go-type-skip-optional-pointer: true
- description: |
- Deprecated. Use `outcome_side` (or `book_side`) instead. See [Order direction](/getting_started/order_direction). This field will not be removed before May 14, 2026.
+ description: >
+ Deprecated. Use `outcome_side` (or `book_side`) instead. See [Order
+ direction](/getting_started/order_direction). This field will not be
+ removed before May 14, 2026.
action:
type: string
- enum: [buy, sell]
+ enum:
+ - buy
+ - sell
deprecated: true
x-go-type-skip-optional-pointer: true
- description: |
- Deprecated. Use `outcome_side` (or `book_side`) instead. See [Order direction](/getting_started/order_direction). This field will not be removed before May 14, 2026.
+ description: >
+ Deprecated. Use `outcome_side` (or `book_side`) instead. See [Order
+ direction](/getting_started/order_direction). This field will not be
+ removed before May 14, 2026.
outcome_side:
type: string
- enum: ['yes', 'no']
- description: |
- The outcome side this order is positioned for. buy-yes and sell-no produce 'yes'; buy-no and sell-yes produce 'no'.
+ enum:
+ - 'yes'
+ - 'no'
+ description: >
+ The outcome side this order is positioned for. buy-yes and sell-no
+ produce 'yes'; buy-no and sell-yes produce 'no'.
+
- `outcome_side` describes directional exposure only; it does not change the order's price. An order at price `p` with `outcome_side=no` is matched by an order at the same price `p` with `outcome_side=yes` — both parties trade at the same price, just on opposite directions.
+ `outcome_side` describes directional exposure only; it does not
+ change the order's price. An order at price `p` with
+ `outcome_side=no` is matched by an order at the same price `p` with
+ `outcome_side=yes` — both parties trade at the same price, just on
+ opposite directions.
- `outcome_side` and `book_side` will become the canonical way to determine order direction. The legacy `action`, `side`, and `is_yes` fields will be deprecated in a future release — please migrate to these new fields.
+
+ `outcome_side` and `book_side` will become the canonical way to
+ determine order direction. The legacy `action`, `side`, and `is_yes`
+ fields will be deprecated in a future release — please migrate to
+ these new fields.
book_side:
$ref: '#/components/schemas/BookSide'
- description: |
- Same directional bit as outcome_side in book vocabulary. 'bid' is equivalent to outcome_side 'yes'; 'ask' is equivalent to outcome_side 'no'.
+ description: >
+ Same directional bit as outcome_side in book vocabulary. 'bid' is
+ equivalent to outcome_side 'yes'; 'ask' is equivalent to
+ outcome_side 'no'.
+
- `outcome_side` and `book_side` will become the canonical way to determine order direction. The legacy `action`, `side`, and `is_yes` fields will be deprecated in a future release — please migrate to these new fields.
+ `outcome_side` and `book_side` will become the canonical way to
+ determine order direction. The legacy `action`, `side`, and `is_yes`
+ fields will be deprecated in a future release — please migrate to
+ these new fields.
type:
type: string
- enum: [limit, market]
+ enum:
+ - limit
+ - market
status:
$ref: '#/components/schemas/OrderStatus'
yes_price_dollars:
@@ -5579,13 +6202,17 @@ components:
description: The no price for this order in fixed-point dollars
fill_count_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of contracts that have been filled
+ description: >-
+ String representation of the number of contracts that have been
+ filled
remaining_count_fp:
$ref: '#/components/schemas/FixedPointCount'
description: String representation of the remaining contracts for this order
initial_count_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the initial size of the order (contract units)
+ description: >-
+ String representation of the initial size of the order (contract
+ units)
taker_fill_cost_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: The cost of filled taker orders in dollars
@@ -5623,7 +6250,9 @@ components:
description: The order group this order is part of
cancel_order_on_pause:
type: boolean
- description: If this flag is set to true, the order will be canceled if the order is open and trading on the exchange is paused for any reason.
+ description: >-
+ If this flag is set to true, the order will be canceled if the order
+ is open and trading on the exchange is paused for any reason.
subaccount_number:
type: integer
nullable: true
@@ -5634,7 +6263,6 @@ components:
- $ref: '#/components/schemas/ExchangeIndex'
x-go-type-skip-optional-pointer: true
x-omitempty: false
-
Milestone:
type: object
required:
@@ -5654,11 +6282,14 @@ components:
description: Unique identifier for the milestone.
category:
type: string
- description: 'Category of the milestone. E.g. Sports, Elections, Esports, Crypto.'
+ description: Category of the milestone. E.g. Sports, Elections, Esports, Crypto.
example: Sports
type:
type: string
- description: 'Type of the milestone. E.g. football_game, basketball_game, soccer_tournament_multi_leg, baseball_game, hockey_match, golf_tournament, political_race.'
+ description: >-
+ Type of the milestone. E.g. football_game, basketball_game,
+ soccer_tournament_multi_leg, baseball_game, hockey_match,
+ golf_tournament, political_race.
example: football_game
start_date:
type: string
@@ -5697,12 +6328,13 @@ components:
type: array
items:
type: string
- description: List of event tickers directly related to the outcome of this milestone.
+ description: >-
+ List of event tickers directly related to the outcome of this
+ milestone.
last_updated_ts:
type: string
format: date-time
description: Last time this structured target was updated.
-
GetMilestoneResponse:
type: object
required:
@@ -5711,7 +6343,6 @@ components:
milestone:
$ref: '#/components/schemas/Milestone'
description: The milestone data.
-
GetMilestonesResponse:
type: object
required:
@@ -5725,7 +6356,6 @@ components:
cursor:
type: string
description: Cursor for pagination.
-
GetOrdersResponse:
type: object
required:
@@ -5738,7 +6368,6 @@ components:
$ref: '#/components/schemas/Order'
cursor:
type: string
-
GetOrderQueuePositionResponse:
type: object
required:
@@ -5747,7 +6376,6 @@ components:
queue_position_fp:
$ref: '#/components/schemas/FixedPointCount'
description: The number of preceding shares before the order in the queue.
-
OrderQueuePosition:
type: object
required:
@@ -5764,7 +6392,6 @@ components:
queue_position_fp:
$ref: '#/components/schemas/FixedPointCount'
description: The number of preceding shares before the order in the queue.
-
GetOrderQueuePositionsResponse:
type: object
required:
@@ -5775,7 +6402,6 @@ components:
description: Queue positions for all matching orders
items:
$ref: '#/components/schemas/OrderQueuePosition'
-
MarketPosition:
type: object
required:
@@ -5796,7 +6422,9 @@ components:
description: Total spent on this market in dollars
position_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of contracts bought in this market. Negative means NO contracts and positive means YES contracts
+ description: >-
+ String representation of the number of contracts bought in this
+ market. Negative means NO contracts and positive means YES contracts
market_exposure_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: Cost of the aggregate market position in dollars
@@ -5810,7 +6438,6 @@ components:
type: string
format: date-time
description: Last time the position is updated
-
EventPosition:
type: object
required:
@@ -5829,7 +6456,9 @@ components:
description: Total spent on this event in dollars
total_cost_shares_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the total number of shares traded on this event (including both YES and NO contracts)
+ description: >-
+ String representation of the total number of shares traded on this
+ event (including both YES and NO contracts)
event_exposure_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: Cost of the aggregate event position in dollars
@@ -5839,7 +6468,6 @@ components:
fees_paid_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: Fees paid on fill orders, in dollars
-
GetPositionsResponse:
type: object
required:
@@ -5848,7 +6476,12 @@ components:
properties:
cursor:
type: string
- description: The Cursor represents a pointer to the next page of records in the pagination. Use the value returned here in the cursor query parameter for this end-point to get the next page containing limit records. An empty value of this field indicates there is no next page.
+ description: >-
+ The Cursor represents a pointer to the next page of records in the
+ pagination. Use the value returned here in the cursor query
+ parameter for this end-point to get the next page containing limit
+ records. An empty value of this field indicates there is no next
+ page.
market_positions:
type: array
items:
@@ -5859,7 +6492,6 @@ components:
items:
$ref: '#/components/schemas/EventPosition'
description: List of event positions
-
Trade:
type: object
required:
@@ -5881,7 +6513,9 @@ components:
description: Unique identifier for the market
count_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of contracts bought or sold in this trade
+ description: >-
+ String representation of the number of contracts bought or sold in
+ this trade
yes_price_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: Yes price for this trade in dollars
@@ -5890,36 +6524,64 @@ components:
description: No price for this trade in dollars
taker_side:
type: string
- enum: ['yes', 'no']
- x-enum-varnames: ['TradeTakerSideYes', 'TradeTakerSideNo']
+ enum:
+ - 'yes'
+ - 'no'
+ x-enum-varnames:
+ - TradeTakerSideYes
+ - TradeTakerSideNo
deprecated: true
x-go-type-skip-optional-pointer: true
- description: |
- Deprecated. Use `taker_outcome_side` (or `taker_book_side`) instead. See [Order direction](/getting_started/order_direction). This field will not be removed before May 14, 2026.
+ description: >
+ Deprecated. Use `taker_outcome_side` (or `taker_book_side`) instead.
+ See [Order direction](/getting_started/order_direction). This field
+ will not be removed before May 14, 2026.
taker_outcome_side:
type: string
- enum: ['yes', 'no']
- x-enum-varnames: ['TradeTakerOutcomeSideYes', 'TradeTakerOutcomeSideNo']
- description: |
- The outcome side the taker is positioned for. buy-yes and sell-no produce 'yes'; buy-no and sell-yes produce 'no'.
-
- `taker_outcome_side` describes directional exposure only; it does not change the trade's price. A trade at price `p` with `taker_outcome_side=no` is matched against the maker at the same price `p` with the opposite direction — both parties trade at the same price.
-
- `taker_outcome_side` and `taker_book_side` will become the canonical way to determine trade direction. The legacy `taker_side` field will be deprecated in a future release — please migrate to these new fields.
+ enum:
+ - 'yes'
+ - 'no'
+ x-enum-varnames:
+ - TradeTakerOutcomeSideYes
+ - TradeTakerOutcomeSideNo
+ description: >
+ The outcome side the taker is positioned for. buy-yes and sell-no
+ produce 'yes'; buy-no and sell-yes produce 'no'.
+
+
+ `taker_outcome_side` describes directional exposure only; it does
+ not change the trade's price. A trade at price `p` with
+ `taker_outcome_side=no` is matched against the maker at the same
+ price `p` with the opposite direction — both parties trade at the
+ same price.
+
+
+ `taker_outcome_side` and `taker_book_side` will become the canonical
+ way to determine trade direction. The legacy `taker_side` field will
+ be deprecated in a future release — please migrate to these new
+ fields.
taker_book_side:
$ref: '#/components/schemas/BookSide'
- description: |
- Same directional bit as taker_outcome_side in book vocabulary. 'bid' is equivalent to taker_outcome_side 'yes'; 'ask' is equivalent to taker_outcome_side 'no'.
+ description: >
+ Same directional bit as taker_outcome_side in book vocabulary. 'bid'
+ is equivalent to taker_outcome_side 'yes'; 'ask' is equivalent to
+ taker_outcome_side 'no'.
+
- `taker_outcome_side` and `taker_book_side` will become the canonical way to determine trade direction. The legacy `taker_side` field will be deprecated in a future release — please migrate to these new fields.
+ `taker_outcome_side` and `taker_book_side` will become the canonical
+ way to determine trade direction. The legacy `taker_side` field will
+ be deprecated in a future release — please migrate to these new
+ fields.
created_time:
type: string
format: date-time
description: Timestamp when this trade was executed
is_block_trade:
type: boolean
- description: True if this trade was matched off-book as a block trade (e.g. via RFQ / negotiated block proposal); false for trades that filled on the standard order book.
-
+ description: >-
+ True if this trade was matched off-book as a block trade (e.g. via
+ RFQ / negotiated block proposal); false for trades that filled on
+ the standard order book.
GetIncentiveProgramsResponse:
type: object
required:
@@ -5932,7 +6594,6 @@ components:
next_cursor:
type: string
description: Cursor for pagination to get the next page of results
-
IncentiveProgram:
type: object
required:
@@ -5951,13 +6612,19 @@ components:
description: Unique identifier for the incentive program
market_id:
type: string
- description: The unique identifier of the market associated with this incentive program
+ description: >-
+ The unique identifier of the market associated with this incentive
+ program
market_ticker:
type: string
- description: The ticker symbol of the market associated with this incentive program
+ description: >-
+ The ticker symbol of the market associated with this incentive
+ program
incentive_type:
type: string
- enum: ['liquidity', 'volume']
+ enum:
+ - liquidity
+ - volume
description: Type of incentive program
incentive_description:
type: string
@@ -5985,8 +6652,9 @@ components:
target_size_fp:
$ref: '#/components/schemas/FixedPointCount'
nullable: true
- description: String representation of the target size for the incentive program (optional)
-
+ description: >-
+ String representation of the target size for the incentive program
+ (optional)
GetTradesResponse:
type: object
required:
@@ -5999,7 +6667,6 @@ components:
$ref: '#/components/schemas/Trade'
cursor:
type: string
-
Fill:
type: object
required:
@@ -6033,36 +6700,64 @@ components:
description: Unique identifier for the market (legacy field name, same as ticker)
side:
type: string
- enum: ['yes', 'no']
+ enum:
+ - 'yes'
+ - 'no'
deprecated: true
x-go-type-skip-optional-pointer: true
- description: |
- Deprecated. Use `outcome_side` (or `book_side`) instead. See [Order direction](/getting_started/order_direction). This field will not be removed before May 14, 2026.
+ description: >
+ Deprecated. Use `outcome_side` (or `book_side`) instead. See [Order
+ direction](/getting_started/order_direction). This field will not be
+ removed before May 14, 2026.
action:
type: string
- enum: ['buy', 'sell']
+ enum:
+ - buy
+ - sell
deprecated: true
x-go-type-skip-optional-pointer: true
- description: |
- Deprecated. Use `outcome_side` (or `book_side`) instead. See [Order direction](/getting_started/order_direction). This field will not be removed before May 14, 2026.
+ description: >
+ Deprecated. Use `outcome_side` (or `book_side`) instead. See [Order
+ direction](/getting_started/order_direction). This field will not be
+ removed before May 14, 2026.
outcome_side:
type: string
- enum: ['yes', 'no']
- description: |
- The outcome side this fill positioned the user for. buy-yes and sell-no produce 'yes'; buy-no and sell-yes produce 'no'.
+ enum:
+ - 'yes'
+ - 'no'
+ description: >
+ The outcome side this fill positioned the user for. buy-yes and
+ sell-no produce 'yes'; buy-no and sell-yes produce 'no'.
+
- `outcome_side` describes directional exposure only; it does not change the fill's price. A fill at price `p` with `outcome_side=no` is matched against an order at the same price `p` with `outcome_side=yes` — both parties trade at the same price, just on opposite directions.
+ `outcome_side` describes directional exposure only; it does not
+ change the fill's price. A fill at price `p` with `outcome_side=no`
+ is matched against an order at the same price `p` with
+ `outcome_side=yes` — both parties trade at the same price, just on
+ opposite directions.
- `outcome_side` and `book_side` will become the canonical way to determine fill direction. The legacy `action` and `side` fields will be deprecated in a future release — please migrate to these new fields.
+
+ `outcome_side` and `book_side` will become the canonical way to
+ determine fill direction. The legacy `action` and `side` fields will
+ be deprecated in a future release — please migrate to these new
+ fields.
book_side:
$ref: '#/components/schemas/BookSide'
- description: |
- Same directional bit as outcome_side in book vocabulary. 'bid' is equivalent to outcome_side 'yes'; 'ask' is equivalent to outcome_side 'no'.
+ description: >
+ Same directional bit as outcome_side in book vocabulary. 'bid' is
+ equivalent to outcome_side 'yes'; 'ask' is equivalent to
+ outcome_side 'no'.
- `outcome_side` and `book_side` will become the canonical way to determine fill direction. The legacy `action` and `side` fields will be deprecated in a future release — please migrate to these new fields.
+
+ `outcome_side` and `book_side` will become the canonical way to
+ determine fill direction. The legacy `action` and `side` fields will
+ be deprecated in a future release — please migrate to these new
+ fields.
count_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of contracts bought or sold in this fill
+ description: >-
+ String representation of the number of contracts bought or sold in
+ this fill
yes_price_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: Fill price for the yes side in fixed-point dollars
@@ -6071,7 +6766,9 @@ components:
description: Fill price for the no side in fixed-point dollars
is_taker:
type: boolean
- description: If true, this fill was a taker (removed liquidity from the order book)
+ description: >-
+ If true, this fill was a taker (removed liquidity from the order
+ book)
created_time:
type: string
format: date-time
@@ -6083,12 +6780,13 @@ components:
type: integer
nullable: true
x-omitempty: true
- description: Subaccount number (0 for primary, 1-63 for subaccounts). Present for direct users.
+ description: >-
+ Subaccount number (0 for primary, 1-63 for subaccounts). Present for
+ direct users.
ts:
type: integer
format: int64
description: Unix timestamp when this fill was executed (legacy field name)
-
GetFillsResponse:
type: object
required:
@@ -6101,8 +6799,6 @@ components:
$ref: '#/components/schemas/Fill'
cursor:
type: string
-
- # Structured Target schemas
StructuredTarget:
type: object
properties:
@@ -6117,10 +6813,14 @@ components:
description: Type of the structured target.
details:
type: object
- description: Additional details about the structured target. Contains flexible JSON data specific to the target type.
+ description: >-
+ Additional details about the structured target. Contains flexible
+ JSON data specific to the target type.
source_id:
type: string
- description: External source identifier for the structured target, if available (e.g., third-party data provider ID).
+ description: >-
+ External source identifier for the structured target, if available
+ (e.g., third-party data provider ID).
source_ids:
type: object
additionalProperties:
@@ -6130,7 +6830,6 @@ components:
type: string
format: date-time
description: Timestamp when this structured target was last updated.
-
GetStructuredTargetsResponse:
type: object
properties:
@@ -6140,19 +6839,17 @@ components:
$ref: '#/components/schemas/StructuredTarget'
cursor:
type: string
- description: Pagination cursor for the next page. Empty if there are no more results.
-
+ description: >-
+ Pagination cursor for the next page. Empty if there are no more
+ results.
GetStructuredTargetResponse:
type: object
properties:
structured_target:
$ref: '#/components/schemas/StructuredTarget'
-
- # Order Group schemas
EmptyResponse:
type: object
description: An empty response body
-
IntraExchangeInstanceTransferRequest:
type: object
required:
@@ -6180,7 +6877,6 @@ components:
default: 0
x-go-type-skip-optional-pointer: true
description: Destination exchange shard index (default 0)
-
IntraExchangeInstanceTransferResponse:
type: object
required:
@@ -6189,7 +6885,6 @@ components:
transfer_id:
type: string
description: The ID of the transfer that was created
-
OrderGroup:
type: object
required:
@@ -6202,7 +6897,9 @@ components:
x-go-type-skip-optional-pointer: true
contracts_limit_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the current maximum contracts allowed over a rolling 15-second window.
+ description: >-
+ String representation of the current maximum contracts allowed over
+ a rolling 15-second window.
x-go-type-skip-optional-pointer: true
is_auto_cancel_enabled:
type: boolean
@@ -6213,7 +6910,6 @@ components:
- $ref: '#/components/schemas/ExchangeIndex'
x-go-type-skip-optional-pointer: true
x-omitempty: false
-
GetOrderGroupsResponse:
type: object
properties:
@@ -6222,7 +6918,6 @@ components:
items:
$ref: '#/components/schemas/OrderGroup'
x-go-type-skip-optional-pointer: true
-
GetOrderGroupResponse:
type: object
required:
@@ -6234,7 +6929,9 @@ components:
description: Whether auto-cancel is enabled for this order group
contracts_limit_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the current maximum contracts allowed over a rolling 15-second window.
+ description: >-
+ String representation of the current maximum contracts allowed over
+ a rolling 15-second window.
x-go-type-skip-optional-pointer: true
orders:
type: array
@@ -6247,34 +6944,42 @@ components:
- $ref: '#/components/schemas/ExchangeIndex'
x-go-type-skip-optional-pointer: true
x-omitempty: false
-
CreateOrderGroupRequest:
type: object
properties:
subaccount:
type: integer
minimum: 0
- description: Optional subaccount number to use for this order group (0 for primary, 1-63 for subaccounts)
+ description: >-
+ Optional subaccount number to use for this order group (0 for
+ primary, 1-63 for subaccounts)
default: 0
x-go-type-skip-optional-pointer: true
contracts_limit:
type: integer
format: int64
minimum: 1
- description: Specifies the maximum number of contracts that can be matched within this group over a rolling 15-second window. Whole contracts only. Provide contracts_limit or contracts_limit_fp; if both provided they must match.
+ description: >-
+ Specifies the maximum number of contracts that can be matched within
+ this group over a rolling 15-second window. Whole contracts only.
+ Provide contracts_limit or contracts_limit_fp; if both provided they
+ must match.
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
validate: omitempty,gte=1
contracts_limit_fp:
$ref: '#/components/schemas/FixedPointCount'
nullable: true
- description: String representation of the maximum number of contracts that can be matched within this group over a rolling 15-second window. Provide contracts_limit or contracts_limit_fp; if both provided they must match.
+ description: >-
+ String representation of the maximum number of contracts that can be
+ matched within this group over a rolling 15-second window. Provide
+ contracts_limit or contracts_limit_fp; if both provided they must
+ match.
exchange_index:
allOf:
- $ref: '#/components/schemas/ExchangeIndex'
default: 0
x-go-type-skip-optional-pointer: true
-
UpdateOrderGroupLimitRequest:
type: object
properties:
@@ -6282,15 +6987,22 @@ components:
type: integer
format: int64
minimum: 1
- description: New maximum number of contracts that can be matched within this group over a rolling 15-second window. Whole contracts only. Provide contracts_limit or contracts_limit_fp; if both provided they must match.
+ description: >-
+ New maximum number of contracts that can be matched within this
+ group over a rolling 15-second window. Whole contracts only. Provide
+ contracts_limit or contracts_limit_fp; if both provided they must
+ match.
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
validate: omitempty,gte=1
contracts_limit_fp:
$ref: '#/components/schemas/FixedPointCount'
nullable: true
- description: String representation of the new maximum number of contracts that can be matched within this group over a rolling 15-second window. Provide contracts_limit or contracts_limit_fp; if both provided they must match.
-
+ description: >-
+ String representation of the new maximum number of contracts that
+ can be matched within this group over a rolling 15-second window.
+ Provide contracts_limit or contracts_limit_fp; if both provided they
+ must match.
CreateOrderGroupResponse:
type: object
required:
@@ -6303,14 +7015,15 @@ components:
subaccount:
type: integer
minimum: 0
- description: Subaccount number that owns the created order group (0 for primary, 1-63 for subaccounts).
+ description: >-
+ Subaccount number that owns the created order group (0 for primary,
+ 1-63 for subaccounts).
x-go-type-skip-optional-pointer: true
exchange_index:
allOf:
- $ref: '#/components/schemas/ExchangeIndex'
x-go-type-skip-optional-pointer: true
x-omitempty: false
-
GetCommunicationsIDResponse:
type: object
required:
@@ -6319,7 +7032,6 @@ components:
communications_id:
type: string
description: A public communications ID which is used to identify the user
-
BlockTradeProposal:
type: object
required:
@@ -6346,17 +7058,25 @@ components:
description: User ID of the proposal creator
buyer_user_id:
type: string
- description: User ID of the buyer. Empty when the authenticated user is not the buyer.
+ description: >-
+ User ID of the buyer. Empty when the authenticated user is not the
+ buyer.
buyer_subtrader_id:
type: string
- description: Subtrader ID of the buyer. Empty when the authenticated user is not the buyer.
+ description: >-
+ Subtrader ID of the buyer. Empty when the authenticated user is not
+ the buyer.
x-go-type-skip-optional-pointer: true
seller_user_id:
type: string
- description: User ID of the seller. Empty when the authenticated user is not the seller.
+ description: >-
+ User ID of the seller. Empty when the authenticated user is not the
+ seller.
seller_subtrader_id:
type: string
- description: Subtrader ID of the seller. Empty when the authenticated user is not the seller.
+ description: >-
+ Subtrader ID of the seller. Empty when the authenticated user is not
+ the seller.
x-go-type-skip-optional-pointer: true
market_ticker:
type: string
@@ -6372,7 +7092,9 @@ components:
maker_side:
type: string
description: The maker side of the trade
- enum: ['yes', 'no']
+ enum:
+ - 'yes'
+ - 'no'
expiration_ts:
type: string
format: date-time
@@ -6414,7 +7136,6 @@ components:
type: string
description: Order ID for the seller after the proposal is executed
x-go-type-skip-optional-pointer: true
-
GetBlockTradeProposalsResponse:
type: object
required:
@@ -6429,7 +7150,6 @@ components:
type: string
description: Cursor for pagination to get the next page of results
x-go-type-skip-optional-pointer: true
-
ProposeBlockTradeRequest:
type: object
required:
@@ -6448,13 +7168,18 @@ components:
validate: required
buyer_subtrader_id:
type: string
- description: Subtrader ID of the buyer. Provide either this or buyer_subaccount, not both.
+ description: >-
+ Subtrader ID of the buyer. Provide either this or buyer_subaccount,
+ not both.
x-go-type-skip-optional-pointer: true
buyer_subaccount:
type: integer
minimum: 0
maximum: 63
- description: User-managed subaccount number of the buyer (0 for primary, 1-63 for numbered subaccounts). Provide either this or buyer_subtrader_id, not both.
+ description: >-
+ User-managed subaccount number of the buyer (0 for primary, 1-63 for
+ numbered subaccounts). Provide either this or buyer_subtrader_id,
+ not both.
seller_user_id:
type: string
description: User ID of the seller
@@ -6462,13 +7187,18 @@ components:
validate: required
seller_subtrader_id:
type: string
- description: Subtrader ID of the seller. Provide either this or seller_subaccount, not both.
+ description: >-
+ Subtrader ID of the seller. Provide either this or
+ seller_subaccount, not both.
x-go-type-skip-optional-pointer: true
seller_subaccount:
type: integer
minimum: 0
maximum: 63
- description: User-managed subaccount number of the seller (0 for primary, 1-63 for numbered subaccounts). Provide either this or seller_subtrader_id, not both.
+ description: >-
+ User-managed subaccount number of the seller (0 for primary, 1-63
+ for numbered subaccounts). Provide either this or
+ seller_subtrader_id, not both.
market_ticker:
type: string
description: The ticker of the market for this block trade
@@ -6491,7 +7221,9 @@ components:
maker_side:
type: string
description: The maker side of the trade
- enum: ['yes', 'no']
+ enum:
+ - 'yes'
+ - 'no'
x-oapi-codegen-extra-tags:
validate: required,oneof=yes no
expiration_ts:
@@ -6500,7 +7232,6 @@ components:
description: Expiration time of the proposal
x-oapi-codegen-extra-tags:
validate: required
-
ProposeBlockTradeResponse:
type: object
required:
@@ -6509,20 +7240,23 @@ components:
block_trade_proposal_id:
type: string
description: The ID of the newly created block trade proposal
-
AcceptBlockTradeProposalRequest:
type: object
properties:
subtrader_id:
type: string
- description: Subtrader ID to accept as. Provide either this or subaccount, not both.
+ description: >-
+ Subtrader ID to accept as. Provide either this or subaccount, not
+ both.
x-go-type-skip-optional-pointer: true
subaccount:
type: integer
minimum: 0
maximum: 63
- description: User-managed subaccount number to accept as (0 for primary, 1-63 for numbered subaccounts). Provide either this or subtrader_id, not both.
-
+ description: >-
+ User-managed subaccount number to accept as (0 for primary, 1-63 for
+ numbered subaccounts). Provide either this or subtrader_id, not
+ both.
RFQ:
type: object
required:
@@ -6544,14 +7278,18 @@ components:
description: The ticker of the market this RFQ is for
contracts_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of contracts requested in the RFQ
+ description: >-
+ String representation of the number of contracts requested in the
+ RFQ
target_cost_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: Total value of the RFQ in dollars
status:
type: string
description: Current status of the RFQ (open, closed)
- enum: [open, closed]
+ enum:
+ - open
+ - closed
created_ts:
type: string
format: date-time
@@ -6580,7 +7318,9 @@ components:
x-go-type-skip-optional-pointer: true
creator_subaccount:
type: integer
- description: Subaccount number of the RFQ creator (visible when the caller is the RFQ creator)
+ description: >-
+ Subaccount number of the RFQ creator (visible when the caller is the
+ RFQ creator)
cancelled_ts:
type: string
format: date-time
@@ -6589,7 +7329,6 @@ components:
type: string
format: date-time
description: Timestamp when the RFQ was last updated
-
GetRFQsResponse:
type: object
required:
@@ -6604,7 +7343,6 @@ components:
type: string
description: Cursor for pagination to get the next page of results
x-go-type-skip-optional-pointer: true
-
GetRFQResponse:
type: object
required:
@@ -6613,7 +7351,6 @@ components:
rfq:
$ref: '#/components/schemas/RFQ'
description: The details of the requested RFQ
-
CreateRFQRequest:
type: object
required:
@@ -6625,16 +7362,23 @@ components:
description: The ticker of the market for which to create an RFQ
contracts:
type: integer
- description: Whole-contract count for the RFQ. Use contracts_fp for partial contract values; if both are provided, they must match.
+ description: >-
+ Whole-contract count for the RFQ. Use contracts_fp for partial
+ contract values; if both are provided, they must match.
x-go-type-skip-optional-pointer: true
contracts_fp:
$ref: '#/components/schemas/FixedPointCount'
nullable: true
- description: Fixed-point number of contracts for the RFQ. Supports partial contracts in 0.01-contract increments; if contracts is also provided, both values must match.
+ description: >-
+ Fixed-point number of contracts for the RFQ. Supports partial
+ contracts in 0.01-contract increments; if contracts is also
+ provided, both values must match.
target_cost_centi_cents:
type: integer
format: int64
- description: 'DEPRECATED: The target cost for the RFQ in centi-cents. Use target_cost_dollars instead.'
+ description: >-
+ DEPRECATED: The target cost for the RFQ in centi-cents. Use
+ target_cost_dollars instead.
deprecated: true
x-go-type-skip-optional-pointer: true
target_cost_dollars:
@@ -6655,9 +7399,10 @@ components:
x-go-type-skip-optional-pointer: true
subaccount:
type: integer
- description: The subaccount number to create the RFQ for (direct members only; 0 for primary, 1-63 for subaccounts)
+ description: >-
+ The subaccount number to create the RFQ for (direct members only; 0
+ for primary, 1-63 for subaccounts)
x-go-type-skip-optional-pointer: true
-
CreateRFQResponse:
type: object
required:
@@ -6666,7 +7411,6 @@ components:
id:
type: string
description: The ID of the newly created RFQ
-
Quote:
type: object
required:
@@ -6718,11 +7462,18 @@ components:
status:
type: string
description: Current status of the quote
- enum: [open, accepted, confirmed, executed, cancelled]
+ enum:
+ - open
+ - accepted
+ - confirmed
+ - executed
+ - cancelled
accepted_side:
type: string
description: The side that was accepted (yes or no)
- enum: ['yes', 'no']
+ enum:
+ - 'yes'
+ - 'no'
accepted_ts:
type: string
format: date-time
@@ -6744,7 +7495,9 @@ components:
description: Whether to rest the remainder of the quote after execution
post_only:
type: boolean
- description: Whether the quote creator's order is post-only (visible when the caller is the quote creator)
+ description: >-
+ Whether the quote creator's order is post-only (visible when the
+ caller is the quote creator)
cancellation_reason:
type: string
description: Reason for quote cancellation if cancelled
@@ -6770,17 +7523,20 @@ components:
x-go-type-skip-optional-pointer: true
creator_subaccount:
type: integer
- description: Subaccount number of the quote creator (visible when the caller is the quote creator)
+ description: >-
+ Subaccount number of the quote creator (visible when the caller is
+ the quote creator)
rfq_creator_subaccount:
type: integer
- description: Subaccount number of the RFQ creator (visible when the caller is the RFQ creator)
+ description: >-
+ Subaccount number of the RFQ creator (visible when the caller is the
+ RFQ creator)
yes_contracts_fp:
$ref: '#/components/schemas/FixedPointCount'
description: Number of YES contracts offered in the quote (fixed-point)
no_contracts_fp:
$ref: '#/components/schemas/FixedPointCount'
description: Number of NO contracts offered in the quote (fixed-point)
-
GetQuotesResponse:
type: object
required:
@@ -6795,7 +7551,6 @@ components:
type: string
description: Cursor for pagination to get the next page of results
x-go-type-skip-optional-pointer: true
-
GetQuoteResponse:
type: object
required:
@@ -6804,7 +7559,6 @@ components:
quote:
$ref: '#/components/schemas/Quote'
description: The details of the requested quote
-
CreateQuoteRequest:
type: object
required:
@@ -6829,11 +7583,14 @@ components:
description: Whether to rest the remainder of the quote after execution
post_only:
type: boolean
- description: If true, the quote creator's resting order will be cancelled rather than crossed if it would take liquidity. Defaults to false.
+ description: >-
+ If true, the quote creator's resting order will be cancelled rather
+ than crossed if it would take liquidity. Defaults to false.
subaccount:
type: integer
- description: Optional subaccount number to place the quote under (0 for primary, 1-63 for subaccounts)
-
+ description: >-
+ Optional subaccount number to place the quote under (0 for primary,
+ 1-63 for subaccounts)
CreateQuoteResponse:
type: object
required:
@@ -6842,7 +7599,6 @@ components:
id:
type: string
description: The ID of the newly created quote
-
AcceptQuoteRequest:
type: object
required:
@@ -6851,9 +7607,9 @@ components:
accepted_side:
type: string
description: The side of the quote to accept (yes or no)
- enum: ['yes', 'no']
-
- # Order schemas
+ enum:
+ - 'yes'
+ - 'no'
GetOrderResponse:
type: object
required:
@@ -6861,7 +7617,6 @@ components:
properties:
order:
$ref: '#/components/schemas/Order'
-
CreateOrderRequest:
type: object
required:
@@ -6878,25 +7633,33 @@ components:
x-go-type-skip-optional-pointer: true
side:
type: string
- enum: ['yes', 'no']
+ enum:
+ - 'yes'
+ - 'no'
x-oapi-codegen-extra-tags:
validate: required,oneof=yes no
action:
type: string
- enum: ['buy', 'sell']
+ enum:
+ - buy
+ - sell
x-oapi-codegen-extra-tags:
validate: required,oneof=buy sell
count:
type: integer
minimum: 1
- description: Order quantity in contracts (whole contracts only). Provide count or count_fp; if both provided they must match.
+ description: >-
+ Order quantity in contracts (whole contracts only). Provide count or
+ count_fp; if both provided they must match.
x-go-type-skip-optional-pointer: true
x-oapi-codegen-extra-tags:
validate: omitempty,gte=1
count_fp:
$ref: '#/components/schemas/FixedPointCount'
nullable: true
- description: String representation of the order quantity in contracts. Provide count or count_fp; if both provided they must match.
+ description: >-
+ String representation of the order quantity in contracts. Provide
+ count or count_fp; if both provided they must match.
yes_price:
type: integer
minimum: 1
@@ -6916,33 +7679,50 @@ components:
expiration_ts:
type: integer
format: int64
- description: |
- Optional Unix timestamp in seconds for when the order expires. To place
+ description: >
+ Optional Unix timestamp in seconds for when the order expires. To
+ place
+
an expiring order, set `time_in_force` to `good_till_canceled` and
- provide this `expiration_ts`. `GTT` is an internal execution type and is
+
+ provide this `expiration_ts`. `GTT` is an internal execution type
+ and is
+
not a valid API value for `time_in_force`. The `immediate_or_cancel`
+
time-in-force value cannot be combined with `expiration_ts`.
time_in_force:
type: string
- description: |
- Specifies how long the order remains active. Use `good_till_canceled`
+ description: >
+ Specifies how long the order remains active. Use
+ `good_till_canceled`
+
with `expiration_ts` for an order that should rest until a specific
+
expiration time; without `expiration_ts`, `good_till_canceled` is a
+
true good-till-canceled order. `GTT` is not a valid API value.
- enum: ['fill_or_kill', 'good_till_canceled', 'immediate_or_cancel']
+ enum:
+ - fill_or_kill
+ - good_till_canceled
+ - immediate_or_cancel
x-oapi-codegen-extra-tags:
- validate: omitempty,oneof=fill_or_kill good_till_canceled immediate_or_cancel
+ validate: >-
+ omitempty,oneof=fill_or_kill good_till_canceled
+ immediate_or_cancel
x-go-type-skip-optional-pointer: true
buy_max_cost:
type: integer
- description: Maximum cost in cents. When specified, the order will automatically have Fill-or-Kill (FoK) behavior.
+ description: >-
+ Maximum cost in cents. When specified, the order will automatically
+ have Fill-or-Kill (FoK) behavior.
post_only:
type: boolean
reduce_only:
type: boolean
sell_position_floor:
type: integer
- description: "Deprecated: Use reduce_only instead. Only accepts value of 0."
+ description: 'Deprecated: Use reduce_only instead. Only accepts value of 0.'
self_trade_prevention_type:
allOf:
- $ref: '#/components/schemas/SelfTradePreventionType'
@@ -6955,20 +7735,25 @@ components:
x-go-type-skip-optional-pointer: true
cancel_order_on_pause:
type: boolean
- description: If this flag is set to true, the order will be canceled if the order is open and trading on the exchange is paused for any reason.
+ description: >-
+ If this flag is set to true, the order will be canceled if the order
+ is open and trading on the exchange is paused for any reason.
subaccount:
type: integer
minimum: 0
default: 0
- description: The subaccount number to use for this order. 0 is the primary subaccount.
+ description: >-
+ The subaccount number to use for this order. 0 is the primary
+ subaccount.
x-go-type-skip-optional-pointer: true
exchange_index:
allOf:
- $ref: '#/components/schemas/ExchangeIndex'
default: 0
- description: "Exchange shard index. Defaults to 0. Use -1 to auto-route by market ticker."
+ description: >-
+ Exchange shard index. Defaults to 0. Use -1 to auto-route by market
+ ticker.
x-go-type-skip-optional-pointer: true
-
CreateOrderResponse:
type: object
required:
@@ -6976,7 +7761,6 @@ components:
properties:
order:
$ref: '#/components/schemas/Order'
-
BatchCreateOrdersRequest:
type: object
required:
@@ -6988,7 +7772,6 @@ components:
validate: required,dive
items:
$ref: '#/components/schemas/CreateOrderRequest'
-
BatchCreateOrdersResponse:
type: object
required:
@@ -6998,7 +7781,6 @@ components:
type: array
items:
$ref: '#/components/schemas/BatchCreateOrdersIndividualResponse'
-
BatchCreateOrdersIndividualResponse:
type: object
properties:
@@ -7007,13 +7789,12 @@ components:
nullable: true
order:
allOf:
- - $ref: '#/components/schemas/Order'
+ - $ref: '#/components/schemas/Order'
nullable: true
error:
allOf:
- - $ref: '#/components/schemas/ErrorResponse'
+ - $ref: '#/components/schemas/ErrorResponse'
nullable: true
-
BatchCancelOrdersRequest:
type: object
properties:
@@ -7027,8 +7808,9 @@ components:
type: array
items:
$ref: '#/components/schemas/BatchCancelOrdersRequestOrder'
- description: An array of orders to cancel, each optionally specifying a subaccount
-
+ description: >-
+ An array of orders to cancel, each optionally specifying a
+ subaccount
BatchCancelOrdersRequestOrder:
type: object
required:
@@ -7041,19 +7823,22 @@ components:
type: integer
minimum: 0
default: 0
- description: Optional subaccount number to use for this cancellation (0 for primary, 1-63 for subaccounts)
+ description: >-
+ Optional subaccount number to use for this cancellation (0 for
+ primary, 1-63 for subaccounts)
x-go-type-skip-optional-pointer: true
exchange_index:
allOf:
- $ref: '#/components/schemas/ExchangeIndex'
default: 0
- description: "Exchange shard index. Defaults to 0. Use -1 to auto-route by market ticker."
+ description: >-
+ Exchange shard index. Defaults to 0. Use -1 to auto-route by market
+ ticker.
x-go-type-skip-optional-pointer: true
market_ticker:
type: string
description: Market ticker. Required when exchange_index is -1 (auto).
x-go-type-skip-optional-pointer: true
-
BatchCancelOrdersResponse:
type: object
required:
@@ -7063,7 +7848,6 @@ components:
type: array
items:
$ref: '#/components/schemas/BatchCancelOrdersIndividualResponse'
-
BatchCancelOrdersIndividualResponse:
type: object
required:
@@ -7072,19 +7856,22 @@ components:
properties:
order_id:
type: string
- description: The order ID to identify which order had an error during batch cancellation
+ description: >-
+ The order ID to identify which order had an error during batch
+ cancellation
order:
allOf:
- $ref: '#/components/schemas/Order'
nullable: true
reduced_by_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of contracts that were successfully canceled from this order
+ description: >-
+ String representation of the number of contracts that were
+ successfully canceled from this order
error:
allOf:
- $ref: '#/components/schemas/ErrorResponse'
nullable: true
-
AmendOrderRequest:
type: object
required:
@@ -7095,7 +7882,9 @@ components:
subaccount:
type: integer
minimum: 0
- description: Optional subaccount number to use for this amendment (0 for primary, 1-63 for subaccounts)
+ description: >-
+ Optional subaccount number to use for this amendment (0 for primary,
+ 1-63 for subaccounts)
default: 0
x-go-type-skip-optional-pointer: true
ticker:
@@ -7103,11 +7892,15 @@ components:
description: Market ticker
side:
type: string
- enum: ["yes", "no"]
+ enum:
+ - 'yes'
+ - 'no'
description: Side of the order
action:
type: string
- enum: ["buy", "sell"]
+ enum:
+ - buy
+ - sell
description: Action of the order
client_order_id:
type: string
@@ -7129,24 +7922,35 @@ components:
description: Updated no price for the order in cents
yes_price_dollars:
$ref: '#/components/schemas/FixedPointDollars'
- description: Updated yes price for the order in fixed-point dollars. Exactly one of yes_price, no_price, yes_price_dollars, and no_price_dollars must be passed.
+ description: >-
+ Updated yes price for the order in fixed-point dollars. Exactly one
+ of yes_price, no_price, yes_price_dollars, and no_price_dollars must
+ be passed.
no_price_dollars:
$ref: '#/components/schemas/FixedPointDollars'
- description: Updated no price for the order in fixed-point dollars. Exactly one of yes_price, no_price, yes_price_dollars, and no_price_dollars must be passed.
+ description: >-
+ Updated no price for the order in fixed-point dollars. Exactly one
+ of yes_price, no_price, yes_price_dollars, and no_price_dollars must
+ be passed.
count:
type: integer
minimum: 1
- description: Updated quantity for the order (whole contracts only). If updating quantity, provide count or count_fp; if both provided they must match.
+ description: >-
+ Updated quantity for the order (whole contracts only). If updating
+ quantity, provide count or count_fp; if both provided they must
+ match.
count_fp:
$ref: '#/components/schemas/FixedPointCount'
nullable: true
- description: String representation of the updated quantity for the order. If updating quantity, provide count or count_fp; if both provided they must match.
+ description: >-
+ String representation of the updated quantity for the order. If
+ updating quantity, provide count or count_fp; if both provided they
+ must match.
exchange_index:
allOf:
- $ref: '#/components/schemas/ExchangeIndex'
default: 0
x-go-type-skip-optional-pointer: true
-
AmendOrderResponse:
type: object
required:
@@ -7159,7 +7963,6 @@ components:
order:
$ref: '#/components/schemas/Order'
description: The order after amendment
-
CreateOrderV2Request:
type: object
required:
@@ -7173,8 +7976,8 @@ components:
ticker: HIGHNY-24JAN01-T60
client_order_id: 8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1
side: bid
- count: "10.00"
- price: "0.5600"
+ count: '10.00'
+ price: '0.5600'
time_in_force: good_till_canceled
self_trade_prevention_type: taker_at_cross
post_only: false
@@ -7204,21 +8007,37 @@ components:
expiration_time:
type: integer
format: int64
- description: |
- Optional Unix timestamp in seconds for when the order expires. To place
+ description: >
+ Optional Unix timestamp in seconds for when the order expires. To
+ place
+
an expiring order, set `time_in_force` to `good_till_canceled` and
- provide this `expiration_time`. `GTT` is an internal execution type and
+
+ provide this `expiration_time`. `GTT` is an internal execution type
+ and
+
is not a valid API value for `time_in_force`. The
+
`immediate_or_cancel` time-in-force value cannot be combined with
+
`expiration_time`.
time_in_force:
type: string
- description: |
- Specifies how long the order remains active. Use `good_till_canceled`
- with `expiration_time` for an order that should rest until a specific
- expiration time; without `expiration_time`, `good_till_canceled` is a
+ description: >
+ Specifies how long the order remains active. Use
+ `good_till_canceled`
+
+ with `expiration_time` for an order that should rest until a
+ specific
+
+ expiration time; without `expiration_time`, `good_till_canceled` is
+ a
+
true good-till-canceled order. `GTT` is not a valid API value.
- enum: ['fill_or_kill', 'good_till_canceled', 'immediate_or_cancel']
+ enum:
+ - fill_or_kill
+ - good_till_canceled
+ - immediate_or_cancel
x-oapi-codegen-extra-tags:
validate: required,oneof=fill_or_kill good_till_canceled immediate_or_cancel
x-go-type-skip-optional-pointer: true
@@ -7232,15 +8051,21 @@ components:
x-go-type-skip-optional-pointer: true
cancel_order_on_pause:
type: boolean
- description: If this flag is set to true, the order will be canceled if the order is open and trading on the exchange is paused for any reason.
+ description: >-
+ If this flag is set to true, the order will be canceled if the order
+ is open and trading on the exchange is paused for any reason.
reduce_only:
type: boolean
- description: Specifies whether the order place count should be capped by the member's current position.
+ description: >-
+ Specifies whether the order place count should be capped by the
+ member's current position.
subaccount:
type: integer
minimum: 0
default: 0
- description: The subaccount number to use for this order. 0 is the primary subaccount.
+ description: >-
+ The subaccount number to use for this order. 0 is the primary
+ subaccount.
x-go-type-skip-optional-pointer: true
order_group_id:
type: string
@@ -7250,9 +8075,10 @@ components:
allOf:
- $ref: '#/components/schemas/ExchangeIndex'
default: 0
- description: "Exchange shard index. Defaults to 0. Use -1 to auto-route by market ticker."
+ description: >-
+ Exchange shard index. Defaults to 0. Use -1 to auto-route by market
+ ticker.
x-go-type-skip-optional-pointer: true
-
CreateOrderV2Response:
type: object
required:
@@ -7263,8 +8089,8 @@ components:
example:
order_id: 3b23c1c7-f4ef-4f0d-8b9a-9e53c61f1a0d
client_order_id: 8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1
- fill_count: "0.00"
- remaining_count: "10.00"
+ fill_count: '0.00'
+ remaining_count: '10.00'
ts_ms: 1715793600123
properties:
order_id:
@@ -7276,18 +8102,25 @@ components:
description: Number of contracts filled immediately upon placement.
remaining_count:
$ref: '#/components/schemas/FixedPointCount'
- description: Number of contracts remaining after placement. For IOC orders, this reflects the final state after unfilled contracts are canceled.
+ description: >-
+ Number of contracts remaining after placement. For IOC orders, this
+ reflects the final state after unfilled contracts are canceled.
average_fill_price:
$ref: '#/components/schemas/FixedPointDollars'
- description: Volume-weighted average fill price. Only present when fill_count > 0.
+ description: >-
+ Volume-weighted average fill price. Only present when fill_count >
+ 0.
average_fee_paid:
$ref: '#/components/schemas/FixedPointDollars'
- description: Volume-weighted average fee paid per contract for fills resulting from this request. Only present when fill_count > 0.
+ description: >-
+ Volume-weighted average fee paid per contract for fills resulting
+ from this request. Only present when fill_count > 0.
ts_ms:
type: integer
format: int64
- description: Matching engine timestamp at which the order was processed, as Unix epoch milliseconds.
-
+ description: >-
+ Matching engine timestamp at which the order was processed, as Unix
+ epoch milliseconds.
CancelOrderV2Response:
type: object
required:
@@ -7297,7 +8130,7 @@ components:
example:
order_id: 3b23c1c7-f4ef-4f0d-8b9a-9e53c61f1a0d
client_order_id: 8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1
- reduced_by: "10.00"
+ reduced_by: '10.00'
ts_ms: 1715793660456
properties:
order_id:
@@ -7306,32 +8139,38 @@ components:
type: string
reduced_by:
$ref: '#/components/schemas/FixedPointCount'
- description: Number of contracts that were canceled (i.e. the remaining count at time of cancellation).
+ description: >-
+ Number of contracts that were canceled (i.e. the remaining count at
+ time of cancellation).
ts_ms:
type: integer
format: int64
- description: Matching engine timestamp at which the cancellation was processed, as Unix epoch milliseconds.
-
+ description: >-
+ Matching engine timestamp at which the cancellation was processed,
+ as Unix epoch milliseconds.
DecreaseOrderV2Request:
type: object
example:
- reduce_by: "2.00"
+ reduce_by: '2.00'
exchange_index: 0
properties:
reduce_by:
$ref: '#/components/schemas/FixedPointCount'
nullable: true
- description: String representation of the number of contracts to reduce by. Exactly one of `reduce_by` or `reduce_to` must be provided.
+ description: >-
+ String representation of the number of contracts to reduce by.
+ Exactly one of `reduce_by` or `reduce_to` must be provided.
reduce_to:
$ref: '#/components/schemas/FixedPointCount'
nullable: true
- description: String representation of the number of contracts to reduce to. Exactly one of `reduce_by` or `reduce_to` must be provided.
+ description: >-
+ String representation of the number of contracts to reduce to.
+ Exactly one of `reduce_by` or `reduce_to` must be provided.
exchange_index:
allOf:
- $ref: '#/components/schemas/ExchangeIndex'
default: 0
x-go-type-skip-optional-pointer: true
-
DecreaseOrderV2Response:
type: object
required:
@@ -7341,7 +8180,7 @@ components:
example:
order_id: 3b23c1c7-f4ef-4f0d-8b9a-9e53c61f1a0d
client_order_id: 8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1
- remaining_count: "8.00"
+ remaining_count: '8.00'
ts_ms: 1715793680789
properties:
order_id:
@@ -7354,8 +8193,9 @@ components:
ts_ms:
type: integer
format: int64
- description: Matching engine timestamp at which the decrease was processed, as Unix epoch milliseconds.
-
+ description: >-
+ Matching engine timestamp at which the decrease was processed, as
+ Unix epoch milliseconds.
AmendOrderV2Request:
type: object
required:
@@ -7366,8 +8206,8 @@ components:
example:
ticker: HIGHNY-24JAN01-T60
side: bid
- price: "0.5700"
- count: "8.00"
+ price: '0.5700'
+ count: '8.00'
client_order_id: 8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1
updated_client_order_id: 2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a
exchange_index: 0
@@ -7388,7 +8228,10 @@ components:
x-go-type-skip-optional-pointer: true
count:
$ref: '#/components/schemas/FixedPointCount'
- description: Updated total/max fillable count for the order. Set this to the order's already filled count plus the desired resting remaining count after the amend.
+ description: >-
+ Updated total/max fillable count for the order. Set this to the
+ order's already filled count plus the desired resting remaining
+ count after the amend.
x-go-type-skip-optional-pointer: true
client_order_id:
type: string
@@ -7403,7 +8246,6 @@ components:
- $ref: '#/components/schemas/ExchangeIndex'
default: 0
x-go-type-skip-optional-pointer: true
-
AmendOrderV2Response:
type: object
required:
@@ -7412,8 +8254,8 @@ components:
example:
order_id: 3b23c1c7-f4ef-4f0d-8b9a-9e53c61f1a0d
client_order_id: 2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a
- remaining_count: "8.00"
- fill_count: "0.00"
+ remaining_count: '8.00'
+ fill_count: '0.00'
ts_ms: 1715793690123
properties:
order_id:
@@ -7424,27 +8266,38 @@ components:
$ref: '#/components/schemas/FixedPointCount'
nullable: true
x-omitempty: false
- description: Number of resting contracts remaining after the amend. This is the actual post-amend resting quantity, not the request's total/max fillable count. Only present when the amend caused a fill or changed the resting size.
+ description: >-
+ Number of resting contracts remaining after the amend. This is the
+ actual post-amend resting quantity, not the request's total/max
+ fillable count. Only present when the amend caused a fill or changed
+ the resting size.
fill_count:
$ref: '#/components/schemas/FixedPointCount'
nullable: true
x-omitempty: false
- description: Number of contracts filled as a result of the amend crossing the book. Only present when fills occurred or remaining size changed.
+ description: >-
+ Number of contracts filled as a result of the amend crossing the
+ book. Only present when fills occurred or remaining size changed.
average_fill_price:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
x-omitempty: false
- description: Volume-weighted average fill price for fills resulting from the amend. Only present when fills occurred.
+ description: >-
+ Volume-weighted average fill price for fills resulting from the
+ amend. Only present when fills occurred.
average_fee_paid:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
x-omitempty: false
- description: Volume-weighted average fee paid per contract for fills resulting from the amend. Only present when fills occurred.
+ description: >-
+ Volume-weighted average fee paid per contract for fills resulting
+ from the amend. Only present when fills occurred.
ts_ms:
type: integer
format: int64
- description: Matching engine timestamp at which the amend was processed, as Unix epoch milliseconds.
-
+ description: >-
+ Matching engine timestamp at which the amend was processed, as Unix
+ epoch milliseconds.
BatchCreateOrdersV2Request:
type: object
required:
@@ -7454,16 +8307,16 @@ components:
- ticker: HIGHNY-24JAN01-T60
client_order_id: 8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1
side: bid
- count: "10.00"
- price: "0.5600"
+ count: '10.00'
+ price: '0.5600'
time_in_force: good_till_canceled
self_trade_prevention_type: taker_at_cross
exchange_index: 0
- ticker: HIGHNY-24JAN01-T60
client_order_id: 2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a
side: ask
- count: "5.00"
- price: "0.5800"
+ count: '5.00'
+ price: '0.5800'
time_in_force: immediate_or_cancel
self_trade_prevention_type: maker
exchange_index: 0
@@ -7474,7 +8327,6 @@ components:
validate: required,dive
items:
$ref: '#/components/schemas/CreateOrderV2Request'
-
BatchCreateOrdersV2Response:
type: object
required:
@@ -7483,15 +8335,15 @@ components:
orders:
- order_id: 3b23c1c7-f4ef-4f0d-8b9a-9e53c61f1a0d
client_order_id: 8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1
- fill_count: "0.00"
- remaining_count: "10.00"
+ fill_count: '0.00'
+ remaining_count: '10.00'
ts_ms: 1715793600123
- order_id: a6d6010d-6d5f-40a1-a7e7-5501386bb621
client_order_id: 2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a
- fill_count: "5.00"
- remaining_count: "0.00"
- average_fill_price: "0.5800"
- average_fee_paid: "0.0012"
+ fill_count: '5.00'
+ remaining_count: '0.00'
+ average_fill_price: '0.5800'
+ average_fee_paid: '0.0012'
ts_ms: 1715793600456
properties:
orders:
@@ -7518,23 +8370,28 @@ components:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
x-omitempty: false
- description: Volume-weighted average fill price. Only present when fill_count > 0.
+ description: >-
+ Volume-weighted average fill price. Only present when
+ fill_count > 0.
average_fee_paid:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
x-omitempty: false
- description: Volume-weighted average fee paid per contract. Only present when fill_count > 0.
+ description: >-
+ Volume-weighted average fee paid per contract. Only present
+ when fill_count > 0.
ts_ms:
type: integer
format: int64
nullable: true
x-omitempty: false
- description: Matching engine timestamp at which the order was processed, as Unix epoch milliseconds. Absent when the request errored.
+ description: >-
+ Matching engine timestamp at which the order was processed, as
+ Unix epoch milliseconds. Absent when the request errored.
error:
allOf:
- $ref: '#/components/schemas/ErrorResponse'
nullable: true
-
BatchCancelOrdersV2Request:
type: object
required:
@@ -7552,7 +8409,9 @@ components:
type: array
x-oapi-codegen-extra-tags:
validate: required,dive
- description: An array of orders to cancel, each optionally specifying a subaccount.
+ description: >-
+ An array of orders to cancel, each optionally specifying a
+ subaccount.
items:
type: object
required:
@@ -7565,19 +8424,22 @@ components:
type: integer
minimum: 0
default: 0
- description: Optional subaccount number to use for this cancellation (0 for primary, 1-63 for subaccounts).
+ description: >-
+ Optional subaccount number to use for this cancellation (0 for
+ primary, 1-63 for subaccounts).
x-go-type-skip-optional-pointer: true
exchange_index:
allOf:
- $ref: '#/components/schemas/ExchangeIndex'
default: 0
- description: "Exchange shard index. Defaults to 0. Use -1 to auto-route by market ticker."
+ description: >-
+ Exchange shard index. Defaults to 0. Use -1 to auto-route by
+ market ticker.
x-go-type-skip-optional-pointer: true
market_ticker:
type: string
description: Market ticker. Required when exchange_index is -1 (auto).
x-go-type-skip-optional-pointer: true
-
BatchCancelOrdersV2Response:
type: object
required:
@@ -7586,11 +8448,11 @@ components:
orders:
- order_id: 3b23c1c7-f4ef-4f0d-8b9a-9e53c61f1a0d
client_order_id: 8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1
- reduced_by: "10.00"
+ reduced_by: '10.00'
ts_ms: 1715793660456
- order_id: a6d6010d-6d5f-40a1-a7e7-5501386bb621
client_order_id: 2a0e3fc9-b593-4aa3-96e5-82f7f7566c2a
- reduced_by: "5.00"
+ reduced_by: '5.00'
ts_ms: 1715793660789
properties:
orders:
@@ -7603,25 +8465,30 @@ components:
properties:
order_id:
type: string
- description: The order ID identifying which order this entry corresponds to.
+ description: >-
+ The order ID identifying which order this entry corresponds
+ to.
client_order_id:
type: string
nullable: true
reduced_by:
$ref: '#/components/schemas/FixedPointCount'
- description: Number of contracts that were canceled (i.e. the remaining count at time of cancellation). Zero if the cancel errored.
+ description: >-
+ Number of contracts that were canceled (i.e. the remaining
+ count at time of cancellation). Zero if the cancel errored.
ts_ms:
type: integer
format: int64
nullable: true
x-omitempty: false
- description: Matching engine timestamp at which the cancellation was processed, as Unix epoch milliseconds. Absent when the cancel errored.
+ description: >-
+ Matching engine timestamp at which the cancellation was
+ processed, as Unix epoch milliseconds. Absent when the cancel
+ errored.
error:
allOf:
- $ref: '#/components/schemas/ErrorResponse'
nullable: true
-
- # Multivariate Event Collection schemas
AssociatedEvent:
type: object
required:
@@ -7639,18 +8506,21 @@ components:
type: integer
format: int32
nullable: true
- description: Maximum number of markets from this event (inclusive). Null means no limit.
+ description: >-
+ Maximum number of markets from this event (inclusive). Null means no
+ limit.
size_min:
type: integer
format: int32
nullable: true
- description: Minimum number of markets from this event (inclusive). Null means no limit.
+ description: >-
+ Minimum number of markets from this event (inclusive). Null means no
+ limit.
active_quoters:
type: array
items:
type: string
description: List of active quoters for this event.
-
MultivariateEventCollection:
type: object
required:
@@ -7674,7 +8544,9 @@ components:
description: Unique identifier for the collection.
series_ticker:
type: string
- description: Series associated with the collection. Events produced in the collection will be associated with this series.
+ description: >-
+ Series associated with the collection. Events produced in the
+ collection will be associated with this series.
title:
type: string
description: Title of the collection.
@@ -7684,11 +8556,15 @@ components:
open_date:
type: string
format: date-time
- description: The open date of the collection. Before this time, the collection cannot be interacted with.
+ description: >-
+ The open date of the collection. Before this time, the collection
+ cannot be interacted with.
close_date:
type: string
format: date-time
- description: The close date of the collection. After this time, the collection cannot be interacted with.
+ description: >-
+ The close date of the collection. After this time, the collection
+ cannot be interacted with.
associated_events:
type: array
items:
@@ -7698,28 +8574,44 @@ components:
type: array
items:
type: string
- description: '[DEPRECATED - Use associated_events instead] A list of events associated with the collection. Markets in these events can be passed as inputs to the Lookup and Create endpoints.'
+ description: >-
+ [DEPRECATED - Use associated_events instead] A list of events
+ associated with the collection. Markets in these events can be
+ passed as inputs to the Lookup and Create endpoints.
is_ordered:
type: boolean
- description: Whether the collection is ordered. If true, the order of markets passed into Lookup/Create affects the output. If false, the order does not matter.
+ description: >-
+ Whether the collection is ordered. If true, the order of markets
+ passed into Lookup/Create affects the output. If false, the order
+ does not matter.
is_single_market_per_event:
type: boolean
- description: '[DEPRECATED - Use associated_events instead] Whether the collection accepts multiple markets from the same event passed into Lookup/Create.'
+ description: >-
+ [DEPRECATED - Use associated_events instead] Whether the collection
+ accepts multiple markets from the same event passed into
+ Lookup/Create.
is_all_yes:
type: boolean
- description: '[DEPRECATED - Use associated_events instead] Whether the collection requires that only the market side of ''yes'' may be used.'
+ description: >-
+ [DEPRECATED - Use associated_events instead] Whether the collection
+ requires that only the market side of 'yes' may be used.
size_min:
type: integer
format: int32
- description: The minimum number of markets that must be passed into Lookup/Create (inclusive).
+ description: >-
+ The minimum number of markets that must be passed into Lookup/Create
+ (inclusive).
size_max:
type: integer
format: int32
- description: The maximum number of markets that must be passed into Lookup/Create (inclusive).
+ description: >-
+ The maximum number of markets that must be passed into Lookup/Create
+ (inclusive).
functional_description:
type: string
- description: A functional description of the collection describing how inputs affect the output.
-
+ description: >-
+ A functional description of the collection describing how inputs
+ affect the output.
GetMultivariateEventCollectionResponse:
type: object
required:
@@ -7728,7 +8620,6 @@ components:
multivariate_contract:
$ref: '#/components/schemas/MultivariateEventCollection'
description: The multivariate event collection.
-
GetMultivariateEventCollectionsResponse:
type: object
required:
@@ -7741,9 +8632,13 @@ components:
description: List of multivariate event collections.
cursor:
type: string
- description: The Cursor represents a pointer to the next page of records in the pagination. Use the value returned here in the cursor query parameter for this end-point to get the next page containing limit records. An empty value of this field indicates there is no next page.
+ description: >-
+ The Cursor represents a pointer to the next page of records in the
+ pagination. Use the value returned here in the cursor query
+ parameter for this end-point to get the next page containing limit
+ records. An empty value of this field indicates there is no next
+ page.
x-go-type-skip-optional-pointer: true
-
TickerPair:
type: object
required:
@@ -7759,11 +8654,12 @@ components:
description: Event ticker identifier.
side:
type: string
- enum: ['yes', 'no']
+ enum:
+ - 'yes'
+ - 'no'
description: Side of the market (yes or no).
x-oapi-codegen-extra-tags:
validate: required,oneof=yes no
-
LookupTickersForMarketInMultivariateEventCollectionRequest:
type: object
required:
@@ -7773,8 +8669,9 @@ components:
type: array
items:
$ref: '#/components/schemas/TickerPair'
- description: List of selected markets that act as parameters to determine which market is produced.
-
+ description: >-
+ List of selected markets that act as parameters to determine which
+ market is produced.
LookupTickersForMarketInMultivariateEventCollectionResponse:
type: object
required:
@@ -7787,7 +8684,6 @@ components:
market_ticker:
type: string
description: Market ticker for the looked up market.
-
CreateMarketInMultivariateEventCollectionRequest:
type: object
required:
@@ -7797,13 +8693,14 @@ components:
type: array
items:
$ref: '#/components/schemas/TickerPair'
- description: List of selected markets that act as parameters to determine which market is created.
+ description: >-
+ List of selected markets that act as parameters to determine which
+ market is created.
x-oapi-codegen-extra-tags:
validate: required,dive
with_market_payload:
type: boolean
description: Whether to include the market payload in the response.
-
CreateMarketInMultivariateEventCollectionResponse:
type: object
required:
@@ -7819,16 +8716,20 @@ components:
market:
$ref: '#/components/schemas/Market'
description: Market payload of the created market.
- # Market Orderbook schemas
PriceLevelDollarsCountFp:
type: array
minItems: 2
maxItems: 2
- example: ["0.1500", "100.00"]
+ example:
+ - '0.1500'
+ - '100.00'
items:
type: string
- description: Price level in dollars represented as [dollars_string, fp] where dollars_string is like "0.1500" and fp is a FixedPointCount string (fixed-point contract count). The second element is the contract quantity (not price).
-
+ description: >-
+ Price level in dollars represented as [dollars_string, fp] where
+ dollars_string is like "0.1500" and fp is a FixedPointCount string
+ (fixed-point contract count). The second element is the contract
+ quantity (not price).
OrderbookCountFp:
type: object
required:
@@ -7843,8 +8744,9 @@ components:
type: array
items:
$ref: '#/components/schemas/PriceLevelDollarsCountFp'
- description: Orderbook with fixed-point contract counts (fp) in all dollar price levels.
-
+ description: >-
+ Orderbook with fixed-point contract counts (fp) in all dollar price
+ levels.
GetMarketOrderbooksResponse:
type: object
required:
@@ -7854,7 +8756,6 @@ components:
type: array
items:
$ref: '#/components/schemas/MarketOrderbookFp'
-
MarketOrderbookFp:
type: object
required:
@@ -7865,7 +8766,6 @@ components:
type: string
orderbook_fp:
$ref: '#/components/schemas/OrderbookCountFp'
-
GetMarketOrderbookResponse:
type: object
required:
@@ -7874,7 +8774,6 @@ components:
orderbook_fp:
$ref: '#/components/schemas/OrderbookCountFp'
description: Orderbook with fixed-point contract counts (fp) in all price levels.
-
GetEventsResponse:
type: object
required:
@@ -7893,8 +8792,9 @@ components:
$ref: '#/components/schemas/Milestone'
cursor:
type: string
- description: Pagination cursor for the next page. Empty if there are no more results.
-
+ description: >-
+ Pagination cursor for the next page. Empty if there are no more
+ results.
GetMultivariateEventsResponse:
type: object
required:
@@ -7908,8 +8808,9 @@ components:
$ref: '#/components/schemas/EventData'
cursor:
type: string
- description: Pagination cursor for the next page. Empty if there are no more results.
-
+ description: >-
+ Pagination cursor for the next page. Empty if there are no more
+ results.
EventFeeChange:
type: object
required:
@@ -7934,17 +8835,21 @@ components:
- $ref: '#/components/schemas/FeeType'
nullable: true
example: quadratic
- description: New fee type override for the event. When null, the event clears any prior override and falls back to the parent series' fee structure.
+ description: >-
+ New fee type override for the event. When null, the event clears any
+ prior override and falls back to the parent series' fee structure.
fee_multiplier_override:
type: number
format: double
nullable: true
- description: New fee multiplier override for the event. When null, the event clears any prior override and falls back to the parent series' fee multiplier.
+ description: >-
+ New fee multiplier override for the event. When null, the event
+ clears any prior override and falls back to the parent series' fee
+ multiplier.
scheduled_ts:
type: string
format: date-time
description: Timestamp when this fee change is scheduled to take effect
-
GetEventFeeChangesResponse:
type: object
required:
@@ -7957,8 +8862,9 @@ components:
$ref: '#/components/schemas/EventFeeChange'
cursor:
type: string
- description: Pagination cursor for the next page. Empty if there are no more results.
-
+ description: >-
+ Pagination cursor for the next page. Empty if there are no more
+ results.
GetEventResponse:
type: object
required:
@@ -7970,10 +8876,13 @@ components:
description: Data for the event.
markets:
type: array
- description: Data for the markets in this event. This field is deprecated in favour of the "markets" field inside the event. Which will be filled with the same value if you use the query parameter "with_nested_markets=true".
+ description: >-
+ Data for the markets in this event. This field is deprecated in
+ favour of the "markets" field inside the event. Which will be filled
+ with the same value if you use the query parameter
+ "with_nested_markets=true".
items:
$ref: '#/components/schemas/Market'
-
MarketMetadata:
type: object
required:
@@ -7990,7 +8899,6 @@ components:
color_code:
type: string
description: The color code for the market.
-
GetEventMetadataResponse:
type: object
required:
@@ -8026,7 +8934,6 @@ components:
x-omitempty: true
description: Event scope, based on the competition.
x-go-type-skip-optional-pointer: true
-
GetEventForecastPercentilesHistoryResponse:
type: object
required:
@@ -8037,7 +8944,6 @@ components:
description: Array of forecast percentile data points over time.
items:
$ref: '#/components/schemas/ForecastPercentilesPoint'
-
ForecastPercentilesPoint:
type: object
required:
@@ -8062,7 +8968,6 @@ components:
description: Array of forecast values at different percentiles.
items:
$ref: '#/components/schemas/PercentilePoint'
-
PercentilePoint:
type: object
required:
@@ -8084,7 +8989,6 @@ components:
formatted_forecast:
type: string
description: The human-readable formatted forecast value.
-
EventData:
type: object
required:
@@ -8111,10 +9015,14 @@ components:
description: Full title of the event.
collateral_return_type:
type: string
- description: Specifies how collateral is returned when markets settle (e.g., 'binary' for standard yes/no markets).
+ description: >-
+ Specifies how collateral is returned when markets settle (e.g.,
+ 'binary' for standard yes/no markets).
mutually_exclusive:
type: boolean
- description: If true, only one market in this event can resolve to 'yes'. If false, multiple markets can resolve to 'yes'.
+ description: >-
+ If true, only one market in this event can resolve to 'yes'. If
+ false, multiple markets can resolve to 'yes'.
category:
type: string
description: Event category (deprecated, use series-level category instead).
@@ -8125,16 +9033,23 @@ components:
format: date-time
nullable: true
x-omitempty: true
- description: The specific date this event is based on. Only filled when the event uses a date strike (mutually exclusive with strike_period).
+ description: >-
+ The specific date this event is based on. Only filled when the event
+ uses a date strike (mutually exclusive with strike_period).
strike_period:
type: string
nullable: true
x-omitempty: true
- description: The time period this event covers (e.g., 'week', 'month'). Only filled when the event uses a period strike (mutually exclusive with strike_date).
+ description: >-
+ The time period this event covers (e.g., 'week', 'month'). Only
+ filled when the event uses a period strike (mutually exclusive with
+ strike_date).
markets:
type: array
x-omitempty: true
- description: Array of markets associated with this event. Only populated when 'with_nested_markets=true' is specified in the request.
+ description: >-
+ Array of markets associated with this event. Only populated when
+ 'with_nested_markets=true' is specified in the request.
items:
$ref: '#/components/schemas/Market'
x-go-type-skip-optional-pointer: true
@@ -8152,7 +9067,9 @@ components:
nullable: true
items:
$ref: '#/components/schemas/SettlementSource'
- description: The official sources used for the determination of markets within this event. Methodology is defined in the rulebook.
+ description: >-
+ The official sources used for the determination of markets within
+ this event. Methodology is defined in the rulebook.
last_updated_ts:
type: string
format: date-time
@@ -8161,19 +9078,22 @@ components:
type: string
nullable: true
x-omitempty: true
- description: Fee type override for this event. When present, takes precedence over the series-level fee for this event's markets.
+ description: >-
+ Fee type override for this event. When present, takes precedence
+ over the series-level fee for this event's markets.
fee_multiplier_override:
type: number
format: double
nullable: true
x-omitempty: true
- description: Fee multiplier override for this event. Paired with fee_type_override.
+ description: >-
+ Fee multiplier override for this event. Paired with
+ fee_type_override.
exchange_index:
allOf:
- $ref: '#/components/schemas/ExchangeIndex'
x-go-type-skip-optional-pointer: true
x-omitempty: false
-
Series:
type: object
required:
@@ -8194,10 +9114,16 @@ components:
description: Ticker that identifies this series.
frequency:
type: string
- description: Description of the frequency of the series. There is no fixed value set here, but will be something human-readable like weekly, daily, one-off.
+ description: >-
+ Description of the frequency of the series. There is no fixed value
+ set here, but will be something human-readable like weekly, daily,
+ one-off.
title:
type: string
- description: Title describing the series. For full context use you should use this field with the title field of the events belonging to this series.
+ description: >-
+ Title describing the series. For full context use you should use
+ this field with the title field of the events belonging to this
+ series.
category:
type: string
description: Category specifies the category which this series belongs to.
@@ -8206,19 +9132,28 @@ components:
nullable: true
items:
type: string
- description: Tags specifies the subjects that this series relates to, multiple series from different categories can have the same tags.
+ description: >-
+ Tags specifies the subjects that this series relates to, multiple
+ series from different categories can have the same tags.
settlement_sources:
type: array
nullable: true
items:
$ref: '#/components/schemas/SettlementSource'
- description: SettlementSources specifies the official sources used for the determination of markets within the series. Methodology is defined in the rulebook.
+ description: >-
+ SettlementSources specifies the official sources used for the
+ determination of markets within the series. Methodology is defined
+ in the rulebook.
contract_url:
type: string
- description: ContractUrl provides a direct link to the original filing of the contract which underlies the series.
+ description: >-
+ ContractUrl provides a direct link to the original filing of the
+ contract which underlies the series.
contract_terms_url:
type: string
- description: ContractTermsUrl is the URL to the current terms of the contract underlying the series.
+ description: >-
+ ContractTermsUrl is the URL to the current terms of the contract
+ underlying the series.
product_metadata:
type: object
nullable: true
@@ -8227,24 +9162,36 @@ components:
fee_type:
allOf:
- $ref: '#/components/schemas/FeeType'
- description: "FeeType is a string representing the series' fee structure. Fee structures can be found at https://kalshi.com/docs/kalshi-fee-schedule.pdf. 'quadratic' is described by the General Trading Fees Table, 'quadratic_with_maker_fees' is described by the General Trading Fees Table with maker fees described in the Maker Fees section, 'flat' is described by the Specific Trading Fees Table."
+ description: >-
+ FeeType is a string representing the series' fee structure. Fee
+ structures can be found at
+ https://kalshi.com/docs/kalshi-fee-schedule.pdf. 'quadratic' is
+ described by the General Trading Fees Table,
+ 'quadratic_with_maker_fees' is described by the General Trading Fees
+ Table with maker fees described in the Maker Fees section, 'flat' is
+ described by the Specific Trading Fees Table.
fee_multiplier:
type: number
format: double
- description: FeeMultiplier is a floating point multiplier applied to the fee calculations.
+ description: >-
+ FeeMultiplier is a floating point multiplier applied to the fee
+ calculations.
additional_prohibitions:
type: array
items:
type: string
- description: AdditionalProhibitions is a list of additional trading prohibitions for this series.
+ description: >-
+ AdditionalProhibitions is a list of additional trading prohibitions
+ for this series.
volume_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the total number of contracts traded across all events in this series.
+ description: >-
+ String representation of the total number of contracts traded across
+ all events in this series.
last_updated_ts:
type: string
format: date-time
description: Timestamp of when this series' metadata was last updated.
-
SeriesFeeChange:
type: object
required:
@@ -8272,7 +9219,6 @@ components:
type: string
format: date-time
description: Timestamp when this fee change is scheduled to take effect
-
GetSeriesResponse:
type: object
required:
@@ -8280,7 +9226,6 @@ components:
properties:
series:
$ref: '#/components/schemas/Series'
-
GetSeriesListResponse:
type: object
required:
@@ -8290,7 +9235,6 @@ components:
type: array
items:
$ref: '#/components/schemas/Series'
-
GetSeriesFeeChangesResponse:
type: object
required:
@@ -8300,7 +9244,6 @@ components:
type: array
items:
$ref: '#/components/schemas/SeriesFeeChange'
-
SettlementSource:
type: object
properties:
@@ -8312,7 +9255,6 @@ components:
type: string
description: URL to the settlement source
x-go-type-skip-optional-pointer: true
-
GetMarketsResponse:
type: object
required:
@@ -8325,7 +9267,6 @@ components:
$ref: '#/components/schemas/Market'
cursor:
type: string
-
GetMarketResponse:
type: object
required:
@@ -8333,7 +9274,6 @@ components:
properties:
market:
$ref: '#/components/schemas/Market'
-
MveSelectedLeg:
type: object
properties:
@@ -8353,8 +9293,9 @@ components:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
x-omitempty: true
- description: The settlement value of the YES/LONG side of the contract in dollars. Only filled after determination
-
+ description: >-
+ The settlement value of the YES/LONG side of the contract in
+ dollars. Only filled after determination
PriceRange:
type: object
required:
@@ -8371,7 +9312,6 @@ components:
step:
type: string
description: Price step/tick size for this range in dollars
-
Market:
type: object
required:
@@ -8415,7 +9355,9 @@ components:
type: string
market_type:
type: string
- enum: [binary, scalar]
+ enum:
+ - binary
+ - scalar
description: Identifies the type of market
title:
type: string
@@ -8464,20 +9406,32 @@ components:
description: The amount of time after determination that the market settles
status:
type: string
- enum: [initialized, inactive, active, closed, determined, disputed, amended, finalized]
+ enum:
+ - initialized
+ - inactive
+ - active
+ - closed
+ - determined
+ - disputed
+ - amended
+ - finalized
description: The current status of the market in its lifecycle.
yes_bid_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: Price for the highest YES buy offer on this market in dollars
yes_bid_size_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: Total contract size of orders to buy YES at the best bid price (fixed-point count string).
+ description: >-
+ Total contract size of orders to buy YES at the best bid price
+ (fixed-point count string).
yes_ask_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: Price for the lowest YES sell offer on this market in dollars
yes_ask_size_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: Total contract size of orders to sell YES at the best ask price (fixed-point count string).
+ description: >-
+ Total contract size of orders to sell YES at the best ask price
+ (fixed-point count string).
no_bid_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: Price for the highest NO buy offer on this market in dollars
@@ -8495,41 +9449,59 @@ components:
description: String representation of the 24h market volume in contracts
result:
type: string
- enum: ['yes', 'no', 'scalar', '']
+ enum:
+ - 'yes'
+ - 'no'
+ - scalar
+ - ''
can_close_early:
type: boolean
open_interest_fp:
$ref: '#/components/schemas/FixedPointCount'
- description: String representation of the number of contracts bought on this market disconsidering netting
+ description: >-
+ String representation of the number of contracts bought on this
+ market disconsidering netting
notional_value_dollars:
$ref: '#/components/schemas/FixedPointDollars'
description: The total value of a single contract at settlement in dollars
previous_yes_bid_dollars:
$ref: '#/components/schemas/FixedPointDollars'
- description: Price for the highest YES buy offer on this market a day ago in dollars
+ description: >-
+ Price for the highest YES buy offer on this market a day ago in
+ dollars
previous_yes_ask_dollars:
$ref: '#/components/schemas/FixedPointDollars'
- description: Price for the lowest YES sell offer on this market a day ago in dollars
+ description: >-
+ Price for the lowest YES sell offer on this market a day ago in
+ dollars
previous_price_dollars:
$ref: '#/components/schemas/FixedPointDollars'
- description: Price for the last traded YES contract on this market a day ago in dollars
+ description: >-
+ Price for the last traded YES contract on this market a day ago in
+ dollars
liquidity_dollars:
allOf:
- $ref: '#/components/schemas/FixedPointDollars'
deprecated: true
x-go-type-skip-optional-pointer: true
- description: 'DEPRECATED: This field is deprecated and will always return "0.0000".'
+ description: >-
+ DEPRECATED: This field is deprecated and will always return
+ "0.0000".
settlement_value_dollars:
$ref: '#/components/schemas/FixedPointDollars'
nullable: true
x-omitempty: true
- description: The settlement value of the YES/LONG side of the contract in dollars. Only filled after determination
+ description: >-
+ The settlement value of the YES/LONG side of the contract in
+ dollars. Only filled after determination
settlement_ts:
type: string
format: date-time
nullable: true
x-omitempty: true
- description: Timestamp when the market was settled. Only filled for settled markets
+ description: >-
+ Timestamp when the market was settled. Only filled for settled
+ markets
expiration_value:
type: string
description: The value that was considered for the settlement
@@ -8537,7 +9509,9 @@ components:
type: string
format: date-time
nullable: true
- description: The recorded datetime when the underlying event occurred, if available
+ description: >-
+ The recorded datetime when the underlying event occurred, if
+ available
fee_waiver_expiration_time:
type: string
format: date-time
@@ -8552,7 +9526,15 @@ components:
x-go-type-skip-optional-pointer: true
strike_type:
type: string
- enum: [greater, greater_or_equal, less, less_or_equal, between, functional, custom, structured]
+ enum:
+ - greater
+ - greater_or_equal
+ - less
+ - less_or_equal
+ - between
+ - functional
+ - custom
+ - structured
x-omitempty: true
description: Strike type defines how the market strike is defined and evaluated
x-go-type-skip-optional-pointer: true
@@ -8601,7 +9583,9 @@ components:
x-omitempty: true
price_level_structure:
type: string
- description: Price level structure for this market, defining price ranges and tick sizes
+ description: >-
+ Price level structure for this market, defining price ranges and
+ tick sizes
price_ranges:
type: array
description: Valid price ranges for orders on this market
@@ -8610,14 +9594,15 @@ components:
is_provisional:
type: boolean
x-omitempty: true
- description: If true, the market may be removed after determination if there is no activity on it
+ description: >-
+ If true, the market may be removed after determination if there is
+ no activity on it
x-go-type-skip-optional-pointer: true
exchange_index:
allOf:
- $ref: '#/components/schemas/ExchangeIndex'
x-go-type-skip-optional-pointer: true
x-omitempty: false
-
tags:
- name: api-keys
description: API key management endpoints
diff --git a/tests/_contract_support.py b/tests/_contract_support.py
index 8dbc955..0a75e7f 100644
--- a/tests/_contract_support.py
+++ b/tests/_contract_support.py
@@ -699,6 +699,18 @@ class Exclusion:
http_method="GET",
path_template="/portfolio/subaccounts/netting",
),
+ MethodEndpointEntry(
+ sdk_method="kalshi.resources.subaccounts.SubaccountsResource.lock_settlement_advance",
+ http_method="PUT",
+ path_template="/portfolio/subaccounts/settlement-advance-lock",
+ request_body_schema="#/components/schemas/LockSubaccountForSettlementAdvanceRequest",
+ ),
+ MethodEndpointEntry(
+ sdk_method="kalshi.resources.subaccounts.SubaccountsResource.unlock_settlement_advance",
+ http_method="DELETE",
+ path_template="/portfolio/subaccounts/settlement-advance-lock",
+ request_body_schema="#/components/schemas/UnlockSubaccountForSettlementAdvanceRequest",
+ ),
# ── portfolio ───────────────────────────────────────────────────────────
MethodEndpointEntry(
sdk_method="kalshi.resources.portfolio.PortfolioResource.balance",
@@ -982,6 +994,39 @@ class Exclusion:
),
kind="body_param",
),
+ # unlock_settlement_advance (DELETE with requestBody): TestRequestParamDrift
+ # only compares query/path params, so body kwargs + the model-first
+ # `request` overload must be allowlisted. Body shape is covered by
+ # TestRequestBodyDrift via UnlockSubaccountForSettlementAdvanceRequest.
+ ("kalshi.resources.subaccounts.SubaccountsResource.unlock_settlement_advance", "request"): (
+ Exclusion(
+ reason=(
+ "Model-first overload for DELETE-with-body settlement-advance unlock; "
+ "not a query/path param. Body checked via TestRequestBodyDrift."
+ ),
+ kind="body_param",
+ )
+ ),
+ (
+ "kalshi.resources.subaccounts.SubaccountsResource.unlock_settlement_advance",
+ "subaccount_number",
+ ): Exclusion(
+ reason=(
+ "Request-body field on DELETE /portfolio/subaccounts/settlement-advance-lock; "
+ "not a query/path param. Body checked via TestRequestBodyDrift."
+ ),
+ kind="body_param",
+ ),
+ (
+ "kalshi.resources.subaccounts.SubaccountsResource.unlock_settlement_advance",
+ "exchange_index",
+ ): Exclusion(
+ reason=(
+ "Request-body field on DELETE /portfolio/subaccounts/settlement-advance-lock; "
+ "not a query/path param. Body checked via TestRequestBodyDrift."
+ ),
+ kind="body_param",
+ ),
# --- CreateOrderGroupRequest / UpdateOrderGroupLimitRequest _fp variants ---
# Spec has both contracts_limit (int) and contracts_limit_fp (FixedPointCount
# string) as mutually-compatible representations. SDK commits to the integer
diff --git a/tests/test_contracts.py b/tests/test_contracts.py
index 766b9c0..93f75ad 100644
--- a/tests/test_contracts.py
+++ b/tests/test_contracts.py
@@ -1452,6 +1452,12 @@ def _assert_params_match(
"#/components/schemas/UpdateSubaccountNettingRequest": (
"kalshi.models.subaccounts.UpdateSubaccountNettingRequest"
),
+ "#/components/schemas/LockSubaccountForSettlementAdvanceRequest": (
+ "kalshi.models.subaccounts.LockSubaccountForSettlementAdvanceRequest"
+ ),
+ "#/components/schemas/UnlockSubaccountForSettlementAdvanceRequest": (
+ "kalshi.models.subaccounts.UnlockSubaccountForSettlementAdvanceRequest"
+ ),
"#/components/schemas/CreateApiKeyRequest": ("kalshi.models.api_keys.CreateApiKeyRequest"),
"#/components/schemas/GenerateApiKeyRequest": ("kalshi.models.api_keys.GenerateApiKeyRequest"),
}
diff --git a/tests/test_models.py b/tests/test_models.py
index 9da9686..6d28a61 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -1070,6 +1070,26 @@ class TestStrictIntRejectsBoolOnRequestModels:
"subaccount_number",
{"enabled": True},
),
+ (
+ "kalshi.models.subaccounts:LockSubaccountForSettlementAdvanceRequest",
+ "subaccount_number",
+ {},
+ ),
+ (
+ "kalshi.models.subaccounts:LockSubaccountForSettlementAdvanceRequest",
+ "exchange_index",
+ {"subaccount_number": 0},
+ ),
+ (
+ "kalshi.models.subaccounts:UnlockSubaccountForSettlementAdvanceRequest",
+ "subaccount_number",
+ {},
+ ),
+ (
+ "kalshi.models.subaccounts:UnlockSubaccountForSettlementAdvanceRequest",
+ "exchange_index",
+ {"subaccount_number": 0},
+ ),
(
"kalshi.models.communications:CreateQuoteRequest",
"subaccount",
diff --git a/tests/test_subaccounts.py b/tests/test_subaccounts.py
index d9f1a14..8a98b01 100644
--- a/tests/test_subaccounts.py
+++ b/tests/test_subaccounts.py
@@ -28,9 +28,12 @@
CreateSubaccountResponse,
GetSubaccountBalancesResponse,
GetSubaccountNettingResponse,
+ LockSubaccountForSettlementAdvanceRequest,
+ LockSubaccountForSettlementAdvanceResponse,
SubaccountBalance,
SubaccountNettingConfig,
SubaccountTransfer,
+ UnlockSubaccountForSettlementAdvanceRequest,
UpdateSubaccountNettingRequest,
)
from kalshi.resources.subaccounts import (
@@ -38,6 +41,14 @@
SubaccountsResource,
)
+# Required settlement-advance fields on SubaccountBalance (OpenAPI 3.26.0 content).
+_BALANCE_ADVANCE_FIELDS = {
+ "voluntarily_locked": False,
+ "settlement_advance": "0.0000",
+}
+
+_TEST_ADVANCE_STATE = "550e8400-e29b-41d4-a716-446655440099"
+
@pytest.fixture
def config() -> KalshiConfig:
@@ -85,11 +96,44 @@ def test_subaccount_balance_parses_dollar_decimal(self) -> None:
"exchange_index": 0,
"balance": "12.3400",
"updated_ts": 1_700_000_000,
+ **_BALANCE_ADVANCE_FIELDS,
}
)
assert bal.subaccount_number == 1
assert bal.balance == Decimal("12.3400")
assert bal.updated_ts == 1_700_000_000
+ assert bal.voluntarily_locked is False
+ assert bal.settlement_advance == Decimal("0.0000")
+ assert bal.settlement_advance_state is None
+
+ def test_subaccount_balance_settlement_advance_fields(self) -> None:
+ state = "550e8400-e29b-41d4-a716-446655440099"
+ bal = SubaccountBalance.model_validate(
+ {
+ "subaccount_number": 2,
+ "exchange_index": 0,
+ "balance": "1.00",
+ "updated_ts": 1,
+ "voluntarily_locked": True,
+ "settlement_advance": "3.5000",
+ "settlement_advance_state": state,
+ }
+ )
+ assert bal.voluntarily_locked is True
+ assert bal.settlement_advance == Decimal("3.5000")
+ assert str(bal.settlement_advance_state) == state
+
+ def test_subaccount_balance_requires_settlement_advance_fields(self) -> None:
+ with pytest.raises(ValidationError):
+ SubaccountBalance.model_validate(
+ {
+ "subaccount_number": 0,
+ "exchange_index": 0,
+ "balance": "1.00",
+ "updated_ts": 1,
+ # voluntarily_locked / settlement_advance intentionally omitted
+ }
+ )
def test_subaccount_transfer_parses(self) -> None:
# Spec sync (2026-07-20/21): GET transfers is cash-only; transfer_type
@@ -167,6 +211,7 @@ def test_get_balances_response_wraps_list(self) -> None:
"exchange_index": 0,
"balance": "100.00",
"updated_ts": 1,
+ **_BALANCE_ADVANCE_FIELDS,
},
],
},
@@ -359,6 +404,44 @@ def test_position_transfer_request_rejects_bad_price(self, bad_price: Decimal) -
price=bad_price,
)
+ # ── Settlement-advance lock / unlock request models (#486) ──
+ def test_lock_settlement_advance_request_serializes(self) -> None:
+ req = LockSubaccountForSettlementAdvanceRequest(subaccount_number=1)
+ body = req.model_dump(exclude_none=True, by_alias=True, mode="json")
+ assert body == {"subaccount_number": 1}
+
+ def test_lock_settlement_advance_request_with_exchange_index(self) -> None:
+ req = LockSubaccountForSettlementAdvanceRequest(
+ subaccount_number=0, exchange_index=0,
+ )
+ body = req.model_dump(exclude_none=True, by_alias=True, mode="json")
+ assert body == {"subaccount_number": 0, "exchange_index": 0}
+
+ def test_lock_settlement_advance_request_forbids_extra(self) -> None:
+ with pytest.raises(ValidationError):
+ LockSubaccountForSettlementAdvanceRequest( # type: ignore[call-arg]
+ subaccount_number=0, phantom=1,
+ )
+
+ def test_unlock_settlement_advance_request_serializes(self) -> None:
+ req = UnlockSubaccountForSettlementAdvanceRequest(
+ subaccount_number=2, exchange_index=0,
+ )
+ body = req.model_dump(exclude_none=True, by_alias=True, mode="json")
+ assert body == {"subaccount_number": 2, "exchange_index": 0}
+
+ def test_unlock_settlement_advance_request_forbids_extra(self) -> None:
+ with pytest.raises(ValidationError):
+ UnlockSubaccountForSettlementAdvanceRequest( # type: ignore[call-arg]
+ subaccount_number=0, phantom=1,
+ )
+
+ def test_lock_settlement_advance_response_parses_uuid(self) -> None:
+ resp = LockSubaccountForSettlementAdvanceResponse.model_validate(
+ {"settlement_advance_state": _TEST_ADVANCE_STATE},
+ )
+ assert str(resp.settlement_advance_state) == _TEST_ADVANCE_STATE
+
class TestSubaccountsCreate:
@respx.mock
@@ -563,12 +646,14 @@ def test_returns_balances(self, subaccounts: SubaccountsResource) -> None:
"exchange_index": 0,
"balance": "10.00",
"updated_ts": 1,
+ **_BALANCE_ADVANCE_FIELDS,
},
{
"subaccount_number": 1,
"exchange_index": 0,
"balance": "5.00",
"updated_ts": 2,
+ **_BALANCE_ADVANCE_FIELDS,
},
],
},
@@ -578,6 +663,7 @@ def test_returns_balances(self, subaccounts: SubaccountsResource) -> None:
assert isinstance(resp, GetSubaccountBalancesResponse)
assert len(resp.subaccount_balances) == 2
assert resp.subaccount_balances[0].balance == Decimal("10.00")
+ assert resp.subaccount_balances[0].voluntarily_locked is False
@respx.mock
def test_empty_list(self, subaccounts: SubaccountsResource) -> None:
@@ -789,6 +875,7 @@ async def test_list_balances(
"exchange_index": 0,
"balance": "1.00",
"updated_ts": 1,
+ **_BALANCE_ADVANCE_FIELDS,
},
],
},
@@ -866,6 +953,126 @@ async def test_get_netting(
resp = await async_subaccounts.get_netting()
assert resp.netting_configs == []
+ async def test_lock_settlement_advance(
+ self,
+ async_subaccounts: AsyncSubaccountsResource,
+ respx_mock: respx.MockRouter,
+ ) -> None:
+ route = respx_mock.put(
+ "https://test.kalshi.com/trade-api/v2/portfolio/subaccounts/"
+ "settlement-advance-lock",
+ ).mock(
+ return_value=httpx.Response(
+ 200, json={"settlement_advance_state": _TEST_ADVANCE_STATE},
+ ),
+ )
+ resp = await async_subaccounts.lock_settlement_advance(subaccount_number=1)
+ assert str(resp.settlement_advance_state) == _TEST_ADVANCE_STATE
+ assert json.loads(route.calls[0].request.content) == {"subaccount_number": 1}
+
+ async def test_unlock_settlement_advance(
+ self,
+ async_subaccounts: AsyncSubaccountsResource,
+ respx_mock: respx.MockRouter,
+ ) -> None:
+ route = respx_mock.delete(
+ "https://test.kalshi.com/trade-api/v2/portfolio/subaccounts/"
+ "settlement-advance-lock",
+ ).mock(return_value=httpx.Response(200, json={}))
+ result = await async_subaccounts.unlock_settlement_advance(subaccount_number=1)
+ assert result is None
+ assert json.loads(route.calls[0].request.content) == {"subaccount_number": 1}
+
+
+class TestSubaccountsSettlementAdvance:
+ @respx.mock
+ def test_lock_settlement_advance_kwargs(
+ self, subaccounts: SubaccountsResource,
+ ) -> None:
+ route = respx.put(
+ "https://test.kalshi.com/trade-api/v2/portfolio/subaccounts/"
+ "settlement-advance-lock",
+ ).mock(
+ return_value=httpx.Response(
+ 200, json={"settlement_advance_state": _TEST_ADVANCE_STATE},
+ ),
+ )
+ resp = subaccounts.lock_settlement_advance(
+ subaccount_number=1, exchange_index=0,
+ )
+ assert isinstance(resp, LockSubaccountForSettlementAdvanceResponse)
+ assert str(resp.settlement_advance_state) == _TEST_ADVANCE_STATE
+ assert json.loads(route.calls[0].request.content) == {
+ "subaccount_number": 1,
+ "exchange_index": 0,
+ }
+
+ @respx.mock
+ def test_lock_settlement_advance_request_model(
+ self, subaccounts: SubaccountsResource,
+ ) -> None:
+ route = respx.put(
+ "https://test.kalshi.com/trade-api/v2/portfolio/subaccounts/"
+ "settlement-advance-lock",
+ ).mock(
+ return_value=httpx.Response(
+ 200, json={"settlement_advance_state": _TEST_ADVANCE_STATE},
+ ),
+ )
+ req = LockSubaccountForSettlementAdvanceRequest(subaccount_number=0)
+ resp = subaccounts.lock_settlement_advance(request=req)
+ assert str(resp.settlement_advance_state) == _TEST_ADVANCE_STATE
+ assert json.loads(route.calls[0].request.content) == {"subaccount_number": 0}
+
+ def test_lock_settlement_advance_requires_subaccount(
+ self, subaccounts: SubaccountsResource,
+ ) -> None:
+ with pytest.raises(TypeError, match="subaccount_number"):
+ subaccounts.lock_settlement_advance()
+
+ def test_lock_settlement_advance_rejects_mixed_args(
+ self, subaccounts: SubaccountsResource,
+ ) -> None:
+ req = LockSubaccountForSettlementAdvanceRequest(subaccount_number=0)
+ with pytest.raises(TypeError, match="either `request="):
+ subaccounts.lock_settlement_advance(request=req, subaccount_number=1)
+
+ @respx.mock
+ def test_unlock_settlement_advance_kwargs(
+ self, subaccounts: SubaccountsResource,
+ ) -> None:
+ route = respx.delete(
+ "https://test.kalshi.com/trade-api/v2/portfolio/subaccounts/"
+ "settlement-advance-lock",
+ ).mock(return_value=httpx.Response(200, json={}))
+ result = subaccounts.unlock_settlement_advance(subaccount_number=2)
+ assert result is None
+ assert json.loads(route.calls[0].request.content) == {"subaccount_number": 2}
+
+ @respx.mock
+ def test_unlock_settlement_advance_request_model(
+ self, subaccounts: SubaccountsResource,
+ ) -> None:
+ route = respx.delete(
+ "https://test.kalshi.com/trade-api/v2/portfolio/subaccounts/"
+ "settlement-advance-lock",
+ ).mock(return_value=httpx.Response(200, json={}))
+ req = UnlockSubaccountForSettlementAdvanceRequest(
+ subaccount_number=3, exchange_index=0,
+ )
+ result = subaccounts.unlock_settlement_advance(request=req)
+ assert result is None
+ assert json.loads(route.calls[0].request.content) == {
+ "subaccount_number": 3,
+ "exchange_index": 0,
+ }
+
+ def test_unlock_settlement_advance_requires_subaccount(
+ self, subaccounts: SubaccountsResource,
+ ) -> None:
+ with pytest.raises(TypeError, match="subaccount_number"):
+ subaccounts.unlock_settlement_advance()
+
class TestSubaccountsAuthGuard:
def test_create_requires_auth(
@@ -917,6 +1124,18 @@ def test_get_netting_requires_auth(
with pytest.raises(AuthRequiredError):
unauth_subaccounts.get_netting()
+ def test_lock_settlement_advance_requires_auth(
+ self, unauth_subaccounts: SubaccountsResource,
+ ) -> None:
+ with pytest.raises(AuthRequiredError):
+ unauth_subaccounts.lock_settlement_advance(subaccount_number=0)
+
+ def test_unlock_settlement_advance_requires_auth(
+ self, unauth_subaccounts: SubaccountsResource,
+ ) -> None:
+ with pytest.raises(AuthRequiredError):
+ unauth_subaccounts.unlock_settlement_advance(subaccount_number=0)
+
class TestClientWiring:
def test_sync_client_exposes_subaccounts(