Skip to content

docs(examples): add bitget-examples-nodejs.md (one page of copy-ready snippets) - #190

Merged
tiagosiebler merged 1 commit into
sieblyio:masterfrom
harbourlark:docs/examples-markdown
Nov 27, 2026
Merged

tiagosiebler merged 1 commit into
sieblyio:masterfrom
harbourlark:docs/examples-markdown

Conversation

@harbourlark

Copy link
Copy Markdown
Contributor

Adds examples/bitget-examples-nodejs.md, a single page of short, copy-ready snippets in the same style as kucoin-api/examples/kucoin-*-examples-nodejs.md and the new examples pages for hyperliquid-api (sieblyio/hyperliquid-api#19), kraken-api (sieblyio/kraken-api#71), gateio-api (sieblyio/gateio-api#159) and coinbase-api (sieblyio/coinbase-api#167).

Why: Context7 parses markdown, and its benchmark for /sieblyio/bitget-api is 58.21, below kucoin-api (73.88) and okx-api (75.78). The runnable .ts examples in V2 - Classic, V3 - UTA and apidoc stay as they are; this page gives indexers and readers one place to find each task. It also says up front that V1 URLs and _SPBL/_UMCBL symbols now return 30032, since old tutorials still send people there.

Covers: which client to use (V2 Classic vs V3 UTA, REST, WebSocket and WS API), client setup (public, key/secret/passphrase, demo trading, CommonJS), V2 spot market data (ticker, symbol rules, order book, candles, recent trades), V2 futures market data (ticker, funding, open interest, contract config, candles), V3 market data (instruments, tickers, order book, candles), V2 spot trading (balances, post-only limit and cancel, market order sizing, order status and fills), V2 futures trading (leverage, order, positions, cancel), V3 trading (submitNewOrder, unfilled orders, cancel, positions), WebSockets (V2 public and private, V3 public and private, WebsocketAPIClient orders) and error handling.

Checked against bitget-api 3.2.9:

  • All 22 TypeScript snippets compile as standalone files under tsc --strict (module nodenext); the CommonJS one ran under Node.
  • Every public snippet ran live: V2 spot and futures REST, V3 REST, V2 public WS (ticker and books5 updates) and V3 public WS (spot and usdt-futures ticker snapshots), plus the error-handling snippet (40034 for a bad symbol).
  • Private REST snippets reached Bitget with a dummy key and were rejected only for the key (40037).

@tiagosiebler tiagosiebler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great stuff

@tiagosiebler
tiagosiebler merged commit e0d88e5 into sieblyio:master Nov 27, 2026
1 of 2 checks passed
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