@stxapp/stx-typescript 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.0 (2026-11-11)
4
+
5
+ Breaking for anyone passing a geolocation option or using the location check: API key requests are now located from your connection, so the SDK no longer sends or reads geolocation data and no longer has its own location check.
6
+
7
+ - The `geoLocation` option is gone from `new STX()`, `placeOrder()`, `placeOrders()`, `cancelOrder()`, `cancelOrders()`, `cancelAllOrders()`, `geoCheck()`, `comboPlayer()` and `comboMaker()`, along with the `GeoOption` and `GeoLocationProvider` types and `STX.geoLocation`. A `geoLocation` key on a `placeOrders()` order is an unknown field. Remove the option; nothing else changes.
8
+ - `ComboJoinReply.next_geolocation_at`, `nextGeolocationAt` on the combo sessions, and `GeoCheckResult.sentPacket` are gone. The exchange may still send `next_geolocation_at`, and the SDK ignores it.
9
+ - `geoCheck()`, `STXGeoLocationException`, `geoRejection()` and the `GeoRejection` and `GeoCheckResult` types are gone. The exchange still refuses order requests from outside the region (422), and that refusal is now a plain `STXRejectedException` with the exchange's message. Catch `STXRejectedException` instead, and drop any `geoCheck()` call: the exchange checks every order write itself. See https://docs.stxapp.io/concepts/us-and-canada/
10
+
11
+ WebSocket reliability, for cancel-on-disconnect in particular:
12
+
13
+ - Cancel-on-disconnect pings at a third of the granted `ping_timeout` instead of 60%, so two pings can be lost before the exchange cancels your orders. At 60%, a client stall of about 2 seconds could let a 5 second timeout fire on a healthy connection.
14
+ - When the exchange closes or errors one channel while the socket stays up (for example, its cancel-on-disconnect timer fired), the client rejoins that channel with its filters and cancel-on-disconnect, then calls `onReconnect` so you can resync. `ws.channelRejoins` counts these. A close meant for an earlier join of the channel is ignored.
15
+ - Each channel is joined once per connection, even when joins or rejoins overlap. Before, two overlapping calls for one topic, or a rejoin racing a reconnect, could join it twice, and the exchange answers a second join by closing the first. Joining a channel while the socket is reconnecting now waits for that reconnect instead of opening a second socket.
16
+ - A `market(marketId)` channel that the exchange closes after the market results or is voided now ends instead of rejoining.
17
+ - If restoring a channel's `marketUpdates` watches fails after a rejoin, only the watches are retried, without joining again.
18
+ - An `onReconnect` that throws is logged and no longer drops the socket it just reconnected.
19
+ - A refused socket handshake (for example an expired OAuth token, answered 401 or 403) now only rejects `connect()` with an `STXTransportException` carrying the status. Before, closing the refused socket also raised an unhandled "WebSocket was closed before the connection was established" error on Node and on Bun 1.4.4 and later, which could stop the process and kept the OAuth token refresh from recovering.
20
+
21
+ Loyalty program:
22
+
23
+ - `loyalty()` and `iterLoyalty()` throw `STXNotAvailableException` (feature `loyalty`) where the exchange has the loyalty program switched off. The exchange answers `GET /api/v1/portfolio/loyalty` there with 404 `{"error": "Loyalty program is not enabled"}`, which was an `STXNotFoundException` before. US demo and US QA have it off since 2026-11-07.
24
+ - `capabilities()` reports `loyalty`, from a signed `GET /api/v1/portfolio/loyalty?limit=1`.
25
+
3
26
  ## 0.9.0 (2026-10-21)
4
27
 
5
28
  One SDK for every STX exchange. Features an exchange does not have yet say so instead of failing obscurely, so the same release works against Ontario production today and against the features on US demo.