@stable_sea/sdk 0.2.37 → 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
@@ -621,15 +621,40 @@ its first chart refresh. The document's captured financial figures remain readab
621
621
  a platform movement; code that switches on `type` should accept the new value.
622
622
  - WisdomTree fund orders: an order settled over `onchain_solana` now fails with
623
623
  `FailedPrecondition` (or `Unavailable` when the business's Solana switch cannot
624
- be read, which is retryable) instead of `InvalidArgument`. Solana settlement
625
- for WisdomTree funds is not live yet, so the order still cannot succeed.
626
- Clients that branch on the status code for this rail should accept both.
624
+ be read, which is retryable) instead of `InvalidArgument`. Clients that branch
625
+ on the status code for this rail should accept both.
626
+ - Session trades: the `funding_source` and `proceeds_destination` enum
627
+ (`TradesSettlementSource`) gains `solana`. A WTGXX buy may name
628
+ `funding_source: "solana"` to fund it from the business's segregated Solana USDC
629
+ balance, for a business whose WisdomTree Solana switch is on (otherwise
630
+ `FailedPrecondition`); every other fund, and every sell with
631
+ `proceeds_destination: "solana"`, is refused with a 400
632
+ `invalid_settlement_source`. `/v1` fund orders name Solana from the
633
+ October 26 contract below. A
634
+ fund-trade approval's `fund_route` reports `source: "solana"` and
635
+ `source_network: "solana"` for such a buy.
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`.
627
652
 
628
653
  ## October 16 API contract
629
654
 
630
655
  Update to the latest SDK before placing fund orders. `POST /v1/orders` takes a
631
656
  `network` for every fund order and refuses it for BTC, and every order read returns
632
- `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
633
658
  `2026-10-15` pin returns `400 unsupported_api_version`. An order whose network the
634
659
  business turned off, or cannot settle on, ends `failed` with `network_not_in_use`
635
660
  or `network_not_eligible`.
@@ -641,7 +666,7 @@ with `client.DELETE("/v1/bank_accounts/{id}")`, without a body or idempotency ke
641
666
  Read bank and wallet operation `status` instead of `state`. Retrieve issued
642
667
  statement content with `GET /v1/statements/{id}`; the `/content` route is retired.
643
668
 
644
- 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
645
670
  `400 unsupported_api_version`. Existing API keys remain valid; stored key and
646
671
  thin-event/webhook versions are preserved.
647
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
  /**
@@ -2736,7 +2736,7 @@ export interface components {
2736
2736
  /** @enum {string} */
2737
2737
  status: "completed" | "pending" | "failed";
2738
2738
  /** @enum {string} */
2739
- type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "cash_home_transfer" | "deposit_hold" | "deposit_return" | "deposit_reversal" | "fund_cash_subscription" | "fund_dividend_payout" | "fund_distribution_payout" | "fund_gas_tank" | "fund_interest_payout" | "fund_sol_reserve" | "fund_xlm_reserve" | "gas_tank_refill" | "gas_wallet_funding" | "go_account_conversion" | "go_account_custodial_transfer" | "go_account_external_send" | "held_deposit_release" | "onchain_deposit" | "onchain_withdrawal" | "ramp_fee_refund" | "reclassification" | "sell_fund_token" | "sell_fund_token_return" | "trade_order" | "treasury_booking" | "treasury_wire_credit" | "wire_offramp" | "wire_onramp";
2739
+ type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "cash_home_transfer" | "deposit_hold" | "deposit_return" | "deposit_reversal" | "fund_cash_subscription" | "fund_dividend_payout" | "fund_distribution_payout" | "fund_gas_tank" | "fund_interest_payout" | "fund_sol_reserve" | "fund_xlm_reserve" | "gas_tank_refill" | "gas_wallet_funding" | "go_account_conversion" | "go_account_custodial_transfer" | "go_account_external_send" | "held_deposit_release" | "onchain_deposit" | "onchain_withdrawal" | "ramp_fee_refund" | "reclassification" | "sell_fund_token" | "sell_fund_token_return" | "swap" | "trade_order" | "treasury_booking" | "treasury_wire_credit" | "wire_offramp" | "wire_onramp";
2740
2740
  withdrawal?: components["schemas"]["StatementWithdrawal"];
2741
2741
  };
