@orderly.network/trading 3.0.4-alpha.1 → 3.0.4-alpha.3

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/index.d.mts CHANGED
@@ -1,13 +1,15 @@
1
+ import { SymbolInfoBarFullProps } from '@orderly.network/markets';
1
2
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, FC, PropsWithChildren, RefObject } from 'react';
3
+ import React__default, { ReactNode, RefObject, FC, PropsWithChildren } from 'react';
3
4
  import * as _orderly_network_types from '@orderly.network/types';
4
5
  import { API, NetworkId, AccountStatusEnum } from '@orderly.network/types';
5
6
  import * as _orderly_network_ui_share from '@orderly.network/ui-share';
6
7
  import { SharePnLConfig } from '@orderly.network/ui-share';
7
8
  import { TradingviewWidgetPropsInterface } from '@orderly.network/ui-tradingview';
9
+ import { AccountState as AccountState$1 } from '@orderly.network/core';
10
+ import Split, { SplitProps } from '@uiw/react-split';
8
11
  import { PositionsProps } from '@orderly.network/ui-positions';
9
12
  import * as _orderly_network_hooks from '@orderly.network/hooks';
10
- import Split, { SplitProps } from '@uiw/react-split';
11
13
  import { SliderMarks } from '@orderly.network/ui';
12
14
  import * as react_jsx_runtime from 'react/jsx-runtime';
13
15
 
@@ -146,6 +148,127 @@ type TradingPageProps = BaseTradingPageProps & {
146
148
  bottomSheetLeading?: React.ReactNode | string;
147
149
  };
148
150
 
