Repository navigation
docs(examples): add coinbase-examples-nodejs.md (one page of copy-ready snippets) - #167
Open
harbourlark wants to merge 1 commit into
Open
harbourlark wants to merge 1 commit into
harbourlark wants to merge 1 commit into
Conversation
…, Exchange and WebSockets
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
examples/coinbase-examples-nodejs.md, a single page of short, copy-ready snippets in the same style askucoin-api/examples/kucoin-*-examples-nodejs.mdand the new examples pages for hyperliquid-api (sieblyio/hyperliquid-api#19), kraken-api (sieblyio/kraken-api#71) and gateio-api.Why: Context7 parses markdown, and its benchmark for /sieblyio/coinbase-api is 52.5 (last indexed 11 Nov), below kucoin-api (73.88) and okx-api (75.78). The runnable
.tsexamples andexamples/apidocstay as they are; this page gives indexers and readers one place to find each task.Covers: which client to use (Advanced Trade, App, Exchange, International, Prime, Commerce, WebSocket and WS API clients), client setup (public, CDP keys with ECDSA or Ed25519, one-line PEM env vars, CommonJS), Advanced Trade market data (server time, products and increments, order book, candles, recent trades), account (paginated accounts, best bid/ask, key permissions, open orders and fills), trading (preview, post-only limit with
client_order_id, market order in quote size, stop-limit, get/edit/cancel), Coinbase App spot price and rates, Coinbase Exchange public data and private client, WebSockets (public and private Advanced Trade, the Exchange feed that replaced the Coinbase Pro feed, unsubscribe and close) and error handling.Checked against coinbase-api 1.3.2:
tsc --strict(module nodenext); the CommonJS one ran under Node.advTradeMarketDataticker, market_trades, level2, heartbeats;exchangeMarketDataticker and matches) ran live, as did unsubscribe/closeAll.omittedFromError.Small thing noticed while testing:
CBAppClient.getSpotPrice(andgetBuyPrice/getSellPrice) returndata.base(for example"BTC"), but the response type only declaresamountandcurrency, sodata.basefails undertsc --strict. The page avoids it for now.