@stable_sea/sdk 0.2.4 → 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 +37 -1
- package/dist/gen/schema.d.ts +251 -2
- package/package.json +1 -1
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
|
package/dist/gen/schema.d.ts
CHANGED
|
@@ -596,6 +596,30 @@ export interface paths {
|
|
|
596
596
|
patch?: never;
|
|
597
597
|
trace?: never;
|
|
598
598
|
};
|
|
599
|
+
"/v1/price_history": {
|
|
600
|
+
parameters: {
|
|
601
|
+
query?: never;
|
|
602
|
+
header?: never;
|
|
603
|
+
path?: never;
|
|
604
|
+
cookie?: never;
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* Read market price history
|
|
608
|
+
* @description Returns the BTC/USD market-price chart used by Terminal for the last thirty days, ninety days or current UTC year. Prices are decimal strings and do not depend on your holdings. The series contains about fifty samples, carrying forward the latest cached close at or before each sample. The underlying market-data cache retains ninety days, so a year-to-date request can contain a shorter available history.
|
|
609
|
+
*
|
|
610
|
+
* Inspect `source`: `historical` means normalized historical prices, `spot` means a flat two-point line at the current price because history was unavailable, and `unavailable` means no prices were available. A spot fallback does not describe past prices.
|
|
611
|
+
*
|
|
612
|
+
* The worker refreshes this observation about once a minute. `observed_ts` is the calculation start; the reads are not an atomic market snapshot. Missing, failed or older-than-two-minutes observations return HTTP 503. Requires `investments:read`.
|
|
613
|
+
*/
|
|
614
|
+
get: operations["price_history.snapshot"];
|
|
615
|
+
put?: never;
|
|
616
|
+
post?: never;
|
|
617
|
+
delete?: never;
|
|
618
|
+
options?: never;
|
|
619
|
+
head?: never;
|
|
620
|
+
patch?: never;
|
|
621
|
+
trace?: never;
|
|
622
|
+
};
|
|
599
623
|
"/v1/quotes": {
|
|
600
624
|
parameters: {
|
|
601
625
|
query?: never;
|
|
@@ -627,7 +651,11 @@ export interface paths {
|
|
|
627
651
|
};
|
|
628
652
|
/**
|
|
629
653
|
* List securities
|
|
630
|
-
* @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.
|
|
631
659
|
*/
|
|
632
660
|
get: operations["securities.catalog"];
|
|
633
661
|
put?: never;
|
|
@@ -793,7 +821,9 @@ export interface paths {
|
|
|
793
821
|
};
|
|
794
822
|
/**
|
|
795
823
|
* Retrieve a statement
|
|
796
|
-
* @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.
|
|
797
827
|
*/
|
|
798
828
|
get: operations["statements.retrieve"];
|
|
799
829
|
put?: never;
|
|
@@ -1567,6 +1597,25 @@ export interface components {
|
|
|
1567
1597
|
holder_identifier?: string;
|
|
1568
1598
|
legal_entity_name: string;
|
|
1569
1599
|
};
|
|
1600
|
+
MarketPricePoint: {
|
|
1601
|
+
close_usd: string;
|
|
1602
|
+
/** Format: date-time */
|
|
1603
|
+
sampled_ts: string;
|
|
1604
|
+
};
|
|
1605
|
+
MarketPriceSeries: {
|
|
1606
|
+
/** @enum {string} */
|
|
1607
|
+
asset: "BTC";
|
|
1608
|
+
/** @enum {string} */
|
|
1609
|
+
object: "market_price_series";
|
|
1610
|
+
points: components["schemas"]["MarketPricePoint"][];
|
|
1611
|
+
/** @enum {string} */
|
|
1612
|
+
quote_asset: "USD";
|
|
1613
|
+
/**
|
|
1614
|
+
* @description historical is the normalized market series. spot is a flat current-price fallback, not historical observations. unavailable carries no points.
|
|
1615
|
+
* @enum {string}
|
|
1616
|
+
*/
|
|
1617
|
+
source: "historical" | "spot" | "unavailable";
|
|
1618
|
+
};
|
|
1570
1619
|
/** @description Customer metadata. Sensitive data is forbidden. */
|
|
1571
1620
|
Metadata: {
|
|
1572
1621
|
[key: string]: string;
|
|
@@ -1746,6 +1795,19 @@ export interface components {
|
|
|
1746
1795
|
};
|
|
1747
1796
|
/** @enum {string} */
|
|
1748
1797
|
PolicyWindowKind: "calendar_day" | "calendar_week" | "rolling_24h" | "rolling_72h";
|
|
1798
|
+
PriceHistorySnapshot: {
|
|
1799
|
+
data: components["schemas"]["MarketPriceSeries"][];
|
|
1800
|
+
/** Format: date-time */
|
|
1801
|
+
end_ts: string;
|
|
1802
|
+
livemode: boolean;
|
|
1803
|
+
/** @enum {string} */
|
|
1804
|
+
object: "price_history";
|
|
1805
|
+
/** Format: date-time */
|
|
1806
|
+
observed_ts: string;
|
|
1807
|
+
/** Format: date-time */
|
|
1808
|
+
start_ts: string;
|
|
1809
|
+
window: components["schemas"]["BalanceHistoryWindow"];
|
|
1810
|
+
};
|
|
1749
1811
|
Quote: {
|
|
1750
1812
|
amount_usd: string;
|
|
1751
1813
|
/** @enum {string} */
|
|
@@ -1792,20 +1854,147 @@ export interface components {
|
|
|
1792
1854
|
};
|
|
1793
1855
|
Security: {
|
|
1794
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;
|
|
1795
1865
|
is_money_market: boolean;
|
|
1796
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. */
|
|
1797
1868
|
name: string;
|
|
1798
1869
|
/** @enum {string} */
|
|
1799
1870
|
object: "security";
|
|
1800
1871
|
provider: string;
|
|
1801
1872
|
/** @description The fund ticker, e.g. WTGXX. */
|
|
1802
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;
|
|
1803
1886
|
};
|
|
1804
1887
|
SecurityCatalog: {
|
|
1805
1888
|
data: components["schemas"]["Security"][];
|
|
1806
1889
|
/** @enum {string} */
|
|
1807
1890
|
object: "list";
|
|
1808
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
|
+
};
|
|
1809
1998
|
SourceWalletDeclaration: {
|
|
1810
1999
|
/** @description Recorded screening outcome, once processed. Recheck funding for current eligibility; retries do not renew clearance. */
|
|
1811
2000
|
cleared: boolean | null;
|
|
@@ -1839,6 +2028,23 @@ export interface components {
|
|
|
1839
2028
|
period_start_ts: string;
|
|
1840
2029
|
superseded_by?: string;
|
|
1841
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
|
+
};
|
|
1842
2048
|
StatementCommission: {
|
|
1843
2049
|
amount: string;
|
|
1844
2050
|
label: string;
|
|
@@ -1846,6 +2052,8 @@ export interface components {
|
|
|
1846
2052
|
};
|
|
1847
2053
|
StatementDetail: {
|
|
1848
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;
|
|
1849
2057
|
/** Format: date-time */
|
|
1850
2058
|
created_ts: string;
|
|
1851
2059
|
id: string;
|
|
@@ -1950,6 +2158,8 @@ export interface components {
|
|
|
1950
2158
|
};
|
|
1951
2159
|
StatementPreview: {
|
|
1952
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;
|
|
1953
2163
|
livemode: boolean;
|
|
1954
2164
|
/** @enum {string} */
|
|
1955
2165
|
object: "statement_preview";
|
|
@@ -3448,6 +3658,45 @@ export interface operations {
|
|
|
3448
3658
|
};
|
|
3449
3659
|
};
|
|
3450
3660
|
};
|
|
3661
|
+
"price_history.snapshot": {
|
|
3662
|
+
parameters: {
|
|
3663
|
+
query?: {
|
|
3664
|
+
/** @description Thirty days, ninety days, or the current UTC year to date. */
|
|
3665
|
+
window?: components["schemas"]["BalanceHistoryWindow"];
|
|
3666
|
+
};
|
|
3667
|
+
header?: never;
|
|
3668
|
+
path?: never;
|
|
3669
|
+
cookie?: never;
|
|
3670
|
+
};
|
|
3671
|
+
requestBody?: never;
|
|
3672
|
+
responses: {
|
|
3673
|
+
/** @description OK */
|
|
3674
|
+
200: {
|
|
3675
|
+
headers: {
|
|
3676
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
3677
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
3678
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
3679
|
+
[name: string]: unknown;
|
|
3680
|
+
};
|
|
3681
|
+
content: {
|
|
3682
|
+
"application/json": components["schemas"]["PriceHistorySnapshot"];
|
|
3683
|
+
};
|
|
3684
|
+
};
|
|
3685
|
+
400: components["responses"]["Error400"];
|
|
3686
|
+
401: components["responses"]["Error401"];
|
|
3687
|
+
403: components["responses"]["Error403"];
|
|
3688
|
+
429: components["responses"]["Error429"];
|
|
3689
|
+
/** @description Error response. */
|
|
3690
|
+
default: {
|
|
3691
|
+
headers: {
|
|
3692
|
+
[name: string]: unknown;
|
|
3693
|
+
};
|
|
3694
|
+
content: {
|
|
3695
|
+
"application/json": components["schemas"]["Error"];
|
|
3696
|
+
};
|
|
3697
|
+
};
|
|
3698
|
+
};
|
|
3699
|
+
};
|
|
3451
3700
|
"quotes.quote": {
|
|
3452
3701
|
parameters: {
|
|
3453
3702
|
query: {
|