@stable_sea/sdk 0.2.10 → 0.2.11
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/dist/gen/schema.d.ts +228 -7
- package/package.json +1 -1
package/dist/gen/schema.d.ts
CHANGED
|
@@ -73,7 +73,9 @@ export interface paths {
|
|
|
73
73
|
};
|
|
74
74
|
/**
|
|
75
75
|
* Read balance history
|
|
76
|
-
* @description Returns
|
|
76
|
+
* @description Returns settled balance history for your business, grouped by asset. Choose a trailing window of 24h, 7d, 30d, 90d or 1y, or ytd for the current UTC year. Each series contains at most 367 samples.
|
|
77
|
+
*
|
|
78
|
+
* The default daily sampling includes pending amounts. Use sampling=chart for the same intervals and aggregate labels as Terminal’s balance chart; chart sampling excludes pending amounts and does not support ytd. The timezone parameter accepts an IANA timezone and defaults to UTC. It controls chart labels; daily and ytd boundaries remain UTC. Inspect start_ts, end_ts and interval_seconds for the exact sample range.
|
|
77
79
|
*
|
|
78
80
|
* Pending amounts include unfinished internal movements only. ACH, wire and on-chain deposits and withdrawals appear after settlement. Completed legs enter settled history even while other legs remain pending, so these amounts can differ from `/v1/balances`.
|
|
79
81
|
*
|
|
@@ -596,6 +598,28 @@ export interface paths {
|
|
|
596
598
|
patch?: never;
|
|
597
599
|
trace?: never;
|
|
598
600
|
};
|
|
601
|
+
"/v1/portfolio": {
|
|
602
|
+
parameters: {
|
|
603
|
+
query?: never;
|
|
604
|
+
header?: never;
|
|
605
|
+
path?: never;
|
|
606
|
+
cookie?: never;
|
|
607
|
+
};
|
|
608
|
+
/**
|
|
609
|
+
* Read the portfolio
|
|
610
|
+
* @description Returns Terminal’s portfolio figures for the authenticated business. Requires `money:read`. Balances retain each asset’s rail partition; `asset_summary` includes every partition and is not a per-destination spending limit. Null USD amounts mean unavailable valuations. Totals include only priced holdings, so inspect `unpriced_assets` before treating them as complete.
|
|
611
|
+
*
|
|
612
|
+
* Balance changes include transfers. `daily_return` reports the price return on crypto holdings (currently BTC), adjusted for intraday investment flows. It excludes cash, fund NAV changes and fund income. It has its own observation timestamp. The calendar day uses the requested IANA timezone, defaulting to UTC. The reads are not one atomic ledger snapshot. `details` adds native BTC cost basis and performance, fund income and yield summaries, and the thirty-day WTGXX principal/dividend chart. The worker refreshes these components about once a minute; missing or older-than-two-minutes details are null while base holdings remain available. Individual unavailable components are also null. Yield dates are the issuer’s own as-of dates. Distribution dates use the requested calendar day; pending income is not a promise of payment on that date. The WTGXX chart is measured in fund shares. BTC performance uses UTC day boundaries and Terminal’s existing cost-basis valuation. Computed observations are reported to at most eighteen decimal places; recorded balances retain native precision.
|
|
613
|
+
*/
|
|
614
|
+
get: operations["portfolio.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/price_history": {
|
|
600
624
|
parameters: {
|
|
601
625
|
query?: never;
|
|
@@ -1154,24 +1178,30 @@ export interface components {
|
|
|
1154
1178
|
data: components["schemas"]["BalanceHistorySeries"][];
|
|
1155
1179
|
/** Format: date-time */
|
|
1156
1180
|
end_ts: string;
|
|
1181
|
+
interval_seconds: number;
|
|
1157
1182
|
livemode: boolean;
|
|
1158
1183
|
/** @enum {string} */
|
|
1159
1184
|
object: "balance_history";
|
|
1160
1185
|
/** Format: date-time */
|
|
1161
1186
|
observed_ts: string;
|
|
1187
|
+
/** @enum {string} */
|
|
1188
|
+
sampling: "daily" | "chart";
|
|
1162
1189
|
/** Format: date-time */
|
|
1163
1190
|
start_ts: string;
|
|
1191
|
+
timezone: string;
|
|
1164
1192
|
/** @description Assets with a nonzero native balance and no USD valuation in at least one sample. Their native balances remain available. */
|
|
1165
1193
|
unpriced_assets: string[];
|
|
1166
1194
|
};
|
|
1167
1195
|
BalanceHistoryTotal: {
|
|
1168
1196
|
/** @description Sum of the priced settled balances at this timestamp. Inspect unpriced_assets before treating it as a complete valuation. */
|
|
1169
1197
|
balance_usd: string;
|
|
1198
|
+
/** @description The native chart label in the requested timezone; present with chart sampling. */
|
|
1199
|
+
label?: string;
|
|
1170
1200
|
/** Format: date-time */
|
|
1171
1201
|
sampled_ts: string;
|
|
1172
1202
|
};
|
|
1173
1203
|
/** @enum {string} */
|
|
1174
|
-
BalanceHistoryWindow: "30d" | "90d" | "ytd";
|
|
1204
|
+
BalanceHistoryWindow: "24h" | "7d" | "30d" | "90d" | "1y" | "ytd";
|
|
1175
1205
|
BalanceList: {
|
|
1176
1206
|
data: components["schemas"]["Balance"][];
|
|
1177
1207
|
has_more: boolean;
|
|
@@ -1801,6 +1831,152 @@ export interface components {
|
|
|
1801
1831
|
};
|
|
1802
1832
|
/** @enum {string} */
|
|
1803
1833
|
PolicyWindowKind: "calendar_day" | "calendar_week" | "rolling_24h" | "rolling_72h";
|
|
1834
|
+
PortfolioAmounts: {
|
|
1835
|
+
available_native: string;
|
|
1836
|
+
available_usd: string | null;
|
|
1837
|
+
balance_native: string;
|
|
1838
|
+
balance_usd: string | null;
|
|
1839
|
+
pending_incoming_native: string;
|
|
1840
|
+
pending_incoming_usd: string | null;
|
|
1841
|
+
pending_outgoing_native: string;
|
|
1842
|
+
pending_outgoing_usd: string | null;
|
|
1843
|
+
};
|
|
1844
|
+
PortfolioAssetReturn: {
|
|
1845
|
+
asset: string;
|
|
1846
|
+
balance_native: string;
|
|
1847
|
+
balance_usd: string;
|
|
1848
|
+
return_percent: string;
|
|
1849
|
+
return_usd: string;
|
|
1850
|
+
};
|
|
1851
|
+
PortfolioBTCPerformance: {
|
|
1852
|
+
average_cost_basis_usd: string | null;
|
|
1853
|
+
gain_loss_percent: string | null;
|
|
1854
|
+
gain_loss_usd: string | null;
|
|
1855
|
+
invested_usd: string | null;
|
|
1856
|
+
last_price_usd: string | null;
|
|
1857
|
+
/** @description Native daily balance samples over thirty days. BTC daily changes use UTC, independently of the portfolio timezone. */
|
|
1858
|
+
series: components["schemas"]["PortfolioBTCPoint"][];
|
|
1859
|
+
thirty_day_change_percent: string | null;
|
|
1860
|
+
thirty_day_change_usd: string | null;
|
|
1861
|
+
today_change_percent: string | null;
|
|
1862
|
+
today_change_usd: string | null;
|
|
1863
|
+
} | null;
|
|
1864
|
+
PortfolioBTCPoint: {
|
|
1865
|
+
balance_native: string;
|
|
1866
|
+
balance_usd: string;
|
|
1867
|
+
/** Format: date-time */
|
|
1868
|
+
sampled_ts: string;
|
|
1869
|
+
};
|
|
1870
|
+
PortfolioDailyReturn: {
|
|
1871
|
+
data: components["schemas"]["PortfolioAssetReturn"][];
|
|
1872
|
+
/** Format: date-time */
|
|
1873
|
+
observed_ts: string;
|
|
1874
|
+
return_percent: string | null;
|
|
1875
|
+
return_usd: string | null;
|
|
1876
|
+
/** Format: date-time */
|
|
1877
|
+
start_ts: string;
|
|
1878
|
+
/** @description Held assets missing a current or opening valuation. Headline return values are null while this list is nonempty; priced per-asset rows remain available. */
|
|
1879
|
+
unpriced_assets: string[];
|
|
1880
|
+
};
|
|
1881
|
+
PortfolioDetails: {
|
|
1882
|
+
btc: components["schemas"]["PortfolioBTCPerformance"];
|
|
1883
|
+
fund_income: components["schemas"]["PortfolioFundIncome"][];
|
|
1884
|
+
funds: components["schemas"]["PortfolioFundSummary"];
|
|
1885
|
+
/** Format: date-time */
|
|
1886
|
+
observed_ts: string;
|
|
1887
|
+
wtgxx_chart: components["schemas"]["PortfolioPrincipalChart"];
|
|
1888
|
+
} | null;
|
|
1889
|
+
PortfolioFundIncome: {
|
|
1890
|
+
asset: string;
|
|
1891
|
+
available: boolean;
|
|
1892
|
+
daily_yield: components["schemas"]["PortfolioYield"];
|
|
1893
|
+
dividends_paid_usd: string | null;
|
|
1894
|
+
/** @description Only WTGXX declares daily accrued income. Variable-NAV funds have no open daily accrual. */
|
|
1895
|
+
pending_dividend_usd: string | null;
|
|
1896
|
+
seven_day_yield: components["schemas"]["PortfolioYield"];
|
|
1897
|
+
/** Format: int64 */
|
|
1898
|
+
unpriced_dividend_count: number;
|
|
1899
|
+
};
|
|
1900
|
+
PortfolioFundPosition: {
|
|
1901
|
+
asset: string;
|
|
1902
|
+
asset_class: string;
|
|
1903
|
+
balance_native: string;
|
|
1904
|
+
balance_usd: string | null;
|
|
1905
|
+
money_market: boolean;
|
|
1906
|
+
/** Format: date */
|
|
1907
|
+
next_distribution_date: string | null;
|
|
1908
|
+
yield: components["schemas"]["PortfolioYield"];
|
|
1909
|
+
};
|
|
1910
|
+
PortfolioFundSummary: {
|
|
1911
|
+
daily_yield: components["schemas"]["PortfolioYield"];
|
|
1912
|
+
/** @description Whether WTGXX's New York calendar is currently on a published payable date. */
|
|
1913
|
+
distribution_day: boolean;
|
|
1914
|
+
/** @description Lifetime dividends across registered funds, including redeemed positions. Null when a payout could not be valued. */
|
|
1915
|
+
dividends_paid_usd: string | null;
|
|
1916
|
+
/** Format: date */
|
|
1917
|
+
next_distribution_date: string | null;
|
|
1918
|
+
/** @description Authoritative open WTGXX accrual; null when unavailable. This is not a promise that the amount will be paid on the next scheduled date. */
|
|
1919
|
+
pending_dividend_usd: string | null;
|
|
1920
|
+
positions: components["schemas"]["PortfolioFundPosition"][];
|
|
1921
|
+
unpriced_dividend_count: number;
|
|
1922
|
+
} | null;
|
|
1923
|
+
PortfolioHolding: {
|
|
1924
|
+
asset: string;
|
|
1925
|
+
asset_summary: components["schemas"]["PortfolioAmounts"];
|
|
1926
|
+
available_native: string;
|
|
1927
|
+
available_usd: string | null;
|
|
1928
|
+
/** @description Balance change since the requested local day began, including transfers. Null when the comparison cannot be valued. */
|
|
1929
|
+
balance_change_usd: string | null;
|
|
1930
|
+
balance_native: string;
|
|
1931
|
+
balance_usd: string | null;
|
|
1932
|
+
/** @description Completed dividends during the requested local day, valued in USD. Null for unsupported assets or unavailable valuations. */
|
|
1933
|
+
dividends_paid_usd: string | null;
|
|
1934
|
+
/** @enum {string} */
|
|
1935
|
+
object: "portfolio_holding";
|
|
1936
|
+
pending_incoming_native: string;
|
|
1937
|
+
pending_incoming_usd: string | null;
|
|
1938
|
+
pending_outgoing_native: string;
|
|
1939
|
+
pending_outgoing_usd: string | null;
|
|
1940
|
+
/** @description Price change since the requested local day began, excluding transfers. Null when a required price is unavailable. */
|
|
1941
|
+
price_change_percent: string | null;
|
|
1942
|
+
segregated_rail: string;
|
|
1943
|
+
};
|
|
1944
|
+
PortfolioPrincipalChart: {
|
|
1945
|
+
/** @enum {string} */
|
|
1946
|
+
asset: "WTGXX";
|
|
1947
|
+
points: components["schemas"]["PortfolioPrincipalPoint"][];
|
|
1948
|
+
/** @enum {string} */
|
|
1949
|
+
window: "30d";
|
|
1950
|
+
} | null;
|
|
1951
|
+
PortfolioPrincipalPoint: {
|
|
1952
|
+
dividends_native: string;
|
|
1953
|
+
principal_native: string;
|
|
1954
|
+
/** Format: date-time */
|
|
1955
|
+
sampled_ts: string;
|
|
1956
|
+
};
|
|
1957
|
+
PortfolioSnapshot: {
|
|
1958
|
+
/** @description Balance change since the local day began, including transfers. Null when a held position lacks a current or opening valuation. */
|
|
1959
|
+
balance_change_usd: string | null;
|
|
1960
|
+
balance_usd: string;
|
|
1961
|
+
daily_return: components["schemas"]["PortfolioDailyReturn"];
|
|
1962
|
+
data: components["schemas"]["PortfolioHolding"][];
|
|
1963
|
+
/** Format: date-time */
|
|
1964
|
+
day_start_ts: string;
|
|
1965
|
+
details: components["schemas"]["PortfolioDetails"];
|
|
1966
|
+
livemode: boolean;
|
|
1967
|
+
/** @enum {string} */
|
|
1968
|
+
object: "portfolio";
|
|
1969
|
+
/** Format: date-time */
|
|
1970
|
+
observed_ts: string;
|
|
1971
|
+
timezone: string;
|
|
1972
|
+
unpriced_assets: string[];
|
|
1973
|
+
};
|
|
1974
|
+
PortfolioYield: {
|
|
1975
|
+
/** Format: date */
|
|
1976
|
+
as_of: string;
|
|
1977
|
+
label: string;
|
|
1978
|
+
percent: string;
|
|
1979
|
+
} | null;
|
|
1804
1980
|
PriceHistorySnapshot: {
|
|
1805
1981
|
data: components["schemas"]["MarketPriceSeries"][];
|
|
1806
1982
|
/** Format: date-time */
|
|
@@ -1812,8 +1988,10 @@ export interface components {
|
|
|
1812
1988
|
observed_ts: string;
|
|
1813
1989
|
/** Format: date-time */
|
|
1814
1990
|
start_ts: string;
|
|
1815
|
-
window: components["schemas"]["
|
|
1991
|
+
window: components["schemas"]["PriceHistoryWindow"];
|
|
1816
1992
|
};
|
|
1993
|
+
/** @enum {string} */
|
|
1994
|
+
PriceHistoryWindow: "30d" | "90d" | "ytd";
|
|
1817
1995
|
Quote: {
|
|
1818
1996
|
amount_usd: string;
|
|
1819
1997
|
/** @enum {string} */
|
|
@@ -2374,13 +2552,13 @@ export interface components {
|
|
|
2374
2552
|
TransactionSide: {
|
|
2375
2553
|
amount: string;
|
|
2376
2554
|
asset: string;
|
|
2377
|
-
/** @description Your bank-account resource, omitted after removal. Retrieve it with
|
|
2555
|
+
/** @description Your bank-account resource, omitted after removal. Retrieve it with money:read for account details. */
|
|
2378
2556
|
bank_account_id?: string;
|
|
2379
2557
|
/** @description Blockchain used by this ledger leg, when it names one. Internal conversions and bank legs have no chain. */
|
|
2380
2558
|
chain?: string;
|
|
2381
2559
|
/** @description Whether this figure can still change. False also covers terminal failure and a fund-trade amount fixed at placement; it does not prove settlement. */
|
|
2382
2560
|
estimated: boolean;
|
|
2383
|
-
/** @description Your external-wallet resource, omitted after removal. Retrieve it with
|
|
2561
|
+
/** @description Your external-wallet resource, omitted after removal. Retrieve it with money:read for wallet details. */
|
|
2384
2562
|
external_wallet_id?: string;
|
|
2385
2563
|
quoted?: components["schemas"]["TransactionValue"];
|
|
2386
2564
|
};
|
|
@@ -2713,8 +2891,12 @@ export interface operations {
|
|
|
2713
2891
|
"balance_history.snapshot": {
|
|
2714
2892
|
parameters: {
|
|
2715
2893
|
query?: {
|
|
2716
|
-
/** @description
|
|
2894
|
+
/** @description IANA timezone for the calendar day and chart labels, such as America/Los_Angeles. Defaults to UTC. */
|
|
2895
|
+
timezone?: string;
|
|
2896
|
+
/** @description A trailing window, or the current UTC year to date. */
|
|
2717
2897
|
window?: components["schemas"]["BalanceHistoryWindow"];
|
|
2898
|
+
/** @description Daily account history or Terminal chart intervals. Chart sampling excludes pending amounts and does not support ytd. */
|
|
2899
|
+
sampling?: "daily" | "chart";
|
|
2718
2900
|
};
|
|
2719
2901
|
header?: never;
|
|
2720
2902
|
path?: never;
|
|
@@ -3804,11 +3986,50 @@ export interface operations {
|
|
|
3804
3986
|
};
|
|
3805
3987
|
};
|
|
3806
3988
|
};
|
|
3989
|
+
"portfolio.snapshot": {
|
|
3990
|
+
parameters: {
|
|
3991
|
+
query?: {
|
|
3992
|
+
/** @description IANA timezone for the calendar day and chart labels, such as America/Los_Angeles. Defaults to UTC. */
|
|
3993
|
+
timezone?: string;
|
|
3994
|
+
};
|
|
3995
|
+
header?: never;
|
|
3996
|
+
path?: never;
|
|
3997
|
+
cookie?: never;
|
|
3998
|
+
};
|
|
3999
|
+
requestBody?: never;
|
|
4000
|
+
responses: {
|
|
4001
|
+
/** @description OK */
|
|
4002
|
+
200: {
|
|
4003
|
+
headers: {
|
|
4004
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
4005
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
4006
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
4007
|
+
[name: string]: unknown;
|
|
4008
|
+
};
|
|
4009
|
+
content: {
|
|
4010
|
+
"application/json": components["schemas"]["PortfolioSnapshot"];
|
|
4011
|
+
};
|
|
4012
|
+
};
|
|
4013
|
+
400: components["responses"]["Error400"];
|
|
4014
|
+
401: components["responses"]["Error401"];
|
|
4015
|
+
403: components["responses"]["Error403"];
|
|
4016
|
+
429: components["responses"]["Error429"];
|
|
4017
|
+
/** @description Error response. */
|
|
4018
|
+
default: {
|
|
4019
|
+
headers: {
|
|
4020
|
+
[name: string]: unknown;
|
|
4021
|
+
};
|
|
4022
|
+
content: {
|
|
4023
|
+
"application/json": components["schemas"]["Error"];
|
|
4024
|
+
};
|
|
4025
|
+
};
|
|
4026
|
+
};
|
|
4027
|
+
};
|
|
3807
4028
|
"price_history.snapshot": {
|
|
3808
4029
|
parameters: {
|
|
3809
4030
|
query?: {
|
|
3810
4031
|
/** @description Thirty days, ninety days, or the current UTC year to date. */
|
|
3811
|
-
window?: components["schemas"]["
|
|
4032
|
+
window?: components["schemas"]["PriceHistoryWindow"];
|
|
3812
4033
|
};
|
|
3813
4034
|
header?: never;
|
|
3814
4035
|
path?: never;
|