Skip to content

Commit 0671c4e

Browse files
committed
refactor!: remove Go SDK (closes #481)
The cgo bridge between Rust's C ABI and Go's runtime carries per-call overhead that masks the upstream throughput this SDK is engineered for. Users who need Go bindings can build their own cgo wrapper against the unchanged C ABI in `crates/ffi/` — header at `sdks/cpp/include/thetadx.h`, all FFI types and free fns exported as `tdx_*` symbols. Removes: - `sdks/go/` (entire directory: 30 source files) - Per-Go build_support modules + templates: `ticks/go.rs`, `fpss_events/go_structs.rs`, `sdk_surface/go.rs`, `endpoints/render/go.rs`, `endpoints/render/go_validate.rs`, all `templates/go/`, `templates/validate_go/`, `templates/go_structs/` - Go-specific `tick_schema.toml` render rows (`go_struct`, `go_converter`) on every `[types.X.render]` block - Go-specific `sdk_surface.toml` targets (`go_fpss`, `go`) and the entire `[[go_ffi.tls_reader_markers]]` SSOT block - `MethodTarget::GoFpss`, `UtilityTarget::Go`, `GoFfiSpec`, `TlsReaderMarker`, plus every Go-only helper in `endpoints/helpers.rs` and `sdk_surface/common.rs` - CI Go SDK jobs in `ci.yml` and `live.yml` (`actions/setup-go`, cgo wrapper steps), Go module from `dependabot.yml`, and the `sdks/go/` rules in `.gitattributes` Extracts shared `(size, align, offset)` math used by the C++ and tdbe layout-assert emitters into a neutral `ticks/layout.rs` module. Refreshes README, CONTRIBUTING, ROADMAP, the docs-site, and the in-repo `docs/` tree. Mirrors `CHANGELOG.md` -> `docs-site/docs/changelog.md`. The C ABI in `crates/ffi/` is unchanged — third-party cgo / Swift / Zig wrappers continue to work against the same `extern "C"` surface. Closes #481.
1 parent 3cc589a commit 0671c4e

105 files changed

Lines changed: 313 additions & 9131 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22
# `generate_sdk_surfaces --check` doesn't false-positive on Windows.
33
ffi/src/endpoint_request_options.rs text eol=lf linguist-generated=true
44
ffi/src/endpoint_with_options.rs text eol=lf linguist-generated=true
5-
sdks/go/endpoint_options.go text eol=lf linguist-generated=true
6-
sdks/go/endpoint_request_options.h.inc text eol=lf linguist-generated=true
7-
sdks/go/endpoint_with_options.h.inc text eol=lf linguist-generated=true
8-
sdks/go/fpss_methods.go text eol=lf linguist-generated=true
9-
sdks/go/historical.go text eol=lf linguist-generated=true
10-
sdks/go/tick_converters.go text eol=lf linguist-generated=true
11-
sdks/go/tick_structs.go text eol=lf linguist-generated=true
12-
sdks/go/utilities.go text eol=lf linguist-generated=true
135
sdks/cpp/include/endpoint_options.hpp.inc text eol=lf linguist-generated=true
146
sdks/cpp/include/endpoint_request_options.h.inc text eol=lf linguist-generated=true
157
sdks/cpp/include/endpoint_with_options.h.inc text eol=lf linguist-generated=true
@@ -20,7 +12,6 @@ sdks/cpp/src/fpss.cpp.inc text eol=lf linguist-generated=true
2012
sdks/cpp/src/historical.cpp.inc text eol=lf linguist-generated=true
2113
sdks/cpp/src/lifecycle.cpp.inc text eol=lf linguist-generated=true
2214
sdks/cpp/src/utilities.cpp.inc text eol=lf linguist-generated=true
23-
sdks/go/validate.go text eol=lf linguist-generated=true
2415
sdks/python/src/historical_methods.rs text eol=lf linguist-generated=true
2516
sdks/python/src/streaming_methods.rs text eol=lf linguist-generated=true
2617
scripts/validate_python.py text eol=lf linguist-generated=true
@@ -36,7 +27,6 @@ sdks/typescript/src/streaming_methods.rs text eol=lf linguist-generated=true
3627
sdks/typescript/src/tick_classes.rs text eol=lf linguist-generated=true
3728
sdks/typescript/src/fpss_event_classes.rs text eol=lf linguist-generated=true
3829
sdks/typescript/src/buffered_event.rs text eol=lf linguist-generated=true
39-
sdks/go/fpss_event_structs.go text eol=lf linguist-generated=true
4030
sdks/cpp/include/fpss_event_structs.h.inc text eol=lf linguist-generated=true
4131

4232
# Generated validator surfaces that were missed from the original list.

.github/dependabot.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,3 @@ updates:
4545
patch-minor:
4646
update-types: ["patch", "minor"]
4747

48-
- package-ecosystem: "gomod"
49-
directory: "/sdks/go"
50-
schedule:
51-
interval: "weekly"
52-
groups:
53-
go-patch-minor:
54-
update-types: ["patch", "minor"]

.github/workflows/ci.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ jobs:
7777
- uses: dtolnay/rust-toolchain@stable
7878
with:
7979
components: clippy
80-
- uses: actions/setup-go@v6
81-
with:
82-
go-version: "1.23"
8380
- uses: actions/setup-python@v6
8481
with:
8582
python-version: "3.12"
@@ -123,9 +120,6 @@ jobs:
123120
ffi_artifact: ffi-windows-msvc-x86_64
124121
steps:
125122
- uses: actions/checkout@v6
126-
- uses: actions/setup-go@v6
127-
with:
128-
go-version: "1.23"
129123
- uses: actions/download-artifact@v8
130124
with:
131125
name: ${{ matrix.ffi_artifact }}
@@ -137,19 +131,6 @@ jobs:
137131
path: target/x86_64-pc-windows-gnu/release/
138132
- run: cmake -S sdks/cpp -B build/cpp
139133
- run: cmake --build build/cpp --config Release --target thetadatadx_cpp
140-
- shell: bash
141-
working-directory: sdks/go
142-
run: |
143-
set -euo pipefail
144-
if [ "${{ runner.os }}" = "Linux" ]; then
145-
export LD_LIBRARY_PATH="${{ github.workspace }}/target/release"
146-
elif [ "${{ runner.os }}" = "macOS" ]; then
147-
export DYLD_LIBRARY_PATH="${{ github.workspace }}/target/release"
148-
else
149-
export PATH="${{ github.workspace }}/target/x86_64-pc-windows-gnu/release:$PATH"
150-
export CGO_LDFLAGS="-L${{ github.workspace }}/target/x86_64-pc-windows-gnu/release"
151-
fi
152-
go test ./...
153134

154135
build-ffi:
155136
name: Build FFI (${{ matrix.os }})

.github/workflows/live.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ jobs:
5656
- uses: actions/setup-python@v6
5757
with:
5858
python-version: "3.12"
59-
- uses: actions/setup-go@v6
60-
with:
61-
go-version: "1.23"
6259
- name: Materialize creds.txt
6360
shell: python
6461
env:
@@ -92,16 +89,6 @@ jobs:
9289
env:
9390
LD_LIBRARY_PATH: ${{ github.workspace }}/target/release
9491
run: ./build/cpp/thetadatadx_fpss_smoke creds.txt
95-
- shell: bash
96-
env:
97-
LD_LIBRARY_PATH: ${{ github.workspace }}/target/release
98-
CGO_LDFLAGS: -L${{ github.workspace }}/target/release
99-
run: cd sdks/go && go run ./cmd/live_smoke ../../creds.txt
100-
- shell: bash
101-
env:
102-
LD_LIBRARY_PATH: ${{ github.workspace }}/target/release
103-
CGO_LDFLAGS: -L${{ github.workspace }}/target/release
104-
run: cd sdks/go && go run ./cmd/fpss_smoke ../../creds.txt
10592
- name: FLATFILES synthetic golden (decoder)
10693
# Runs against a hand-built blob in the repo; no live wire. This
10794
# is the always-on regression gate for the FIT decoder + CSV
@@ -138,9 +125,6 @@ jobs:
138125
- uses: actions/setup-python@v6
139126
with:
140127
python-version: "3.12"
141-
- uses: actions/setup-go@v6
142-
with:
143-
go-version: "1.23"
144128
- name: Materialize creds.txt
145129
shell: python
146130
env:
@@ -168,11 +152,6 @@ jobs:
168152
env:
169153
LD_LIBRARY_PATH: ${{ github.workspace }}/target/release
170154
run: ./build/cpp/thetadatadx_validate creds.txt
171-
- shell: bash
172-
env:
173-
LD_LIBRARY_PATH: ${{ github.workspace }}/target/release
174-
CGO_LDFLAGS: -L${{ github.workspace }}/target/release
175-
run: cd sdks/go && go run ./cmd/validate ../../creds.txt
176155
release-validation:
177156
name: Full Release Validation
178157
needs: endpoint-validation
@@ -182,9 +161,6 @@ jobs:
182161
steps:
183162
- uses: actions/checkout@v6
184163
- uses: ./.github/actions/setup-rust-deps
185-
- uses: actions/setup-go@v6
186-
with:
187-
go-version: "1.23"
188164
- uses: actions/setup-python@v6
189165
with:
190166
python-version: "3.12"

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [8.0.29] - 2026-05-06
11+
12+
### Removed
13+
14+
- **Go SDK.** The cgo bridge between Rust's C ABI and Go's runtime
15+
carries per-call overhead that masks the upstream throughput this
16+
SDK is engineered for. Users who need Go bindings can build their
17+
own cgo wrapper against the unchanged C ABI in `crates/ffi/`
18+
header at `sdks/cpp/include/thetadx.h`, all FFI types and free fns
19+
exported as `tdx_*` symbols.
20+
21+
Closes #481.
22+
1023
## [8.0.28] - 2026-05-06
1124

1225
### Breaking

CONTRIBUTING.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ for the FLATFILES coverage matrix.
1818
- **Python 3.9+** - for the Python SDK
1919
- **maturin** - for building the PyO3 Python bindings (`pip install "maturin>=1.9.4,<2.0"`)
2020
- **Node.js 18+** - for the TypeScript/Node.js SDK
21-
- **Go 1.21+** - for the Go SDK
2221

2322
Note: `protoc` is required even if you're not modifying `.proto` files, because `build.rs` compiles protos during `cargo build`.
2423

@@ -64,7 +63,6 @@ cargo test --manifest-path tools/cli/Cargo.toml
6463
# 6. Language SDK smoke checks (if modified)
6564
cargo check --manifest-path sdks/python/Cargo.toml
6665
(cd sdks/typescript && npm run build)
67-
(cd sdks/go && LD_LIBRARY_PATH=../../target/release go test ./...)
6866
c++ -std=c++17 -fsyntax-only -I sdks/cpp/include sdks/cpp/src/thetadx.cpp
6967
cmake -S sdks/cpp -B build/cpp
7068
cmake --build build/cpp --target thetadatadx_cpp
@@ -114,7 +112,6 @@ We follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
114112
| `ffi` | `ffi/` |
115113
| `python` | `sdks/python/` |
116114
| `typescript` | `sdks/typescript/` |
117-
| `go` | `sdks/go/` |
118115
| `cpp` | `sdks/cpp/` |
119116
| `cli` | `tools/cli/` |
120117
| `mcp` | `tools/mcp/` |

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ThetaDataDx
22

3-
Rust SDK for ThetaData market data — single Rust core, five language surfaces (Rust, Python, TypeScript, Go, C++).
3+
Rust SDK for ThetaData market data — single Rust core, four language surfaces (Rust, Python, TypeScript, C++).
44

55
[![build](https://github.com/userFRM/ThetaDataDx/actions/workflows/ci.yml/badge.svg)](https://github.com/userFRM/ThetaDataDx/actions/workflows/ci.yml)
66
[![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)
@@ -10,18 +10,18 @@ Rust SDK for ThetaData market data — single Rust core, five language surfaces
1010
[![Docs](https://img.shields.io/docsrs/thetadatadx)](https://docs.rs/thetadatadx)
1111
[![Discord](https://img.shields.io/badge/Discord-community-5865F2.svg?logo=discord&logoColor=white)](https://discord.thetadata.us/)
1212

13-
`thetadatadx` is a native Rust SDK for [ThetaData](https://thetadata.us) market data. It connects directly to ThetaData's three public surfaces — MDDS (historical request/response over gRPC), FPSS (real-time streaming over TCP), and FLATFILES (whole-universe daily blobs over the legacy MDDS port) — decodes ticks in-process, and exposes a typed API across Rust, Python, TypeScript, Go, and C++ from a single Rust core. No JVM, no subprocess, no IPC serialization.
13+
`thetadatadx` is a native Rust SDK for [ThetaData](https://thetadata.us) market data. It connects directly to ThetaData's three public surfaces — MDDS (historical request/response over gRPC), FPSS (real-time streaming over TCP), and FLATFILES (whole-universe daily blobs over the legacy MDDS port) — decodes ticks in-process, and exposes a typed API across Rust, Python, TypeScript, and C++ from a single Rust core. No JVM, no subprocess, no IPC serialization. Go consumers can build a thin cgo wrapper against the unchanged C ABI in [`ffi/`](ffi/) — header at [`sdks/cpp/include/thetadx.h`](sdks/cpp/include/thetadx.h), all FFI types and free fns exported as `tdx_*` symbols.
1414

1515
> [!IMPORTANT]
1616
> A valid [ThetaData](https://thetadata.us) subscription is required. The SDK authenticates against ThetaData's Nexus API using your account credentials.
1717
1818
## Highlights
1919

20-
- **Typed everywhere.** 61 ThetaData endpoints exposed as typed methods across all five SDKs; no raw JSON or protobuf on the public surface.
20+
- **Typed everywhere.** 61 ThetaData endpoints exposed as typed methods across all four SDKs; no raw JSON or protobuf on the public surface.
2121
- **Arrow-backed DataFrames.** Python `to_arrow()` / `to_pandas()` / `to_polars()` pipe through shared Arrow buffers.
2222
- **SPKI-pinned FPSS TLS.** Public-key pinning on the FPSS streaming handshake.
2323
- **FIT decoder + SPSC ring buffer** on the FPSS path. Decode cost is measured in the benchmarks under `crates/thetadatadx/benches/`.
24-
- **Shared FFI layer.** Go, C++, and Node.js go through the same `extern "C"` layer; the Python wheel uses PyO3 ABI3 directly.
24+
- **Shared FFI layer.** C++ and Node.js go through the same `extern "C"` layer; the Python wheel uses PyO3 ABI3 directly. The C ABI is also the supported integration path for any third-party Go/C/other-language consumer that wants to roll their own wrapper.
2525
- **Covers all three public surfaces.** MDDS gRPC endpoints, FPSS wire format with reconnect semantics, and the FLATFILES daily-blob protocol — every transport speaks directly to ThetaData's production servers from a single client. See the [parity checklist](docs/java-parity-checklist.md) and the [vendor flat-file reference](https://http-docs.thetadata.us/operations/get-v2-flat-file-getting-started.html).
2626
- **FLATFILES daily blobs.** Pull whole-universe `(sec_type, req_type, date)` blobs over the legacy MDDS port; decode to vendor-byte CSV, JSONL, or a typed `Vec<FlatFileRow>` in memory. Cross-language coverage is tracked under the binding issues; the Rust core is shipped today.
2727

@@ -100,32 +100,6 @@ for (const t of tdx.stockHistoryEOD('AAPL', '20240101', '20240301')) {
100100
}
101101
```
102102

103-
### Go
104-
105-
```sh
106-
go get github.com/userFRM/ThetaDataDx/sdks/go
107-
```
108-
109-
```go
110-
package main
111-
112-
import (
113-
"fmt"
114-
thetadata "github.com/userFRM/ThetaDataDx/sdks/go"
115-
)
116-
117-
func main() {
118-
tdx, err := thetadata.ConnectFromFile("creds.txt", thetadata.Production())
119-
if err != nil { panic(err) }
120-
defer tdx.Close()
121-
ticks, _ := tdx.StockHistoryEod("AAPL", "20240101", "20240301")
122-
for _, t := range ticks {
123-
fmt.Printf("%d: O=%.2f H=%.2f L=%.2f C=%.2f V=%d\n",
124-
t.Date, t.Open, t.High, t.Low, t.Close, t.Volume)
125-
}
126-
}
127-
```
128-
129103
### C++
130104

131105
```cpp
@@ -202,7 +176,6 @@ flowchart TB
202176
203177
core -->|PyO3 / maturin| python["Python SDK<br/>(pyo3 · Arrow)"]
204178
ffi -->|napi-rs| ts["TypeScript SDK<br/>(N-API · BigInt)"]
205-
ffi -->|cgo| go["Go SDK"]
206179
ffi -->|extern C| cpp["C++ SDK<br/>(RAII header-only)"]
207180
core -->|tonic| rust["Rust consumer<br/>(direct crate)"]
208181
@@ -211,17 +184,16 @@ flowchart TB
211184
classDef sdkStyle fill:#14532d,stroke:#052e16,color:#fff
212185
class thetadatadx,tdbe coreStyle
213186
class ffi ffiStyle
214-
class python,ts,go,cpp,rust sdkStyle
187+
class python,ts,cpp,rust sdkStyle
215188
```
216189

217190
| Layer | Crate / package | Purpose |
218191
|-------|-----------------|---------|
219192
| Encoding / types | [`crates/tdbe`](crates/tdbe/) | Tick structs, FIT/FIE codecs, Greeks, Price |
220193
| Core SDK | [`crates/thetadatadx`](crates/thetadatadx/) | MDDS gRPC client, FPSS streaming, auth |
221-
| C FFI | [`ffi/`](ffi/) | Stable `extern "C"` layer consumed by Go, C++, Node.js |
194+
| C FFI | [`ffi/`](ffi/) | Stable `extern "C"` layer consumed by C++, Node.js, and any third-party C/Go consumer |
222195
| Python | [`sdks/python`](sdks/python/) | PyO3 / maturin wheel with Arrow DataFrame adapter |
223196
| TypeScript | [`sdks/typescript`](sdks/typescript/) | napi-rs prebuilt binary |
224-
| Go | [`sdks/go`](sdks/go/) | CGo bindings over the FFI layer |
225197
| C++ | [`sdks/cpp`](sdks/cpp/) | RAII header-only wrapper |
226198
| CLI | [`tools/cli`](tools/cli/) | `tdx` CLI — every generated historical endpoint from the command line |
227199
| MCP | [`tools/mcp`](tools/mcp/) | MCP server - gives clients access to every generated historical endpoint plus offline tools over JSON-RPC |

ROADMAP.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ Server retention window: 7 calendar days. Older history: contact ThetaData sales
142142
| REST/WS server (`tools/server`) | Pending | #432 |
143143
| Python (`sdks/python`) | Pending | #435 |
144144
| TypeScript (`sdks/typescript`) | Pending | #436 |
145-
| Go (`sdks/go`) | Pending | #437 |
146145
| C++ (`sdks/cpp`) | Pending | #438 |
147146
| `sdk_surface.toml` declarative spec | Pending | #439 |
148147

@@ -169,11 +168,10 @@ Server retention window: 7 calendar days. Older history: contact ThetaData sales
169168

170169
### Cross-language parity for `utils`
171170

172-
The Rust SDK exposes `thetadatadx::utils::{conditions, exchange, sequences}` for post-processing tick records. The Python, TypeScript, Go, and C++ SDKs do **not** currently expose any of these helpers. Tracked in issue #424.
171+
The Rust SDK exposes `thetadatadx::utils::{conditions, exchange, sequences}` for post-processing tick records. The Python, TypeScript, and C++ SDKs do **not** currently expose any of these helpers. Tracked in issue #424.
173172

174173
- [ ] **Python** — bind `thetadatadx.utils.{conditions, exchange, sequences}` via PyO3.
175174
- [ ] **TypeScript** — bind via napi-rs under the same `utils.*` namespace.
176-
- [ ] **Go** — flat helper functions `thetadatadx.UtilsConditionName(code)`, etc.
177175
- [ ] **C++** — header at `sdks/cpp/include/thetadx_utils.h` with `extern "C"` bindings plus thin C++ wrappers.
178176

179177
### MDDS endpoint coverage on subscription-tier-blocked rows
@@ -193,7 +191,7 @@ The 7 SKIP rows in the MDDS validator are subscription-blocked on the current te
193191

194192
### Cross-SDK parity validation
195193

196-
- [ ] Run the validator matrix through the Python, TypeScript, Go, and C++ SDKs and compare row-for-row against the Rust artifact. Locks in the contract that all four bindings return identical data for every endpoint.
194+
- [ ] Run the validator matrix through the Python, TypeScript, and C++ SDKs and compare row-for-row against the Rust artifact. Locks in the contract that all three bindings return identical data for every endpoint.
197195

198196
### Upstream features
199197

crates/thetadatadx/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thetadatadx"
3-
version = "8.0.28"
3+
version = "8.0.29"
44
edition.workspace = true
55
rust-version.workspace = true
66
authors.workspace = true

0 commit comments

Comments
 (0)