feat(foxbit): add X-FB-CLIENT identification headers - #1
Open
matheus-alcuri-foxbit wants to merge 2 commits into
Open
feat(foxbit): add X-FB-CLIENT identification headers#1matheus-alcuri-foxbit wants to merge 2 commits into
matheus-alcuri-foxbit wants to merge 2 commits into
Conversation
Send X-FB-CLIENT: ccxt and X-FB-CLIENT-VERSION: <ccxt version> on every foxbit REST request so the exchange can identify and measure ccxt-originated traffic. Since the library version constant was not reachable from transpiled exchange code, this adds a getCcxtVersion() base helper implemented above the transpile marker (hand-written per language: TS/JS, Python, PHP, C#, Go, Java), and a testFoxbit broker-id test asserting both headers via last_request_headers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Sends
X-FB-CLIENT: ccxtandX-FB-CLIENT-VERSION: <ccxt version>on every foxbit REST request so the exchange can identify and measure ccxt-originated traffic (client header approach chosen over User-Agent, which users/base code can override).Since the library version constant was not reachable from transpiled exchange code, this adds a
getCcxtVersion()base helper implemented above the transpile marker (hand-written per language: TS/JS, Python, PHP, C#, Go, Java). Headers are injected insign()(same pattern as bybit'sReferer), so they take precedence over userheadersoverrides. AtestFoxbitbroker-id test asserts both headers vialast_request_headers.Tests run
use-typescript6wrapper) — 0 errors on edited filesnpm run tsBuild— pass (afteremitAPITs)testFoxbit) — passed in JS and Pythongo build(v4 + v4/pro) — passdotnet build cs/ccxt.sln— 4 projects, 0 errors (.NET 10 SDK)php -lon edited/regenerated files — clean (php:8.2 container)BaseExchange.javaand returnsVersion.VERSIONfetchTicker BTC/BRL— request carried both headers, 200 OKNotes
ts/src/**+ hand-written base files. Per-exchange generated files are left to the build automation.vss.