diff --git a/README.md b/README.md index 78ea849..a5ead64 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ [![CI](https://github.com/Reddimus/kalshi-cpp/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Reddimus/kalshi-cpp/actions/workflows/ci.yml) [![Release](https://img.shields.io/github/v/release/Reddimus/kalshi-cpp)](https://github.com/Reddimus/kalshi-cpp/releases) -An unofficial C++23 client for Kalshi's Predictions API. It covers every +A C++23 client for Kalshi's Predictions API. It covers every [REST operation](docs/operations.md) and [WebSocket channel](docs/channels.md). -A generator builds it from Kalshi's OpenAPI and AsyncAPI documents in -[`spec/`](https://github.com/Reddimus/kalshi-cpp/tree/main/spec), so type and -field names match [Kalshi's API docs](https://docs.kalshi.com). Kalshi's -separate Margin and Perpetuals API is out of scope. The +Its types and methods come from Kalshi's OpenAPI and AsyncAPI documents in +[`spec/`](https://github.com/Reddimus/kalshi-cpp/tree/main/spec), so their names +match [Kalshi's API docs](https://docs.kalshi.com). Kalshi's separate Margin +and Perpetuals API is out of scope. The [API reference](https://reddimus.github.io/kalshi-cpp/) lists every type and method. ## Install @@ -172,6 +172,6 @@ shows. ## Contributing -[CONTRIBUTING.md](CONTRIBUTING.md) covers building from source, tests, code -generation, and releases. Report security issues as +[CONTRIBUTING.md](CONTRIBUTING.md) covers building from source, tests, updating +the specs, and releases. Report security issues as [SECURITY.md](SECURITY.md) describes. diff --git a/docs/channels.md b/docs/channels.md index 254880c..34d7c95 100644 --- a/docs/channels.md +++ b/docs/channels.md @@ -1,6 +1,6 @@ # WebSocket channels -Generated from Kalshi's AsyncAPI 2.0.0 document (`spec/asyncapi.yaml`). +Covers Kalshi's AsyncAPI 2.0.0 document (`spec/asyncapi.yaml`). Subscribe with `WebSocketClient::subscribe(ws::Channel::..., params)`; each message arrives in `on_message` as `ws::Update`. diff --git a/docs/operations.md b/docs/operations.md index 3f6f7cf..72d17ec 100644 --- a/docs/operations.md +++ b/docs/operations.md @@ -1,6 +1,6 @@ # REST operations -Generated from Kalshi Predictions OpenAPI 3.31.0 (`spec/openapi.yaml`). +Covers Kalshi's Predictions OpenAPI 3.31.0 document (`spec/openapi.yaml`). Each row is a `KalshiClient` method. ## account diff --git a/include/README.md b/include/README.md index ecc1065..d699b28 100644 --- a/include/README.md +++ b/include/README.md @@ -4,8 +4,8 @@ | Header | Contents | | --- | --- | -| `kalshi/api.hpp` | `KalshiClient`, one method per REST operation (generated) | -| `kalshi/models.hpp` | Request, response, and enum types from the OpenAPI spec (generated) | +| `kalshi/api.hpp` | `KalshiClient`, one method per REST operation | +| `kalshi/models.hpp` | Request, response, and enum types from the OpenAPI spec | | `kalshi/helpers.hpp` | Fixed-point to cents or contracts, timestamps, order directions | | `kalshi/http_client.hpp` | Transport interface, libcurl client, `ClientConfig` | | `kalshi/retry.hpp` | `RetryingTransport` and `RetryPolicy` | @@ -13,12 +13,12 @@ | `kalshi/pagination.hpp` | `collect_pages` | | `kalshi/signer.hpp` | API key loading and request signing | | `kalshi/websocket.hpp` | `WebSocketClient`, `WsConfig`, and `WsError` | -| `kalshi/ws_models.hpp` | WebSocket channels and message types from the AsyncAPI spec (generated) | +| `kalshi/ws_models.hpp` | WebSocket channels and message types from the AsyncAPI spec | | `kalshi/error.hpp` | `Error`, `ErrorCode`, and `Result` | | `kalshi/environment.hpp` | Production and demo URLs | | `kalshi/fixed_point.hpp` | Exact decimal parsing | | `kalshi/raw_json.hpp` | `RawJson`, free-form JSON kept as text | -| `kalshi/version.hpp` | `kalshi::VERSION` (generated at configure time) | +| `kalshi/version.hpp` | `kalshi::VERSION`, set at configure time | Headers under `kalshi/detail/` support the implementation and tests. They are not a stable interface. diff --git a/include/kalshi/version.hpp.in b/include/kalshi/version.hpp.in index 21fb845..05249a6 100644 --- a/include/kalshi/version.hpp.in +++ b/include/kalshi/version.hpp.in @@ -1,7 +1,7 @@ #pragma once /// @file version.hpp -/// @brief The SDK version, generated from `project(... VERSION)` in CMakeLists.txt. +/// @brief The SDK version, from `project(... VERSION)` in CMakeLists.txt. namespace kalshi { diff --git a/tools/codegen/generate.py b/tools/codegen/generate.py index 161c469..6f0dddd 100644 --- a/tools/codegen/generate.py +++ b/tools/codegen/generate.py @@ -516,7 +516,7 @@ def routes_test(self) -> str: def operations_doc(self) -> str: version = self.spec.get("info", {}).get("version", "?") out = ["# REST operations\n\n", - f"Generated from Kalshi Predictions OpenAPI {version} (`spec/openapi.yaml`).\n", + f"Covers Kalshi's Predictions OpenAPI {version} document (`spec/openapi.yaml`).\n", "Each row is a `KalshiClient` method.\n"] for tag, ops in sorted(self.tags().items()): out.append(f"\n## {tag}\n\n| Method | Route | C++ |\n| --- | --- | --- |\n") diff --git a/tools/codegen/ws.py b/tools/codegen/ws.py index 29bf587..4905bd7 100644 --- a/tools/codegen/ws.py +++ b/tools/codegen/ws.py @@ -361,7 +361,7 @@ def example_check(self, message: DataMessage, example: dict) -> str: def channels_doc(self) -> str: version = self.spec.get("info", {}).get("version", "?") out = ["# WebSocket channels\n\n", - f"Generated from Kalshi's AsyncAPI {version} document (`spec/asyncapi.yaml`).\n", + f"Covers Kalshi's AsyncAPI {version} document (`spec/asyncapi.yaml`).\n", "Subscribe with `WebSocketClient::subscribe(ws::Channel::..., params)`; each message\n" "arrives in `on_message` as `ws::Update`.\n\n", "| Channel | `ws::Channel` | Messages |\n| --- | --- | --- |\n"]