fix(ffi): add unified exports + SnapshotTradeTick plumbing to Go/C++ headers#239
Merged
Merged
Conversation
…headers (#216, #227) Add all 19 tdx_unified_* C declarations (connect, start/stop streaming, subscribe/unsubscribe quotes/trades/open_interest/full_trades/full_open_interest, is_streaming, contract_lookup, active_subscriptions, next_event, historical, free) plus the TdxUnified opaque type to both sdks/go/ffi_bridge.h and sdks/cpp/include/thetadx.h. Add missing cOptionContract size assertion to Go init() checks. Note: TdxSnapshotTradeTickArray and tdx_free_snapshot_trade_tick_array are NOT added because the Rust FFI does not export them -- SnapshotTradeTick was intentionally removed from the FFI layer in v5.4.0 (snapshot trade endpoints return TdxTradeTickArray). The C struct definition remains for documentation but has no array/free plumbing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tdx_unified_*C declarations and theTdxUnifiedopaque type to bothsdks/go/ffi_bridge.handsdks/cpp/include/thetadx.h. These match the Rust FFI exports that have existed since the unified client was introduced but were never declared in the SDK headers.cOptionContractsize assertion to Goinit()checks (expected size: 32 bytes).TdxSnapshotTradeTickArray/tdx_free_snapshot_trade_tick_arrayare intentionally not added because the Rust FFI does not export them --SnapshotTradeTickwas removed from the FFI layer in v5.4.0; snapshot trade endpoints returnTdxTradeTickArray.Files changed
sdks/go/ffi_bridge.h--TdxUnifiedopaque type + 19 unified function externssdks/cpp/include/thetadx.h--TdxUnifiedopaque type + 19 unified function declarations with doc commentssdks/go/client.go--cOptionContractsize assertion ininit()Test plan
cargo build --release -p thetadatadx-ffi --lockedpasses (no Rust changes)🤖 Generated with Claude Code