@nadohq/nuanze-client 0.41.0
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 +72 -0
- package/dist/NuanzeClient-BUjoXpWV.cjs +327 -0
- package/dist/NuanzeClient-BUjoXpWV.cjs.map +1 -0
- package/dist/NuanzeClient.cjs +4 -0
- package/dist/NuanzeClient.d.cts +229 -0
- package/dist/NuanzeClient.d.cts.map +1 -0
- package/dist/NuanzeClient.d.ts +229 -0
- package/dist/NuanzeClient.d.ts.map +1 -0
- package/dist/NuanzeClient.js +293 -0
- package/dist/NuanzeClient.js.map +1 -0
- package/dist/NuanzeServerFailureError-B9EhXPyW.d.cts +29 -0
- package/dist/NuanzeServerFailureError-B9EhXPyW.d.cts.map +1 -0
- package/dist/NuanzeServerFailureError-DqWaKEMA.d.ts +29 -0
- package/dist/NuanzeServerFailureError-DqWaKEMA.d.ts.map +1 -0
- package/dist/clientModelTypes-A-D7ER-p.d.ts +932 -0
- package/dist/clientModelTypes-A-D7ER-p.d.ts.map +1 -0
- package/dist/clientModelTypes-BLPA-e3V.d.cts +932 -0
- package/dist/clientModelTypes-BLPA-e3V.d.cts.map +1 -0
- package/dist/clientTypes-DdpinbkS.d.ts +642 -0
- package/dist/clientTypes-DdpinbkS.d.ts.map +1 -0
- package/dist/clientTypes-Du2RLy4W.d.cts +642 -0
- package/dist/clientTypes-Du2RLy4W.d.cts.map +1 -0
- package/dist/dataMappers.cjs +688 -0
- package/dist/dataMappers.cjs.map +1 -0
- package/dist/dataMappers.d.cts +159 -0
- package/dist/dataMappers.d.cts.map +1 -0
- package/dist/dataMappers.d.ts +159 -0
- package/dist/dataMappers.d.ts.map +1 -0
- package/dist/dataMappers.js +650 -0
- package/dist/dataMappers.js.map +1 -0
- package/dist/endpoints.cjs +18 -0
- package/dist/endpoints.cjs.map +1 -0
- package/dist/endpoints.d.cts +14 -0
- package/dist/endpoints.d.cts.map +1 -0
- package/dist/endpoints.d.ts +14 -0
- package/dist/endpoints.d.ts.map +1 -0
- package/dist/endpoints.js +17 -0
- package/dist/endpoints.js.map +1 -0
- package/dist/index.cjs +79 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +9 -0
- package/dist/nuanzeErrorCodes-CWCTWh2k.d.cts +14 -0
- package/dist/nuanzeErrorCodes-CWCTWh2k.d.cts.map +1 -0
- package/dist/nuanzeErrorCodes-Dh6juim0.d.ts +14 -0
- package/dist/nuanzeErrorCodes-Dh6juim0.d.ts.map +1 -0
- package/dist/serverModelTypes-D-vS_7uc.d.ts +377 -0
- package/dist/serverModelTypes-D-vS_7uc.d.ts.map +1 -0
- package/dist/serverModelTypes-DZDxdIzz.d.cts +377 -0
- package/dist/serverModelTypes-DZDxdIzz.d.cts.map +1 -0
- package/dist/serverQueryTypes-BBIFZZ36.d.cts +240 -0
- package/dist/serverQueryTypes-BBIFZZ36.d.cts.map +1 -0
- package/dist/serverQueryTypes-e7HWmE8t.d.ts +240 -0
- package/dist/serverQueryTypes-e7HWmE8t.d.ts.map +1 -0
- package/dist/types/NuanzeServerFailureError.cjs +21 -0
- package/dist/types/NuanzeServerFailureError.cjs.map +1 -0
- package/dist/types/NuanzeServerFailureError.d.cts +2 -0
- package/dist/types/NuanzeServerFailureError.d.ts +2 -0
- package/dist/types/NuanzeServerFailureError.js +20 -0
- package/dist/types/NuanzeServerFailureError.js.map +1 -0
- package/dist/types/clientModelTypes.cjs +236 -0
- package/dist/types/clientModelTypes.cjs.map +1 -0
- package/dist/types/clientModelTypes.d.cts +2 -0
- package/dist/types/clientModelTypes.d.ts +2 -0
- package/dist/types/clientModelTypes.js +208 -0
- package/dist/types/clientModelTypes.js.map +1 -0
- package/dist/types/clientTypes.cjs +0 -0
- package/dist/types/clientTypes.d.cts +2 -0
- package/dist/types/clientTypes.d.ts +2 -0
- package/dist/types/clientTypes.js +1 -0
- package/dist/types/index.cjs +36 -0
- package/dist/types/index.d.cts +7 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.js +5 -0
- package/dist/types/nuanzeErrorCodes.cjs +32 -0
- package/dist/types/nuanzeErrorCodes.cjs.map +1 -0
- package/dist/types/nuanzeErrorCodes.d.cts +2 -0
- package/dist/types/nuanzeErrorCodes.d.ts +2 -0
- package/dist/types/nuanzeErrorCodes.js +31 -0
- package/dist/types/nuanzeErrorCodes.js.map +1 -0
- package/dist/types/serverModelTypes.cjs +0 -0
- package/dist/types/serverModelTypes.d.cts +2 -0
- package/dist/types/serverModelTypes.d.ts +2 -0
- package/dist/types/serverModelTypes.js +1 -0
- package/dist/types/serverQueryTypes.cjs +15 -0
- package/dist/types/serverQueryTypes.cjs.map +1 -0
- package/dist/types/serverQueryTypes.d.cts +2 -0
- package/dist/types/serverQueryTypes.d.ts +2 -0
- package/dist/types/serverQueryTypes.js +14 -0
- package/dist/types/serverQueryTypes.js.map +1 -0
- package/package.json +54 -0
- package/src/NuanzeClient.ts +556 -0
- package/src/dataMappers.ts +889 -0
- package/src/endpoints.ts +14 -0
- package/src/index.ts +4 -0
- package/src/types/NuanzeServerFailureError.ts +36 -0
- package/src/types/clientModelTypes.ts +1085 -0
- package/src/types/clientTypes.ts +719 -0
- package/src/types/index.ts +6 -0
- package/src/types/nuanzeErrorCodes.ts +31 -0
- package/src/types/serverModelTypes.ts +422 -0
- package/src/types/serverQueryTypes.ts +298 -0
|
@@ -0,0 +1,932 @@
|
|
|
1
|
+
import BigNumber from "bignumber.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types/clientModelTypes.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Every {@link NuanzeMarketVenue} the API can report, for callers that need the values at runtime
|
|
6
|
+
* (validation, filters, UI enumeration).
|
|
7
|
+
*/
|
|
8
|
+
declare const NUANZE_MARKET_VENUES: readonly ["perp", "spot"];
|
|
9
|
+
/**
|
|
10
|
+
* Venue a market is listed on. Perpetuals use even product IDs, spot markets odd ones.
|
|
11
|
+
*/
|
|
12
|
+
type NuanzeMarketVenue = (typeof NUANZE_MARKET_VENUES)[number];
|
|
13
|
+
/**
|
|
14
|
+
* Every {@link NuanzeMarketTradingStatus} the API can report, for callers that need the values at
|
|
15
|
+
* runtime (validation, filters, UI enumeration).
|
|
16
|
+
*/
|
|
17
|
+
declare const NUANZE_MARKET_TRADING_STATUSES: readonly ["live", "notTradable", "reduceOnly", "postOnly", "softReduceOnly"];
|
|
18
|
+
/**
|
|
19
|
+
* Normalized tradability state of a market. The API camelCases the engine's snake_case source values,
|
|
20
|
+
* so `not_tradable` arrives as `notTradable`.
|
|
21
|
+
*/
|
|
22
|
+
type NuanzeMarketTradingStatus = (typeof NUANZE_MARKET_TRADING_STATUSES)[number];
|
|
23
|
+
/**
|
|
24
|
+
* Every {@link NuanzeNewsSentiment} the API can report.
|
|
25
|
+
*/
|
|
26
|
+
declare const NUANZE_NEWS_SENTIMENTS: readonly ["bearish", "bullish", "neutral"];
|
|
27
|
+
/**
|
|
28
|
+
* Editorial sentiment of a published news story.
|
|
29
|
+
*/
|
|
30
|
+
type NuanzeNewsSentiment = (typeof NUANZE_NEWS_SENTIMENTS)[number];
|
|
31
|
+
/**
|
|
32
|
+
* Every {@link NuanzeNewsEventType} the API can report.
|
|
33
|
+
*/
|
|
34
|
+
declare const NUANZE_NEWS_EVENT_TYPES: readonly ["earnings", "guidance", "ma", "regulatory", "product", "analyst", "macro", "personnel", "legal", "other"];
|
|
35
|
+
/**
|
|
36
|
+
* Editorial event classification of a published news story.
|
|
37
|
+
*/
|
|
38
|
+
type NuanzeNewsEventType = (typeof NUANZE_NEWS_EVENT_TYPES)[number];
|
|
39
|
+
/**
|
|
40
|
+
* Every {@link NuanzeNewsTier} the API can report.
|
|
41
|
+
*/
|
|
42
|
+
declare const NUANZE_NEWS_TIERS: readonly ["core", "us", "global"];
|
|
43
|
+
/**
|
|
44
|
+
* Geographic/priority tier of a published news story, or null when unassigned.
|
|
45
|
+
*/
|
|
46
|
+
type NuanzeNewsTier = (typeof NUANZE_NEWS_TIERS)[number];
|
|
47
|
+
/**
|
|
48
|
+
* Every {@link NuanzeNewsEntityRole} the API can report. Values are the wire strings; `read_across`
|
|
49
|
+
* is not camelCased.
|
|
50
|
+
*/
|
|
51
|
+
declare const NUANZE_NEWS_ENTITY_ROLES: readonly ["subject", "read_across"];
|
|
52
|
+
/**
|
|
53
|
+
* Role of a market entity on a news story.
|
|
54
|
+
*/
|
|
55
|
+
type NuanzeNewsEntityRole = (typeof NUANZE_NEWS_ENTITY_ROLES)[number];
|
|
56
|
+
/**
|
|
57
|
+
* Every {@link NuanzePnlWindow} the API can report.
|
|
58
|
+
*/
|
|
59
|
+
declare const NUANZE_PNL_WINDOWS: readonly ["24h", "7d", "30d", "90d", "all"];
|
|
60
|
+
/**
|
|
61
|
+
* Account PnL lookback window.
|
|
62
|
+
*/
|
|
63
|
+
type NuanzePnlWindow = (typeof NUANZE_PNL_WINDOWS)[number];
|
|
64
|
+
/**
|
|
65
|
+
* Every {@link NuanzeLeaderboardTimeframe} the API can report.
|
|
66
|
+
*/
|
|
67
|
+
declare const NUANZE_LEADERBOARD_TIMEFRAMES: readonly ["24h", "7d", "30d", "all"];
|
|
68
|
+
/**
|
|
69
|
+
* Leaderboard ranking window. All-time analytics cost five rate-limit units.
|
|
70
|
+
*/
|
|
71
|
+
type NuanzeLeaderboardTimeframe = (typeof NUANZE_LEADERBOARD_TIMEFRAMES)[number];
|
|
72
|
+
/**
|
|
73
|
+
* Every {@link NuanzePlatformWindow} the API can report.
|
|
74
|
+
*/
|
|
75
|
+
declare const NUANZE_PLATFORM_WINDOWS: readonly ["7d", "30d", "90d"];
|
|
76
|
+
/**
|
|
77
|
+
* Selected comparison window for platform activity aggregates.
|
|
78
|
+
*/
|
|
79
|
+
type NuanzePlatformWindow = (typeof NUANZE_PLATFORM_WINDOWS)[number];
|
|
80
|
+
/**
|
|
81
|
+
* Every {@link NuanzeFlowTimeframe} the API can report.
|
|
82
|
+
*/
|
|
83
|
+
declare const NUANZE_FLOW_TIMEFRAMES: readonly ["24h", "7d", "30d", "all"];
|
|
84
|
+
/**
|
|
85
|
+
* Collateral-flow lookback window.
|
|
86
|
+
*/
|
|
87
|
+
type NuanzeFlowTimeframe = (typeof NUANZE_FLOW_TIMEFRAMES)[number];
|
|
88
|
+
/**
|
|
89
|
+
* Every {@link NuanzeFlowEventTypeFilter} the API accepts as a query filter.
|
|
90
|
+
*/
|
|
91
|
+
declare const NUANZE_FLOW_EVENT_TYPE_FILTERS: readonly ["all", "deposit", "withdrawal"];
|
|
92
|
+
/**
|
|
93
|
+
* Collateral event type filter. `all` includes both deposits and withdrawals.
|
|
94
|
+
*/
|
|
95
|
+
type NuanzeFlowEventTypeFilter = (typeof NUANZE_FLOW_EVENT_TYPE_FILTERS)[number];
|
|
96
|
+
/**
|
|
97
|
+
* Every {@link NuanzeFlowEventType} a collateral event can have.
|
|
98
|
+
*/
|
|
99
|
+
declare const NUANZE_FLOW_EVENT_TYPES: readonly ["deposit", "withdrawal"];
|
|
100
|
+
/**
|
|
101
|
+
* On-chain collateral event kind.
|
|
102
|
+
*/
|
|
103
|
+
type NuanzeFlowEventType = (typeof NUANZE_FLOW_EVENT_TYPES)[number];
|
|
104
|
+
/**
|
|
105
|
+
* Every {@link NuanzeFlowBucket} the API can report.
|
|
106
|
+
*/
|
|
107
|
+
declare const NUANZE_FLOW_BUCKETS: readonly ["hour", "day"];
|
|
108
|
+
/**
|
|
109
|
+
* UTC bucket size for collateral flow series. Allowed pairs are 24h/hour, 7d/hour or day
|
|
110
|
+
* (default hour), 30d/day, and all/day.
|
|
111
|
+
*/
|
|
112
|
+
type NuanzeFlowBucket = (typeof NUANZE_FLOW_BUCKETS)[number];
|
|
113
|
+
/**
|
|
114
|
+
* Every {@link NuanzeCandleInterval} the API can report.
|
|
115
|
+
*/
|
|
116
|
+
declare const NUANZE_CANDLE_INTERVALS: readonly ["1h", "4h", "1d"];
|
|
117
|
+
/**
|
|
118
|
+
* Candle bar interval. Source storage is 1h; 4h and 1d are UTC-aligned rollups.
|
|
119
|
+
*/
|
|
120
|
+
type NuanzeCandleInterval = (typeof NUANZE_CANDLE_INTERVALS)[number];
|
|
121
|
+
/**
|
|
122
|
+
* Every {@link NuanzeSeriesMetric} the API can report.
|
|
123
|
+
*/
|
|
124
|
+
declare const NUANZE_SERIES_METRICS: readonly ["pnl", "equity", "volume"];
|
|
125
|
+
/**
|
|
126
|
+
* Wallet series metric.
|
|
127
|
+
*/
|
|
128
|
+
type NuanzeSeriesMetric = (typeof NUANZE_SERIES_METRICS)[number];
|
|
129
|
+
/**
|
|
130
|
+
* Every {@link NuanzeCoverage} the API can report.
|
|
131
|
+
*/
|
|
132
|
+
declare const NUANZE_COVERAGES: readonly ["complete", "partial"];
|
|
133
|
+
/**
|
|
134
|
+
* Whether a snapshot or window has full historical coverage.
|
|
135
|
+
*/
|
|
136
|
+
type NuanzeCoverage = (typeof NUANZE_COVERAGES)[number];
|
|
137
|
+
/**
|
|
138
|
+
* Every {@link NuanzePositionSide} the API can report.
|
|
139
|
+
*/
|
|
140
|
+
declare const NUANZE_POSITION_SIDES: readonly ["long", "short"];
|
|
141
|
+
/**
|
|
142
|
+
* Direction of an open position.
|
|
143
|
+
*/
|
|
144
|
+
type NuanzePositionSide = (typeof NUANZE_POSITION_SIDES)[number];
|
|
145
|
+
/**
|
|
146
|
+
* Every {@link NuanzeTradeSide} the API can report.
|
|
147
|
+
*/
|
|
148
|
+
declare const NUANZE_TRADE_SIDES: readonly ["buy", "sell"];
|
|
149
|
+
/**
|
|
150
|
+
* Aggressor side of a match.
|
|
151
|
+
*/
|
|
152
|
+
type NuanzeTradeSide = (typeof NUANZE_TRADE_SIDES)[number];
|
|
153
|
+
/**
|
|
154
|
+
* Every {@link NuanzeMarginKind} the API can report.
|
|
155
|
+
*/
|
|
156
|
+
declare const NUANZE_MARGIN_KINDS: readonly ["cross", "isolated"];
|
|
157
|
+
/**
|
|
158
|
+
* Margin mode of a perpetual position leg.
|
|
159
|
+
*/
|
|
160
|
+
type NuanzeMarginKind = (typeof NUANZE_MARGIN_KINDS)[number];
|
|
161
|
+
/**
|
|
162
|
+
* Every field accepted for ordering market positions.
|
|
163
|
+
*/
|
|
164
|
+
declare const NUANZE_MARKET_POSITION_SORT_BYS: readonly ["notional", "pnl", "amount"];
|
|
165
|
+
/**
|
|
166
|
+
* Primary field used to order market positions. Notional and amount are compared by absolute value;
|
|
167
|
+
* PnL remains signed.
|
|
168
|
+
*/
|
|
169
|
+
type NuanzeMarketPositionSortBy = (typeof NUANZE_MARKET_POSITION_SORT_BYS)[number];
|
|
170
|
+
/**
|
|
171
|
+
* Every direction accepted for ordering market positions.
|
|
172
|
+
*/
|
|
173
|
+
declare const NUANZE_MARKET_POSITION_SORT_DIRECTIONS: readonly ["asc", "desc"];
|
|
174
|
+
/**
|
|
175
|
+
* Direction used to order market positions.
|
|
176
|
+
*/
|
|
177
|
+
type NuanzeMarketPositionSortDirection = (typeof NUANZE_MARKET_POSITION_SORT_DIRECTIONS)[number];
|
|
178
|
+
/**
|
|
179
|
+
* Every direction accepted for globally ranked open positions.
|
|
180
|
+
*/
|
|
181
|
+
declare const NUANZE_OPEN_POSITION_SORT_DIRECTIONS: readonly ["asc", "desc"];
|
|
182
|
+
/**
|
|
183
|
+
* Signed unrealized-PnL ordering direction for globally ranked open positions.
|
|
184
|
+
*/
|
|
185
|
+
type NuanzeOpenPositionSortDirection = (typeof NUANZE_OPEN_POSITION_SORT_DIRECTIONS)[number];
|
|
186
|
+
/**
|
|
187
|
+
* Every {@link NuanzePositioningGroupBy} the API can report.
|
|
188
|
+
*/
|
|
189
|
+
declare const NUANZE_POSITIONING_GROUP_BYS: readonly ["side", "cohort", "notionalBucket"];
|
|
190
|
+
/**
|
|
191
|
+
* Positioning cell grouping.
|
|
192
|
+
*/
|
|
193
|
+
type NuanzePositioningGroupBy = (typeof NUANZE_POSITIONING_GROUP_BYS)[number];
|
|
194
|
+
/**
|
|
195
|
+
* Every {@link NuanzeMinPositionUsd} the API accepts. Values are USD threshold strings, not numbers.
|
|
196
|
+
*/
|
|
197
|
+
declare const NUANZE_MIN_POSITION_USDS: readonly ["10", "100", "1000", "10000", "100000"];
|
|
198
|
+
/**
|
|
199
|
+
* Fixed USD inclusion threshold. Qualification is strictly `abs(netNotional) > minPositionUsd`.
|
|
200
|
+
*/
|
|
201
|
+
type NuanzeMinPositionUsd = (typeof NUANZE_MIN_POSITION_USDS)[number];
|
|
202
|
+
/**
|
|
203
|
+
* Every {@link NuanzeCohortKey} the API can report. Values are the wire strings.
|
|
204
|
+
*/
|
|
205
|
+
declare const NUANZE_COHORT_KEYS: readonly ["extremely_profitable", "very_profitable", "profitable", "unprofitable", "very_unprofitable", "rekt"];
|
|
206
|
+
/**
|
|
207
|
+
* Wallet cohort label used by positioning cells.
|
|
208
|
+
*/
|
|
209
|
+
type NuanzeCohortKey = (typeof NUANZE_COHORT_KEYS)[number];
|
|
210
|
+
/**
|
|
211
|
+
* Every {@link NuanzeNotionalBucket} the API can report. Frozen USD ranges are small [10, 1000),
|
|
212
|
+
* medium [1000, 10000), large [10000, 100000), and whale [100000, +infinity).
|
|
213
|
+
*/
|
|
214
|
+
declare const NUANZE_NOTIONAL_BUCKETS: readonly ["small", "medium", "large", "whale"];
|
|
215
|
+
/**
|
|
216
|
+
* Notional-bucket key used by positioning cells.
|
|
217
|
+
*/
|
|
218
|
+
type NuanzeNotionalBucket = (typeof NUANZE_NOTIONAL_BUCKETS)[number];
|
|
219
|
+
/**
|
|
220
|
+
* Every {@link NuanzeFundamentalsSource} the API can report.
|
|
221
|
+
*/
|
|
222
|
+
declare const NUANZE_FUNDAMENTALS_SOURCES: readonly ["yahoo", "coingecko"];
|
|
223
|
+
/**
|
|
224
|
+
* Provider that populated a fundamentals projection.
|
|
225
|
+
*/
|
|
226
|
+
type NuanzeFundamentalsSource = (typeof NUANZE_FUNDAMENTALS_SOURCES)[number];
|
|
227
|
+
/**
|
|
228
|
+
* Every {@link NuanzeSourceInterval} the API can report.
|
|
229
|
+
*/
|
|
230
|
+
declare const NUANZE_SOURCE_INTERVALS: readonly ["hour", "day", "mixed"];
|
|
231
|
+
/**
|
|
232
|
+
* Snapshot grain used for a wallet PnL window or series.
|
|
233
|
+
*/
|
|
234
|
+
type NuanzeSourceInterval = (typeof NUANZE_SOURCE_INTERVALS)[number];
|
|
235
|
+
/**
|
|
236
|
+
* Canonical market identity shared by market-derived objects. `productId` is unambiguous; ticker
|
|
237
|
+
* is a case-insensitive display lookup.
|
|
238
|
+
*/
|
|
239
|
+
interface NuanzeMarketIdentity {
|
|
240
|
+
/** Public product ID. Perpetuals are even, spot markets odd. */
|
|
241
|
+
productId: number;
|
|
242
|
+
/** Venue-native symbol, for example `ETH-PERP`. */
|
|
243
|
+
symbol: string;
|
|
244
|
+
/** Canonical ticker, for example `ETH`. */
|
|
245
|
+
ticker: string;
|
|
246
|
+
/** Venue the product trades on. */
|
|
247
|
+
venue: NuanzeMarketVenue;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Latest price snapshot for a market. Every field is null until the first snapshot for that market
|
|
251
|
+
* lands; prices refresh about every minute.
|
|
252
|
+
*/
|
|
253
|
+
interface NuanzeLatestTicker {
|
|
254
|
+
/** Mid price, or null when no quote is available. */
|
|
255
|
+
midPrice: BigNumber | null;
|
|
256
|
+
/** Best bid, or null when no quote is available. */
|
|
257
|
+
bidPrice: BigNumber | null;
|
|
258
|
+
/** Best ask, or null when no quote is available. */
|
|
259
|
+
askPrice: BigNumber | null;
|
|
260
|
+
/** Rolling 24-hour traded volume, or null when unknown. */
|
|
261
|
+
volume24h: BigNumber | null;
|
|
262
|
+
/** Open interest, or null when unknown. */
|
|
263
|
+
openInterest: BigNumber | null;
|
|
264
|
+
/** Rolling 24-hour price change in percent, or null when unknown. */
|
|
265
|
+
priceChange24hPct: BigNumber | null;
|
|
266
|
+
/** When the snapshot was taken, as a UTC ISO 8601 string. */
|
|
267
|
+
updatedAt: string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* A market listed on Nado, as served by Nuanze. Timestamps stay UTC ISO 8601 strings rather than
|
|
271
|
+
* `Date`, matching the API contract.
|
|
272
|
+
*/
|
|
273
|
+
interface NuanzeMarket extends NuanzeMarketIdentity {
|
|
274
|
+
/** Normalized tradability state. */
|
|
275
|
+
tradingStatus: NuanzeMarketTradingStatus;
|
|
276
|
+
/** Minimum price step. */
|
|
277
|
+
priceIncrement: BigNumber;
|
|
278
|
+
/** Minimum size step. */
|
|
279
|
+
sizeIncrement: BigNumber;
|
|
280
|
+
/** Minimum order size. */
|
|
281
|
+
minSize: BigNumber;
|
|
282
|
+
/** Latest price snapshot, or null when none exists yet. */
|
|
283
|
+
latest: NuanzeLatestTicker | null;
|
|
284
|
+
/**
|
|
285
|
+
* Signed perp trader-positioning skew, or null when unavailable. Spot markets always return
|
|
286
|
+
* null.
|
|
287
|
+
*
|
|
288
|
+
* Of the qualifying open perpetual positions in this market, what share is long versus short?
|
|
289
|
+
* Each qualifying owner/subaccount position counts as one, regardless of size. `0.5` means 75%
|
|
290
|
+
* of those positions are long and 25% are short: `(long - short) / (long + short)`. Convert
|
|
291
|
+
* with `longPct = (1 + skew) / 2`. It is not the long share of open interest, capital, or
|
|
292
|
+
* volume — market-wide long and short notional are approximately equal by construction.
|
|
293
|
+
*
|
|
294
|
+
* Classification uses current account-snapshot rows at the owner/subaccount grain. Cross and
|
|
295
|
+
* isolated legs on the same subaccount are one position; subaccounts of the same wallet are
|
|
296
|
+
* not netted, so a hedge is counted on both sides. A row qualifies when `abs(notional) > $10`
|
|
297
|
+
* (equality is excluded). Dust and flat rows drop out of that filter, so there is no separate
|
|
298
|
+
* wallet-level net-flat pass.
|
|
299
|
+
*
|
|
300
|
+
* The value is a current-state snapshot with typical indexer latency of up to about one hour,
|
|
301
|
+
* not a 24-hour or historical series. It does not consolidate sybil wallets or unique people,
|
|
302
|
+
* and it is descriptive context rather than a trading signal.
|
|
303
|
+
*/
|
|
304
|
+
skew: BigNumber | null;
|
|
305
|
+
/**
|
|
306
|
+
* When {@link NuanzeMarket.skew} was last calculated from the hourly account-snapshot pass, as
|
|
307
|
+
* a UTC ISO 8601 string, or null when skew is unavailable.
|
|
308
|
+
*/
|
|
309
|
+
skewUpdatedAt: string | null;
|
|
310
|
+
/** When market metadata was last synced, as a UTC ISO 8601 string. */
|
|
311
|
+
updatedAt: string;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Latest funding observation for a perpetual.
|
|
315
|
+
*/
|
|
316
|
+
interface NuanzeFundingObservation {
|
|
317
|
+
/** Instantaneous funding rate. */
|
|
318
|
+
rate: BigNumber;
|
|
319
|
+
/** Annualized funding rate. */
|
|
320
|
+
annualizedRate: BigNumber;
|
|
321
|
+
/** When the observation was taken, as a UTC ISO 8601 string. */
|
|
322
|
+
observedAt: string;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Latest funding rate for an active perpetual market.
|
|
326
|
+
*/
|
|
327
|
+
interface NuanzeFundingRate extends NuanzeMarketIdentity, NuanzeFundingObservation {}
|
|
328
|
+
/**
|
|
329
|
+
* Market entity referenced by a published news story. No decimals.
|
|
330
|
+
*/
|
|
331
|
+
interface NuanzeNewsEntity {
|
|
332
|
+
/** Stable entity key. */
|
|
333
|
+
key: string;
|
|
334
|
+
/** Display name. */
|
|
335
|
+
name: string;
|
|
336
|
+
/** Whether the entity is the story subject or a read-across market. */
|
|
337
|
+
role: NuanzeNewsEntityRole;
|
|
338
|
+
/** Linked product ID, or null when the entity is not a listed market. */
|
|
339
|
+
productId: number | null;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Published editorial story. Raw ingestion, scoring, queue, and newsdesk fields are excluded.
|
|
343
|
+
*/
|
|
344
|
+
interface NuanzeNewsStory {
|
|
345
|
+
/** Story ID. */
|
|
346
|
+
id: string;
|
|
347
|
+
/** Short headline, or null when unpublished as a headline. */
|
|
348
|
+
headline: string | null;
|
|
349
|
+
/** Story title. */
|
|
350
|
+
title: string;
|
|
351
|
+
/** Short blurb, or null when absent. */
|
|
352
|
+
blurb: string | null;
|
|
353
|
+
/** Canonical story URL. */
|
|
354
|
+
url: string;
|
|
355
|
+
/** Publisher name, or null when unknown. */
|
|
356
|
+
publisher: string | null;
|
|
357
|
+
/** Publication time as a UTC ISO 8601 string, or null when unscheduled. */
|
|
358
|
+
publishedAt: string | null;
|
|
359
|
+
/** Thumbnail URL, or null when absent. */
|
|
360
|
+
thumbnailUrl: string | null;
|
|
361
|
+
/** Event classification, or null when unassigned. */
|
|
362
|
+
eventType: NuanzeNewsEventType | null;
|
|
363
|
+
/** Editorial sentiment. */
|
|
364
|
+
sentiment: NuanzeNewsSentiment;
|
|
365
|
+
/** Geographic/priority tier, or null when unassigned. */
|
|
366
|
+
tier: NuanzeNewsTier | null;
|
|
367
|
+
/** Number of contributing sources. */
|
|
368
|
+
sourceCount: number;
|
|
369
|
+
/** Public entity references only. */
|
|
370
|
+
entities: NuanzeNewsEntity[];
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Nested key-data block of a fundamentals projection. Employee count stays an integer; every other
|
|
374
|
+
* numeric field is a decimal.
|
|
375
|
+
*/
|
|
376
|
+
interface NuanzeFundamentalsKeyData {
|
|
377
|
+
/** Dividend yield, or null when unknown. */
|
|
378
|
+
dividendYield: BigNumber | null;
|
|
379
|
+
/** Employee count, or null when unknown. */
|
|
380
|
+
employees: number | null;
|
|
381
|
+
/** Enterprise value, or null when unknown. */
|
|
382
|
+
enterpriseValue: BigNumber | null;
|
|
383
|
+
/** Shares outstanding, or null when unknown. */
|
|
384
|
+
sharesOutstanding: BigNumber | null;
|
|
385
|
+
/** Beta, or null when unknown. */
|
|
386
|
+
beta: BigNumber | null;
|
|
387
|
+
/** 52-week high, or null when unknown. */
|
|
388
|
+
fiftyTwoWeekHigh: BigNumber | null;
|
|
389
|
+
/** 52-week low, or null when unknown. */
|
|
390
|
+
fiftyTwoWeekLow: BigNumber | null;
|
|
391
|
+
/** Volume, or null when unknown. */
|
|
392
|
+
volume: BigNumber | null;
|
|
393
|
+
/** Average volume, or null when unknown. */
|
|
394
|
+
averageVolume: BigNumber | null;
|
|
395
|
+
/** Circulating supply, or null when unknown. */
|
|
396
|
+
circulatingSupply: BigNumber | null;
|
|
397
|
+
/** Total supply, or null when unknown. */
|
|
398
|
+
totalSupply: BigNumber | null;
|
|
399
|
+
/** Max supply, or null when unknown. */
|
|
400
|
+
maxSupply: BigNumber | null;
|
|
401
|
+
/** Fully diluted valuation, or null when unknown. */
|
|
402
|
+
fullyDilutedValuation: BigNumber | null;
|
|
403
|
+
/** All-time high, or null when unknown. */
|
|
404
|
+
ath: BigNumber | null;
|
|
405
|
+
/** All-time low, or null when unknown. */
|
|
406
|
+
atl: BigNumber | null;
|
|
407
|
+
/** 24-hour high, or null when unknown. */
|
|
408
|
+
high24h: BigNumber | null;
|
|
409
|
+
/** 24-hour low, or null when unknown. */
|
|
410
|
+
low24h: BigNumber | null;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Valuation ratios of a fundamentals projection.
|
|
414
|
+
*/
|
|
415
|
+
interface NuanzeFundamentalsValuation {
|
|
416
|
+
/** Trailing P/E, or null when unknown. */
|
|
417
|
+
trailingPE: BigNumber | null;
|
|
418
|
+
/** Forward P/E, or null when unknown. */
|
|
419
|
+
forwardPE: BigNumber | null;
|
|
420
|
+
/** Price to book, or null when unknown. */
|
|
421
|
+
priceToBook: BigNumber | null;
|
|
422
|
+
/** Enterprise value to revenue, or null when unknown. */
|
|
423
|
+
enterpriseToRevenue: BigNumber | null;
|
|
424
|
+
/** Enterprise value to EBITDA, or null when unknown. */
|
|
425
|
+
enterpriseToEbitda: BigNumber | null;
|
|
426
|
+
/** Revenue, or null when unknown. */
|
|
427
|
+
revenue: BigNumber | null;
|
|
428
|
+
/** Profit margins, or null when unknown. */
|
|
429
|
+
profitMargins: BigNumber | null;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Performance returns of a fundamentals projection.
|
|
433
|
+
*/
|
|
434
|
+
interface NuanzeFundamentalsPerformance {
|
|
435
|
+
/** One-month return, or null when unknown. */
|
|
436
|
+
oneMonth: BigNumber | null;
|
|
437
|
+
/** Three-month return, or null when unknown. */
|
|
438
|
+
threeMonth: BigNumber | null;
|
|
439
|
+
/** Year-to-date return, or null when unknown. */
|
|
440
|
+
ytd: BigNumber | null;
|
|
441
|
+
/** One-year return, or null when unknown. */
|
|
442
|
+
oneYear: BigNumber | null;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Social/link fields of a fundamentals projection. No decimals.
|
|
446
|
+
*/
|
|
447
|
+
interface NuanzeFundamentalsSocial {
|
|
448
|
+
/** Website URL, or null when unknown. */
|
|
449
|
+
website: string | null;
|
|
450
|
+
/** X/Twitter URL, or null when unknown. */
|
|
451
|
+
x: string | null;
|
|
452
|
+
/** LinkedIn URL, or null when unknown. */
|
|
453
|
+
linkedin: string | null;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Approved stock/token fundamentals projection. The entire value is null when no row exists.
|
|
457
|
+
*/
|
|
458
|
+
interface NuanzeStockFundamentals {
|
|
459
|
+
/** Product the projection belongs to. */
|
|
460
|
+
productId: number;
|
|
461
|
+
/** Provider, or null when unknown. */
|
|
462
|
+
source: NuanzeFundamentalsSource | null;
|
|
463
|
+
/** Quote type, or null when unknown. */
|
|
464
|
+
quoteType: string | null;
|
|
465
|
+
/** Quote currency, or null when unknown. */
|
|
466
|
+
currency: string | null;
|
|
467
|
+
/** Display name, or null when unknown. */
|
|
468
|
+
name: string | null;
|
|
469
|
+
/** Description, or null when unknown. */
|
|
470
|
+
description: string | null;
|
|
471
|
+
/** Sector, or null when unknown. */
|
|
472
|
+
sector: string | null;
|
|
473
|
+
/** Industry, or null when unknown. */
|
|
474
|
+
industry: string | null;
|
|
475
|
+
/** Website URL, or null when unknown. */
|
|
476
|
+
website: string | null;
|
|
477
|
+
/** Employee count, or null when unknown. */
|
|
478
|
+
employees: number | null;
|
|
479
|
+
/** Market cap, or null when unknown. */
|
|
480
|
+
marketCap: BigNumber | null;
|
|
481
|
+
/** Nested key-data decimals. */
|
|
482
|
+
keyData: NuanzeFundamentalsKeyData;
|
|
483
|
+
/** Nested valuation decimals. */
|
|
484
|
+
valuation: NuanzeFundamentalsValuation;
|
|
485
|
+
/** Nested performance decimals. */
|
|
486
|
+
performance: NuanzeFundamentalsPerformance;
|
|
487
|
+
/** Nested social links. */
|
|
488
|
+
social: NuanzeFundamentalsSocial;
|
|
489
|
+
/** When the projection was last updated, as a UTC ISO 8601 string. */
|
|
490
|
+
updatedAt: string;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Per-component freshness timestamps on a resolved market detail.
|
|
494
|
+
*/
|
|
495
|
+
interface NuanzeMarketComponentUpdatedAt {
|
|
496
|
+
/** When market metadata was last synced. */
|
|
497
|
+
market: string;
|
|
498
|
+
/** When the latest ticker was last synced. */
|
|
499
|
+
ticker: string;
|
|
500
|
+
/** When funding was last observed, or null when absent. */
|
|
501
|
+
funding: string | null;
|
|
502
|
+
/** When fundamentals were last updated, or null when absent. */
|
|
503
|
+
fundamentals: string | null;
|
|
504
|
+
/** When related news was last updated, or null when absent. */
|
|
505
|
+
news: string | null;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Resolved market detail: list market fields plus venue resolution, funding, fundamentals, and
|
|
509
|
+
* recent published news.
|
|
510
|
+
*/
|
|
511
|
+
interface NuanzeMarketDetail extends NuanzeMarket {
|
|
512
|
+
/** Primary product ID for the asset. */
|
|
513
|
+
primaryProductId: number;
|
|
514
|
+
/** Venues the asset currently lists on. */
|
|
515
|
+
availableVenues: NuanzeMarketVenue[];
|
|
516
|
+
/** Venue used when the request omitted one. */
|
|
517
|
+
primaryVenue: NuanzeMarketVenue;
|
|
518
|
+
/** Latest funding observation, or null for spot or when none exists. */
|
|
519
|
+
funding: NuanzeFundingObservation | null;
|
|
520
|
+
/** Fundamentals projection, or null when no row exists. */
|
|
521
|
+
fundamentals: NuanzeStockFundamentals | null;
|
|
522
|
+
/** Recent published stories, capped by `newsLimit`. */
|
|
523
|
+
news: NuanzeNewsStory[];
|
|
524
|
+
/** Mixed-source freshness timestamps. */
|
|
525
|
+
componentUpdatedAt: NuanzeMarketComponentUpdatedAt;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Per-subaccount row from `POST /wallets/leaderboard`. Unknown or window-younger
|
|
529
|
+
* subaccounts are backfilled with `pnl: null`, `globalRank: null`, zero counts, and
|
|
530
|
+
* an empty `productIds`.
|
|
531
|
+
*/
|
|
532
|
+
interface NuanzeFollowedLeaderboardItem {
|
|
533
|
+
/**
|
|
534
|
+
* Lowercase bytes32 subaccount hex (owner + name), the SDK `subaccountToHex` form.
|
|
535
|
+
*/
|
|
536
|
+
subaccountHex: string;
|
|
537
|
+
/**
|
|
538
|
+
* Equity-basis account PnL for the requested timeframe, or null when the subaccount
|
|
539
|
+
* has no data in the window.
|
|
540
|
+
*/
|
|
541
|
+
pnl: BigNumber | null;
|
|
542
|
+
/** Close-derived win count. */
|
|
543
|
+
wins: number;
|
|
544
|
+
/** Close-derived loss count. */
|
|
545
|
+
losses: number;
|
|
546
|
+
/** Win rate, or null when there are no closed trades. */
|
|
547
|
+
winRate: BigNumber | null;
|
|
548
|
+
/** Perp fill count in the window. */
|
|
549
|
+
trades: number;
|
|
550
|
+
/** Traded product IDs, sorted by fill count descending. */
|
|
551
|
+
productIds: number[];
|
|
552
|
+
/** Number of distinct traded products. Equals `productIds.length`. */
|
|
553
|
+
productCount: number;
|
|
554
|
+
/**
|
|
555
|
+
* Rank among all subaccounts by this timeframe's PnL (`1` = highest), or null when
|
|
556
|
+
* the subaccount has no PnL in the window.
|
|
557
|
+
*/
|
|
558
|
+
globalRank: number | null;
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Leaderboard row. PnL is equity-basis account PnL, not realized PnL.
|
|
562
|
+
*/
|
|
563
|
+
interface NuanzeLeaderboardItem {
|
|
564
|
+
/** Rank in the selected timeframe. */
|
|
565
|
+
rank: number;
|
|
566
|
+
/** Rank change versus the prior window, or null when unknown. */
|
|
567
|
+
rankDelta: number | null;
|
|
568
|
+
/** Lowercased wallet address. */
|
|
569
|
+
address: string;
|
|
570
|
+
/** Account PnL for the selected timeframe. */
|
|
571
|
+
accountPnl: BigNumber;
|
|
572
|
+
/** Rolling 24-hour account PnL, or null when uncovered. */
|
|
573
|
+
pnl24h: BigNumber | null;
|
|
574
|
+
/** 7-day account PnL, or null when uncovered. */
|
|
575
|
+
pnl7d: BigNumber | null;
|
|
576
|
+
/** 30-day account PnL, or null when uncovered. */
|
|
577
|
+
pnl30d: BigNumber | null;
|
|
578
|
+
/** All-time account PnL. */
|
|
579
|
+
pnlAll: BigNumber;
|
|
580
|
+
/** Close-derived win count. */
|
|
581
|
+
wins: number;
|
|
582
|
+
/** Close-derived loss count. */
|
|
583
|
+
losses: number;
|
|
584
|
+
/** Win rate, or null when there are no closed trades. */
|
|
585
|
+
winRate: BigNumber | null;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Prior-window percentage deltas on the platform summary.
|
|
589
|
+
*/
|
|
590
|
+
interface NuanzePlatformDeltas {
|
|
591
|
+
/** Volume change versus the prior equal window, or null when unavailable. */
|
|
592
|
+
volumePct: BigNumber | null;
|
|
593
|
+
/** Trade-count change versus the prior equal window, or null when unavailable. */
|
|
594
|
+
tradesPct: BigNumber | null;
|
|
595
|
+
/** Trader-count change versus the prior equal window, or null when unavailable. */
|
|
596
|
+
tradersPct: BigNumber | null;
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Replica-backed wallet position snapshot. Not an execution-grade live feed.
|
|
600
|
+
*/
|
|
601
|
+
interface NuanzeWalletPosition {
|
|
602
|
+
/** Subaccount that owns the row. */
|
|
603
|
+
subaccountName: string;
|
|
604
|
+
/** Public product ID. */
|
|
605
|
+
productId: number;
|
|
606
|
+
/** Venue-native symbol. */
|
|
607
|
+
symbol: string;
|
|
608
|
+
/** Canonical ticker. */
|
|
609
|
+
ticker: string;
|
|
610
|
+
/** Venue the product trades on. */
|
|
611
|
+
venue: NuanzeMarketVenue;
|
|
612
|
+
/** Position direction. */
|
|
613
|
+
side: NuanzePositionSide;
|
|
614
|
+
/** Whether the row is a spot balance. */
|
|
615
|
+
isSpot: boolean;
|
|
616
|
+
/** Signed position size. */
|
|
617
|
+
amount: BigNumber;
|
|
618
|
+
/** Oracle price at snapshot time. */
|
|
619
|
+
oraclePrice: BigNumber;
|
|
620
|
+
/** Absolute notional. */
|
|
621
|
+
notional: BigNumber;
|
|
622
|
+
/** Unrealized PnL. */
|
|
623
|
+
unrealizedPnl: BigNumber;
|
|
624
|
+
/** When the snapshot was taken, as a UTC ISO 8601 string. */
|
|
625
|
+
snapshotAt: string;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Taker-side market tape row. Wallet identity is absent.
|
|
629
|
+
*/
|
|
630
|
+
interface NuanzeMarketTrade {
|
|
631
|
+
/** Match row ID. */
|
|
632
|
+
id: number;
|
|
633
|
+
/** Public product ID. */
|
|
634
|
+
productId: number;
|
|
635
|
+
/** Venue-native symbol. */
|
|
636
|
+
symbol: string;
|
|
637
|
+
/** Canonical ticker. */
|
|
638
|
+
ticker: string;
|
|
639
|
+
/** Venue the product trades on. */
|
|
640
|
+
venue: NuanzeMarketVenue;
|
|
641
|
+
/** Aggressor side. */
|
|
642
|
+
side: NuanzeTradeSide;
|
|
643
|
+
/** Fill price. */
|
|
644
|
+
price: BigNumber;
|
|
645
|
+
/** Fill size. */
|
|
646
|
+
amount: BigNumber;
|
|
647
|
+
/** Notional. */
|
|
648
|
+
notional: BigNumber;
|
|
649
|
+
/** Match time as a UTC ISO 8601 string. */
|
|
650
|
+
matchedAt: string;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Open perpetual position leg for a resolved market. Wallet addresses are returned.
|
|
654
|
+
*/
|
|
655
|
+
interface NuanzeMarketPosition {
|
|
656
|
+
/** Lowercased owner address. */
|
|
657
|
+
subaccountOwner: string;
|
|
658
|
+
/** Subaccount name. */
|
|
659
|
+
subaccountName: string;
|
|
660
|
+
/** Venue-native symbol. */
|
|
661
|
+
symbol: string;
|
|
662
|
+
/** Margin mode. Isolated margin is isolated equity and is null when non-positive. */
|
|
663
|
+
marginKind: NuanzeMarginKind;
|
|
664
|
+
/** Position direction. */
|
|
665
|
+
side: NuanzePositionSide;
|
|
666
|
+
/** Signed exact base amount. Positive is long and negative is short. */
|
|
667
|
+
amount: BigNumber;
|
|
668
|
+
/** Absolute notional. Legs below $10 are excluded by the API. */
|
|
669
|
+
notional: BigNumber;
|
|
670
|
+
/** Unrealized PnL. */
|
|
671
|
+
upnl: BigNumber;
|
|
672
|
+
/**
|
|
673
|
+
* Cross: market implied initial requirement. Isolated: isolated equity, or null when
|
|
674
|
+
* non-positive or unavailable.
|
|
675
|
+
*/
|
|
676
|
+
margin: BigNumber | null;
|
|
677
|
+
/** Entry price, or null when unavailable. */
|
|
678
|
+
entryPrice: BigNumber | null;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Current open perpetual position leg in the global signed-unrealized-PnL ranking.
|
|
682
|
+
*/
|
|
683
|
+
interface NuanzeOpenPosition extends NuanzeMarketPosition {
|
|
684
|
+
/** Public product ID for this row's market. */
|
|
685
|
+
productId: number;
|
|
686
|
+
/** Canonical market ticker. */
|
|
687
|
+
ticker: string;
|
|
688
|
+
/** Global open positions contain perpetuals only. */
|
|
689
|
+
venue: 'perp';
|
|
690
|
+
/** Source snapshot time for this position leg, as a UTC ISO 8601 string. */
|
|
691
|
+
snapshotAt: string;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* OHLCV candle. Missing source bars are not interpolated. A current bucket has `complete=false`.
|
|
695
|
+
*/
|
|
696
|
+
interface NuanzeCandle {
|
|
697
|
+
/** Bar open time as a UTC ISO 8601 string. */
|
|
698
|
+
openTime: string;
|
|
699
|
+
/** Open price. */
|
|
700
|
+
open: BigNumber;
|
|
701
|
+
/** High price. */
|
|
702
|
+
high: BigNumber;
|
|
703
|
+
/** Low price. */
|
|
704
|
+
low: BigNumber;
|
|
705
|
+
/** Close price. */
|
|
706
|
+
close: BigNumber;
|
|
707
|
+
/** Traded volume. */
|
|
708
|
+
volume: BigNumber;
|
|
709
|
+
/** False when the bar is still accumulating. */
|
|
710
|
+
complete: boolean;
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Wallet-owned execution row. Unlike market tape, both maker and taker fills are included.
|
|
714
|
+
*/
|
|
715
|
+
interface NuanzeWalletTrade {
|
|
716
|
+
/** Match row ID. */
|
|
717
|
+
id: number;
|
|
718
|
+
/** Subaccount that filled. */
|
|
719
|
+
subaccountName: string;
|
|
720
|
+
/** Public product ID. */
|
|
721
|
+
productId: number;
|
|
722
|
+
/** Venue-native symbol. */
|
|
723
|
+
symbol: string;
|
|
724
|
+
/** Canonical ticker. */
|
|
725
|
+
ticker: string;
|
|
726
|
+
/** Venue the product trades on. */
|
|
727
|
+
venue: NuanzeMarketVenue;
|
|
728
|
+
/** Side of this wallet's fill. */
|
|
729
|
+
side: NuanzeTradeSide;
|
|
730
|
+
/** Whether this wallet was the maker. */
|
|
731
|
+
isMaker: boolean;
|
|
732
|
+
/** Fill price. */
|
|
733
|
+
price: BigNumber;
|
|
734
|
+
/** Fill size. */
|
|
735
|
+
amount: BigNumber;
|
|
736
|
+
/** Notional. */
|
|
737
|
+
notional: BigNumber;
|
|
738
|
+
/** Match time as a UTC ISO 8601 string. */
|
|
739
|
+
matchedAt: string;
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Sampled wallet series point. Synthetic points are the boundary anchor or carried-forward tip.
|
|
743
|
+
*/
|
|
744
|
+
interface NuanzeSeriesPoint {
|
|
745
|
+
/** Point time as a UTC ISO 8601 string. */
|
|
746
|
+
timestamp: string;
|
|
747
|
+
/** Metric value, or null when the bucket has no observation. */
|
|
748
|
+
value: BigNumber | null;
|
|
749
|
+
/** True when the point is a synthetic anchor or tip. */
|
|
750
|
+
synthetic: boolean;
|
|
751
|
+
/** True when the latest bucket is still provisional. */
|
|
752
|
+
provisional: boolean;
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Public tags on a collateral event. No identity beyond the event's own owner.
|
|
756
|
+
*/
|
|
757
|
+
interface NuanzeFlowTags {
|
|
758
|
+
/** Whether the owner is tagged as a whale. */
|
|
759
|
+
whale: boolean;
|
|
760
|
+
/** Whether the owner is tagged as smart money. */
|
|
761
|
+
smartMoney: boolean;
|
|
762
|
+
/** Whether the owner is tagged as a fresh wallet. */
|
|
763
|
+
freshWallet: boolean;
|
|
764
|
+
}
|
|
765
|
+
/**
|
|
766
|
+
* Public on-chain collateral event. Product 0 and 11 may use fallback symbols.
|
|
767
|
+
*/
|
|
768
|
+
interface NuanzeCollateralFlow {
|
|
769
|
+
/** Event ID. */
|
|
770
|
+
id: number;
|
|
771
|
+
/** Deposit or withdrawal. */
|
|
772
|
+
eventType: NuanzeFlowEventType;
|
|
773
|
+
/** Public product ID. */
|
|
774
|
+
productId: number;
|
|
775
|
+
/** Asset symbol. */
|
|
776
|
+
symbol: string;
|
|
777
|
+
/** Exact asset amount. */
|
|
778
|
+
assetAmount: BigNumber;
|
|
779
|
+
/** Oracle price at event time, or null when unvalued. */
|
|
780
|
+
oraclePrice: BigNumber | null;
|
|
781
|
+
/** USD valuation, or null when unvalued. */
|
|
782
|
+
usdValue: BigNumber | null;
|
|
783
|
+
/** Lowercased owner address. */
|
|
784
|
+
owner: string;
|
|
785
|
+
/** Subaccount name. */
|
|
786
|
+
subaccountName: string;
|
|
787
|
+
/** Event time as a UTC ISO 8601 string. */
|
|
788
|
+
timestamp: string;
|
|
789
|
+
/** Public tags. */
|
|
790
|
+
tags: NuanzeFlowTags;
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* UTC-bucketed collateral flow point.
|
|
794
|
+
*/
|
|
795
|
+
interface NuanzeCollateralFlowPoint {
|
|
796
|
+
/** Bucket start as a UTC ISO 8601 string. */
|
|
797
|
+
timestamp: string;
|
|
798
|
+
/** Deposited USD in the bucket. */
|
|
799
|
+
deposited: BigNumber;
|
|
800
|
+
/** Withdrawn USD in the bucket. */
|
|
801
|
+
withdrawn: BigNumber;
|
|
802
|
+
/** Net USD in the bucket. */
|
|
803
|
+
net: BigNumber;
|
|
804
|
+
/** Cumulative net USD through this bucket. */
|
|
805
|
+
cumulativeNet: BigNumber;
|
|
806
|
+
/** Event count. */
|
|
807
|
+
eventCount: number;
|
|
808
|
+
/** Count of valued events. */
|
|
809
|
+
valuedCount: number;
|
|
810
|
+
/** Count of unvalued events. */
|
|
811
|
+
unvaluedCount: number;
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* Aggregate long/short totals for a positioning response. All reversible fields are null when any
|
|
815
|
+
* contributing cell required by the grouping is suppressed.
|
|
816
|
+
*/
|
|
817
|
+
interface NuanzePositioningTotals {
|
|
818
|
+
/** Long position count at the owner/subaccount grain, or null if suppressed. */
|
|
819
|
+
longPositions: number | null;
|
|
820
|
+
/** Short position count at the owner/subaccount grain, or null if suppressed. */
|
|
821
|
+
shortPositions: number | null;
|
|
822
|
+
/** Distinct long owners, or null if suppressed. */
|
|
823
|
+
longOwners: number | null;
|
|
824
|
+
/** Distinct short owners, or null if suppressed. */
|
|
825
|
+
shortOwners: number | null;
|
|
826
|
+
/** Owners netted flat, or null if suppressed. */
|
|
827
|
+
netFlatOwners: number | null;
|
|
828
|
+
/** Long notional, or null if suppressed. */
|
|
829
|
+
longNotional: BigNumber | null;
|
|
830
|
+
/** Short notional, or null if suppressed. */
|
|
831
|
+
shortNotional: BigNumber | null;
|
|
832
|
+
/** Long share of positions, or null if suppressed. */
|
|
833
|
+
longPositionPct: BigNumber | null;
|
|
834
|
+
/** Short share of positions, or null if suppressed. */
|
|
835
|
+
shortPositionPct: BigNumber | null;
|
|
836
|
+
/** Long/short ratio, or null if suppressed. */
|
|
837
|
+
longShortRatio: BigNumber | null;
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* Shared fields of a privacy-preserving positioning cell. For a suppressed cell every reversible
|
|
841
|
+
* value is null; only the label, key, suppressed flag, and threshold remain.
|
|
842
|
+
*/
|
|
843
|
+
interface NuanzePositioningCellBase {
|
|
844
|
+
/** Display label. */
|
|
845
|
+
label: string;
|
|
846
|
+
/** Side this cell describes, or null when the grouping is not by side. */
|
|
847
|
+
side: NuanzePositionSide | null;
|
|
848
|
+
/** True when complementary or cross-request suppression nulls reversible metrics. */
|
|
849
|
+
suppressed: boolean;
|
|
850
|
+
/** Owner-count suppression threshold. Always 20. */
|
|
851
|
+
suppressionThreshold: 20;
|
|
852
|
+
/** Position count, or null if suppressed. */
|
|
853
|
+
positions: number | null;
|
|
854
|
+
/** Distinct contributing owners, or null if suppressed. */
|
|
855
|
+
owners: number | null;
|
|
856
|
+
/** Cell notional, or null if suppressed. */
|
|
857
|
+
notional: BigNumber | null;
|
|
858
|
+
/** Average notional, or null if suppressed. */
|
|
859
|
+
averageNotional: BigNumber | null;
|
|
860
|
+
/** Share of the grouping, or null if suppressed. */
|
|
861
|
+
percentage: BigNumber | null;
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* Positioning cell grouped by side.
|
|
865
|
+
*/
|
|
866
|
+
interface NuanzeSidePositioningCell extends NuanzePositioningCellBase {
|
|
867
|
+
/** Side key. */
|
|
868
|
+
key: NuanzePositionSide;
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* Positioning cell grouped by wallet cohort.
|
|
872
|
+
*/
|
|
873
|
+
interface NuanzeCohortPositioningCell extends NuanzePositioningCellBase {
|
|
874
|
+
/** Cohort key. */
|
|
875
|
+
key: NuanzeCohortKey;
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Positioning cell grouped by frozen USD notional bucket. Empty buckets are omitted rather than
|
|
879
|
+
* returned with zeros.
|
|
880
|
+
*/
|
|
881
|
+
interface NuanzeNotionalBucketPositioningCell extends NuanzePositioningCellBase {
|
|
882
|
+
/** Notional-bucket key. */
|
|
883
|
+
key: NuanzeNotionalBucket;
|
|
884
|
+
}
|
|
885
|
+
/**
|
|
886
|
+
* Shared fields of every positioning response. Identity, entry price, PnL, margin, and leverage
|
|
887
|
+
* are never returned.
|
|
888
|
+
*/
|
|
889
|
+
interface NuanzeMarketPositioningBase extends NuanzeMarketIdentity {
|
|
890
|
+
/** Effective inclusion threshold after request validation. */
|
|
891
|
+
effectiveMinPositionUsd: NuanzeMinPositionUsd;
|
|
892
|
+
/** Owner-count suppression threshold. Always 20. */
|
|
893
|
+
suppressionThreshold: 20;
|
|
894
|
+
/** Grouping totals; reversible fields are null when any required cell is suppressed. */
|
|
895
|
+
totals: NuanzePositioningTotals;
|
|
896
|
+
/** Newest contributing snapshot, or null when none. */
|
|
897
|
+
newestSnapshotAt: string | null;
|
|
898
|
+
/** Oldest contributing snapshot, or null when none. */
|
|
899
|
+
oldestSnapshotAt: string | null;
|
|
900
|
+
/** When the response was generated, as a UTC ISO 8601 string. */
|
|
901
|
+
asOf: string;
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Positioning grouped by side. Always two cells, long then short.
|
|
905
|
+
*/
|
|
906
|
+
interface NuanzeMarketPositioningSideResponse extends NuanzeMarketPositioningBase {
|
|
907
|
+
/** Grouping discriminator. */
|
|
908
|
+
groupBy: 'side';
|
|
909
|
+
/** Long and short cells. */
|
|
910
|
+
cells: NuanzeSidePositioningCell[];
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* Positioning grouped by wallet cohort.
|
|
914
|
+
*/
|
|
915
|
+
interface NuanzeMarketPositioningCohortResponse extends NuanzeMarketPositioningBase {
|
|
916
|
+
/** Grouping discriminator. */
|
|
917
|
+
groupBy: 'cohort';
|
|
918
|
+
/** Cohort cells. */
|
|
919
|
+
cells: NuanzeCohortPositioningCell[];
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* Positioning grouped by notional bucket.
|
|
923
|
+
*/
|
|
924
|
+
interface NuanzeMarketPositioningNotionalBucketResponse extends NuanzeMarketPositioningBase {
|
|
925
|
+
/** Grouping discriminator. */
|
|
926
|
+
groupBy: 'notionalBucket';
|
|
927
|
+
/** Notional-bucket cells. Empty buckets omitted. */
|
|
928
|
+
cells: NuanzeNotionalBucketPositioningCell[];
|
|
929
|
+
}
|
|
930
|
+
//#endregion
|
|
931
|
+
export { NuanzeMarket as $, NuanzeCandleInterval as A, NuanzePositioningTotals as At, NuanzeFlowTimeframe as B, NUANZE_PNL_WINDOWS as C, NuanzeOpenPositionSortDirection as Ct, NUANZE_SOURCE_INTERVALS as D, NuanzePositionSide as Dt, NUANZE_SERIES_METRICS as E, NuanzePnlWindow as Et, NuanzeCoverage as F, NuanzeStockFundamentals as Ft, NuanzeFundamentalsSource as G, NuanzeFundamentalsKeyData as H, NuanzeFlowBucket as I, NuanzeTradeSide as It, NuanzeFundingRate as J, NuanzeFundamentalsValuation as K, NuanzeFlowEventType as L, NuanzeWalletPosition as Lt, NuanzeCohortPositioningCell as M, NuanzeSeriesPoint as Mt, NuanzeCollateralFlow as N, NuanzeSidePositioningCell as Nt, NUANZE_TRADE_SIDES as O, NuanzePositioningCellBase as Ot, NuanzeCollateralFlowPoint as P, NuanzeSourceInterval as Pt, NuanzeMarginKind as Q, NuanzeFlowEventTypeFilter as R, NuanzeWalletTrade as Rt, NUANZE_PLATFORM_WINDOWS as S, NuanzeOpenPosition as St, NUANZE_POSITION_SIDES as T, NuanzePlatformWindow as Tt, NuanzeFundamentalsPerformance as U, NuanzeFollowedLeaderboardItem as V, NuanzeFundamentalsSocial as W, NuanzeLeaderboardItem as X, NuanzeLatestTicker as Y, NuanzeLeaderboardTimeframe as Z, NUANZE_NEWS_EVENT_TYPES as _, NuanzeNewsSentiment as _t, NUANZE_FLOW_EVENT_TYPES as a, NuanzeMarketPositionSortDirection as at, NUANZE_NOTIONAL_BUCKETS as b, NuanzeNotionalBucket as bt, NUANZE_FUNDAMENTALS_SOURCES as c, NuanzeMarketPositioningNotionalBucketResponse as ct, NUANZE_MARKET_POSITION_SORT_BYS as d, NuanzeMarketTradingStatus as dt, NuanzeMarketComponentUpdatedAt as et, NUANZE_MARKET_POSITION_SORT_DIRECTIONS as f, NuanzeMarketVenue as ft, NUANZE_NEWS_ENTITY_ROLES as g, NuanzeNewsEventType as gt, NUANZE_MIN_POSITION_USDS as h, NuanzeNewsEntityRole as ht, NUANZE_FLOW_BUCKETS as i, NuanzeMarketPositionSortBy as it, NuanzeCohortKey as j, NuanzeSeriesMetric as jt, NuanzeCandle as k, NuanzePositioningGroupBy as kt, NUANZE_LEADERBOARD_TIMEFRAMES as l, NuanzeMarketPositioningSideResponse as lt, NUANZE_MARKET_VENUES as m, NuanzeNewsEntity as mt, NUANZE_COHORT_KEYS as n, NuanzeMarketIdentity as nt, NUANZE_FLOW_EVENT_TYPE_FILTERS as o, NuanzeMarketPositioningBase as ot, NUANZE_MARKET_TRADING_STATUSES as p, NuanzeMinPositionUsd as pt, NuanzeFundingObservation as q, NUANZE_COVERAGES as r, NuanzeMarketPosition as rt, NUANZE_FLOW_TIMEFRAMES as s, NuanzeMarketPositioningCohortResponse as st, NUANZE_CANDLE_INTERVALS as t, NuanzeMarketDetail as tt, NUANZE_MARGIN_KINDS as u, NuanzeMarketTrade as ut, NUANZE_NEWS_SENTIMENTS as v, NuanzeNewsStory as vt, NUANZE_POSITIONING_GROUP_BYS as w, NuanzePlatformDeltas as wt, NUANZE_OPEN_POSITION_SORT_DIRECTIONS as x, NuanzeNotionalBucketPositioningCell as xt, NUANZE_NEWS_TIERS as y, NuanzeNewsTier as yt, NuanzeFlowTags as z };
|
|
932
|
+
//# sourceMappingURL=clientModelTypes-BLPA-e3V.d.cts.map
|