Skip to content

fix: read Bitget USDT-M and UTA account state - #951

Draft
enderzcx wants to merge 1 commit into
TraderAlice:devfrom
enderzcx:agent/bitget-usdtm-read-model
Draft

fix: read Bitget USDT-M and UTA account state#951
enderzcx wants to merge 1 commit into
TraderAlice:devfrom
enderzcx:agent/bitget-usdtm-read-model

Conversation

@enderzcx

@enderzcx enderzcx commented Aug 1, 2026

Copy link
Copy Markdown

Summary

  • Model Bitget Classic accounts as separate Spot and USDT-M Futures sub-accounts, while keeping UTA as one unified account.
  • Route balances and positions through the explicit Bitget account family and USDT-FUTURES product type.
  • Enumerate regular, trigger, TP/SL, and trailing open-order namespaces and fail loudly on partial private reads.
  • Add a backward-compatible Classic/Unified account selector to the Bitget preset.

Root cause

CCXT defaults Bitget to spot with UTA disabled. The previous unscoped balance, position, and open-order calls therefore looked healthy while omitting Classic USDT-M funds and several order namespaces. CCXT 4.5.38 also normalizes UTA asset balance instead of the venue equity field.

Verification

  • 174 targeted Vitest assertions pass across the Bitget override, actual CCXT 4.5.38 routing contract, CcxtBroker, and preset translation specs.
  • Root TypeScript check passes.
  • CCXT broker package typecheck passes.
  • Broker-pack build and verification pass for all five darwin-arm64 release artifacts.
  • Read-only live acceptance against a Classic Bitget account returned separate spot and derivatives sub-accounts, readable positive derivatives equity, zero current positions, and two submitted open orders. The UTA v3 probe correctly rejected the Classic account with Bitget code 40084. No order write endpoint was called.

The full Node 22 suite reached 3,863 passing and 9 skipped tests. The remaining 30 local failures are confined to PTY tests and Git-backed workspace tests because this checkout could not download dugite's bundled Git and its node-pty PTY spawn is unavailable; no Bitget test failed.

Boundaries

  • This changes read-only account parsing/routing and preset configuration only.
  • It does not change order placement, modification, cancellation, credentials, exchange permissions, or automated-trading policy.

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

@enderzcx is attempting to deploy a commit to the luokerenx4's Team Team on Vercel.

A member of the Team first needs to authorize it.

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