You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(mdds): forward list order and interval verbatim, matching the terminal (#1202)
* refactor(mdds): forward list order and interval verbatim, matching the terminal
The terminal's REST layer is a pure pass-through: it streams the server's
DataTable in wire order and forwards the interval string unchanged. Two SDK
behaviors diverged from that and are removed.
List endpoints no longer re-sort their values. `sorted_list_values` imposed a
numeric-aware ascending order on every `list_*` return (roots, expirations,
strikes, dates); the wire order is the server's order and is now preserved.
The interval argument is no longer snapped to the nearest preset.
`normalize_interval` silently mapped an arbitrary millisecond string (`"250"`,
`"60000"`) to a documented bucket; the server accepts only the closed preset
enum and the terminal forwards the string as-is. The codegen no longer wraps
interval args, and `validate_interval` now rejects anything outside the preset
set client-side instead of accepting raw milliseconds. Raw-ms shorthand is a
breaking change to the `interval` parameter.
Interval parameter docs are regenerated to drop the millisecond-string mention.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* docs: drop stale millisecond-interval mentions from spec and examples
The interval parameter no longer accepts raw-millisecond strings, but the
OpenAPI spec, the symbology article, the codegen fallback description, an
example fixture, and the local server's doc comment still advertised
milliseconds ("60000") and used it in every history-endpoint code sample —
snippets that now fail client-side validation. Rewrite the descriptions to the
closed preset enum and switch the example interval to "1m" (the preset for the
same one-minute bar).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: preview <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21
21
22
22
-**Config-file migration.** A `config.toml` that still sets `flush_mode`, `streaming.host_selection`, `streaming.host_shuffle_seed`, or a `reconnect_jitter` of `"equal"` / `"decorrelated"` now fails to load with a typed error rather than being silently ignored — remove those keys / values when upgrading.
23
23
24
+
-**`QuoteTick.midpoint` derived column.** Removed from every binding (Python `QuoteTick.midpoint`, TypeScript `QuoteTick.midpoint`, C `ThetaDataDxQuoteTick.midpoint`, and the Arrow / Polars `midpoint` column). The quote wire carries `bid` and `ask`; `midpoint` was an SDK-computed `(bid + ask) / 2` column the server never sends and the terminal never exposes — compute it from `bid` / `ask` at the call site if you need it. The `IvTick.midpoint` field is a real wire column and is unaffected. This is a breaking change to the quote tick schema.
25
+
26
+
-**List endpoints now preserve wire order.**`list_*` results (roots / symbols, expirations, strikes, dates) come back in the server's row order rather than re-sorted ascending by the SDK. The terminal streams these lists in wire order untouched; the SDK's numeric-aware ascending sort had no terminal counterpart. Sort client-side if you need a specific order. This is a behavioral change to the `list_*` returns.
27
+
28
+
-**`interval` is forwarded verbatim.** The `interval` argument is no longer snapped to the nearest preset: a raw-millisecond value such as `"250"` or `"60000"` is now rejected client-side rather than silently mapped to `"500ms"` / `"1m"`. The server accepts only the closed preset enum (`tick`, `10ms`, `100ms`, `500ms`, `1s`, `5s`, `10s`, `15s`, `30s`, `1m`, `5m`, `10m`, `15m`, `30m`, `1h`); the SDK now forwards the string as-is and validates against that set. Pass an explicit preset. This is a breaking change to the `interval` parameter.
Copy file name to clipboardExpand all lines: docs-site/docs/changelog.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21
21
22
22
-**Config-file migration.** A `config.toml` that still sets `flush_mode`, `streaming.host_selection`, `streaming.host_shuffle_seed`, or a `reconnect_jitter` of `"equal"` / `"decorrelated"` now fails to load with a typed error rather than being silently ignored — remove those keys / values when upgrading.
23
23
24
+
-**`QuoteTick.midpoint` derived column.** Removed from every binding (Python `QuoteTick.midpoint`, TypeScript `QuoteTick.midpoint`, C `ThetaDataDxQuoteTick.midpoint`, and the Arrow / Polars `midpoint` column). The quote wire carries `bid` and `ask`; `midpoint` was an SDK-computed `(bid + ask) / 2` column the server never sends and the terminal never exposes — compute it from `bid` / `ask` at the call site if you need it. The `IvTick.midpoint` field is a real wire column and is unaffected. This is a breaking change to the quote tick schema.
25
+
26
+
-**List endpoints now preserve wire order.**`list_*` results (roots / symbols, expirations, strikes, dates) come back in the server's row order rather than re-sorted ascending by the SDK. The terminal streams these lists in wire order untouched; the SDK's numeric-aware ascending sort had no terminal counterpart. Sort client-side if you need a specific order. This is a behavioral change to the `list_*` returns.
27
+
28
+
-**`interval` is forwarded verbatim.** The `interval` argument is no longer snapped to the nearest preset: a raw-millisecond value such as `"250"` or `"60000"` is now rejected client-side rather than silently mapped to `"500ms"` / `"1m"`. The server accepts only the closed preset enum (`tick`, `10ms`, `100ms`, `500ms`, `1s`, `5s`, `10s`, `15s`, `30s`, `1m`, `5m`, `10m`, `15m`, `30m`, `1h`); the SDK now forwards the string as-is and validates against that set. Pass an explicit preset. This is a breaking change to the `interval` parameter.
|`date`| date | no | — | Single date YYYYMMDD. Supply this for a single-day pull, or supply `start_date`/`end_date` for a range. When present, `date` takes precedence over the range. |
44
-
|`interval`| string | no |`1s`| Interval preset or millisecond string. Defaults to `1s` when omitted — matching the upstream ThetaData Python library. Accepted values: `tick`, `10ms`, `100ms`, `500ms`, `1s`, `5s`, `10s`, `15s`, `30s`, `1m`, `5m`, `10m`, `15m`, `30m`, `1h`. |
44
+
|`interval`| string | no |`1s`| Interval preset. Defaults to `1s` when omitted — matching the upstream ThetaData Python library. Accepted values: `tick`, `10ms`, `100ms`, `500ms`, `1s`, `5s`, `10s`, `15s`, `30s`, `1m`, `5m`, `10m`, `15m`, `30m`, `1h`. |
45
45
|`start_time`| string | no |`09:30:00`| Start time filter |
46
46
|`end_time`| string | no |`16:00:00`| End time filter |
47
47
|`start_date`| date | no | — | Start date YYYYMMDD |
0 commit comments