Skip to content

feat(foxbit): add X-FB-CLIENT identification headers - #1

Open
matheus-alcuri-foxbit wants to merge 2 commits into
masterfrom
ccxt-client-identification
Open

feat(foxbit): add X-FB-CLIENT identification headers#1
matheus-alcuri-foxbit wants to merge 2 commits into
masterfrom
ccxt-client-identification

Conversation

@matheus-alcuri-foxbit

@matheus-alcuri-foxbit matheus-alcuri-foxbit commented Aug 7, 2026

Copy link
Copy Markdown

Summary

Sends 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 (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 in sign() (same pattern as bybit's Referer), so they take precedence over user headers overrides. A testFoxbit broker-id test asserts both headers via last_request_headers.

Tests run

  • eslint (via the use-typescript6 wrapper) — 0 errors on edited files
  • npm run tsBuild — pass (after emitAPITs)
  • id-tests (brokerId suite incl. new testFoxbit) — passed in JS and Python
  • go build (v4 + v4/pro) — pass
  • dotnet build cs/ccxt.sln — 4 projects, 0 errors (.NET 10 SDK)
  • php -l on edited/regenerated files — clean (php:8.2 container)
  • Java compile — not run locally (needs JDK 21+); the helper mirrors adjacent hand-written methods in BaseExchange.java and returns Version.VERSION
  • Live smoke (previous round, same code): fetchTicker BTC/BRL — request carried both headers, 200 OK

Notes

  • Diff is source-only (9 files, +60/−1): ts/src/** + hand-written base files. Per-exchange generated files are left to the build automation.
  • The version header value comes from each language's existing version constant, all already bumped by vss.
  • Replaces the equivalent branch/PR from the previous fork repository.

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>
@matheus-alcuri-foxbit matheus-alcuri-foxbit self-assigned this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant