@stable_sea/sdk 0.2.5 → 0.2.7

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
@@ -182,16 +182,52 @@ 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
+
185
210
  ## Statement previews
186
211
 
187
212
  Read the current month's interim document with
188
213
  `client.GET("/v1/statements/preview")` and `money:read`. Its display-ready
189
- balances, transactions and fees use the same native calculation as Terminal.
214
+ balances, captured charts, transactions and fees use the same native calculation as Terminal.
190
215
  Values refresh about once a minute. Check `observed_ts`; missing,
191
216
  stale or previous-month previews return 503. Opening balances remain provisional
192
217
  until the previous month's statement is issued. Issued documents continue to use
193
218
  `GET /v1/statements/{id}`.
194
219
 
220
+ ## Statement charts
221
+
222
+ Issued statements and current-month previews include `chart`. Each daily point
223
+ has `sampled_ts`, `total_usd`, `formatted` and an `assets` list containing
224
+ `symbol`, `usd` and `formatted`. USD values are decimal strings from the stored
225
+ plotting figures; display labels are preserved. These figures are for the
226
+ statement chart, not exact ledger calculations. Issued charts are immutable;
227
+ preview charts update with the document. An empty array means no captured series
228
+ was stored. A null chart is unavailable, including a fresh older preview awaiting
229
+ its first chart refresh. The document's captured financial figures remain readable.
230
+
195
231
  ## Contract changes
196
232
 
197
233
  - `GET /v1/balances`: `chain` gains the value `solana`. A USDC balance held on
@@ -651,7 +651,11 @@ export interface paths {
651
651
  };
652
652
  /**
653
653
  * List securities
654
- * @description Returns every fund available on this API. The list is identical for every caller and is not paged. A fund appearing here is not by itself an assurance that a given account may trade it.
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. 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.
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;
@@ -1848,20 +1854,147 @@ export interface components {
1848
1854
  };
1849
1855
  Security: {
1850
1856
  asset_class: string;
1857
+ details: components["schemas"]["SecurityDetails"];
1858
+ /**
1859
+ * Format: date-time
1860
+ * @description When the latest fund details began refreshing. Each section has its own source date; this is not a quote timestamp.
1861
+ */
1862
+ details_observed_ts: string | null;
1863
+ /** @description Native headline percent string, without a percent sign; empty when unavailable. */
1864
+ expense_ratio_percent: string;
1851
1865
  is_money_market: boolean;
1852
1866
  minimum_investment: string;
1867
+ /** @description Display name from current issuer data, or the fund registry when issuer data is unavailable. Use ticker as the identifier. */
1853
1868
  name: string;
1854
1869
  /** @enum {string} */
1855
1870
  object: "security";
1856
1871
  provider: string;
1857
1872
  /** @description The fund ticker, e.g. WTGXX. */
1858
1873
  ticker: string;
1874
+ /** @description The headline yield's source date (YYYY-MM-DD), or empty when unavailable. */
1875
+ yield_as_of: string;
1876
+ /** @description Native headline percent string, without a percent sign; empty when unavailable. */
1877
+ yield_percent: string;
1878
+ };
1879
+ SecurityAccrual: {
1880
+ accrual_per_share: string;
1881
+ daily_accrued: string;
1882
+ /** Format: date-time */
1883
+ date_ts: string | null;
1884
+ shares_outstanding: string;
1885
+ total_unpaid_accrued: string;
1859
1886
  };
1860
1887
  SecurityCatalog: {
1861
1888
  data: components["schemas"]["Security"][];
1862
1889
  /** @enum {string} */
1863
1890
  object: "list";
1864
1891
  };
1892
+ SecurityContent: {
1893
+ description_html: string;
1894
+ disclosures: components["schemas"]["SecurityDisclosure"][];
1895
+ why_fund_html: string;
1896
+ };
1897
+ SecurityDetails: {
1898
+ accrued_income: components["schemas"]["SecurityAccrual"][];
1899
+ characteristics: components["schemas"]["SecurityFacts"];
1900
+ content: components["schemas"]["SecurityContent"];
1901
+ distributions: components["schemas"]["SecurityDistribution"][];
1902
+ holdings: components["schemas"]["SecurityHoldings"];
1903
+ liquidity: components["schemas"]["SecurityLiquidity"][];
1904
+ month_end_returns: components["schemas"]["SecurityReturns"];
1905
+ nav: components["schemas"]["SecurityNAV"];
1906
+ profile: components["schemas"]["SecurityFacts"];
1907
+ quarter_end_returns: components["schemas"]["SecurityReturns"];
1908
+ token_addresses: components["schemas"]["SecurityTokenAddress"][];
1909
+ } | null;
1910
+ SecurityDisclosure: {
1911
+ /** @description Native sanitized, issuer-approved disclosure HTML. */
1912
+ html: string;
1913
+ title: string;
1914
+ };
1915
+ SecurityDistribution: {
1916
+ /** Format: date-time */
1917
+ ex_ts: string | null;
1918
+ /** Format: date-time */
1919
+ payable_ts: string | null;
1920
+ per_share: string;
1921
+ /** Format: date-time */
1922
+ record_ts: string | null;
1923
+ };
1924
+ SecurityFact: {
1925
+ /** @description Stable fact identifier, such as expense_ratio or minimum_investment. Select facts by key rather than display label. */
1926
+ key: string;
1927
+ label: string;
1928
+ /** @description Native display value, including units and formatting. */
1929
+ value: string;
1930
+ };
1931
+ SecurityFacts: {
1932
+ /**
1933
+ * Format: date-time
1934
+ * @description This section's own source date. Null means no date was published.
1935
+ */
1936
+ as_of_ts: string | null;
1937
+ data: components["schemas"]["SecurityFact"][];
1938
+ };
1939
+ SecurityHolding: {
1940
+ name: string;
1941
+ weight_percent: string;
1942
+ };
1943
+ SecurityHoldings: {
1944
+ /** Format: date-time */
1945
+ as_of_ts: string | null;
1946
+ data: components["schemas"]["SecurityHolding"][];
1947
+ } | null;
1948
+ SecurityLiquidity: {
1949
+ amortized_nav: string;
1950
+ daily_liquid_percent: string;
1951
+ /** Format: date-time */
1952
+ date_ts: string | null;
1953
+ market_nav: string;
1954
+ net_cash_flow: string;
1955
+ weekly_liquid_percent: string;
1956
+ };
1957
+ SecurityNAV: {
1958
+ /** Format: date-time */
1959
+ as_of_ts: string | null;
1960
+ change: string;
1961
+ change_percent: string;
1962
+ value: string;
1963
+ } | null;
1964
+ SecurityReturn: {
1965
+ five_year: string;
1966
+ name: string;
1967
+ one_month: string;
1968
+ one_year: string;
1969
+ /** @description Source series kind, normally NAV for the fund or Benchmark for its index. Name is a display label. */
1970
+ related_type: string;
1971
+ since_inception_annualized: string;
1972
+ since_inception_cumulative: string;
1973
+ ten_year: string;
1974
+ three_month: string;
1975
+ three_year: string;
1976
+ ytd: string;
1977
+ };
1978
+ SecurityReturns: {
1979
+ /**
1980
+ * Format: date-time
1981
+ * @description Independent source date for average annual returns.
1982
+ */
1983
+ as_of_avg_annual_ts: string | null;
1984
+ /**
1985
+ * Format: date-time
1986
+ * @description Source date for cumulative returns.
1987
+ */
1988
+ as_of_ts: string | null;
1989
+ /** @description Percent display strings. Empty values were not published; they are not zero. */
1990
+ data: components["schemas"]["SecurityReturn"][];
1991
+ } | null;
1992
+ SecurityTokenAddress: {
1993
+ /** @description The fund token's contract or issuer address, not a customer deposit destination. */
1994
+ address: string;
1995
+ /** @description Issuer's network label for this fund token. */
1996
+ chain: string;
1997
+ };
1865
1998
  SourceWalletDeclaration: {
1866
1999
  /** @description Recorded screening outcome, once processed. Recheck funding for current eligibility; retries do not renew clearance. */
1867
2000
  cleared: boolean | null;
@@ -1895,6 +2028,23 @@ export interface components {
1895
2028
  period_start_ts: string;
1896
2029
  superseded_by?: string;
1897
2030
  };
2031
+ StatementChartAsset: {
2032
+ /** @description The asset's original display label. */
2033
+ formatted: string;
2034
+ symbol: string;
2035
+ /** @description Stored USD plotting value as a decimal string. */
2036
+ usd: string;
2037
+ };
2038
+ StatementChartPoint: {
2039
+ /** @description Captured USD values by symbol, sorted by symbol. A missing asset was absent from this sample; it is not a new valuation. */
2040
+ assets: components["schemas"]["StatementChartAsset"][];
2041
+ /** @description The total's original display label. */
2042
+ formatted: string;
2043
+ /** Format: date-time */
2044
+ sampled_ts: string;
2045
+ /** @description Stored USD plotting value as a decimal string. This is a display figure, not an exact ledger amount. */
2046
+ total_usd: string;
2047
+ };
1898
2048
  StatementCommission: {
1899
2049
  amount: string;
1900
2050
  label: string;
@@ -1902,6 +2052,8 @@ export interface components {
1902
2052
  };
1903
2053
  StatementDetail: {
1904
2054
  balances: components["schemas"]["StatementLine"][];
2055
+ /** @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. */
2056
+ chart: components["schemas"]["StatementChartPoint"][] | null;
1905
2057
  /** Format: date-time */
1906
2058
  created_ts: string;
1907
2059
  id: string;
@@ -2006,6 +2158,8 @@ export interface components {
2006
2158
  };
2007
2159
  StatementPreview: {
2008
2160
  balances: components["schemas"]["StatementLine"][];
2161
+ /** @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. */
2162
+ chart: components["schemas"]["StatementChartPoint"][] | null;
2009
2163
  livemode: boolean;
2010
2164
  /** @enum {string} */
2011
2165
  object: "statement_preview";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stable_sea/sdk",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [