Skip to content

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

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/gateio-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) and kraken-api.

Why: Context7 parses markdown, and its benchmark for /sieblyio/gateio-api is 47.67, the weakest of the Siebly SDKs after kraken-api, while kucoin-api (with examples markdown) scores 73.88. The runnable .ts examples and examples/apidoc stay as they are; this page gives indexers and readers one place to find each task.

Covers: which client to use, client setup (public, private, testnet, CommonJS), Spot market data (server time and pair rules, tickers, order book, trades, candles), Spot account (balances, orders, fills, ledger), Spot trading (limit with a t- custom id, market buy in quote currency, post-only, get/amend/cancel, cancel all on a pair, batch, countdown cancel), Futures market data (contract rules incl. quanto_multiplier, tickers, order book, candles, trades), Futures account and trading (account, positions, orders, fills, leverage, limit, market reduce-only, amend, cancel, cancel all), WebSockets (public Spot and Futures, private Spot and Futures, unsubscribe and close), the WebSocket API (Spot and Futures orders) and error handling.

Checked against gateio-api 1.6.9:

  • All 24 TypeScript snippets compile as standalone files under tsc --strict (module nodenext); the CommonJS one ran under Node.
  • Every public REST snippet, the public WebSocket snippet (spotV4 and perpFuturesUSDTV4) and the unsubscribe/close snippet ran live against Gate.
  • Private snippets were exercised with dummy keys only (REST answered 401 INVALID_KEY), so no orders were placed.
  • Prices in the trading snippets are far from market and sizes are small.

@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.

Nice

@tiagosiebler
tiagosiebler merged commit 4b6b0c3 into sieblyio:master Nov 27, 2026
1 check 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