@stxapp/stx-typescript 0.12.0 → 0.12.1

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,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.12.1 (2026-11-18)
4
+
5
+ - `capabilities()` reports `orders.post_only` and `orders.fill_or_kill` again, so code written for 0.11 that reads them compiles and runs unchanged. Both are deprecated and always `null` (unknown): the exchange no longer publishes whether it takes fill modes, so the SDK does not guess. `caps.has()` is `false` for them and `caps.require()` does not throw. Send the order with `fillMode` and handle `STXNotAvailableException` instead.
6
+ - On an exchange that does not have fill modes, a post-only or fill-or-kill order may be placed as a normal limit order, without an error. Check `fill_mode` on the order you get back. See https://docs.stxapp.io/sdks/typescript/trading/#post-only-and-fill-or-kill
7
+
3
8
  ## 0.12.0 (2026-11-18)
4
9
 
5
10
  Breaking for anyone reading `orders.post_only` or `orders.fill_or_kill` from `capabilities()`:
package/README.md CHANGED
@@ -72,7 +72,7 @@ Every field is described in the [API reference](https://docs.stxapp.io/sdks/type
72
72
 
73
73
  </details>
74
74
 
75
- `placeOrder(marketId, "buy", "limit", { price, quantity, fillMode: "post_only" })` places a limit order that only rests on the book, and `fillMode: "fill_or_kill"` one that fills in full or not at all. Where the exchange has not enabled a fill mode, it rejects the order and the call throws `STXNotAvailableException`. See [Trading](https://docs.stxapp.io/sdks/typescript/trading/).
75
+ `placeOrder(marketId, "buy", "limit", { price, quantity, fillMode: "post_only" })` places a limit order that only rests on the book, and `fillMode: "fill_or_kill"` one that fills in full or not at all. Where the exchange has not enabled a fill mode, it rejects the order and the call throws `STXNotAvailableException`. An exchange without fill modes may instead place it as a normal limit order, so check `fill_mode` on the order you get back. See [Trading](https://docs.stxapp.io/sdks/typescript/trading/).
76
76
 
77
77
  ## For apps: STX accounts and markets
78
78
 
@@ -311,7 +311,22 @@ var FEATURES = [
311
311
  "event_players",
312
312
  "leaderboard",
313
313
  "loyalty",
314
- "combos"
314
+ "combos",
315
+ /**
316
+ * @deprecated The exchange no longer publishes whether it takes post-only
317
+ * orders, so this is always `null` (unknown). Send the order with
318
+ * `fillMode: "post_only"` and handle `STXNotAvailableException`. An exchange
319
+ * on a release from before fill modes may place it as a normal limit order.
320
+ */
321
+ "orders.post_only",
322
+ /**
323
+ * @deprecated The exchange no longer publishes whether it takes fill-or-kill
324
+ * orders, so this is always `null` (unknown). Send the order with
325
+ * `fillMode: "fill_or_kill"` and handle `STXNotAvailableException`. An
326
+ * exchange on a release from before fill modes may place it as a normal
327
+ * limit order.
328
+ */
329
+ "orders.fill_or_kill"
315
330
  ];
316
331
  var MEMBER_SCOPES = [
317
332
  "profile.read",
@@ -423,7 +438,10 @@ async function discoverCapabilities(probes) {
423
438
  leaderboard: board === null ? null : board.status >= 200 && board.status < 300 ? true : board.status === 404 ? false : null,
424
439
  // Switched off answers 404 ("Loyalty program is not enabled").
425
440
  loyalty: loyalty === null ? null : loyalty.status >= 200 && loyalty.status < 300 ? true : loyalty.status === 404 ? false : null,
426
- combos: combos === null ? null : combos !== "unmatched topic"
441
+ combos: combos === null ? null : combos !== "unmatched topic",
442
+ // Kept so code written for 0.11 still compiles; the exchange publishes no answer.
443
+ "orders.post_only": null,
444
+ "orders.fill_or_kill": null
427
445
  };
428
446
  return new Capabilities({
429
447
  host: probes.host,
@@ -1256,7 +1274,7 @@ function credentialsFromSettings(keyId, privateKey, signer) {
1256
1274
  }
1257
1275
 
1258
1276
  // src/version.ts
1259
- var VERSION = "0.12.0";
1277
+ var VERSION = "0.12.1";
1260
1278
  var USER_AGENT = `stx-typescript/${VERSION}`;
1261
1279
  var ASYNC_DISPOSE = Symbol.asyncDispose ?? /* @__PURE__ */ Symbol.for("Symbol.asyncDispose");
1262
1280
 
@@ -3925,4 +3943,4 @@ export {
3925
3943
  orderBody,
3926
3944
  STX
3927
3945
  };
3928
- //# sourceMappingURL=chunk-JJRK3Z27.js.map
3946
+ //# sourceMappingURL=chunk-NYUIPUZH.js.map