@kodiak-finance/orderly-portfolio 2.8.16-rc.0 → 2.8.16-rc.2

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.
@@ -0,0 +1,707 @@
1
+ import * as React$1 from 'react';
2
+ import React__default, { FC, PropsWithChildren } from 'react';
3
+ import { ScaffoldProps, SideBarProps, SideMenuItem } from '@kodiak-finance/orderly-ui-scaffold';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import * as _kodiak_finance_orderly_types from '@kodiak-finance/orderly-types';
6
+ import { API, AssetHistorySideEnum } from '@kodiak-finance/orderly-types';
7
+ import * as _kodiak_finance_orderly_hooks from '@kodiak-finance/orderly-hooks';
8
+ import { TWType, useAccount } from '@kodiak-finance/orderly-hooks';
9
+ import * as _kodiak_finance_orderly_ui from '@kodiak-finance/orderly-ui';
10
+ import { Column, TanstackColumn } from '@kodiak-finance/orderly-ui';
11
+ import { PositionsProps } from '@kodiak-finance/orderly-ui-positions';
12
+ import { SharePnLConfig } from '@kodiak-finance/orderly-ui-share';
13
+ import { Decimal } from '@kodiak-finance/orderly-utils';
14
+
15
+ type PortfolioLayoutProps = ScaffoldProps & {
16
+ hideSideBar?: boolean;
17
+ items?: SideBarProps["items"];
18
+ };
19
+ declare const PortfolioLayout: FC<PropsWithChildren<PortfolioLayoutProps>>;
20
+
21
+ type PortfolioLayoutWidgetProps = PortfolioLayoutProps;
22
+ declare const PortfolioLayoutWidget: FC<PropsWithChildren<PortfolioLayoutWidgetProps>>;
23
+
24
+ declare enum PortfolioLeftSidebarPath {
25
+ Overview = "/portfolio",
26
+ Positions = "/portfolio/positions",
27
+ Orders = "/portfolio/orders",
28
+ Assets = "/portfolio/assets",
29
+ FeeTier = "/portfolio/feeTier",
30
+ ApiKey = "/portfolio/apiKey",
31
+ Setting = "/portfolio/setting",
32
+ History = "/portfolio/history",
33
+ SymbolPerformance = "/portfolio/symbol-performance"
34
+ }
35
+ type UseLayoutBuilderOptions = {
36
+ current?: string;
37
+ };
38
+ declare const usePortfolioLayoutScript: (props: UseLayoutBuilderOptions) => {
39
+ items: ({
40
+ name: string;
41
+ href: PortfolioLeftSidebarPath;
42
+ icon: react_jsx_runtime.JSX.Element;
43
+ hide?: undefined;
44
+ } | {
45
+ name: string;
46
+ href: PortfolioLeftSidebarPath;
47
+ hide: boolean;
48
+ icon?: undefined;
49
+ })[];
50
+ current: string;
51
+ hideSideBar: boolean;
52
+ onItemSelect: (item: SideMenuItem) => void;
53
+ };
54
+
55
+ declare const useAssetScript: () => {
56
+ readonly canTrade: boolean;
57
+ readonly connect: (options?: any) => Promise<_kodiak_finance_orderly_hooks.WalletState[]>;
58
+ readonly portfolioValue: number | null;
59
+ readonly freeCollateral: number;
60
+ readonly unrealPnL: number;
61
+ readonly unrealROI: number;
62
+ readonly currentLeverage: number;
63
+ readonly onLeverageEdit: () => void;
64
+ readonly visible: any;
65
+ readonly wrongNetwork: boolean;
66
+ readonly toggleVisible: () => void;
67
+ readonly onDeposit: () => void;
68
+ readonly onWithdraw: () => void;
69
+ readonly onTransfer: () => void;
70
+ readonly namespace: _kodiak_finance_orderly_types.ChainNamespace | null;
71
+ readonly isMainAccount: boolean;
72
+ readonly hasSubAccount: boolean;
73
+ };
74
+ type AssetScriptReturn = ReturnType<typeof useAssetScript>;
75
+
76
+ declare const AssetsUI: React__default.FC<AssetScriptReturn & {
77
+ onConnectWallet?: () => void;
78
+ }>;
79
+
80
+ declare const AssetWidget: React__default.FC;
81
+
82
+ declare const HistoryDataGroupWidget: React.FC;
83
+
84
+ declare const AssetsChartWidget: React__default.FC;
85
+
86
+ declare enum PeriodType$1 {
87
+ DAY = "1D",
88
+ WEEK = "7D",
89
+ MONTH = "30D",
90
+ QUARTER = "90D"
91
+ }
92
+ declare const useAssetsHistoryData: (localKey: string, options?: {
93
+ isRealtime?: boolean;
94
+ }) => {
95
+ readonly periodTypes: PeriodType$1[];
96
+ readonly period: PeriodType$1 | null;
97
+ readonly onPeriodChange: (value: PeriodType$1) => void;
98
+ readonly periodLabel: Record<PeriodType$1, string>;
99
+ readonly curPeriod: string;
100
+ readonly data: API.DailyRow[];
101
+ readonly aggregateValue: {
102
+ vol: number;
103
+ pnl: number;
104
+ roi: number;
105
+ };
106
+ readonly createFakeData: (start: Partial<API.DailyRow>, end: Partial<API.DailyRow>) => {
107
+ account_value?: number | undefined;
108
+ broker_id?: string | undefined;
109
+ date: string;
110
+ perp_volume?: number | undefined;
111
+ pnl?: number | undefined;
112
+ snapshot_time?: number | undefined;
113
+ }[];
114
+ readonly volumeUpdateDate: any;
115
+ readonly filterItems: any;
116
+ readonly onFilter: (filter: {
117
+ name: string;
118
+ value: any;
119
+ }) => void;
120
+ readonly dateRange: {
121
+ from: Date;
122
+ to: Date;
123
+ };
124
+ readonly setDateRange: (newRange: {
125
+ from: Date | string;
126
+ to: Date | string;
127
+ }) => void;
128
+ };
129
+ type useAssetsHistoryDataReturn = ReturnType<typeof useAssetsHistoryData>;
130
+
131
+ declare const useAssetsChartScript: () => {
132
+ readonly data: {
133
+ account_value?: number | undefined;
134
+ broker_id?: string | undefined;
135
+ date: string;
136
+ perp_volume?: number | undefined;
137
+ pnl?: number | undefined;
138
+ snapshot_time?: number | undefined;
139
+ }[];
140
+ readonly invisible: boolean;
141
+ readonly type?: _kodiak_finance_orderly_hooks.TWType;
142
+ readonly periodTypes: PeriodType$1[];
143
+ readonly period: PeriodType$1 | null;
144
+ readonly onPeriodChange: (value: PeriodType$1) => void;
145
+ readonly periodLabel: Record<PeriodType$1, string>;
146
+ readonly curPeriod: string;
147
+ readonly aggregateValue: {
148
+ vol: number;
149
+ pnl: number;
150
+ roi: number;
151
+ };
152
+ readonly createFakeData: (start: Partial<_kodiak_finance_orderly_types.API.DailyRow>, end: Partial<_kodiak_finance_orderly_types.API.DailyRow>) => {
153
+ account_value?: number | undefined;
154
+ broker_id?: string | undefined;
155
+ date: string;
156
+ perp_volume?: number | undefined;
157
+ pnl?: number | undefined;
158
+ snapshot_time?: number | undefined;
159
+ }[];
160
+ readonly volumeUpdateDate: any;
161
+ readonly filterItems: any;
162
+ readonly onFilter: (filter: {
163
+ name: string;
164
+ value: any;
165
+ }) => void;
166
+ readonly dateRange: {
167
+ from: Date;
168
+ to: Date;
169
+ };
170
+ readonly setDateRange: (newRange: {
171
+ from: Date | string;
172
+ to: Date | string;
173
+ }) => void;
174
+ readonly totalOrderClaimedReward: [number | undefined, {
175
+ refresh: () => void;
176
+ }];
177
+ readonly curEpochEstimate: _kodiak_finance_orderly_hooks.CurrentEpochEstimate | undefined;
178
+ readonly epochList: _kodiak_finance_orderly_hooks.EpochInfoType;
179
+ readonly brokerName: string | undefined;
180
+ readonly referralInfo: _kodiak_finance_orderly_hooks.RefferalAPI.ReferralInfo | undefined;
181
+ };
182
+ type useAssetsChartScriptReturn = ReturnType<typeof useAssetsChartScript>;
183
+
184
+ type AssetsLineChartProps = {} & useAssetsChartScriptReturn;
185
+ declare const AssetsChart: React__default.FC<AssetsLineChartProps>;
186
+
187
+ type Options = {
188
+ chainsInfo: any[];
189
+ isDeposit: boolean;
190
+ isWeb3Wallet: boolean;
191
+ };
192
+ declare const useAssetHistoryColumns: (options: Options) => Column[];
193
+
194
+ declare enum AssetTarget {
195
+ Web3Wallet = "Web3Wallet",
196
+ AccountId = "AccountId"
197
+ }
198
+ type AssetHistoryScriptOptions = {
199
+ side: AssetHistorySideEnum;
200
+ };
201
+ type AssetHistoryScriptReturn = ReturnType<typeof useAssetHistoryScript>;
202
+ declare const useAssetHistoryScript: (options: AssetHistoryScriptOptions) => {
203
+ dataSource: any[];
204
+ total: number | undefined;
205
+ isLoading: boolean;
206
+ queryParameter: {
207
+ target: AssetTarget;
208
+ dateRange: Date[];
209
+ };
210
+ onFilter: (filter: {
211
+ name: string;
212
+ value: any;
213
+ }) => void;
214
+ pagination: _kodiak_finance_orderly_ui.PaginationMeta;
215
+ onDeposit: () => void;
216
+ chainsInfo: any[];
217
+ isDeposit: boolean;
218
+ isWeb3Wallet: boolean;
219
+ };
220
+
221
+ type AssetHistoryProps = AssetHistoryScriptReturn;
222
+ declare const AssetHistory: FC<AssetHistoryProps>;
223
+
224
+ type AssetHistoryWidgetProps = {
225
+ side: AssetHistorySideEnum;
226
+ };
227
+ declare const AssetHistoryWidget: React__default.FC<AssetHistoryWidgetProps>;
228
+
229
+ declare const usePerformanceScript: () => {
230
+ data: ReadonlyArray<any>;
231
+ invisible: boolean;
232
+ visible: boolean;
233
+ setVisible: (value: boolean) => void;
234
+ type?: _kodiak_finance_orderly_hooks.TWType;
235
+ periodTypes: PeriodType$1[];
236
+ period: PeriodType$1 | null;
237
+ onPeriodChange: (value: PeriodType$1) => void;
238
+ periodLabel: Record<PeriodType$1, string>;
239
+ curPeriod: string;
240
+ aggregateValue: {
241
+ vol: number;
242
+ pnl: number;
243
+ roi: number;
244
+ };
245
+ createFakeData: (start: Partial<_kodiak_finance_orderly_types.API.DailyRow>, end: Partial<_kodiak_finance_orderly_types.API.DailyRow>) => {
246
+ account_value?: number | undefined;
247
+ broker_id?: string | undefined;
248
+ date: string;
249
+ perp_volume?: number | undefined;
250
+ pnl?: number | undefined;
251
+ snapshot_time?: number | undefined;
252
+ }[];
253
+ volumeUpdateDate: any;
254
+ filterItems: any;
255
+ onFilter: (filter: {
256
+ name: string;
257
+ value: any;
258
+ }) => void;
259
+ dateRange: {
260
+ from: Date;
261
+ to: Date;
262
+ };
263
+ setDateRange: (newRange: {
264
+ from: Date | string;
265
+ to: Date | string;
266
+ }) => void;
267
+ totalOrderClaimedReward: [number | undefined, {
268
+ refresh: () => void;
269
+ }];
270
+ curEpochEstimate: _kodiak_finance_orderly_hooks.CurrentEpochEstimate | undefined;
271
+ epochList: _kodiak_finance_orderly_hooks.EpochInfoType;
272
+ brokerName: string | undefined;
273
+ referralInfo: _kodiak_finance_orderly_hooks.RefferalAPI.ReferralInfo | undefined;
274
+ };
275
+ type UsePerformanceScriptReturn = ReturnType<typeof usePerformanceScript>;
276
+
277
+ type PerformanceUIProps = {} & UsePerformanceScriptReturn;
278
+ declare const PerformanceUI: React__default.FC<PerformanceUIProps>;
279
+
280
+ declare const PerformanceWidget: React__default.FC;
281
+
282
+ declare const PerformanceMobileUI: React__default.FC<Pick<useAssetsHistoryDataReturn & UsePerformanceScriptReturn, "data" | "curPeriod" | "aggregateValue" | "onPeriodChange" | "invisible" | "visible" | "createFakeData" | "period" | "filterItems" | "onFilter">>;
283
+
284
+ declare const PerformanceMobileWidget: React__default.FC;
285
+ declare const PerformanceMobileSheetId = "PerformanceMobileSheetId";
286
+ declare const PerformanceMobileDialogId = "PerformanceMobileDialogId";
287
+
288
+ declare const FundingHistoryWidget: React__default.FC;
289
+
290
+ declare const useFundingHistoryHook: () => {
291
+ readonly dataSource: (_kodiak_finance_orderly_types.API.FundingFeeRow & {
292
+ annual_rate: number;
293
+ })[] | null;
294
+ readonly isLoading: boolean;
295
+ readonly isValidating: boolean;
296
+ readonly queryParameter: {
297
+ readonly symbol: string;
298
+ readonly dateRange: Date[];
299
+ };
300
+ readonly onFilter: (filter: {
301
+ name: string;
302
+ value: any;
303
+ }) => void;
304
+ readonly pagination: _kodiak_finance_orderly_ui.PaginationMeta;
305
+ };
306
+
307
+ declare const useFundingHistoryColumns: () => Column<API.FundingFeeRow & {
308
+ annual_rate: number;
309
+ }>[];
310
+
311
+ declare const DistributionHistoryWidget: React__default.FC;
312
+
313
+ declare const useDistributionHistoryHook: () => {
314
+ readonly dataSource: (_kodiak_finance_orderly_types.API.FundingFeeRow & {
315
+ annual_rate: number;
316
+ })[];
317
+ readonly isLoading: boolean;
318
+ readonly isValidating: boolean;
319
+ readonly queryParameter: {
320
+ readonly type: string;
321
+ readonly dateRange: Date[];
322
+ };
323
+ readonly onFilter: (filter: {
324
+ name: string;
325
+ value: any;
326
+ }) => void;
327
+ readonly pagination: _kodiak_finance_orderly_ui.PaginationMeta;
328
+ };
329
+ type useDistributionHistoryHookReturn = ReturnType<typeof useDistributionHistoryHook>;
330
+
331
+ type FundingHistoryProps$1 = {} & useDistributionHistoryHookReturn;
332
+ declare const DistributionHistoryMobile: FC<FundingHistoryProps$1>;
333
+
334
+ type FundingHistoryProps = {} & useDistributionHistoryHookReturn;
335
+ declare const DistributionHistoryDesktop: FC<FundingHistoryProps>;
336
+
337
+ declare const OverviewPage: React__default.FC;
338
+
339
+ declare const OverviewProvider: FC<PropsWithChildren<{
340
+ type?: TWType;
341
+ }>>;
342
+
343
+ declare const index$6_AssetHistory: typeof AssetHistory;
344
+ declare const index$6_AssetHistoryWidget: typeof AssetHistoryWidget;
345
+ declare const index$6_AssetWidget: typeof AssetWidget;
346
+ declare const index$6_AssetsChart: typeof AssetsChart;
347
+ declare const index$6_AssetsChartWidget: typeof AssetsChartWidget;
348
+ declare const index$6_AssetsUI: typeof AssetsUI;
349
+ declare const index$6_DistributionHistoryDesktop: typeof DistributionHistoryDesktop;
350
+ declare const index$6_DistributionHistoryMobile: typeof DistributionHistoryMobile;
351
+ declare const index$6_DistributionHistoryWidget: typeof DistributionHistoryWidget;
352
+ declare const index$6_FundingHistoryWidget: typeof FundingHistoryWidget;
353
+ declare const index$6_HistoryDataGroupWidget: typeof HistoryDataGroupWidget;
354
+ declare const index$6_OverviewPage: typeof OverviewPage;
355
+ declare const index$6_OverviewProvider: typeof OverviewProvider;
356
+ declare const index$6_PerformanceMobileDialogId: typeof PerformanceMobileDialogId;
357
+ declare const index$6_PerformanceMobileSheetId: typeof PerformanceMobileSheetId;
358
+ declare const index$6_PerformanceMobileUI: typeof PerformanceMobileUI;
359
+ declare const index$6_PerformanceMobileWidget: typeof PerformanceMobileWidget;
360
+ declare const index$6_PerformanceUI: typeof PerformanceUI;
361
+ declare const index$6_PerformanceWidget: typeof PerformanceWidget;
362
+ declare const index$6_useAssetHistoryColumns: typeof useAssetHistoryColumns;
363
+ declare const index$6_useAssetHistoryScript: typeof useAssetHistoryScript;
364
+ declare const index$6_useAssetsChartScript: typeof useAssetsChartScript;
365
+ declare const index$6_useFundingHistoryColumns: typeof useFundingHistoryColumns;
366
+ declare const index$6_useFundingHistoryHook: typeof useFundingHistoryHook;
367
+ declare const index$6_usePerformanceScript: typeof usePerformanceScript;
368
+ declare namespace index$6 {
369
+ export { index$6_AssetHistory as AssetHistory, index$6_AssetHistoryWidget as AssetHistoryWidget, index$6_AssetWidget as AssetWidget, index$6_AssetsChart as AssetsChart, index$6_AssetsChartWidget as AssetsChartWidget, index$6_AssetsUI as AssetsUI, index$6_DistributionHistoryDesktop as DistributionHistoryDesktop, index$6_DistributionHistoryMobile as DistributionHistoryMobile, index$6_DistributionHistoryWidget as DistributionHistoryWidget, index$6_FundingHistoryWidget as FundingHistoryWidget, index$6_HistoryDataGroupWidget as HistoryDataGroupWidget, index$6_OverviewPage as OverviewPage, index$6_OverviewProvider as OverviewProvider, index$6_PerformanceMobileDialogId as PerformanceMobileDialogId, index$6_PerformanceMobileSheetId as PerformanceMobileSheetId, index$6_PerformanceMobileUI as PerformanceMobileUI, index$6_PerformanceMobileWidget as PerformanceMobileWidget, index$6_PerformanceUI as PerformanceUI, index$6_PerformanceWidget as PerformanceWidget, index$6_useAssetHistoryColumns as useAssetHistoryColumns, index$6_useAssetHistoryScript as useAssetHistoryScript, index$6_useAssetsChartScript as useAssetsChartScript, index$6_useFundingHistoryColumns as useFundingHistoryColumns, index$6_useFundingHistoryHook as useFundingHistoryHook, index$6_usePerformanceScript as usePerformanceScript };
370
+ }
371
+
372
+ type FeeTierWidgetProps = UseFeeTierScriptOptions;
373
+
374
+ type FeeTierPageProps = FeeTierWidgetProps;
375
+ declare const FeeTierPage: React__default.FC<FeeTierPageProps>;
376
+
377
+ type UseFeeTierScriptOptions = {
378
+ dataAdapter?: (columns: Column<any>[], dataSource: any[], context?: {
379
+ tier?: number;
380
+ }) => {
381
+ columns: Column<any>[];
382
+ dataSource: any[];
383
+ };
384
+ headerDataAdapter?: (original: any[]) => any[];
385
+ onRow?: (record: any, index: number) => {
386
+ normal?: any;
387
+ active?: any;
388
+ };
389
+ onCell?: (column: TanstackColumn<any>, record: any, index: number) => {
390
+ normal?: any;
391
+ active?: any;
392
+ };
393
+ };
394
+ interface FeeDataType {
395
+ tier: number | null;
396
+ volume_min?: number | null;
397
+ volume_max?: number | null;
398
+ volume_node?: React__default.ReactNode;
399
+ or?: string | null;
400
+ maker_fee: string;
401
+ taker_fee: string;
402
+ }
403
+ declare const useFeeTierScript: (options?: UseFeeTierScriptOptions) => {
404
+ columns: Column<any>[] | Column<FeeDataType>[];
405
+ dataSource: any[] | FeeDataType[];
406
+ onRow: ((record: any, index: number) => {
407
+ normal?: any;
408
+ active?: any;
409
+ }) | undefined;
410
+ onCell: ((column: TanstackColumn<any>, record: any, index: number) => {
411
+ normal?: any;
412
+ active?: any;
413
+ }) | undefined;
414
+ headerDataAdapter: ((original: any[]) => any[]) | undefined;
415
+ tier?: number | null | undefined;
416
+ vol?: number | undefined;
417
+ };
418
+
419
+ type index$5_FeeDataType = FeeDataType;
420
+ declare const index$5_FeeTierPage: typeof FeeTierPage;
421
+ type index$5_UseFeeTierScriptOptions = UseFeeTierScriptOptions;
422
+ declare const index$5_useFeeTierScript: typeof useFeeTierScript;
423
+ declare namespace index$5 {
424
+ export { type index$5_FeeDataType as FeeDataType, index$5_FeeTierPage as FeeTierPage, type index$5_UseFeeTierScriptOptions as UseFeeTierScriptOptions, index$5_useFeeTierScript as useFeeTierScript };
425
+ }
426
+
427
+ declare const PositionsPage: React__default.FC<PositionsProps>;
428
+
429
+ declare const page$1_PositionsPage: typeof PositionsPage;
430
+ declare namespace page$1 {
431
+ export { page$1_PositionsPage as PositionsPage };
432
+ }
433
+
434
+ declare const OrdersPage: React__default.FC<{
435
+ sharePnLConfig?: SharePnLConfig;
436
+ }>;
437
+
438
+ declare const page_OrdersPage: typeof OrdersPage;
439
+ declare namespace page {
440
+ export { page_OrdersPage as OrdersPage };
441
+ }
442
+
443
+ declare const APIManagerWidget: (props?: {
444
+ filterTags?: [string];
445
+ keyStatus?: string;
446
+ }) => react_jsx_runtime.JSX.Element;
447
+
448
+ /**
449
+ * API key manager page
450
+ * @param filterTags filterTags
451
+ * @param keyStatus filterTags default is "ACTIVE"
452
+ * @returns
453
+ */
454
+ declare const APIManagerPage: (props: {
455
+ filterTags?: [string];
456
+ keyStatus?: string;
457
+ }) => react_jsx_runtime.JSX.Element;
458
+
459
+ declare const index$4_APIManagerPage: typeof APIManagerPage;
460
+ declare const index$4_APIManagerWidget: typeof APIManagerWidget;
461
+ declare namespace index$4 {
462
+ export { index$4_APIManagerPage as APIManagerPage, index$4_APIManagerWidget as APIManagerWidget };
463
+ }
464
+
465
+ declare const SettingWidget: React__default.FC;
466
+
467
+ declare const SettingPage: React__default.FC;
468
+
469
+ declare const index$3_SettingPage: typeof SettingPage;
470
+ declare const index$3_SettingWidget: typeof SettingWidget;
471
+ declare namespace index$3 {
472
+ export { index$3_SettingPage as SettingPage, index$3_SettingWidget as SettingWidget };
473
+ }
474
+
475
+ declare const useAssetsScript: () => {
476
+ columns: _kodiak_finance_orderly_ui.Column[];
477
+ dataSource: {
478
+ children: {
479
+ indexPrice: number;
480
+ assetValue: number;
481
+ collateralRatio: Decimal;
482
+ collateralContribution: number;
483
+ token: string;
484
+ holding: number;
485
+ frozen: number;
486
+ pending_short: number;
487
+ updated_time: number;
488
+ account_id: string;
489
+ }[];
490
+ account_id: string;
491
+ id?: string;
492
+ description?: string;
493
+ }[];
494
+ visible: boolean;
495
+ onToggleVisibility: () => void;
496
+ selectedAccount: string;
497
+ selectedAsset: string;
498
+ onFilter: (filter: {
499
+ name: string;
500
+ value: string;
501
+ }) => void;
502
+ totalValue: number;
503
+ hasSubAccount: boolean;
504
+ onDeposit: () => void;
505
+ onWithdraw: () => void;
506
+ holding: _kodiak_finance_orderly_types.API.Holding[];
507
+ assetsOptions: {
508
+ label: string;
509
+ value: string;
510
+ }[];
511
+ };
512
+ type useAssetsScriptReturn = ReturnType<typeof useAssetsScript> & ReturnType<typeof useAccount>;
513
+
514
+ type AssetsWidgetProps = useAssetsScriptReturn;
515
+ declare const AssetsDataTableWidget: React__default.FC;
516
+ declare const AssetsWidget: React__default.FC;
517
+
518
+ declare const AssetsPage: React__default.FC;
519
+
520
+ declare const AssetsDataTable: React__default.FC<Pick<AssetsWidgetProps, "columns" | "dataSource" | "isMainAccount" | "onFilter" | "selectedAccount" | "selectedAsset" | "assetsOptions" | "state">>;
521
+ declare const AssetsTable: React__default.FC<AssetsWidgetProps>;
522
+
523
+ declare const AssetsTableMobile: React__default.FC<useAssetsScriptReturn>;
524
+
525
+ declare const index$2_AssetsDataTable: typeof AssetsDataTable;
526
+ declare const index$2_AssetsDataTableWidget: typeof AssetsDataTableWidget;
527
+ declare const index$2_AssetsPage: typeof AssetsPage;
528
+ declare const index$2_AssetsTable: typeof AssetsTable;
529
+ declare const index$2_AssetsTableMobile: typeof AssetsTableMobile;
530
+ declare const index$2_AssetsWidget: typeof AssetsWidget;
531
+ type index$2_AssetsWidgetProps = AssetsWidgetProps;
532
+ declare namespace index$2 {
533
+ export { index$2_AssetsDataTable as AssetsDataTable, index$2_AssetsDataTableWidget as AssetsDataTableWidget, index$2_AssetsPage as AssetsPage, index$2_AssetsTable as AssetsTable, index$2_AssetsTableMobile as AssetsTableMobile, index$2_AssetsWidget as AssetsWidget, type index$2_AssetsWidgetProps as AssetsWidgetProps };
534
+ }
535
+
536
+ declare const HistoryWidget: React__default.FC;
537
+ declare const HistoryPage: React__default.FC;
538
+
539
+ declare const index$1_HistoryPage: typeof HistoryPage;
540
+ declare const index$1_HistoryWidget: typeof HistoryWidget;
541
+ declare namespace index$1 {
542
+ export { index$1_HistoryPage as HistoryPage, index$1_HistoryWidget as HistoryWidget };
543
+ }
544
+
545
+ declare const SymbolPerformancePage: React__default.FC;
546
+
547
+ declare const SymbolPerformanceWidget: React__default.FC<{
548
+ symbol?: string;
549
+ }>;
550
+
551
+ interface TradeData {
552
+ id: number;
553
+ symbol: string;
554
+ fee: number;
555
+ fee_asset: string;
556
+ side: "BUY" | "SELL";
557
+ order_id: number;
558
+ executed_price: number;
559
+ executed_quantity: number;
560
+ executed_timestamp: number;
561
+ is_maker: number;
562
+ realized_pnl: number;
563
+ match_id: string;
564
+ }
565
+
566
+ interface SymbolPerformanceMetrics {
567
+ totalPnL: number;
568
+ totalVolume: number;
569
+ totalFees: number;
570
+ totalTrades: number;
571
+ makerShare: number;
572
+ dailyData: Array<{
573
+ date: string;
574
+ pnl: number;
575
+ volume: number;
576
+ fees: number;
577
+ }>;
578
+ cumulativeDailyPnL: Array<{
579
+ date: string;
580
+ cumulativePnl: number;
581
+ }>;
582
+ cumulativeDailyFees: Array<{
583
+ date: string;
584
+ cumulativeFees: number;
585
+ }>;
586
+ cumulativeDailyVolume: Array<{
587
+ date: string;
588
+ cumulativeVolume: number;
589
+ }>;
590
+ hourlyData: Array<{
591
+ date: string;
592
+ pnl: number;
593
+ fees: number;
594
+ volume: number;
595
+ }>;
596
+ cumulativeHourlyPnL: Array<{
597
+ date: string;
598
+ cumulativePnl: number;
599
+ }>;
600
+ cumulativeHourlyFees: Array<{
601
+ date: string;
602
+ cumulativeFees: number;
603
+ }>;
604
+ cumulativeHourlyVolume: Array<{
605
+ date: string;
606
+ cumulativeVolume: number;
607
+ }>;
608
+ fifteenMinuteData: Array<{
609
+ date: string;
610
+ pnl: number;
611
+ fees: number;
612
+ volume: number;
613
+ }>;
614
+ cumulativeFifteenMinutePnL: Array<{
615
+ date: string;
616
+ cumulativePnl: number;
617
+ }>;
618
+ cumulativeFifteenMinuteFees: Array<{
619
+ date: string;
620
+ cumulativeFees: number;
621
+ }>;
622
+ cumulativeFifteenMinuteVolume: Array<{
623
+ date: string;
624
+ cumulativeVolume: number;
625
+ }>;
626
+ }
627
+
628
+ declare enum PeriodType {
629
+ DAY = "1D",
630
+ WEEK = "7D",
631
+ MONTH = "30D",
632
+ QUARTER = "90D"
633
+ }
634
+ declare enum AggregationWindow {
635
+ FIFTEEN_MIN = "15m",
636
+ HOURLY = "1h",
637
+ DAILY = "1d"
638
+ }
639
+ type Timeframe = "1D" | "7D" | "30D" | "90D" | "ALL";
640
+ declare const useSymbolPerformanceScript: (symbol?: string) => {
641
+ selectedSymbol: string;
642
+ setSelectedSymbol: React$1.Dispatch<React$1.SetStateAction<string>>;
643
+ period: PeriodType | null;
644
+ onPeriodChange: (value: PeriodType) => void;
645
+ periodTypes: PeriodType[];
646
+ aggregationWindow: AggregationWindow;
647
+ setAggregationWindow: React$1.Dispatch<React$1.SetStateAction<AggregationWindow>>;
648
+ aggregationWindowTypes: AggregationWindow[];
649
+ dateRange: {
650
+ from: Date;
651
+ to: Date;
652
+ };
653
+ filterItems: {
654
+ type: "range";
655
+ name: string;
656
+ value: {
657
+ from: Date;
658
+ to: Date;
659
+ };
660
+ max: number;
661
+ }[];
662
+ onFilter: (filter: {
663
+ name: string;
664
+ value: any;
665
+ }) => void;
666
+ trades: TradeData[];
667
+ isLoading: boolean;
668
+ error: any;
669
+ performanceData: SymbolPerformanceMetrics | null;
670
+ aggregatedData: {
671
+ periodData: {
672
+ date: string;
673
+ pnl: number;
674
+ fees: number;
675
+ volume: number;
676
+ }[];
677
+ cumulativePnL: {
678
+ date: string;
679
+ cumulativePnl: number;
680
+ }[];
681
+ cumulativeFees: {
682
+ date: string;
683
+ cumulativeFees: number;
684
+ }[];
685
+ cumulativeVolume: {
686
+ date: string;
687
+ cumulativeVolume: number;
688
+ }[];
689
+ } | null;
690
+ invisible: boolean;
691
+ };
692
+ type UseSymbolPerformanceScriptReturn = ReturnType<typeof useSymbolPerformanceScript>;
693
+
694
+ type SymbolPerformanceUIProps = UseSymbolPerformanceScriptReturn;
695
+ declare const SymbolPerformanceUI: React__default.FC<SymbolPerformanceUIProps>;
696
+
697
+ declare const index_SymbolPerformancePage: typeof SymbolPerformancePage;
698
+ declare const index_SymbolPerformanceUI: typeof SymbolPerformanceUI;
699
+ declare const index_SymbolPerformanceWidget: typeof SymbolPerformanceWidget;
700
+ type index_Timeframe = Timeframe;
701
+ type index_UseSymbolPerformanceScriptReturn = UseSymbolPerformanceScriptReturn;
702
+ declare const index_useSymbolPerformanceScript: typeof useSymbolPerformanceScript;
703
+ declare namespace index {
704
+ export { index_SymbolPerformancePage as SymbolPerformancePage, index_SymbolPerformanceUI as SymbolPerformanceUI, index_SymbolPerformanceWidget as SymbolPerformanceWidget, type index_Timeframe as Timeframe, type index_UseSymbolPerformanceScriptReturn as UseSymbolPerformanceScriptReturn, index_useSymbolPerformanceScript as useSymbolPerformanceScript };
705
+ }
706
+
707
+ export { index$4 as APIManagerModule, index$2 as AssetsModule, index$5 as FeeTierModule, index$1 as HistoryModule, page as OrdersModule, index$6 as OverviewModule, PortfolioLayout, type PortfolioLayoutProps, PortfolioLayoutWidget, type PortfolioLayoutWidgetProps, PortfolioLeftSidebarPath, page$1 as PositionsModule, index$3 as SettingModule, index as SymbolPerformanceModule, usePortfolioLayoutScript };