@stable_sea/sdk 0.2.5 → 0.2.8
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 +49 -1
- package/dist/gen/schema.d.ts +207 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -182,16 +182,64 @@ and wire transfers use the instructions returned by funding.
|
|
|
182
182
|
See [the funding guide](../../docs/api/funding.md) for the complete sequence,
|
|
183
183
|
permissions and retry behavior.
|
|
184
184
|
|
|
185
|
+
## Read fund details
|
|
186
|
+
|
|
187
|
+
Use `investments:read` with `GET /v1/securities` to read each listed fund's
|
|
188
|
+
profile, NAV, returns, holdings and issuer information.
|
|
189
|
+
|
|
190
|
+
```ts
|
|
191
|
+
const funds = await client.GET("/v1/securities");
|
|
192
|
+
if (funds.error) throw new Error(funds.error.error.message);
|
|
193
|
+
const fund = funds.data.data.find((item) => item.ticker === "WTGXX");
|
|
194
|
+
console.log(fund?.details?.nav);
|
|
195
|
+
console.log(fund?.details?.month_end_returns);
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Figures preserve Terminal's display formatting. Each section has its own source
|
|
199
|
+
dates; missing figures and sections are empty or null, never estimated. Returns
|
|
200
|
+
keep the fund and benchmark series separate, with independent cumulative and
|
|
201
|
+
annual-return dates. Fund token addresses identify the issuer's token, not a
|
|
202
|
+
customer deposit destination.
|
|
203
|
+
|
|
204
|
+
Check `details_observed_ts`: references refresh every five minutes. Missing,
|
|
205
|
+
failed or older-than-ten-minutes observations return `details: null`; the fund's
|
|
206
|
+
registry metadata remains available. These figures are informational. Use a
|
|
207
|
+
quote to obtain the price for a trade. See the
|
|
208
|
+
[securities reference](https://docs.stablesea.com/api/reference/#GET/v1/securities).
|
|
209
|
+
|
|
210
|
+
## Transaction settlement references
|
|
211
|
+
|
|
212
|
+
Retrieve `GET /v1/transactions/{id}` with `money:read` to see
|
|
213
|
+
`onchain_transactions`. Each observed reference includes its `hash` and, when
|
|
214
|
+
known, `chain` and `explorer_url`. An empty array means no references have been
|
|
215
|
+
observed; null means the metadata is unavailable, including a receipt initiated
|
|
216
|
+
by another business. List responses omit this detail.
|
|
217
|
+
|
|
218
|
+
A hash is a settlement reference, not proof that the whole movement completed.
|
|
219
|
+
Check the transaction's `status` and `asset_changes` for its lifecycle and effect
|
|
220
|
+
on settled balances. Sandbox references use simulated partner data.
|
|
221
|
+
|
|
185
222
|
## Statement previews
|
|
186
223
|
|
|
187
224
|
Read the current month's interim document with
|
|
188
225
|
`client.GET("/v1/statements/preview")` and `money:read`. Its display-ready
|
|
189
|
-
balances, transactions and fees use the same native calculation as Terminal.
|
|
226
|
+
balances, captured charts, transactions and fees use the same native calculation as Terminal.
|
|
190
227
|
Values refresh about once a minute. Check `observed_ts`; missing,
|
|
191
228
|
stale or previous-month previews return 503. Opening balances remain provisional
|
|
192
229
|
until the previous month's statement is issued. Issued documents continue to use
|
|
193
230
|
`GET /v1/statements/{id}`.
|
|
194
231
|
|
|
232
|
+
## Statement charts
|
|
233
|
+
|
|
234
|
+
Issued statements and current-month previews include `chart`. Each daily point
|
|
235
|
+
has `sampled_ts`, `total_usd`, `formatted` and an `assets` list containing
|
|
236
|
+
`symbol`, `usd` and `formatted`. USD values are decimal strings from the stored
|
|
237
|
+
plotting figures; display labels are preserved. These figures are for the
|
|
238
|
+
statement chart, not exact ledger calculations. Issued charts are immutable;
|
|
239
|
+
preview charts update with the document. An empty array means no captured series
|
|
240
|
+
was stored. A null chart is unavailable, including a fresh older preview awaiting
|
|
241
|
+
its first chart refresh. The document's captured financial figures remain readable.
|
|
242
|
+
|
|
195
243
|
## Contract changes
|
|
196
244
|
|
|
197
245
|
- `GET /v1/balances`: `chain` gains the value `solana`. A USDC balance held on
|
package/dist/gen/schema.d.ts
CHANGED
|
@@ -651,7 +651,11 @@ export interface paths {
|
|
|
651
651
|
};
|
|
652
652
|
/**
|
|
653
653
|
* List securities
|
|
654
|
-
* @description
|
|
654
|
+
* @description Lists supported funds and their profile, NAV, returns, holdings and issuer information. The catalog is the same for all businesses and does not use pagination. Trading remains subject to your business's eligibility and controls.
|
|
655
|
+
*
|
|
656
|
+
* Figures use Terminal's display formatting. Each section has its own source dates and may have been read at a different time. Null sections and empty values mean unavailable data, not zero. Use `/v1/quotes` for a tradable price.
|
|
657
|
+
*
|
|
658
|
+
* Details refresh every five minutes. `details_observed_ts` records when the latest refresh began. Details are null if unavailable, if the latest refresh failed, or if the last refresh began more than ten minutes ago. Basic fund metadata remains available.
|
|
655
659
|
*/
|
|
656
660
|
get: operations["securities.catalog"];
|
|
657
661
|
put?: never;
|
|
@@ -817,7 +821,9 @@ export interface paths {
|
|
|
817
821
|
};
|
|
818
822
|
/**
|
|
819
823
|
* Retrieve a statement
|
|
820
|
-
* @description Returns the immutable issued statement values as display-ready JSON. Corrected statements remain retrievable and name their replacement.
|
|
824
|
+
* @description Returns the immutable issued statement values as display-ready JSON. Corrected statements remain retrievable and name their replacement. `chart` contains the document's captured daily USD series and display labels. Plotting values are decimal strings, not exact ledger amounts. Older documents without a stored chart return an empty array.
|
|
825
|
+
*
|
|
826
|
+
* Pay-ins and payouts are not served on this API, so they are not listed in transactions; the balances and totals are the printed ones and still include their effect, which means a statement for a period in which the business made a payment does not reconcile from its transactions alone.
|
|
821
827
|
*/
|
|
822
828
|
get: operations["statements.retrieve"];
|
|
823
829
|
put?: never;
|
|
@@ -888,6 +894,8 @@ export interface paths {
|
|
|
888
894
|
*
|
|
889
895
|
* The status is `pending`, `processing`, `completed` or `failed`. `completed_ts` and `failed_ts` are mutually exclusive and absent while execution is pending or processing.
|
|
890
896
|
*
|
|
897
|
+
* `onchain_transactions` includes observed hashes, their blockchain when known, and available explorer links for movements initiated by your business. An empty array means no hashes have been observed; null means references are unavailable for this read. Lists omit these details.
|
|
898
|
+
*
|
|
891
899
|
* Unknown and cross-business IDs return the same not-found response.
|
|
892
900
|
*/
|
|
893
901
|
get: operations["transactions.get"];
|
|
@@ -1848,20 +1856,147 @@ export interface components {
|
|
|
1848
1856
|
};
|
|
1849
1857
|
Security: {
|
|
1850
1858
|
asset_class: string;
|
|
1859
|
+
details: components["schemas"]["SecurityDetails"];
|
|
1860
|
+
/**
|
|
1861
|
+
* Format: date-time
|
|
1862
|
+
* @description When the latest fund details began refreshing. Each section has its own source date; this is not a quote timestamp.
|
|
1863
|
+
*/
|
|
1864
|
+
details_observed_ts: string | null;
|
|
1865
|
+
/** @description Native headline percent string, without a percent sign; empty when unavailable. */
|
|
1866
|
+
expense_ratio_percent: string;
|
|
1851
1867
|
is_money_market: boolean;
|
|
1852
1868
|
minimum_investment: string;
|
|
1869
|
+
/** @description Display name from current issuer data, or the fund registry when issuer data is unavailable. Use ticker as the identifier. */
|
|
1853
1870
|
name: string;
|
|
1854
1871
|
/** @enum {string} */
|
|
1855
1872
|
object: "security";
|
|
1856
1873
|
provider: string;
|
|
1857
1874
|
/** @description The fund ticker, e.g. WTGXX. */
|
|
1858
1875
|
ticker: string;
|
|
1876
|
+
/** @description The headline yield's source date (YYYY-MM-DD), or empty when unavailable. */
|
|
1877
|
+
yield_as_of: string;
|
|
1878
|
+
/** @description Native headline percent string, without a percent sign; empty when unavailable. */
|
|
1879
|
+
yield_percent: string;
|
|
1880
|
+
};
|
|
1881
|
+
SecurityAccrual: {
|
|
1882
|
+
accrual_per_share: string;
|
|
1883
|
+
daily_accrued: string;
|
|
1884
|
+
/** Format: date-time */
|
|
1885
|
+
date_ts: string | null;
|
|
1886
|
+
shares_outstanding: string;
|
|
1887
|
+
total_unpaid_accrued: string;
|
|
1859
1888
|
};
|
|
1860
1889
|
SecurityCatalog: {
|
|
1861
1890
|
data: components["schemas"]["Security"][];
|
|
1862
1891
|
/** @enum {string} */
|
|
1863
1892
|
object: "list";
|
|
1864
1893
|
};
|
|
1894
|
+
SecurityContent: {
|
|
1895
|
+
description_html: string;
|
|
1896
|
+
disclosures: components["schemas"]["SecurityDisclosure"][];
|
|
1897
|
+
why_fund_html: string;
|
|
1898
|
+
};
|
|
1899
|
+
SecurityDetails: {
|
|
1900
|
+
accrued_income: components["schemas"]["SecurityAccrual"][];
|
|
1901
|
+
characteristics: components["schemas"]["SecurityFacts"];
|
|
1902
|
+
content: components["schemas"]["SecurityContent"];
|
|
1903
|
+
distributions: components["schemas"]["SecurityDistribution"][];
|
|
1904
|
+
holdings: components["schemas"]["SecurityHoldings"];
|
|
1905
|
+
liquidity: components["schemas"]["SecurityLiquidity"][];
|
|
1906
|
+
month_end_returns: components["schemas"]["SecurityReturns"];
|
|
1907
|
+
nav: components["schemas"]["SecurityNAV"];
|
|
1908
|
+
profile: components["schemas"]["SecurityFacts"];
|
|
1909
|
+
quarter_end_returns: components["schemas"]["SecurityReturns"];
|
|
1910
|
+
token_addresses: components["schemas"]["SecurityTokenAddress"][];
|
|
1911
|
+
} | null;
|
|
1912
|
+
SecurityDisclosure: {
|
|
1913
|
+
/** @description Native sanitized, issuer-approved disclosure HTML. */
|
|
1914
|
+
html: string;
|
|
1915
|
+
title: string;
|
|
1916
|
+
};
|
|
1917
|
+
SecurityDistribution: {
|
|
1918
|
+
/** Format: date-time */
|
|
1919
|
+
ex_ts: string | null;
|
|
1920
|
+
/** Format: date-time */
|
|
1921
|
+
payable_ts: string | null;
|
|
1922
|
+
per_share: string;
|
|
1923
|
+
/** Format: date-time */
|
|
1924
|
+
record_ts: string | null;
|
|
1925
|
+
};
|
|
1926
|
+
SecurityFact: {
|
|
1927
|
+
/** @description Stable fact identifier, such as expense_ratio or minimum_investment. Select facts by key rather than display label. */
|
|
1928
|
+
key: string;
|
|
1929
|
+
label: string;
|
|
1930
|
+
/** @description Native display value, including units and formatting. */
|
|
1931
|
+
value: string;
|
|
1932
|
+
};
|
|
1933
|
+
SecurityFacts: {
|
|
1934
|
+
/**
|
|
1935
|
+
* Format: date-time
|
|
1936
|
+
* @description This section's own source date. Null means no date was published.
|
|
1937
|
+
*/
|
|
1938
|
+
as_of_ts: string | null;
|
|
1939
|
+
data: components["schemas"]["SecurityFact"][];
|
|
1940
|
+
};
|
|
1941
|
+
SecurityHolding: {
|
|
1942
|
+
name: string;
|
|
1943
|
+
weight_percent: string;
|
|
1944
|
+
};
|
|
1945
|
+
SecurityHoldings: {
|
|
1946
|
+
/** Format: date-time */
|
|
1947
|
+
as_of_ts: string | null;
|
|
1948
|
+
data: components["schemas"]["SecurityHolding"][];
|
|
1949
|
+
} | null;
|
|
1950
|
+
SecurityLiquidity: {
|
|
1951
|
+
amortized_nav: string;
|
|
1952
|
+
daily_liquid_percent: string;
|
|
1953
|
+
/** Format: date-time */
|
|
1954
|
+
date_ts: string | null;
|
|
1955
|
+
market_nav: string;
|
|
1956
|
+
net_cash_flow: string;
|
|
1957
|
+
weekly_liquid_percent: string;
|
|
1958
|
+
};
|
|
1959
|
+
SecurityNAV: {
|
|
1960
|
+
/** Format: date-time */
|
|
1961
|
+
as_of_ts: string | null;
|
|
1962
|
+
change: string;
|
|
1963
|
+
change_percent: string;
|
|
1964
|
+
value: string;
|
|
1965
|
+
} | null;
|
|
1966
|
+
SecurityReturn: {
|
|
1967
|
+
five_year: string;
|
|
1968
|
+
name: string;
|
|
1969
|
+
one_month: string;
|
|
1970
|
+
one_year: string;
|
|
1971
|
+
/** @description Source series kind, normally NAV for the fund or Benchmark for its index. Name is a display label. */
|
|
1972
|
+
related_type: string;
|
|
1973
|
+
since_inception_annualized: string;
|
|
1974
|
+
since_inception_cumulative: string;
|
|
1975
|
+
ten_year: string;
|
|
1976
|
+
three_month: string;
|
|
1977
|
+
three_year: string;
|
|
1978
|
+
ytd: string;
|
|
1979
|
+
};
|
|
1980
|
+
SecurityReturns: {
|
|
1981
|
+
/**
|
|
1982
|
+
* Format: date-time
|
|
1983
|
+
* @description Independent source date for average annual returns.
|
|
1984
|
+
*/
|
|
1985
|
+
as_of_avg_annual_ts: string | null;
|
|
1986
|
+
/**
|
|
1987
|
+
* Format: date-time
|
|
1988
|
+
* @description Source date for cumulative returns.
|
|
1989
|
+
*/
|
|
1990
|
+
as_of_ts: string | null;
|
|
1991
|
+
/** @description Percent display strings. Empty values were not published; they are not zero. */
|
|
1992
|
+
data: components["schemas"]["SecurityReturn"][];
|
|
1993
|
+
} | null;
|
|
1994
|
+
SecurityTokenAddress: {
|
|
1995
|
+
/** @description The fund token's contract or issuer address, not a customer deposit destination. */
|
|
1996
|
+
address: string;
|
|
1997
|
+
/** @description Issuer's network label for this fund token. */
|
|
1998
|
+
chain: string;
|
|
1999
|
+
};
|
|
1865
2000
|
SourceWalletDeclaration: {
|
|
1866
2001
|
/** @description Recorded screening outcome, once processed. Recheck funding for current eligibility; retries do not renew clearance. */
|
|
1867
2002
|
cleared: boolean | null;
|
|
@@ -1895,6 +2030,23 @@ export interface components {
|
|
|
1895
2030
|
period_start_ts: string;
|
|
1896
2031
|
superseded_by?: string;
|
|
1897
2032
|
};
|
|
2033
|
+
StatementChartAsset: {
|
|
2034
|
+
/** @description The asset's original display label. */
|
|
2035
|
+
formatted: string;
|
|
2036
|
+
symbol: string;
|
|
2037
|
+
/** @description Stored USD plotting value as a decimal string. */
|
|
2038
|
+
usd: string;
|
|
2039
|
+
};
|
|
2040
|
+
StatementChartPoint: {
|
|
2041
|
+
/** @description Captured USD values by symbol, sorted by symbol. A missing asset was absent from this sample; it is not a new valuation. */
|
|
2042
|
+
assets: components["schemas"]["StatementChartAsset"][];
|
|
2043
|
+
/** @description The total's original display label. */
|
|
2044
|
+
formatted: string;
|
|
2045
|
+
/** Format: date-time */
|
|
2046
|
+
sampled_ts: string;
|
|
2047
|
+
/** @description Stored USD plotting value as a decimal string. This is a display figure, not an exact ledger amount. */
|
|
2048
|
+
total_usd: string;
|
|
2049
|
+
};
|
|
1898
2050
|
StatementCommission: {
|
|
1899
2051
|
amount: string;
|
|
1900
2052
|
label: string;
|
|
@@ -1902,6 +2054,8 @@ export interface components {
|
|
|
1902
2054
|
};
|
|
1903
2055
|
StatementDetail: {
|
|
1904
2056
|
balances: components["schemas"]["StatementLine"][];
|
|
2057
|
+
/** @description Captured daily USD chart, including the closing point. Values and display labels come from this document; they are not recomputed from current balances. An empty array means no chart was stored; null means the captured chart is unavailable. */
|
|
2058
|
+
chart: components["schemas"]["StatementChartPoint"][] | null;
|
|
1905
2059
|
/** Format: date-time */
|
|
1906
2060
|
created_ts: string;
|
|
1907
2061
|
id: string;
|
|
@@ -2006,6 +2160,8 @@ export interface components {
|
|
|
2006
2160
|
};
|
|
2007
2161
|
StatementPreview: {
|
|
2008
2162
|
balances: components["schemas"]["StatementLine"][];
|
|
2163
|
+
/** @description Daily USD chart captured with this preview, including its closing point. Plotting values are decimal strings; display labels match the native document. Null means the chart is unavailable; an empty array means no series was captured. */
|
|
2164
|
+
chart: components["schemas"]["StatementChartPoint"][] | null;
|
|
2009
2165
|
livemode: boolean;
|
|
2010
2166
|
/** @enum {string} */
|
|
2011
2167
|
object: "statement_preview";
|
|
@@ -2093,12 +2249,60 @@ export interface components {
|
|
|
2093
2249
|
/** @description The asset symbol, in the ledger's own casing (USDC, WTGXX, SOL:USDC). */
|
|
2094
2250
|
asset: string;
|
|
2095
2251
|
};
|
|
2252
|
+
TransactionDetail: {
|
|
2253
|
+
/** @description Signed net changes to settled holdings, one entry per asset, ordered by asset. Empty when no part has settled. A failed movement includes any changes that settled before failure; pending or processing status alone does not determine whether this array is empty. */
|
|
2254
|
+
asset_changes: components["schemas"]["TransactionAssetChange"][];
|
|
2255
|
+
/**
|
|
2256
|
+
* Format: date-time
|
|
2257
|
+
* @description When the last leg settled. Present only when status is completed, and never alongside failed_ts.
|
|
2258
|
+
*/
|
|
2259
|
+
completed_ts?: string;
|
|
2260
|
+
/**
|
|
2261
|
+
* Format: date-time
|
|
2262
|
+
* @description When the movement was opened. Immutable, and the instant this list is ordered and paged on.
|
|
2263
|
+
*/
|
|
2264
|
+
created_ts: string;
|
|
2265
|
+
/**
|
|
2266
|
+
* Format: date-time
|
|
2267
|
+
* @description When the movement terminated as failed. Present only when status is failed, and never alongside completed_ts.
|
|
2268
|
+
*/
|
|
2269
|
+
failed_ts?: string;
|
|
2270
|
+
/** @description The transaction id. Stable for the life of the movement and safe to store. */
|
|
2271
|
+
id: string;
|
|
2272
|
+
/** @description Whether the resource represents live financial data. False for an isolated simulated ledger; independent of the reading credential. */
|
|
2273
|
+
livemode: boolean;
|
|
2274
|
+
/** @enum {string} */
|
|
2275
|
+
object: "transaction";
|
|
2276
|
+
/** @description Observed on-chain settlement references for a movement initiated by your business. Empty when none have been observed; null when unavailable. */
|
|
2277
|
+
onchain_transactions: components["schemas"]["TransactionOnchainReference"][] | null;
|
|
2278
|
+
/**
|
|
2279
|
+
* @description The movement lifecycle: pending before execution starts; processing while at least one part is in flight; completed when all parts settle; failed when execution ends unsuccessfully. A failed movement can have settled changes, reported in asset_changes.
|
|
2280
|
+
* @enum {string}
|
|
2281
|
+
*/
|
|
2282
|
+
status: "pending" | "processing" | "completed" | "failed";
|
|
2283
|
+
/**
|
|
2284
|
+
* @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.
|
|
2285
|
+
* @enum {string}
|
|
2286
|
+
*/
|
|
2287
|
+
type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "deposit_hold" | "deposit_return" | "deposit_reversal" | "fund_cash_subscription" | "fund_dividend_payout" | "fund_distribution_payout" | "fund_gas_tank" | "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";
|
|
2288
|
+
};
|
|
2096
2289
|
TransactionList: {
|
|
2097
2290
|
data: components["schemas"]["Transaction"][];
|
|
2098
2291
|
has_more: boolean;
|
|
2099
2292
|
/** @enum {string} */
|
|
2100
2293
|
object: "list";
|
|
2101
2294
|
};
|
|
2295
|
+
TransactionOnchainReference: {
|
|
2296
|
+
/** @description Blockchain identifier, such as ethereum or stellar. Omitted when the hash cannot be attributed to a blockchain. */
|
|
2297
|
+
chain?: string;
|
|
2298
|
+
/**
|
|
2299
|
+
* Format: uri
|
|
2300
|
+
* @description Block-explorer URL, when available. Otherwise use the hash as plain text.
|
|
2301
|
+
*/
|
|
2302
|
+
explorer_url?: string;
|
|
2303
|
+
/** @description Observed transaction hash. */
|
|
2304
|
+
hash: string;
|
|
2305
|
+
};
|
|
2102
2306
|
USBankAccountCreateDetails: {
|
|
2103
2307
|
account_number: string;
|
|
2104
2308
|
/** @enum {string} */
|
|
@@ -4002,7 +4206,7 @@ export interface operations {
|
|
|
4002
4206
|
[name: string]: unknown;
|
|
4003
4207
|
};
|
|
4004
4208
|
content: {
|
|
4005
|
-
"application/json": components["schemas"]["
|
|
4209
|
+
"application/json": components["schemas"]["TransactionDetail"];
|
|
4006
4210
|
};
|
|
4007
4211
|
};
|
|
4008
4212
|
400: components["responses"]["Error400"];
|