151
+ /**
152
+ * Desktop asks list props. `symbolInfo` and `depth` are threaded through
153
+ * {@link InjectableDesktopAsks} so Orderly plugins replacing `OrderBook.Desktop.Asks`
154
+ * can render without relying only on context. The default `DesktopAsks` uses `data`
155
+ * and reads symbol/depth from `OrderBookProvider` / `OrderBookContext`.
156
+ */
157
+ interface Props$1 {
158
+ data: number[][];
159
+ /** For plugin replacements; unused by the default asks row list (context carries symbol). */
160
+ symbolInfo: BasicSymbolInfo;
161
+ /** For plugin replacements; active depth key; unused by the default list (context carries depth). */
162
+ depth: string | undefined;
163
+ }
164
+
165
+ /**
166
+ * Desktop bids list props. `symbolInfo` and `depth` are threaded through
167
+ * {@link InjectableDesktopBids} so Orderly plugins replacing `OrderBook.Desktop.Bids`
168
+ * can render without relying only on context. The default `DesktopBids` uses `data`
169
+ * and reads symbol/depth from `OrderBookProvider` / `OrderBookContext`.
170
+ */
171
+ interface Props {
172
+ data: number[][];
173
+ /** For plugin replacements; unused by the default bids row list (context carries symbol). */
174
+ symbolInfo: BasicSymbolInfo;
175
+ /** For plugin replacements; active depth key; unused by the default list (context carries depth). */
176
+ depth: string | undefined;
177
+ }
178
+
179
+ declare const useAccountScript: () => {
180
+ onShowAccountSheet: () => void;
181
+ address: string | undefined;
182
+ state: AccountState$1;
183
+ };
184
+ type AccountState = ReturnType<typeof useAccountScript>;
185
+
186
+ type LayoutPosition = "left" | "right";
187
+
188
+ type TradingState = ReturnType<typeof useTradingScript>;
189
+ type MarketLayoutPosition = "left" | "top" | "bottom" | "hide";
190
+ declare const useTradingScript: () => TradingPageState & {
191
+ marketsWidth: number;
192
+ tradindviewMaxHeight: number;
193
+ dataListMinHeight: number;
194
+ total: number | null;
195
+ hideAssets: any;
196
+ setHideAssets: (value: boolean) => void;
197
+ onShowPortfolioSheet: () => void;
198
+ navigateToPortfolio: (() => void) | undefined;
199
+ isFirstTimeDeposit: boolean;
200
+ symbolInfoBarHeight: number;
201
+ max2XLSplitRef: RefObject<Split>;
202
+ tradingviewAndOrderbookSplitRef: RefObject<Split>;
203
+ onTradingviewAndOrderbookDragging: (preSize: number, nextSize: number) => void;
204
+ onDataListSplitHeightDragging: (preSize: number, nextSize: number) => void;
205
+ extraHeight: any;
206
+ dataListHeight: any;
207
+ restrictedInfo: {
208
+ ip: string;
209
+ invalidRegions: string[];
210
+ restrictedOpen: boolean;
211
+ content: React$1.ReactNode | ((data: {
212
+ ip: string;
213
+ brokerName: string;
214
+ }) => React$1.ReactNode);
215
+ canUnblock: boolean;
216
+ accessRestricted: any;
217
+ setAccessRestricted: (value: boolean | undefined) => void;
218
+ };
219
+ orderEntryViewRef: RefObject<HTMLDivElement>;
220
+ orderEntryHeight: number;
221
+ orderBookSplitSize: string | undefined;
222
+ setOrderbookSplitSize: (size: string) => void;
223
+ dataListSplitSize: string | undefined;
224
+ setDataListSplitSize: (size: string) => void;
225
+ mainSplitSize: string | undefined;
226
+ setMainSplitSize: (size: string) => void;
227
+ dataListSplitHeightSM: string | undefined;
228
+ setDataListSplitHeightSM: (size: string) => void;
229
+ orderBookSplitHeightSM: string | undefined;
230
+ setOrderbookSplitHeightSM: (size: string) => void;
231
+ positions: number[];
232
+ showPositionIcon: boolean;
233
+ updatePositions: (currentIdx: number, targetIdx: number) => void;
234
+ resizeable: boolean;
235
+ panelSize: "small" | "middle" | "large";
236
+ onPanelSizeChange: (collapsed: "small" | "middle" | "large") => void;
237
+ animating: boolean;
238
+ setAnimating: React$1.Dispatch<React$1.SetStateAction<boolean>>;
239
+ layout: any;
240
+ onLayout: (value: LayoutPosition) => void;
241
+ marketLayout: any;
242
+ onMarketLayout: (value: MarketLayoutPosition) => void;
243
+ max2XL: boolean;
244
+ min3XL: boolean;
245
+ max4XL: boolean;
246
+ canTrade: boolean;
247
+ openMarketsSheet: boolean;
248
+ onOpenMarketsSheetChange: React$1.Dispatch<React$1.SetStateAction<boolean>>;
249
+ horizontalDraggable: boolean;
250
+ };
251
+
252
+ type DesktopLayoutProps = TradingState & {
253
+ className?: string;
254
+ };
255
+
256
+ /**
257
+ * Module augmentation: maps interceptor target paths to their component props types.
258
+ * Import from @orderly.network/trading to enable typed props in
259
+ * createInterceptor('Trading.Layout.Desktop', ...), createInterceptor('Account.MobileAccountMenu', ...), etc.
260
+ */
261
+
262
+ declare module "@orderly.network/plugin-core" {
263
+ interface InterceptorTargetPropsMap {
264
+ "Account.MobileAccountMenu": AccountState;
265
+ "OrderBook.Desktop.Asks": Props$1;
266
+ "OrderBook.Desktop.Bids": Props;
267
+ "Trading.Layout.Desktop": DesktopLayoutProps;
268
+ "Trading.SymbolInfoBar.Desktop": SymbolInfoBarFullProps;
269
+ }
270
+ }
271
+
149
272
  declare enum DataListTabType {
150
273
  positions = "Positions",
151
274
  pending = "Pending",
@@ -401,7 +524,7 @@ declare const usePortfolioSheetScript: () => {
401
524
  hasSubAccount: boolean;
402
525
  aggregated: Omit<_orderly_network_types.API.PositionsTPSLExt, "rows">;
403
526
  totalUnrealizedROI: number;
404
- positionsInfo: Record<"unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "notional" | "unrealPnlROI" | "unrealPnlROI_index" | "total_unsettled_cross_pnl" | "total_unsettled_isolated_pnl", <Key extends "unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "notional" | "unrealPnlROI" | "unrealPnlROI_index" | "total_unsettled_cross_pnl" | "total_unsettled_isolated_pnl">(defaultValue?: Omit<_orderly_network_types.API.PositionInfo, "rows">[Key] | undefined) => Omit<_orderly_network_types.API.PositionInfo, "rows">[Key]> & {
527
+ positionsInfo: Record<"notional" | "unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "unrealPnlROI" | "unrealPnlROI_index" | "total_unsettled_cross_pnl" | "total_unsettled_isolated_pnl", <Key extends "unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "notional" | "unrealPnlROI" | "unrealPnlROI_index" | "total_unsettled_cross_pnl" | "total_unsettled_isolated_pnl">(defaultValue?: Omit<_orderly_network_types.API.PositionInfo, "rows">[Key] | undefined) => Omit<_orderly_network_types.API.PositionInfo, "rows">[Key]> & {
405
528
  isNil: boolean;
406
529
  };
407
530
  marginRatio: number;
@@ -479,72 +602,6 @@ declare const FundingRateModalWidget: React__default.FC<{
479
602
  declare const FundingRateDialogId = "FundingRateDialogId";
480
603
  declare const FundingRateSheetId = "FundingRateSheetId";
481
604
 
482
- type LayoutPosition = "left" | "right";
483
-
484
- type TradingState = ReturnType<typeof useTradingScript>;
485
- type MarketLayoutPosition = "left" | "top" | "bottom" | "hide";
486
- declare const useTradingScript: () => TradingPageState & {
487
- marketsWidth: number;
488
- tradindviewMaxHeight: number;
489
- dataListMinHeight: number;
490
- total: number | null;
491
- hideAssets: any;
492
- setHideAssets: (value: boolean) => void;
493
- onShowPortfolioSheet: () => void;
494
- navigateToPortfolio: (() => void) | undefined;
495
- isFirstTimeDeposit: boolean;
496
- symbolInfoBarHeight: number;
497
- max2XLSplitRef: RefObject<Split>;
498
- tradingviewAndOrderbookSplitRef: RefObject<Split>;
499
- onTradingviewAndOrderbookDragging: (preSize: number, nextSize: number) => void;
500
- onDataListSplitHeightDragging: (preSize: number, nextSize: number) => void;
501
- extraHeight: any;
502
- dataListHeight: any;
503
- restrictedInfo: {
504
- ip: string;
505
- invalidRegions: string[];
506
- restrictedOpen: boolean;
507
- content: React$1.ReactNode | ((data: {
508
- ip: string;
509
- brokerName: string;
510
- }) => React$1.ReactNode);
511
- canUnblock: boolean;
512
- accessRestricted: any;
513
- setAccessRestricted: (value: boolean | undefined) => void;
514
- };
515
- orderEntryViewRef: RefObject<HTMLDivElement>;
516
- orderEntryHeight: number;
517
- orderBookSplitSize: string | undefined;
518
- setOrderbookSplitSize: (size: string) => void;
519
- dataListSplitSize: string | undefined;
520
- setDataListSplitSize: (size: string) => void;
521
- mainSplitSize: string | undefined;
522
- setMainSplitSize: (size: string) => void;
523
- dataListSplitHeightSM: string | undefined;
524
- setDataListSplitHeightSM: (size: string) => void;
525
- orderBookSplitHeightSM: string | undefined;
526
- setOrderbookSplitHeightSM: (size: string) => void;
527
- positions: number[];
528
- showPositionIcon: boolean;
529
- updatePositions: (currentIdx: number, targetIdx: number) => void;
530
- resizeable: boolean;
531
- panelSize: "middle" | "small" | "large";
532
- onPanelSizeChange: (collapsed: "small" | "middle" | "large") => void;
533
- animating: boolean;
534
- setAnimating: React$1.Dispatch<React$1.SetStateAction<boolean>>;
535
- layout: any;
536
- onLayout: (value: LayoutPosition) => void;
537
- marketLayout: any;
538
- onMarketLayout: (value: MarketLayoutPosition) => void;
539
- max2XL: boolean;
540
- min3XL: boolean;
541
- max4XL: boolean;
542
- canTrade: boolean;
543
- openMarketsSheet: boolean;
544
- onOpenMarketsSheetChange: React$1.Dispatch<React$1.SetStateAction<boolean>>;
545
- horizontalDraggable: boolean;
546
- };
547
-
548
605
  declare const Trading: FC<TradingState>;
549
606
 
550
607
  declare const TradingWidget: React__default.FC;
@@ -578,4 +635,4 @@ declare const usePendingOrderCount: (symbol?: string) => {
578
635
  tpSlOrderCount: number;
579
636
  };
580
637
 
581
- export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, type BuySellRatio, BuySellRatioBar, DataList, DataListWidget, FundingRate, FundingRateDialogId, FundingRateModal, type FundingRateModalState, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookProvider, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, type ReferralProps, RiskRate, RiskRateWidget, type ShareOptions, SplitLayout, Trading, TradingPage, TradingPageContext, type TradingPageProps, TradingPageProvider, type TradingRewardsProps, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookContext, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };
638
+ export { type AccountState, AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, type BuySellRatio, BuySellRatioBar, DataList, DataListWidget, type DesktopLayoutProps, FundingRate, FundingRateDialogId, FundingRateModal, type FundingRateModalState, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, type Props$1 as OrderBookDesktopAsksProps, type Props as OrderBookDesktopBidsProps, OrderBookProvider, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, type ReferralProps, RiskRate, RiskRateWidget, type ShareOptions, SplitLayout, Trading, TradingPage, TradingPageContext, type TradingPageProps, TradingPageProvider, type TradingRewardsProps, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookContext, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,15 @@
1
+ import { SymbolInfoBarFullProps } from '@orderly.network/markets';
1
2
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, FC, PropsWithChildren, RefObject } from 'react';
3
+ import React__default, { ReactNode, RefObject, FC, PropsWithChildren } from 'react';
3
4
  import * as _orderly_network_types from '@orderly.network/types';
4
5
  import { API, NetworkId, AccountStatusEnum } from '@orderly.network/types';
5
6
  import * as _orderly_network_ui_share from '@orderly.network/ui-share';
6
7
  import { SharePnLConfig } from '@orderly.network/ui-share';
7
8
  import { TradingviewWidgetPropsInterface } from '@orderly.network/ui-tradingview';
9
+ import { AccountState as AccountState$1 } from '@orderly.network/core';
10
+ import Split, { SplitProps } from '@uiw/react-split';
8
11
  import { PositionsProps } from '@orderly.network/ui-positions';
9
12
  import * as _orderly_network_hooks from '@orderly.network/hooks';
10
- import Split, { SplitProps } from '@uiw/react-split';
11
13
  import { SliderMarks } from '@orderly.network/ui';
12
14
  import * as react_jsx_runtime from 'react/jsx-runtime';
13
15
 
@@ -146,6 +148,127 @@ type TradingPageProps = BaseTradingPageProps & {
146
148
  bottomSheetLeading?: React.ReactNode | string;
147
149
  };
148
150
 
151
+ /**
152
+ * Desktop asks list props. `symbolInfo` and `depth` are threaded through
153
+ * {@link InjectableDesktopAsks} so Orderly plugins replacing `OrderBook.Desktop.Asks`
154
+ * can render without relying only on context. The default `DesktopAsks` uses `data`
155
+ * and reads symbol/depth from `OrderBookProvider` / `OrderBookContext`.
156
+ */
157
+ interface Props$1 {
158
+ data: number[][];
159
+ /** For plugin replacements; unused by the default asks row list (context carries symbol). */
160
+ symbolInfo: BasicSymbolInfo;
161
+ /** For plugin replacements; active depth key; unused by the default list (context carries depth). */
162
+ depth: string | undefined;
163
+ }
164
+
165
+ /**
166
+ * Desktop bids list props. `symbolInfo` and `depth` are threaded through
167
+ * {@link InjectableDesktopBids} so Orderly plugins replacing `OrderBook.Desktop.Bids`
168
+ * can render without relying only on context. The default `DesktopBids` uses `data`
169
+ * and reads symbol/depth from `OrderBookProvider` / `OrderBookContext`.
170
+ */
171
+ interface Props {
172
+ data: number[][];
173
+ /** For plugin replacements; unused by the default bids row list (context carries symbol). */
174
+ symbolInfo: BasicSymbolInfo;
175
+ /** For plugin replacements; active depth key; unused by the default list (context carries depth). */
176
+ depth: string | undefined;
177
+ }
178
+
179
+ declare const useAccountScript: () => {
180
+ onShowAccountSheet: () => void;
181
+ address: string | undefined;
182
+ state: AccountState$1;
183
+ };
184
+ type AccountState = ReturnType<typeof useAccountScript>;
185
+
186
+ type LayoutPosition = "left" | "right";
187
+
188
+ type TradingState = ReturnType<typeof useTradingScript>;
189
+ type MarketLayoutPosition = "left" | "top" | "bottom" | "hide";
190
+ declare const useTradingScript: () => TradingPageState & {
191
+ marketsWidth: number;
192
+ tradindviewMaxHeight: number;
193
+ dataListMinHeight: number;
194
+ total: number | null;
195
+ hideAssets: any;
196
+ setHideAssets: (value: boolean) => void;
197
+ onShowPortfolioSheet: () => void;
198
+ navigateToPortfolio: (() => void) | undefined;
199
+ isFirstTimeDeposit: boolean;
200
+ symbolInfoBarHeight: number;
201
+ max2XLSplitRef: RefObject<Split>;
202
+ tradingviewAndOrderbookSplitRef: RefObject<Split>;
203
+ onTradingviewAndOrderbookDragging: (preSize: number, nextSize: number) => void;
204
+ onDataListSplitHeightDragging: (preSize: number, nextSize: number) => void;
205
+ extraHeight: any;
206
+ dataListHeight: any;
207
+ restrictedInfo: {
208
+ ip: string;
209
+ invalidRegions: string[];
210
+ restrictedOpen: boolean;
211
+ content: React$1.ReactNode | ((data: {
212
+ ip: string;
213
+ brokerName: string;
214
+ }) => React$1.ReactNode);
215
+ canUnblock: boolean;
216
+ accessRestricted: any;
217
+ setAccessRestricted: (value: boolean | undefined) => void;
218
+ };
219
+ orderEntryViewRef: RefObject<HTMLDivElement>;
220
+ orderEntryHeight: number;
221
+ orderBookSplitSize: string | undefined;
222
+ setOrderbookSplitSize: (size: string) => void;
223
+ dataListSplitSize: string | undefined;
224
+ setDataListSplitSize: (size: string) => void;
225
+ mainSplitSize: string | undefined;
226
+ setMainSplitSize: (size: string) => void;
227
+ dataListSplitHeightSM: string | undefined;
228
+ setDataListSplitHeightSM: (size: string) => void;
229
+ orderBookSplitHeightSM: string | undefined;
230
+ setOrderbookSplitHeightSM: (size: string) => void;
231
+ positions: number[];
232
+ showPositionIcon: boolean;
233
+ updatePositions: (currentIdx: number, targetIdx: number) => void;
234
+ resizeable: boolean;
235
+ panelSize: "small" | "middle" | "large";
236
+ onPanelSizeChange: (collapsed: "small" | "middle" | "large") => void;
237
+ animating: boolean;
238
+ setAnimating: React$1.Dispatch<React$1.SetStateAction<boolean>>;
239
+ layout: any;
240
+ onLayout: (value: LayoutPosition) => void;
241
+ marketLayout: any;
242
+ onMarketLayout: (value: MarketLayoutPosition) => void;
243
+ max2XL: boolean;
244
+ min3XL: boolean;
245
+ max4XL: boolean;
246
+ canTrade: boolean;
247
+ openMarketsSheet: boolean;
248
+ onOpenMarketsSheetChange: React$1.Dispatch<React$1.SetStateAction<boolean>>;
249
+ horizontalDraggable: boolean;
250
+ };
251
+
252
+ type DesktopLayoutProps = TradingState & {
253
+ className?: string;
254
+ };
255
+
256
+ /**
257
+ * Module augmentation: maps interceptor target paths to their component props types.
258
+ * Import from @orderly.network/trading to enable typed props in
259
+ * createInterceptor('Trading.Layout.Desktop', ...), createInterceptor('Account.MobileAccountMenu', ...), etc.
260
+ */
261
+
262
+ declare module "@orderly.network/plugin-core" {
263
+ interface InterceptorTargetPropsMap {
264
+ "Account.MobileAccountMenu": AccountState;
265
+ "OrderBook.Desktop.Asks": Props$1;
266
+ "OrderBook.Desktop.Bids": Props;
267
+ "Trading.Layout.Desktop": DesktopLayoutProps;
268
+ "Trading.SymbolInfoBar.Desktop": SymbolInfoBarFullProps;
269
+ }
270
+ }
271
+
149
272
  declare enum DataListTabType {
150
273
  positions = "Positions",
151
274
  pending = "Pending",
@@ -401,7 +524,7 @@ declare const usePortfolioSheetScript: () => {
401
524
  hasSubAccount: boolean;
402
525
  aggregated: Omit<_orderly_network_types.API.PositionsTPSLExt, "rows">;
403
526
  totalUnrealizedROI: number;
404
- positionsInfo: Record<"unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "notional" | "unrealPnlROI" | "unrealPnlROI_index" | "total_unsettled_cross_pnl" | "total_unsettled_isolated_pnl", <Key extends "unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "notional" | "unrealPnlROI" | "unrealPnlROI_index" | "total_unsettled_cross_pnl" | "total_unsettled_isolated_pnl">(defaultValue?: Omit<_orderly_network_types.API.PositionInfo, "rows">[Key] | undefined) => Omit<_orderly_network_types.API.PositionInfo, "rows">[Key]> & {
527
+ positionsInfo: Record<"notional" | "unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "unrealPnlROI" | "unrealPnlROI_index" | "total_unsettled_cross_pnl" | "total_unsettled_isolated_pnl", <Key extends "unsettledPnL" | "margin_ratio" | "initial_margin_ratio" | "maintenance_margin_ratio" | "open_margin_ratio" | "current_margin_ratio_with_orders" | "initial_margin_ratio_with_orders" | "maintenance_margin_ratio_with_orders" | "total_collateral_value" | "free_collateral" | "total_pnl_24_h" | "unrealPnL" | "total_unreal_pnl" | "total_unreal_pnl_index" | "total_unsettled_pnl" | "notional" | "unrealPnlROI" | "unrealPnlROI_index" | "total_unsettled_cross_pnl" | "total_unsettled_isolated_pnl">(defaultValue?: Omit<_orderly_network_types.API.PositionInfo, "rows">[Key] | undefined) => Omit<_orderly_network_types.API.PositionInfo, "rows">[Key]> & {
405
528
  isNil: boolean;
406
529
  };
407
530
  marginRatio: number;
@@ -479,72 +602,6 @@ declare const FundingRateModalWidget: React__default.FC<{
479
602
  declare const FundingRateDialogId = "FundingRateDialogId";
480
603
  declare const FundingRateSheetId = "FundingRateSheetId";
481
604
 
482
- type LayoutPosition = "left" | "right";
483
-
484
- type TradingState = ReturnType<typeof useTradingScript>;
485
- type MarketLayoutPosition = "left" | "top" | "bottom" | "hide";
486
- declare const useTradingScript: () => TradingPageState & {
487
- marketsWidth: number;
488
- tradindviewMaxHeight: number;
489
- dataListMinHeight: number;
490
- total: number | null;
491
- hideAssets: any;
492
- setHideAssets: (value: boolean) => void;
493
- onShowPortfolioSheet: () => void;
494
- navigateToPortfolio: (() => void) | undefined;
495
- isFirstTimeDeposit: boolean;
496
- symbolInfoBarHeight: number;
497
- max2XLSplitRef: RefObject<Split>;
498
- tradingviewAndOrderbookSplitRef: RefObject<Split>;
499
- onTradingviewAndOrderbookDragging: (preSize: number, nextSize: number) => void;
500
- onDataListSplitHeightDragging: (preSize: number, nextSize: number) => void;
501
- extraHeight: any;
502
- dataListHeight: any;
503
- restrictedInfo: {
504
- ip: string;
505
- invalidRegions: string[];
506
- restrictedOpen: boolean;
507
- content: React$1.ReactNode | ((data: {
508
- ip: string;
509
- brokerName: string;
510
- }) => React$1.ReactNode);
511
- canUnblock: boolean;
512
- accessRestricted: any;
513
- setAccessRestricted: (value: boolean | undefined) => void;
514
- };
515
- orderEntryViewRef: RefObject<HTMLDivElement>;
516
- orderEntryHeight: number;
517
- orderBookSplitSize: string | undefined;
518
- setOrderbookSplitSize: (size: string) => void;
519
- dataListSplitSize: string | undefined;
520
- setDataListSplitSize: (size: string) => void;
521
- mainSplitSize: string | undefined;
522
- setMainSplitSize: (size: string) => void;
523
- dataListSplitHeightSM: string | undefined;
524
- setDataListSplitHeightSM: (size: string) => void;
525
- orderBookSplitHeightSM: string | undefined;
526
- setOrderbookSplitHeightSM: (size: string) => void;
527
- positions: number[];
528
- showPositionIcon: boolean;
529
- updatePositions: (currentIdx: number, targetIdx: number) => void;
530
- resizeable: boolean;
531
- panelSize: "middle" | "small" | "large";
532
- onPanelSizeChange: (collapsed: "small" | "middle" | "large") => void;
533
- animating: boolean;
534
- setAnimating: React$1.Dispatch<React$1.SetStateAction<boolean>>;
535
- layout: any;
536
- onLayout: (value: LayoutPosition) => void;
537
- marketLayout: any;
538
- onMarketLayout: (value: MarketLayoutPosition) => void;
539
- max2XL: boolean;
540
- min3XL: boolean;
541
- max4XL: boolean;
542
- canTrade: boolean;
543
- openMarketsSheet: boolean;
544
- onOpenMarketsSheetChange: React$1.Dispatch<React$1.SetStateAction<boolean>>;
545
- horizontalDraggable: boolean;
546
- };
547
-
548
605
  declare const Trading: FC<TradingState>;
549
606
 
550
607
  declare const TradingWidget: React__default.FC;
@@ -578,4 +635,4 @@ declare const usePendingOrderCount: (symbol?: string) => {
578
635
  tpSlOrderCount: number;
579
636
  };
580
637
 
581
- export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, type BuySellRatio, BuySellRatioBar, DataList, DataListWidget, FundingRate, FundingRateDialogId, FundingRateModal, type FundingRateModalState, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookProvider, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, type ReferralProps, RiskRate, RiskRateWidget, type ShareOptions, SplitLayout, Trading, TradingPage, TradingPageContext, type TradingPageProps, TradingPageProvider, type TradingRewardsProps, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookContext, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };
638
+ export { type AccountState, AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, type BuySellRatio, BuySellRatioBar, DataList, DataListWidget, type DesktopLayoutProps, FundingRate, FundingRateDialogId, FundingRateModal, type FundingRateModalState, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, type Props$1 as OrderBookDesktopAsksProps, type Props as OrderBookDesktopBidsProps, OrderBookProvider, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, type ReferralProps, RiskRate, RiskRateWidget, type ShareOptions, SplitLayout, Trading, TradingPage, TradingPageContext, type TradingPageProps, TradingPageProvider, type TradingRewardsProps, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookContext, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };