Skip to content

feat(v1.1.9): maker protection editAlreadyHeld and spot book guide - #4

Merged
JJ-Cro merged 5 commits into
mainfrom
update26102026
Oct 28, 2026
Merged

JJ-Cro merged 5 commits into
mainfrom
update26102026

Conversation

@JJ-Cro

@JJ-Cro JJ-Cro commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Futures Maker Protection Phase 3 (29 Oct 2026 08:00 UTC): a second edit of an order whose edit is still held returns editAlreadyHeld (REST v4 EDIT_ALREADY_HELD). An edit of an order whose placement is still held returns orderForEditNotFound. Both are on the edit status unions. editOrder JSDoc says what each one means.
  • README section Spot orderbook over WebSocket: SDK subscribe, an inline local book, and what a raw ws socket misses (reconnect, resubscribe, heartbeat, checksum resync). The checksum formats parsed price and qty with toFixed at the pair precision (instrument price_precision / qty_precision, or REST AssetPairs pair_decimals / lot_decimals), then strips . and leading zeros. A real mismatch drops that book and subscribes again.
  • WSTopicRequest<'book'> payload is WSSpotPublicBookParams or WSDerivativesPublicBookParams instead of any. subscribe / unsubscribe infer the topic.

The default branch is main. PR sieblyio#63 (update19102026) is already on upstream main (f2c643f), so this branch starts there.

Changelog

1.1.9

  • Futures edit status editAlreadyHeld, and REST v4 EDIT_ALREADY_HELD. orderForEditNotFound was already typed on single 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. Inline local book checksum uses pair precision so parsed numbers match Kraken's CRC32. A mismatch resubscribes for a fresh snapshot.
  • Public book subscribe payloads are typed on WSTopicRequest<'book'> (spot symbol / depth / snapshot, derivatives product_ids).

Checks

  • npm run lint
  • tsc -p tsconfig.json --noEmit, tsc -p tsconfig.esm.json --noEmit, tsc -p test/tsconfig.test.json --noEmit
  • Unit tests: wsStore.test.ts, testnet.retired.test.ts (13 passed)
  • npm run build
  • Published book example checksum 3310070434 matches after JSON.parse plus toFixed(1) / toFixed(8)
  • Live public WS v2 book: BTC/USD 673/673 and ETH/USD 693/693 checksums matched (price_precision / qty_precision). WS v2 has no XBT/USD symbol. REST XBT/USD is pair_decimals 1 and lot_decimals 8, the same precisions as BTC/USD.

Base: f2c643f (upstream main, v1.1.8). Branch: update26102026. Version stays 1.1.9.

Open in Web Open in Cursor 

cursoragent and others added 5 commits October 26, 2026 08:12
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>
@JJ-Cro
JJ-Cro merged commit e9c2707 into main Oct 28, 2026
0 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