Repository navigation
feat(v1.1.9): maker protection editAlreadyHeld and spot book guide - #4
Merged
Merged
Conversation
Changelog: - Futures edit status editAlreadyHeld, and REST v4 EDIT_ALREADY_HELD. orderForEditNotFound was already typed on edit and send. Document both on editOrder: a second edit of a held edit, and an edit of a held placement. - README: Spot orderbook over WebSocket. SDK subscribe snippet, inline local book with Kraken CRC32 checksum, and what raw ws misses (reconnect, resubscribe, heartbeat, checksum resync). - Public book subscribe payloads are typed on WSTopicRequest<'book'> (spot symbol/depth/snapshot, derivatives product_ids). Co-authored-by: Jerko J <JJ-Cro@users.noreply.github.com>
README local book uses toFixed(price_precision / qty_precision) before the Kraken CRC32, so JSON numbers match. A real mismatch still drops the book and resubscribes. Co-authored-by: Jerko J <JJ-Cro@users.noreply.github.com>
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.
Summary
editAlreadyHeld(REST v4EDIT_ALREADY_HELD). An edit of an order whose placement is still held returnsorderForEditNotFound. Both are on the edit status unions.editOrderJSDoc says what each one means.wssocket misses (reconnect, resubscribe, heartbeat, checksum resync). The checksum formats parsed price and qty withtoFixedat the pair precision (instrumentprice_precision/qty_precision, or RESTAssetPairspair_decimals/lot_decimals), then strips.and leading zeros. A real mismatch drops that book and subscribes again.WSTopicRequest<'book'>payload isWSSpotPublicBookParamsorWSDerivativesPublicBookParamsinstead ofany.subscribe/unsubscribeinfer the topic.The default branch is
main. PR sieblyio#63 (update19102026) is already on upstreammain(f2c643f), so this branch starts there.Changelog
1.1.9
editAlreadyHeld, and REST v4EDIT_ALREADY_HELD.orderForEditNotFoundwas already typed on single edit and send. Document both oneditOrder: a second edit of a held edit, and an edit of a held placement.WSTopicRequest<'book'>(spotsymbol/depth/snapshot, derivativesproduct_ids).Checks
npm run linttsc -p tsconfig.json --noEmit,tsc -p tsconfig.esm.json --noEmit,tsc -p test/tsconfig.test.json --noEmitwsStore.test.ts,testnet.retired.test.ts(13 passed)npm run build3310070434matches afterJSON.parseplustoFixed(1)/toFixed(8)price_precision/qty_precision). WS v2 has noXBT/USDsymbol. RESTXBT/USDispair_decimals1 andlot_decimals8, the same precisions as BTC/USD.Base:
f2c643f(upstreammain, v1.1.8). Branch:update26102026. Version stays1.1.9.