2742
2742
  StatementGeneration: {
@@ -2921,7 +2921,7 @@ export interface components {
2921
2921
  * @description What the movement is. The whole vocabulary a transaction can carry is published; a business only ever sees the members its own activity produces. Pay-ins and payouts are never served on this API.
2922
2922
  * @enum {string}
2923
2923
  */
2924
- type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "cash_home_transfer" | "deposit_hold" | "deposit_return" | "deposit_reversal" | "fund_cash_subscription" | "fund_dividend_payout" | "fund_distribution_payout" | "fund_gas_tank" | "fund_interest_payout" | "fund_sol_reserve" | "fund_xlm_reserve" | "gas_tank_refill" | "gas_wallet_funding" | "go_account_conversion" | "go_account_custodial_transfer" | "go_account_external_send" | "held_deposit_release" | "onchain_deposit" | "onchain_withdrawal" | "ramp_fee_refund" | "reclassification" | "sell_fund_token" | "sell_fund_token_return" | "trade_order" | "treasury_booking" | "treasury_wire_credit" | "wire_offramp" | "wire_onramp";
2924
+ type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "cash_home_transfer" | "deposit_hold" | "deposit_return" | "deposit_reversal" | "fund_cash_subscription" | "fund_dividend_payout" | "fund_distribution_payout" | "fund_gas_tank" | "fund_interest_payout" | "fund_sol_reserve" | "fund_xlm_reserve" | "gas_tank_refill" | "gas_wallet_funding" | "go_account_conversion" | "go_account_custodial_transfer" | "go_account_external_send" | "held_deposit_release" | "onchain_deposit" | "onchain_withdrawal" | "ramp_fee_refund" | "reclassification" | "sell_fund_token" | "sell_fund_token_return" | "swap" | "trade_order" | "treasury_booking" | "treasury_wire_credit" | "wire_offramp" | "wire_onramp";
2925
2925
  };
2926
2926
  TransactionAssetChange: {
2927
2927
  /** @description The signed net change to the business's settled holdings of this asset, in the asset's own units. Negative amounts decrease holdings; positive amounts increase them. Net of the ledger's fees and taxes, on the same basis /v1/balances reports. For a business with no pay-ins or payouts, summing an asset's amounts across every transaction — not only the completed ones — gives the movement in its settled balance. Pay-ins and payouts are not served on this API but still move /v1/balances, so a business with payments cannot reconcile its balance from transactions alone. */
@@ -3003,7 +3003,7 @@ export interface components {
3003
3003
  * @description What the movement is. The whole vocabulary a transaction can carry is published; a business only ever sees the members its own activity produces. Pay-ins and payouts are never served on this API.
3004
3004
  * @enum {string}
3005
3005
  */
3006
- type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "cash_home_transfer" | "deposit_hold" | "deposit_return" | "deposit_reversal" | "fund_cash_subscription" | "fund_dividend_payout" | "fund_distribution_payout" | "fund_gas_tank" | "fund_interest_payout" | "fund_sol_reserve" | "fund_xlm_reserve" | "gas_tank_refill" | "gas_wallet_funding" | "go_account_conversion" | "go_account_custodial_transfer" | "go_account_external_send" | "held_deposit_release" | "onchain_deposit" | "onchain_withdrawal" | "ramp_fee_refund" | "reclassification" | "sell_fund_token" | "sell_fund_token_return" | "trade_order" | "treasury_booking" | "treasury_wire_credit" | "wire_offramp" | "wire_onramp";
3006
+ type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "cash_home_transfer" | "deposit_hold" | "deposit_return" | "deposit_reversal" | "fund_cash_subscription" | "fund_dividend_payout" | "fund_distribution_payout" | "fund_gas_tank" | "fund_interest_payout" | "fund_sol_reserve" | "fund_xlm_reserve" | "gas_tank_refill" | "gas_wallet_funding" | "go_account_conversion" | "go_account_custodial_transfer" | "go_account_external_send" | "held_deposit_release" | "onchain_deposit" | "onchain_withdrawal" | "ramp_fee_refund" | "reclassification" | "sell_fund_token" | "sell_fund_token_return" | "swap" | "trade_order" | "treasury_booking" | "treasury_wire_credit" | "wire_offramp" | "wire_onramp";
3007
3007
  };
3008
3008
  TransactionFeeReturns: {
3009
3009
  original_transaction_id: string | null;
@@ -3026,7 +3026,7 @@ export interface components {
3026
3026
  deposit?: components["schemas"]["TransactionDepositAmounts"];
3027
3027
  /**
3028
3028
  * Format: date-time
3029
- * @description Pending fund settlement estimate. Null after the native receipt no longer reports an estimate.
3029
+ * @description Pending fund settlement estimate. For a pending YLDS sale it is the time Figure is expected to pay the USDC proceeds, set once the YLDS reaches Figure: 5:00 p.m. ET that day if the YLDS reached Figure by 2:30 p.m. ET on a business day (an NYSE trading day that is not a Federal Reserve holiday), else 5:00 p.m. ET on the next business day. Same-day payment depends on Figure's liquidity, and the time is not guaranteed. Null for a YLDS buy, which Figure mints on receipt of the USDC at any hour, for a failed sale, and after the native receipt no longer reports an estimate.
3030
3030
  */
3031
3031
  estimated_settlement_ts: string | null;
3032
3032
  fee?: components["schemas"]["TransactionValue"];
@@ -2023,7 +2023,7 @@ export interface paths {
2023
2023
  };
2024
2024
  /**
2025
2025
  * Retrieve trading pathways
2026
- * @description Read settlement estimates and pathway availability for the signed-in business and trade direction before entering an amount. WTGXX buys include express-buy and cash-subscription availability and the cash minimum; WTGXX sells include instant-sell availability. Express-buy fees show the rate only. Request a quote for amount-specific fees, limits and share quantities. Availability is advisory: submission rechecks current eligibility and controls.
2026
+ * @description Read settlement estimates and pathway availability for the signed-in business and trade direction before entering an amount. WTGXX buys include express-buy and cash-subscription availability and the cash minimum; WTGXX sells include instant-sell availability. USTB buys include the business's minimum buy when one applies. Express-buy fees show the rate only. Request a quote for amount-specific fees, limits and share quantities. Availability is advisory: submission rechecks current eligibility and controls.
2027
2027
  */
2028
2028
  get: operations["money.trades.pathways.get"];
2029
2029
  put?: never;
@@ -3879,6 +3879,7 @@ export interface components {
3879
3879
  /** Format: date-time */
3880
3880
  settlement_ts?: string;
3881
3881
  status: components["schemas"]["MoneyenumLifecycleStatus"];
3882
+ swap?: components["schemas"]["MoneyMovementsSwapTradeView"];
3882
3883
  transaction_count: number;
3883
3884
  type: string;
3884
3885
  };
@@ -3941,6 +3942,15 @@ export interface components {
3941
3942
  };
3942
3943
  /** @enum {string} */
3943
3944
  MoneyenumLifecycleStatus: "pending" | "completed" | "failed";
3945
+ MoneyMovementsSwapTradeView: {
3946
+ chain: components["schemas"]["MoneyenumChain"];
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
+ 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;
3951
+ };
3952
+ /** @enum {string} */
3953
+ MoneyenumChain: "arbitrum" | "base" | "ethereum" | "polygon" | "solana" | "stellar";
3944
3954
  MoneyMovementsTransferApprovalView: {
3945
3955
  also_required_ind_id?: string | null;
3946
3956
  also_required_name?: string;
@@ -4041,12 +4051,13 @@ export interface components {
4041
4051
  pathway?: "standard" | "express";
4042
4052
  pathway_defaulted?: boolean;
4043
4053
  /** @enum {string} */
4044
- source?: "platform" | "stellar";
4054
+ source?: "platform" | "stellar" | "solana";
4045
4055
  source_defaulted?: boolean;
4046
- /** @enum {string} */
4047
- source_network?: "ethereum" | "stellar";
4056
+ source_network?: components["schemas"]["MoneyMovementsTransferApprovalNetwork"];
4048
4057
  };
4049
4058
  /** @enum {string} */
4059
+ MoneyMovementsTransferApprovalNetwork: "ethereum" | "stellar" | "solana";
4060
+ /** @enum {string} */
4050
4061
  MoneyMovementsTransferApprovalStatus: "pending" | "approved" | "denied" | "cancelled" | "expired" | "policy_changed" | "failed";
4051
4062
  MoneyMovementsTransferApprovalVoteView: {
4052
4063
  approver?: string;
@@ -4093,9 +4104,9 @@ export interface components {
4093
4104
  selected_route?: components["schemas"]["MoneyMovementsTransferApprovalFundRoute"];
4094
4105
  /**
4095
4106
  * Format: date-time
4096
- * @description Estimated time at which the trade settles.
4107
+ * @description Estimated time at which the trade settles. Absent when the quote dates no settlement: a YLDS buy, which Figure mints on receipt of the USDC at any hour, a YLDS sale, and a USTB order.
4097
4108
  */
4098
- settled_ts?: string;
4109
+ settled_ts?: string | null;
4099
4110
  settlement_duration_minutes?: number | null;
4100
4111
  settlement_trading_days?: number | null;
4101
4112
  };
@@ -4135,7 +4146,7 @@ export interface components {
4135
4146
  symbol: string;
4136
4147
  };
4137
4148
  /** @enum {string} */
4138
- TradesSettlementSource: "platform" | "stellar";
4149
+ TradesSettlementSource: "platform" | "stellar" | "solana";
4139
4150
  /** @enum {string} */
4140
4151
  TradesSettlementPreference: "standard" | "instant";
4141
4152
  /** @enum {string} */
@@ -4145,6 +4156,8 @@ export interface components {
4145
4156
  express_buy?: components["schemas"]["TradesExpressBuyQuote"];
4146
4157
  express_settlement?: components["schemas"]["TradesPathwaySettlementEstimate"];
4147
4158
  instant_sell?: components["schemas"]["TradesInstantSellQuote"];
4159
+ min_buy_usd?: string;
4160
+ min_buy_usd_view?: components["schemas"]["MoneyfmtMoneyAmountView"];
4148
4161
  standard_settlement?: components["schemas"]["TradesPathwaySettlementEstimate"];
4149
4162
  };
4150
4163
  TradesCashSubscriptionQuote: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stable_sea/sdk",
3
- "version": "0.2.37",
3
+ "version": "0.2.41",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [
@@ -38,7 +38,7 @@
38
38
  "@types/node": "26.6.5",
39
39
  "openapi-typescript": "7.13.0",
40
40
  "typescript": "5.9.3",
41
- "vitest": "5.0.4"
41
+ "vitest": "5.0.5"
42
42
  },
43
43
  "overrides": {
44
44
  "js-yaml": "^4.3.2",