Liking cljdoc? Tell your friends :D

Official Go and JavaScript SDK Cross-Check

English counterpart of OFFICIAL_SDK_CROSSCHECK.md. | Türkçe

Review date: 2026-08-18 Result: Phase 1's core decisions were confirmed; retry classification was tightened by binding it to endpoint execution semantics.

Reviewed Sources

SDKCommitSpot/common version
Binance Go Connector553d82485895a6ccabd881e6bf838d384a65fc1aSpot 1.10.0, common 2.6.0
Binance JavaScript Connector092e4f289e9047114fb8ec66256510cc207e16bb@binance/spot 32.0.1, @binance/common 2.4.5

Both repositories are current product-oriented, modular, OpenAPI-generated connector implementations. Older monolithic Node/TypeScript connectors are not current design sources.

Decision Matrix

TopicGo / JavaScript findingbinance-clj decision
Client separationREST, WebSocket API, and Streams have separate config/lifecycleConfirmed: retain separate boundaries behind one facade
Public modelLarge generated struct/interface networksNot copied: immutable Clojure maps and small normalizers
Financial fieldsPrice/quantity/balance generally remain stringsStrengthened: strings on wire, BigDecimal internally/publicly
Large integersJS uses json-with-bigint; Go uses int64/typed modelsIDs/timestamps remain integers and never become financial values
REST signingSerialization and signed payload are produced togetherExact wire-payload and percent-encoding confirmed
WS API signingBoth sort parameters alphabeticallyAlphabetical ordering confirmed
WS UnicodeCommon helpers URL-encodeOfficial raw-UTF-8 vector wins; Phase 3 test protects it
AuthenticationHMAC, RSA, and Ed25519 pathsHMAC + Ed25519 in V1; RSA remains out of scope
TimestampSDKs read system time directlyKeep clock injection for deterministic tests and server offset
Response metadataStatus, headers, and rate-limit metadata preservedNormalized metadata envelope confirmed
Error modelShared classes focus on HTTP statusPreserve richer numeric code, status, retry metadata, and unknown execution
ReconnectRegistry, serverShutdown, reconnect, restoreConfirmed, plus bounded queue, jitter, and explicit-close distinction
Default environmentSDKs default to productionIntentionally keep Testnet as the safer default

Critical Retry Finding

Go common 2.6.0 retries REST 500504 three times without checking HTTP method. JavaScript common 2.4.5 limits network/500504 retries to GET and DELETE. On Binance Spot, DELETE /api/v3/order is a state-changing cancel command, so HTTP method alone cannot establish retry safety.

Therefore binance-clj:

  • never derives retry safety only from GET/POST/DELETE;
  • marks every endpoint :execution :read|:command;
  • requires :retry-policy :never for every command; and
  • reconciles uncertain create/cancel outcomes through query and UDS.

This expands “do not retry a trading POST” into “do not automatically retry any state-changing trading command.”

Intentional Differences

  1. No generated model network or closed SDK enum design.
  2. No production URL default.
  3. No fixed/global retry count.
  4. No method-based inference of retry safety.
  5. No shared REST/WebSocket canonicalizer.
  6. Reconnect uses exponential backoff plus jitter, not only a fixed delay.
  7. Raw exception/request content is not copied into diagnostics; errors are normalized and secret-safe.

Final Confirmation

No error required reversing Phase 1 decisions on scope, endpoints, Testnet safety, BigDecimal, separate REST/WS signing, current User Data Stream method, metadata envelope, unknown execution, or reconnect/restore. Retry scope was tightened as described and incorporated into the Phase 2 endpoint contract.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close