@stable_sea/sdk 0.2.40 → 0.2.41

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/README.md CHANGED
@@ -21,7 +21,7 @@ import { createStableSeaClient } from "@stable_sea/sdk";
21
21
  const client = createStableSeaClient({
22
22
  apiKey: process.env.STABLE_SEA_API_KEY!,
23
23
  baseUrl: process.env.STABLE_SEA_BASE_URL!,
24
- version: "2026-10-16",
24
+ version: "2026-10-26",
25
25
  });
26
26
  ```
27
27
 
@@ -53,9 +53,9 @@ keys and rotations reuse that data.
53
53
  WTGXX supports standard and instant settlement. FLTTX supports standard
54
54
  settlement; instant orders are refused in both production and sandbox.
55
55
 
56
- Every fund order names the network it settles on, `ethereum` or `stellar`. The
57
- API never applies a business's default network. A BTC order settles on no network
58
- and must not name one. The generated `network` type is optional because BTC shares
56
+ Every fund order names the network it settles on, `ethereum`, `stellar` or
57
+ `solana`. The API never applies a business's default network. A BTC order settles
58
+ on no network and must not name one. The generated `network` type is optional because BTC shares
59
59
  the request, so the server enforces both rules: a fund order without a network
60
60
  fails with `network_required`, and a BTC order with one fails with
61
61
  `network_not_applicable`. Sandbox settles on `ethereum`. Instant settlement is
@@ -629,15 +629,32 @@ its first chart refresh. The document's captured financial figures remain readab
629
629
  balance, for a business whose WisdomTree Solana switch is on (otherwise
630
630
  `FailedPrecondition`); every other fund, and every sell with
631
631
  `proceeds_destination: "solana"`, is refused with a 400
632
- `invalid_settlement_source`. `/v1` fund orders cannot name Solana yet. A
632
+ `invalid_settlement_source`. `/v1` fund orders name Solana from the
633
+ October 26 contract below. A
633
634
  fund-trade approval's `fund_route` reports `source: "solana"` and
634
635
  `source_network: "solana"` for such a buy.
635
636
 
637
+ ## October 26 API contract
638
+
639
+ Update to the latest SDK before placing a fund order on Solana. `POST /v1/orders`
640
+ accepts `network: "solana"` for a fund order, and every order read may return
641
+ `network: "solana"`. A standard WTGXX buy on Solana is funded from the business's
642
+ segregated Solana USDC balance, and a standard WTGXX sell on Solana returns its
643
+ proceeds there, through the same execution path as Terminal. Any other Solana
644
+ order (another fund, or instant settlement), and any Solana order from a business
645
+ outside the WisdomTree Solana program or outside its Solana deposit rollout, ends
646
+ `failed` with `network_not_eligible`. While the platform is still setting up the
647
+ business's Solana wallet, or refilling the SOL it pays network fees with, the order
648
+ stays `pending` and is retried.
649
+ A business that turned Solana off gets `network_not_in_use`. The HTTP request pin
650
+ is `2026-10-26`; the retired `2026-10-16` pin returns
651
+ `400 unsupported_api_version`.
652
+
636
653
  ## October 16 API contract
637
654
 
638
655
  Update to the latest SDK before placing fund orders. `POST /v1/orders` takes a
639
656
  `network` for every fund order and refuses it for BTC, and every order read returns
640
- `network` (`null` for BTC). The HTTP request pin is `2026-10-16`; the retired
657
+ `network` (`null` for BTC). The HTTP request pin was `2026-10-16`; the retired
641
658
  `2026-10-15` pin returns `400 unsupported_api_version`. An order whose network the
642
659
  business turned off, or cannot settle on, ends `failed` with `network_not_in_use`
643
660
  or `network_not_eligible`.
@@ -649,7 +666,7 @@ with `client.DELETE("/v1/bank_accounts/{id}")`, without a body or idempotency ke
649
666
  Read bank and wallet operation `status` instead of `state`. Retrieve issued
650
667
  statement content with `GET /v1/statements/{id}`; the `/content` route is retired.
651
668
 
652
- The HTTP request pin is `2026-10-16`. The retired pin returns
669
+ The HTTP request pin is `2026-10-26`. The retired pin returns
653
670
  `400 unsupported_api_version`. Existing API keys remain valid; stored key and
654
671
  thin-event/webhook versions are preserved.
655
672
 
@@ -629,7 +629,7 @@ export interface paths {
629
629
  put?: never;
630
630
  /**
631
631
  * Place an order
632
- * @description Creates an order for the authenticated business and returns it as `pending`. A fund order must name the `network` it settles on, `ethereum` or `stellar`; the API never applies a business's default network. A business that has turned that network off, or is not eligible for it, gets a failed order with a `failure_code` naming why. BTC orders require both `investments:write` and `investments:btc_write`, use standard settlement and settle on no network, so they must not name one. The BTC quote is indicative; execution uses the current native price and fees. Execution is asynchronous and uses the same authorization checks and trading engine as Terminal. Retrieve the order to follow it through `executing` to `filled` or `failed`.
632
+ * @description Creates an order for the authenticated business and returns it as `pending`. A fund order must name the `network` it settles on, `ethereum`, `stellar` or `solana`; the API never applies a business's default network. A business that has turned that network off, or is not eligible for it, gets a failed order with a `failure_code` naming why. BTC orders require both `investments:write` and `investments:btc_write`, use standard settlement and settle on no network, so they must not name one. The BTC quote is indicative; execution uses the current native price and fees. Execution is asynchronous and uses the same authorization checks and trading engine as Terminal. Retrieve the order to follow it through `executing` to `filled` or `failed`.
633
633
  *
634
634
  * Fund orders check the quoted NAV at execution. Price changes and insufficient express liquidity can cause execution to fail. The failed order includes a reason. While the quote remains valid, an express refusal can be submitted as a new standard order.
635
635
  *
@@ -2043,7 +2043,7 @@ export interface components {
2043
2043
  observed_ts: string;
2044
2044
  };
2045
2045
  /** @enum {string} */
2046
- HTTPAPIVersion: "2026-10-16";
2046
+ HTTPAPIVersion: "2026-10-26";
2047
2047
  List: {
2048
2048
  data: components["schemas"]["Resource"][];
2049
2049
  has_more: boolean;
@@ -2120,7 +2120,7 @@ export interface components {
2120
2120
  * @description The network the order settles on, as the request named it. Null for BTC, which settles on no network.
2121
2121
  * @enum {string|null}
2122
2122
  */
2123
- network: "ethereum" | "stellar" | null;
2123
+ network: "ethereum" | "stellar" | "solana" | null;
2124
2124
  /** @enum {string} */
2125
2125
  object: "order";
2126
2126
  quoted_price: string;
@@ -2146,10 +2146,10 @@ export interface components {
2146
2146
  */
2147
2147
  funding_method?: "balance" | "wire";
2148
2148
  /**
2149
- * @description The network a fund order settles on. Required for a fund order and refused for BTC, which settles on no network. The API never applies a business's default network.
2149
+ * @description The network a fund order settles on. Required for a fund order and refused for BTC, which settles on no network. The API never applies a business's default network. Solana settles a standard WTGXX buy or sell for a business in the WisdomTree Solana program and its Solana deposit rollout. A Solana order that cannot settle for any other reason fails with network_not_eligible, and one waiting on the business's Solana wallet stays pending and is retried.
2150
2150
  * @enum {string}
2151
2151
  */
2152
- network?: "ethereum" | "stellar";
2152
+ network?: "ethereum" | "stellar" | "solana";
2153
2153
  /** @description The price_per_unit from GET /v1/quotes. Fund execution checks the NAV; BTC uses an indicative price and executes at the current native price. */
2154
2154
  quoted_price: string;
2155
2155
  /**
@@ -3946,6 +3946,8 @@ export interface components {
3946
3946
  chain: components["schemas"]["MoneyenumChain"];
3947
3947
  /** @description The rate the trade filled at, to the asset received per one asset sent, before the swap fee: a decimal string at eight places. */
3948
3948
  rate: string;
3949
+ /** @description Whether the swap's trade is booked: both of its legs completed. A pending swap with a booked trade is waiting on its fee transfer. A failed swap with a booked trade moved the trade's funds; a failed one without moved nothing. */
3950
+ trade_booked: boolean;
3949
3951
  };
3950
3952
  /** @enum {string} */
3951
3953
  MoneyenumChain: "arbitrum" | "base" | "ethereum" | "polygon" | "solana" | "stellar";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stable_sea/sdk",
3
- "version": "0.2.40",
3
+ "version": "0.2.41",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [