Skip to content

Migrate to Bitget API V2#6

Open
gering wants to merge 3 commits intomainfrom
feature/api-v2-migration
Open

Migrate to Bitget API V2#6
gering wants to merge 3 commits intomainfrom
feature/api-v2-migration

Conversation

@gering
Copy link
Owner

@gering gering commented Feb 1, 2026

Summary

Based on #4 by @karstenevers with additional version bump.

  • Migrate all endpoints from API V1 to V2
  • Add proper URL encoding for query parameters
  • Support USDC in addition to USDT
  • Update field names for V2 response structure
  • Bump version to 2.0
  • Update API-SPEC.md documentation

Changes from #4

  • Version bump: 1.1 → 2.0

Test plan

  • Spot account balances load correctly
  • Cryptocurrency prices are fetched
  • Futures positions (if available)

Closes #4
Closes #5

🤖 Generated with Claude Code

- Bitget V1 endpoints are decommissioned; migrate spot + mix requests to /api/v2/* and update response parsing (arrays, lastPr, markPrice/openPriceAvg, marginSize).

- Canonicalize query-string ordering for signature prehash to avoid intermittent auth errors.

- Refactor FX conversion: treat USDT/USDC as USD, and avoid caching failed non-EUR ECB lookups that can break reverse-pair logic.
Document Bitget REST API v2 endpoints used by this project (spot assets, spot tickers, mix accounts, mix positions, mix ticker, public time).
Clarify v2 signature prehash format (including conditional '?' before query string) and recommend deterministic query construction to prevent signature mismatches.
Add timestamp drift guidance for ACCESS-TIMESTAMP and update response format notes (code "00000", msg/message).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gering gering force-pushed the feature/api-v2-migration branch from 88b5c77 to 0161a30 Compare February 1, 2026 12:02
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.

2 participants