Skip to content

Conversation

@karstenevers
Copy link

Description:

  • Migrates spot + mix endpoints to /api/v2/* and updates response parsing (data[], lastPr, etc.)
  • Canonicalizes query string construction (sorted + URL-encoded) for stable signature prehash
  • FX fixes: treat USDT/USDC as USD for EUR conversion; avoid caching failed non-EUR ECB lookups
  • Updates API-SPEC.md to match v2 endpoints + signing

- 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).
@karstenevers
Copy link
Author

Error that appeared with the original Bitget.lua:
image

API decommissioned - https://api.bitget.com/api/spot/v1/public/time:
{"code":"30032","msg":"The V1 API has been decommissioned. Please migrate to a newer version.","requestTime":1766948263633,"data":null}%

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