@orderly.network/trading 2.0.0 → 2.0.1-alpha.1
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 +147 -63
- package/dist/index.d.ts +147 -63
- package/dist/index.js +42 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +23 -18
- package/dist/index.css +0 -2
- package/dist/index.css.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,36 +1,13 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
3
2
|
import { API, NetworkId, AccountStatusEnum } from '@orderly.network/types';
|
|
4
|
-
import { PositionsProps } from '@orderly.network/ui-positions';
|
|
5
3
|
import * as react from 'react';
|
|
6
|
-
import { ReactNode, FC, PropsWithChildren } from 'react';
|
|
4
|
+
import react__default, { ReactNode, FC, PropsWithChildren } from 'react';
|
|
5
|
+
import * as _orderly_network_ui_share from '@orderly.network/ui-share';
|
|
6
|
+
import { SharePnLConfig, SharePnLParams } from '@orderly.network/ui-share';
|
|
7
|
+
import { PositionsProps } from '@orderly.network/ui-positions';
|
|
8
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
9
|
import * as _orderly_network_hooks from '@orderly.network/hooks';
|
|
8
|
-
|
|
9
|
-
declare enum DataListTabType {
|
|
10
|
-
positions = "Positions",
|
|
11
|
-
pending = "Pending",
|
|
12
|
-
tp_sl = "TP/SL",
|
|
13
|
-
filled = "Filled",
|
|
14
|
-
orderHistory = "Order history"
|
|
15
|
-
}
|
|
16
|
-
declare const useDataListScript: (props: {
|
|
17
|
-
current?: DataListTabType;
|
|
18
|
-
config: PositionsProps & {
|
|
19
|
-
symbol?: string;
|
|
20
|
-
};
|
|
21
|
-
}) => {
|
|
22
|
-
current: DataListTabType | undefined;
|
|
23
|
-
config: PositionsProps & {
|
|
24
|
-
symbol?: string | undefined;
|
|
25
|
-
};
|
|
26
|
-
unPnlPriceBasis: any;
|
|
27
|
-
setUnPnlPriceBasic: (value: string) => void;
|
|
28
|
-
pnlNotionalDecimalPrecision: any;
|
|
29
|
-
setPnlNotionalDecimalPrecision: (value: number) => void;
|
|
30
|
-
showAllSymbol: any;
|
|
31
|
-
setShowAllSymbol: (value: boolean) => void;
|
|
32
|
-
};
|
|
33
|
-
type DataListState = ReturnType<typeof useDataListScript>;
|
|
10
|
+
import { SplitProps } from '@uiw/react-split';
|
|
34
11
|
|
|
35
12
|
type layoutInfo = {
|
|
36
13
|
width?: number;
|
|
@@ -110,7 +87,7 @@ type BasicSymbolInfo = {
|
|
|
110
87
|
base: string;
|
|
111
88
|
quote: string;
|
|
112
89
|
};
|
|
113
|
-
interface TradingPageState extends
|
|
90
|
+
interface TradingPageState extends TradingPageProps {
|
|
114
91
|
symbolInfo: {
|
|
115
92
|
base_dp: number;
|
|
116
93
|
quote_dp: number;
|
|
@@ -119,6 +96,8 @@ interface TradingPageState extends TradingPageV2Props {
|
|
|
119
96
|
quote: string;
|
|
120
97
|
symbol: string;
|
|
121
98
|
};
|
|
99
|
+
/** default is `(max-width: 768px)`*/
|
|
100
|
+
tabletMediaQuery?: string;
|
|
122
101
|
}
|
|
123
102
|
interface TradingViewConfigInterface {
|
|
124
103
|
scriptSRC?: string;
|
|
@@ -144,11 +123,9 @@ type ReferralProps = {
|
|
|
144
123
|
saveRefCode?: boolean;
|
|
145
124
|
onClickReferral?: () => void;
|
|
146
125
|
onBoundRefCode?: (success: boolean, error: any) => void;
|
|
147
|
-
refLink?: string;
|
|
148
|
-
slogan?: string;
|
|
149
126
|
};
|
|
150
|
-
type
|
|
151
|
-
|
|
127
|
+
type TradingRewardsProps = {
|
|
128
|
+
onClickTradingRewards?: () => void;
|
|
152
129
|
};
|
|
153
130
|
type BaseTradingPageProps = {
|
|
154
131
|
symbol: string;
|
|
@@ -158,25 +135,50 @@ type BaseTradingPageProps = {
|
|
|
158
135
|
overrideFeatures?: Record<TradingFeatures, ReactNode>;
|
|
159
136
|
};
|
|
160
137
|
type TradingPageProps = BaseTradingPageProps & {
|
|
161
|
-
|
|
162
|
-
referral
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
type TradingPageV2Props = BaseTradingPageProps & {
|
|
166
|
-
dataList: {
|
|
167
|
-
current?: DataListTabType;
|
|
168
|
-
config: Partial<Omit<PositionsProps, "pnlNotionalDecimalPrecision">>;
|
|
169
|
-
};
|
|
138
|
+
sharePnLConfig?: SharePnLConfig & Partial<Omit<SharePnLParams, "position" | "refCode" | "leverage">>;
|
|
139
|
+
referral?: ReferralProps;
|
|
140
|
+
tradingRewards?: TradingRewardsProps;
|
|
141
|
+
bottomSheetLeading?: React.ReactNode | string;
|
|
170
142
|
};
|
|
171
143
|
|
|
172
|
-
declare
|
|
144
|
+
declare enum DataListTabType {
|
|
145
|
+
positions = "Positions",
|
|
146
|
+
pending = "Pending",
|
|
147
|
+
tp_sl = "TP/SL",
|
|
148
|
+
filled = "Filled",
|
|
149
|
+
orderHistory = "Order history"
|
|
150
|
+
}
|
|
151
|
+
declare const useDataListScript: (props: {
|
|
152
|
+
current?: DataListTabType;
|
|
153
|
+
tabletMediaQuery: string;
|
|
154
|
+
} & PositionsProps) => {
|
|
155
|
+
positionCount: number;
|
|
156
|
+
pendingOrderCount: number;
|
|
157
|
+
tpSlOrderCount: number;
|
|
158
|
+
onSymbolChange: ((symbol: _orderly_network_types.API.Symbol) => void) | undefined;
|
|
159
|
+
unPnlPriceBasis: any;
|
|
160
|
+
setUnPnlPriceBasic: (value: string) => void;
|
|
161
|
+
pnlNotionalDecimalPrecision: any;
|
|
162
|
+
setPnlNotionalDecimalPrecision: (value: number) => void;
|
|
163
|
+
showAllSymbol: any;
|
|
164
|
+
setShowAllSymbol: (value: boolean) => void;
|
|
165
|
+
hideAssets: any;
|
|
166
|
+
setHideAssets: (value: boolean) => void;
|
|
167
|
+
current: DataListTabType | undefined;
|
|
168
|
+
tabletMediaQuery: string;
|
|
169
|
+
sharePnLConfig: (_orderly_network_ui_share.SharePnLConfig & Partial<Omit<_orderly_network_ui_share.SharePnLParams, "position" | "refCode" | "leverage">>) | undefined;
|
|
170
|
+
symbol: string | undefined;
|
|
171
|
+
calcMode: any;
|
|
172
|
+
includedPendingOrder: boolean | undefined;
|
|
173
|
+
};
|
|
174
|
+
type DataListState = ReturnType<typeof useDataListScript>;
|
|
173
175
|
|
|
174
176
|
declare const DataList: FC<DataListState>;
|
|
175
177
|
|
|
176
178
|
declare const DataListWidget: (props: {
|
|
177
179
|
current?: DataListTabType;
|
|
178
|
-
|
|
179
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
180
|
+
tabletMediaQuery: string;
|
|
181
|
+
} & PositionsProps) => react_jsx_runtime.JSX.Element;
|
|
180
182
|
|
|
181
183
|
declare const useLastTradesScript: (symbol: string) => {
|
|
182
184
|
base: any;
|
|
@@ -189,13 +191,31 @@ declare const useLastTradesScript: (symbol: string) => {
|
|
|
189
191
|
type LastTradesState = ReturnType<typeof useLastTradesScript>;
|
|
190
192
|
|
|
191
193
|
declare const LastTrades: FC<LastTradesState & {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
+
classNames?: {
|
|
195
|
+
root?: string;
|
|
196
|
+
list?: string;
|
|
197
|
+
listHeader?: string;
|
|
198
|
+
listItem?: {
|
|
199
|
+
left?: string;
|
|
200
|
+
mid?: string;
|
|
201
|
+
right?: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
style?: react__default.CSSProperties;
|
|
194
205
|
}>;
|
|
195
206
|
|
|
196
207
|
declare const LastTradesWidget: (props: {
|
|
197
208
|
symbol: string;
|
|
198
|
-
|
|
209
|
+
classNames?: {
|
|
210
|
+
root?: string;
|
|
211
|
+
list?: string;
|
|
212
|
+
listHeader?: string;
|
|
213
|
+
listItem?: {
|
|
214
|
+
left?: string;
|
|
215
|
+
mid?: string;
|
|
216
|
+
right?: string;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
199
219
|
style?: React.CSSProperties;
|
|
200
220
|
}) => react_jsx_runtime.JSX.Element;
|
|
201
221
|
|
|
@@ -207,11 +227,11 @@ declare const useAssetViewScript: () => {
|
|
|
207
227
|
toggleVisible: () => void;
|
|
208
228
|
networkId: NetworkId;
|
|
209
229
|
isFirstTimeDeposit: boolean;
|
|
210
|
-
totalValue: number;
|
|
230
|
+
totalValue: number | undefined;
|
|
211
231
|
status: AccountStatusEnum;
|
|
212
|
-
freeCollateral: number;
|
|
213
|
-
marginRatioVal: number;
|
|
214
|
-
renderMMR:
|
|
232
|
+
freeCollateral: number | undefined;
|
|
233
|
+
marginRatioVal: number | undefined;
|
|
234
|
+
renderMMR: number | undefined;
|
|
215
235
|
isConnected: boolean;
|
|
216
236
|
};
|
|
217
237
|
type AssetViewState = ReturnType<typeof useAssetViewScript>;
|
|
@@ -222,6 +242,7 @@ declare const AssetViewWidget: () => react_jsx_runtime.JSX.Element;
|
|
|
222
242
|
|
|
223
243
|
declare const useOrderBookScript: (props: {
|
|
224
244
|
symbol: string;
|
|
245
|
+
tabletMediaQuery?: string;
|
|
225
246
|
height?: number;
|
|
226
247
|
}) => {
|
|
227
248
|
level: number;
|
|
@@ -245,16 +266,18 @@ type OrderBookState = ReturnType<typeof useOrderBookScript>;
|
|
|
245
266
|
|
|
246
267
|
declare const OrderBook: FC<OrderBookState & {
|
|
247
268
|
className?: string;
|
|
269
|
+
tabletMediaQuery: string;
|
|
248
270
|
}>;
|
|
249
271
|
|
|
250
272
|
declare const OrderBookWidget: (props: {
|
|
251
273
|
className?: string;
|
|
252
274
|
symbol: string;
|
|
253
275
|
height?: number;
|
|
276
|
+
tabletMediaQuery: string;
|
|
254
277
|
}) => react_jsx_runtime.JSX.Element;
|
|
255
278
|
|
|
256
279
|
declare const useRiskRateScript: () => {
|
|
257
|
-
riskRate: string;
|
|
280
|
+
riskRate: string | null;
|
|
258
281
|
riskRateColor: {
|
|
259
282
|
isHigh: boolean;
|
|
260
283
|
isMedium: boolean;
|
|
@@ -262,7 +285,7 @@ declare const useRiskRateScript: () => {
|
|
|
262
285
|
isDefault: boolean;
|
|
263
286
|
};
|
|
264
287
|
isConnected: boolean;
|
|
265
|
-
currentLeverage: number;
|
|
288
|
+
currentLeverage: number | null;
|
|
266
289
|
maxLeverage: any;
|
|
267
290
|
};
|
|
268
291
|
type RiskRateState = ReturnType<typeof useRiskRateScript>;
|
|
@@ -283,21 +306,82 @@ declare const useOrderBookAndTradesScript: (symbol: string) => {
|
|
|
283
306
|
};
|
|
284
307
|
type OrderBookAndTradesState = ReturnType<typeof useOrderBookAndTradesScript>;
|
|
285
308
|
|
|
286
|
-
declare const OrderBookAndTrades: FC<OrderBookAndTradesState
|
|
309
|
+
declare const OrderBookAndTrades: FC<OrderBookAndTradesState & {
|
|
310
|
+
tabletMediaQuery: string;
|
|
311
|
+
}>;
|
|
287
312
|
|
|
288
313
|
declare const OrderBookAndTradesWidget: (props: {
|
|
289
314
|
symbol: string;
|
|
315
|
+
tabletMediaQuery: string;
|
|
290
316
|
}) => react_jsx_runtime.JSX.Element;
|
|
291
317
|
|
|
292
|
-
|
|
293
|
-
|
|
318
|
+
type SplitLayoutProps = PropsWithChildren<SplitProps> & {
|
|
319
|
+
onSizeChange?: (size: string) => void;
|
|
320
|
+
};
|
|
321
|
+
declare const SplitLayout: react__default.FC<SplitLayoutProps>;
|
|
294
322
|
|
|
295
|
-
declare const
|
|
323
|
+
declare const useBottomNavBarScript: () => {
|
|
324
|
+
wrongNetwork: boolean;
|
|
325
|
+
};
|
|
326
|
+
type BottomNavBarState = ReturnType<typeof useBottomNavBarScript>;
|
|
296
327
|
|
|
297
|
-
declare const
|
|
328
|
+
declare const BottomNavBar: FC<BottomNavBarState>;
|
|
298
329
|
|
|
299
|
-
declare const
|
|
330
|
+
declare const BottomNavBarWidget: () => react_jsx_runtime.JSX.Element;
|
|
300
331
|
|
|
301
|
-
|
|
332
|
+
type TradingState = ReturnType<typeof useTradingScript>;
|
|
333
|
+
declare const useTradingScript: () => TradingPageState & {
|
|
334
|
+
collapsed: any;
|
|
335
|
+
onCollapse: (collapsed: boolean) => void;
|
|
336
|
+
layout: any;
|
|
337
|
+
onLayout: (value: string) => void;
|
|
338
|
+
orderBookSplitSize: string | undefined;
|
|
339
|
+
setOrderbookSplitSize: (size: string) => void;
|
|
340
|
+
dataListSplitSize: string | undefined;
|
|
341
|
+
setDataListSplitSize: (size: string) => void;
|
|
342
|
+
mainSplitSize: string | undefined;
|
|
343
|
+
setMainSplitSize: (size: string) => void;
|
|
344
|
+
isMedium: boolean;
|
|
345
|
+
animating: boolean;
|
|
346
|
+
setAnimating: react.Dispatch<react.SetStateAction<boolean>>;
|
|
347
|
+
positions: number[];
|
|
348
|
+
updatePositions: (currentIdx: number, targetIdx: number) => void;
|
|
349
|
+
canTrading: boolean;
|
|
350
|
+
showPositionIcon: boolean;
|
|
351
|
+
openMarketsSheet: boolean;
|
|
352
|
+
onOpenMarketsSheetChange: react.Dispatch<react.SetStateAction<boolean>>;
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
declare const Trading: FC<TradingState>;
|
|
356
|
+
|
|
357
|
+
declare const TradingWidget: () => react_jsx_runtime.JSX.Element;
|
|
358
|
+
|
|
359
|
+
declare const TradingPage: (props: TradingPageProps) => react_jsx_runtime.JSX.Element;
|
|
360
|
+
|
|
361
|
+
declare const TradingPageContext: react.Context<TradingPageState>;
|
|
362
|
+
declare const useTradingPageContext: () => TradingPageState;
|
|
363
|
+
declare const TradingPageProvider: (props: PropsWithChildren<TradingPageProps>) => react_jsx_runtime.JSX.Element;
|
|
364
|
+
|
|
365
|
+
declare const useTradingLocalStorage: (props?: {
|
|
366
|
+
pnlNotionalDecimalPrecision?: number;
|
|
367
|
+
}) => {
|
|
368
|
+
unPnlPriceBasis: any;
|
|
369
|
+
setUnPnlPriceBasic: (value: string) => void;
|
|
370
|
+
pnlNotionalDecimalPrecision: any;
|
|
371
|
+
setPnlNotionalDecimalPrecision: (value: number) => void;
|
|
372
|
+
showAllSymbol: any;
|
|
373
|
+
setShowAllSymbol: (value: boolean) => void;
|
|
374
|
+
hideAssets: any;
|
|
375
|
+
setHideAssets: (value: boolean) => void;
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
declare const usePositionsCount: (symbol?: string) => {
|
|
379
|
+
positionCount: number;
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
declare const usePendingOrderCount: (symbol?: string) => {
|
|
383
|
+
pendingOrderCount: number;
|
|
384
|
+
tpSlOrderCount: number;
|
|
385
|
+
};
|
|
302
386
|
|
|
303
|
-
export { AssetView, AssetViewWidget, DataList, DataListWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookWidget, RiskRate, RiskRateWidget, type ShareOptions, TradingPage, TradingPageProvider,
|
|
387
|
+
export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, DataList, DataListWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookWidget, type ReferralProps, RiskRate, RiskRateWidget, type ShareOptions, SplitLayout, Trading, TradingPage, TradingPageContext, type TradingPageProps, TradingPageProvider, type TradingRewardsProps, TradingWidget, useBottomNavBarScript, useOrderBookAndTradesScript, useOrderBookScript, usePendingOrderCount, usePositionsCount, useTradingLocalStorage, useTradingPageContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,36 +1,13 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as _orderly_network_types from '@orderly.network/types';
|
|
3
2
|
import { API, NetworkId, AccountStatusEnum } from '@orderly.network/types';
|
|
4
|
-
import { PositionsProps } from '@orderly.network/ui-positions';
|
|
5
3
|
import * as react from 'react';
|
|
6
|
-
import { ReactNode, FC, PropsWithChildren } from 'react';
|
|
4
|
+
import react__default, { ReactNode, FC, PropsWithChildren } from 'react';
|
|
5
|
+
import * as _orderly_network_ui_share from '@orderly.network/ui-share';
|
|
6
|
+
import { SharePnLConfig, SharePnLParams } from '@orderly.network/ui-share';
|
|
7
|
+
import { PositionsProps } from '@orderly.network/ui-positions';
|
|
8
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
9
|
import * as _orderly_network_hooks from '@orderly.network/hooks';
|
|
8
|
-
|
|
9
|
-
declare enum DataListTabType {
|
|
10
|
-
positions = "Positions",
|
|
11
|
-
pending = "Pending",
|
|
12
|
-
tp_sl = "TP/SL",
|
|
13
|
-
filled = "Filled",
|
|
14
|
-
orderHistory = "Order history"
|
|
15
|
-
}
|
|
16
|
-
declare const useDataListScript: (props: {
|
|
17
|
-
current?: DataListTabType;
|
|
18
|
-
config: PositionsProps & {
|
|
19
|
-
symbol?: string;
|
|
20
|
-
};
|
|
21
|
-
}) => {
|
|
22
|
-
current: DataListTabType | undefined;
|
|
23
|
-
config: PositionsProps & {
|
|
24
|
-
symbol?: string | undefined;
|
|
25
|
-
};
|
|
26
|
-
unPnlPriceBasis: any;
|
|
27
|
-
setUnPnlPriceBasic: (value: string) => void;
|
|
28
|
-
pnlNotionalDecimalPrecision: any;
|
|
29
|
-
setPnlNotionalDecimalPrecision: (value: number) => void;
|
|
30
|
-
showAllSymbol: any;
|
|
31
|
-
setShowAllSymbol: (value: boolean) => void;
|
|
32
|
-
};
|
|
33
|
-
type DataListState = ReturnType<typeof useDataListScript>;
|
|
10
|
+
import { SplitProps } from '@uiw/react-split';
|
|
34
11
|
|
|
35
12
|
type layoutInfo = {
|
|
36
13
|
width?: number;
|
|
@@ -110,7 +87,7 @@ type BasicSymbolInfo = {
|
|
|
110
87
|
base: string;
|
|
111
88
|
quote: string;
|
|
112
89
|
};
|
|
113
|
-
interface TradingPageState extends
|
|
90
|
+
interface TradingPageState extends TradingPageProps {
|
|
114
91
|
symbolInfo: {
|
|
115
92
|
base_dp: number;
|
|
116
93
|
quote_dp: number;
|
|
@@ -119,6 +96,8 @@ interface TradingPageState extends TradingPageV2Props {
|
|
|
119
96
|
quote: string;
|
|
120
97
|
symbol: string;
|
|
121
98
|
};
|
|
99
|
+
/** default is `(max-width: 768px)`*/
|
|
100
|
+
tabletMediaQuery?: string;
|
|
122
101
|
}
|
|
123
102
|
interface TradingViewConfigInterface {
|
|
124
103
|
scriptSRC?: string;
|
|
@@ -144,11 +123,9 @@ type ReferralProps = {
|
|
|
144
123
|
saveRefCode?: boolean;
|
|
145
124
|
onClickReferral?: () => void;
|
|
146
125
|
onBoundRefCode?: (success: boolean, error: any) => void;
|
|
147
|
-
refLink?: string;
|
|
148
|
-
slogan?: string;
|
|
149
126
|
};
|
|
150
|
-
type
|
|
151
|
-
|
|
127
|
+
type TradingRewardsProps = {
|
|
128
|
+
onClickTradingRewards?: () => void;
|
|
152
129
|
};
|
|
153
130
|
type BaseTradingPageProps = {
|
|
154
131
|
symbol: string;
|
|
@@ -158,25 +135,50 @@ type BaseTradingPageProps = {
|
|
|
158
135
|
overrideFeatures?: Record<TradingFeatures, ReactNode>;
|
|
159
136
|
};
|
|
160
137
|
type TradingPageProps = BaseTradingPageProps & {
|
|
161
|
-
|
|
162
|
-
referral
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
type TradingPageV2Props = BaseTradingPageProps & {
|
|
166
|
-
dataList: {
|
|
167
|
-
current?: DataListTabType;
|
|
168
|
-
config: Partial<Omit<PositionsProps, "pnlNotionalDecimalPrecision">>;
|
|
169
|
-
};
|
|
138
|
+
sharePnLConfig?: SharePnLConfig & Partial<Omit<SharePnLParams, "position" | "refCode" | "leverage">>;
|
|
139
|
+
referral?: ReferralProps;
|
|
140
|
+
tradingRewards?: TradingRewardsProps;
|
|
141
|
+
bottomSheetLeading?: React.ReactNode | string;
|
|
170
142
|
};
|
|
171
143
|
|
|
172
|
-
declare
|
|
144
|
+
declare enum DataListTabType {
|
|
145
|
+
positions = "Positions",
|
|
146
|
+
pending = "Pending",
|
|
147
|
+
tp_sl = "TP/SL",
|
|
148
|
+
filled = "Filled",
|
|
149
|
+
orderHistory = "Order history"
|
|
150
|
+
}
|
|
151
|
+
declare const useDataListScript: (props: {
|
|
152
|
+
current?: DataListTabType;
|
|
153
|
+
tabletMediaQuery: string;
|
|
154
|
+
} & PositionsProps) => {
|
|
155
|
+
positionCount: number;
|
|
156
|
+
pendingOrderCount: number;
|
|
157
|
+
tpSlOrderCount: number;
|
|
158
|
+
onSymbolChange: ((symbol: _orderly_network_types.API.Symbol) => void) | undefined;
|
|
159
|
+
unPnlPriceBasis: any;
|
|
160
|
+
setUnPnlPriceBasic: (value: string) => void;
|
|
161
|
+
pnlNotionalDecimalPrecision: any;
|
|
162
|
+
setPnlNotionalDecimalPrecision: (value: number) => void;
|
|
163
|
+
showAllSymbol: any;
|
|
164
|
+
setShowAllSymbol: (value: boolean) => void;
|
|
165
|
+
hideAssets: any;
|
|
166
|
+
setHideAssets: (value: boolean) => void;
|
|
167
|
+
current: DataListTabType | undefined;
|
|
168
|
+
tabletMediaQuery: string;
|
|
169
|
+
sharePnLConfig: (_orderly_network_ui_share.SharePnLConfig & Partial<Omit<_orderly_network_ui_share.SharePnLParams, "position" | "refCode" | "leverage">>) | undefined;
|
|
170
|
+
symbol: string | undefined;
|
|
171
|
+
calcMode: any;
|
|
172
|
+
includedPendingOrder: boolean | undefined;
|
|
173
|
+
};
|
|
174
|
+
type DataListState = ReturnType<typeof useDataListScript>;
|
|
173
175
|
|
|
174
176
|
declare const DataList: FC<DataListState>;
|
|
175
177
|
|
|
176
178
|
declare const DataListWidget: (props: {
|
|
177
179
|
current?: DataListTabType;
|
|
178
|
-
|
|
179
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
180
|
+
tabletMediaQuery: string;
|
|
181
|
+
} & PositionsProps) => react_jsx_runtime.JSX.Element;
|
|
180
182
|
|
|
181
183
|
declare const useLastTradesScript: (symbol: string) => {
|
|
182
184
|
base: any;
|
|
@@ -189,13 +191,31 @@ declare const useLastTradesScript: (symbol: string) => {
|
|
|
189
191
|
type LastTradesState = ReturnType<typeof useLastTradesScript>;
|
|
190
192
|
|
|
191
193
|
declare const LastTrades: FC<LastTradesState & {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
+
classNames?: {
|
|
195
|
+
root?: string;
|
|
196
|
+
list?: string;
|
|
197
|
+
listHeader?: string;
|
|
198
|
+
listItem?: {
|
|
199
|
+
left?: string;
|
|
200
|
+
mid?: string;
|
|
201
|
+
right?: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
style?: react__default.CSSProperties;
|
|
194
205
|
}>;
|
|
195
206
|
|
|
196
207
|
declare const LastTradesWidget: (props: {
|
|
197
208
|
symbol: string;
|
|
198
|
-
|
|
209
|
+
classNames?: {
|
|
210
|
+
root?: string;
|
|
211
|
+
list?: string;
|
|
212
|
+
listHeader?: string;
|
|
213
|
+
listItem?: {
|
|
214
|
+
left?: string;
|
|
215
|
+
mid?: string;
|
|
216
|
+
right?: string;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
199
219
|
style?: React.CSSProperties;
|
|
200
220
|
}) => react_jsx_runtime.JSX.Element;
|
|
201
221
|
|
|
@@ -207,11 +227,11 @@ declare const useAssetViewScript: () => {
|
|
|
207
227
|
toggleVisible: () => void;
|
|
208
228
|
networkId: NetworkId;
|
|
209
229
|
isFirstTimeDeposit: boolean;
|
|
210
|
-
totalValue: number;
|
|
230
|
+
totalValue: number | undefined;
|
|
211
231
|
status: AccountStatusEnum;
|
|
212
|
-
freeCollateral: number;
|
|
213
|
-
marginRatioVal: number;
|
|
214
|
-
renderMMR:
|
|
232
|
+
freeCollateral: number | undefined;
|
|
233
|
+
marginRatioVal: number | undefined;
|
|
234
|
+
renderMMR: number | undefined;
|
|
215
235
|
isConnected: boolean;
|
|
216
236
|
};
|
|
217
237
|
type AssetViewState = ReturnType<typeof useAssetViewScript>;
|
|
@@ -222,6 +242,7 @@ declare const AssetViewWidget: () => react_jsx_runtime.JSX.Element;
|
|
|
222
242
|
|
|
223
243
|
declare const useOrderBookScript: (props: {
|
|
224
244
|
symbol: string;
|
|
245
|
+
tabletMediaQuery?: string;
|
|
225
246
|
height?: number;
|
|
226
247
|
}) => {
|
|
227
248
|
level: number;
|
|
@@ -245,16 +266,18 @@ type OrderBookState = ReturnType<typeof useOrderBookScript>;
|
|
|
245
266
|
|
|
246
267
|
declare const OrderBook: FC<OrderBookState & {
|
|
247
268
|
className?: string;
|
|
269
|
+
tabletMediaQuery: string;
|
|
248
270
|
}>;
|
|
249
271
|
|
|
250
272
|
declare const OrderBookWidget: (props: {
|
|
251
273
|
className?: string;
|
|
252
274
|
symbol: string;
|
|
253
275
|
height?: number;
|
|
276
|
+
tabletMediaQuery: string;
|
|
254
277
|
}) => react_jsx_runtime.JSX.Element;
|
|
255
278
|
|
|
256
279
|
declare const useRiskRateScript: () => {
|
|
257
|
-
riskRate: string;
|
|
280
|
+
riskRate: string | null;
|
|
258
281
|
riskRateColor: {
|
|
259
282
|
isHigh: boolean;
|
|
260
283
|
isMedium: boolean;
|
|
@@ -262,7 +285,7 @@ declare const useRiskRateScript: () => {
|
|
|
262
285
|
isDefault: boolean;
|
|
263
286
|
};
|
|
264
287
|
isConnected: boolean;
|
|
265
|
-
currentLeverage: number;
|
|
288
|
+
currentLeverage: number | null;
|
|
266
289
|
maxLeverage: any;
|
|
267
290
|
};
|
|
268
291
|
type RiskRateState = ReturnType<typeof useRiskRateScript>;
|
|
@@ -283,21 +306,82 @@ declare const useOrderBookAndTradesScript: (symbol: string) => {
|
|
|
283
306
|
};
|
|
284
307
|
type OrderBookAndTradesState = ReturnType<typeof useOrderBookAndTradesScript>;
|
|
285
308
|
|
|
286
|
-
declare const OrderBookAndTrades: FC<OrderBookAndTradesState
|
|
309
|
+
declare const OrderBookAndTrades: FC<OrderBookAndTradesState & {
|
|
310
|
+
tabletMediaQuery: string;
|
|
311
|
+
}>;
|
|
287
312
|
|
|
288
313
|
declare const OrderBookAndTradesWidget: (props: {
|
|
289
314
|
symbol: string;
|
|
315
|
+
tabletMediaQuery: string;
|
|
290
316
|
}) => react_jsx_runtime.JSX.Element;
|
|
291
317
|
|
|
292
|
-
|
|
293
|
-
|
|
318
|
+
type SplitLayoutProps = PropsWithChildren<SplitProps> & {
|
|
319
|
+
onSizeChange?: (size: string) => void;
|
|
320
|
+
};
|
|
321
|
+
declare const SplitLayout: react__default.FC<SplitLayoutProps>;
|
|
294
322
|
|
|
295
|
-
declare const
|
|
323
|
+
declare const useBottomNavBarScript: () => {
|
|
324
|
+
wrongNetwork: boolean;
|
|
325
|
+
};
|
|
326
|
+
type BottomNavBarState = ReturnType<typeof useBottomNavBarScript>;
|
|
296
327
|
|
|
297
|
-
declare const
|
|
328
|
+
declare const BottomNavBar: FC<BottomNavBarState>;
|
|
298
329
|
|
|
299
|
-
declare const
|
|
330
|
+
declare const BottomNavBarWidget: () => react_jsx_runtime.JSX.Element;
|
|
300
331
|
|
|
301
|
-
|
|
332
|
+
type TradingState = ReturnType<typeof useTradingScript>;
|
|
333
|
+
declare const useTradingScript: () => TradingPageState & {
|
|
334
|
+
collapsed: any;
|
|
335
|
+
onCollapse: (collapsed: boolean) => void;
|
|
336
|
+
layout: any;
|
|
337
|
+
onLayout: (value: string) => void;
|
|
338
|
+
orderBookSplitSize: string | undefined;
|
|
339
|
+
setOrderbookSplitSize: (size: string) => void;
|
|
340
|
+
dataListSplitSize: string | undefined;
|
|
341
|
+
setDataListSplitSize: (size: string) => void;
|
|
342
|
+
mainSplitSize: string | undefined;
|
|
343
|
+
setMainSplitSize: (size: string) => void;
|
|
344
|
+
isMedium: boolean;
|
|
345
|
+
animating: boolean;
|
|
346
|
+
setAnimating: react.Dispatch<react.SetStateAction<boolean>>;
|
|
347
|
+
positions: number[];
|
|
348
|
+
updatePositions: (currentIdx: number, targetIdx: number) => void;
|
|
349
|
+
canTrading: boolean;
|
|
350
|
+
showPositionIcon: boolean;
|
|
351
|
+
openMarketsSheet: boolean;
|
|
352
|
+
onOpenMarketsSheetChange: react.Dispatch<react.SetStateAction<boolean>>;
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
declare const Trading: FC<TradingState>;
|
|
356
|
+
|
|
357
|
+
declare const TradingWidget: () => react_jsx_runtime.JSX.Element;
|
|
358
|
+
|
|
359
|
+
declare const TradingPage: (props: TradingPageProps) => react_jsx_runtime.JSX.Element;
|
|
360
|
+
|
|
361
|
+
declare const TradingPageContext: react.Context<TradingPageState>;
|
|
362
|
+
declare const useTradingPageContext: () => TradingPageState;
|
|
363
|
+
declare const TradingPageProvider: (props: PropsWithChildren<TradingPageProps>) => react_jsx_runtime.JSX.Element;
|
|
364
|
+
|
|
365
|
+
declare const useTradingLocalStorage: (props?: {
|
|
366
|
+
pnlNotionalDecimalPrecision?: number;
|
|
367
|
+
}) => {
|
|
368
|
+
unPnlPriceBasis: any;
|
|
369
|
+
setUnPnlPriceBasic: (value: string) => void;
|
|
370
|
+
pnlNotionalDecimalPrecision: any;
|
|
371
|
+
setPnlNotionalDecimalPrecision: (value: number) => void;
|
|
372
|
+
showAllSymbol: any;
|
|
373
|
+
setShowAllSymbol: (value: boolean) => void;
|
|
374
|
+
hideAssets: any;
|
|
375
|
+
setHideAssets: (value: boolean) => void;
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
declare const usePositionsCount: (symbol?: string) => {
|
|
379
|
+
positionCount: number;
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
declare const usePendingOrderCount: (symbol?: string) => {
|
|
383
|
+
pendingOrderCount: number;
|
|
384
|
+
tpSlOrderCount: number;
|
|
385
|
+
};
|
|
302
386
|
|
|
303
|
-
export { AssetView, AssetViewWidget, DataList, DataListWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookWidget, RiskRate, RiskRateWidget, type ShareOptions, TradingPage, TradingPageProvider,
|
|
387
|
+
export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, DataList, DataListWidget, LastTrades, LastTradesWidget, OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookWidget, type ReferralProps, RiskRate, RiskRateWidget, type ShareOptions, SplitLayout, Trading, TradingPage, TradingPageContext, type TradingPageProps, TradingPageProvider, type TradingRewardsProps, TradingWidget, useBottomNavBarScript, useOrderBookAndTradesScript, useOrderBookScript, usePendingOrderCount, usePositionsCount, useTradingLocalStorage, useTradingPageContext };
|