@orderly.network/hooks 2.6.3 → 2.7.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/dist/index.d.mts +61 -7
- package/dist/index.d.ts +61 -7
- package/dist/index.js +151 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +147 -63
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -33,7 +33,7 @@ declare global {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
declare const _default: "2.
|
|
36
|
+
declare const _default: "2.7.0";
|
|
37
37
|
|
|
38
38
|
declare const fetcher: (url: string, init: RequestInit | undefined, queryOptions: useQueryOptions<any>) => Promise<any>;
|
|
39
39
|
type useQueryOptions<T> = SWRConfiguration & {
|
|
@@ -114,7 +114,7 @@ declare const useUpdatedRef: <T>(val: NotFunction<T>) => react.MutableRefObject<
|
|
|
114
114
|
|
|
115
115
|
type noop = (this: any, ...args: any[]) => any;
|
|
116
116
|
type PickFunction<T extends noop> = (this: ThisParameterType<T>, ...args: Parameters<T>) => ReturnType<T>;
|
|
117
|
-
declare const useMemoizedFn: <T extends noop>(fn
|
|
117
|
+
declare const useMemoizedFn: <T extends noop>(fn?: T) => PickFunction<T>;
|
|
118
118
|
|
|
119
119
|
interface AudioPlayerOptions {
|
|
120
120
|
volume?: number;
|
|
@@ -497,7 +497,7 @@ interface OrderlyConfigContextState {
|
|
|
497
497
|
/**
|
|
498
498
|
* custom `/v2/public/announcement` response data
|
|
499
499
|
*/
|
|
500
|
-
announcementList?: (data: any[]) => any[];
|
|
500
|
+
announcementList?: (data: any[] | ReadonlyArray<any>) => any[];
|
|
501
501
|
};
|
|
502
502
|
notification?: {
|
|
503
503
|
orderFilled?: {
|
|
@@ -679,6 +679,8 @@ declare const useSymbolsInfo: () => Record<string, <Key extends keyof _orderly_n
|
|
|
679
679
|
};
|
|
680
680
|
declare const useSymbolsInfoStore: () => Record<string, _orderly_network_types.API.SymbolExt> | undefined;
|
|
681
681
|
|
|
682
|
+
declare const useSymbolInfo: (symbol?: string) => ((<Key extends keyof _orderly_network_types.API.SymbolExt>(key: Key, defaultValue?: _orderly_network_types.API.SymbolExt[Key] | undefined) => _orderly_network_types.API.SymbolExt[Key]) & (() => _orderly_network_types.API.SymbolExt)) | null;
|
|
683
|
+
|
|
682
684
|
declare const useAccountInfo: () => swr.SWRResponse<API.AccountInfo, any, any>;
|
|
683
685
|
|
|
684
686
|
declare const useMarketsStream: () => {
|
|
@@ -1151,11 +1153,16 @@ declare function useStorageChain(): {
|
|
|
1151
1153
|
setStorageChain: (chainId: number) => void;
|
|
1152
1154
|
};
|
|
1153
1155
|
|
|
1156
|
+
/**
|
|
1157
|
+
* @param token @deprecated, use useTokenInfo instead
|
|
1158
|
+
*/
|
|
1154
1159
|
declare const useChain: (token: string) => {
|
|
1155
1160
|
chains: API.Chain | null;
|
|
1156
1161
|
isLoading: boolean;
|
|
1157
1162
|
};
|
|
1158
1163
|
|
|
1164
|
+
declare const useChainInfo: () => swr.SWRResponse<unknown, any, any>;
|
|
1165
|
+
|
|
1159
1166
|
type UseWithdrawOptions = {
|
|
1160
1167
|
srcChainId?: number;
|
|
1161
1168
|
token?: string;
|
|
@@ -1443,11 +1450,47 @@ position: Partial<API.PositionTPSLExt> & Pick<API.PositionTPSLExt, "symbol" | "a
|
|
|
1443
1450
|
*
|
|
1444
1451
|
* @example
|
|
1445
1452
|
* ```typescript
|
|
1446
|
-
* const leverage =
|
|
1453
|
+
* const leverage = useMaxLeverage("PERP_BTC_USDC");
|
|
1454
|
+
* console.log(`Maximum leverage for PERP_BTC_USDC: ${leverage}x`);
|
|
1455
|
+
* ```
|
|
1456
|
+
*/
|
|
1457
|
+
declare const useMaxLeverage: (symbol: string) => number;
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
* A custom hook that calculates the maximum allowed leverage for a given trading pair symbol.
|
|
1461
|
+
*
|
|
1462
|
+
* The final leverage is determined by taking the minimum value between the account's maximum
|
|
1463
|
+
* leverage and the symbol's maximum leverage.
|
|
1464
|
+
*
|
|
1465
|
+
* @param symbol - Trading pair symbol (e.g. "PERP_BTC_USDC")
|
|
1466
|
+
* @returns The maximum allowed leverage as a number, or "-" if the leverage cannot be determined
|
|
1467
|
+
*
|
|
1468
|
+
* @example
|
|
1469
|
+
* ```typescript
|
|
1470
|
+
* const leverage = useMaxSymbolLeverage("PERP_BTC_USDC");
|
|
1447
1471
|
* console.log(`Maximum leverage for PERP_BTC_USDC: ${leverage}x`);
|
|
1448
1472
|
* ```
|
|
1449
1473
|
*/
|
|
1450
|
-
declare const useSymbolLeverage: (symbol
|
|
1474
|
+
declare const useSymbolLeverage: (symbol?: string) => {
|
|
1475
|
+
maxLeverage: number;
|
|
1476
|
+
update: (this: unknown, data: Record<string, any> | null, params?: Record<string, any> | undefined, options?: swr_mutation.SWRMutationConfiguration<unknown, unknown> | undefined) => Promise<any>;
|
|
1477
|
+
isLoading: boolean;
|
|
1478
|
+
};
|
|
1479
|
+
|
|
1480
|
+
/**
|
|
1481
|
+
* A hook to fetch and subscribe to leverage for a given trading symbol.
|
|
1482
|
+
* It initially fetches the leverage data via a private query and then listens for real-time
|
|
1483
|
+
* updates through a WebSocket subscription to keep the leverage value current.
|
|
1484
|
+
*
|
|
1485
|
+
* @param symbol - The trading symbol (e.g. "PERP_BTC_USDC")
|
|
1486
|
+
* @returns The current leverage value associated with the symbol, or undefined if not available
|
|
1487
|
+
*
|
|
1488
|
+
* @example
|
|
1489
|
+
* ```typescript
|
|
1490
|
+
* const leverage = useLeverageBySymbol("PERP_BTC_USDC");
|
|
1491
|
+
* ```
|
|
1492
|
+
*/
|
|
1493
|
+
declare const useLeverageBySymbol: (symbol?: string) => number | undefined;
|
|
1451
1494
|
|
|
1452
1495
|
type AssetHistoryOptions = {
|
|
1453
1496
|
/** token name you want to search */
|
|
@@ -1575,7 +1618,7 @@ declare enum MaintenanceStatus {
|
|
|
1575
1618
|
None = 0,
|
|
1576
1619
|
Maintenance = 2
|
|
1577
1620
|
}
|
|
1578
|
-
declare
|
|
1621
|
+
declare const useMaintenanceStatus: () => {
|
|
1579
1622
|
status: number;
|
|
1580
1623
|
brokerName: string;
|
|
1581
1624
|
startTime: number | undefined;
|
|
@@ -1605,6 +1648,17 @@ declare const useTokensInfo: () => API.Chain[];
|
|
|
1605
1648
|
*/
|
|
1606
1649
|
declare const useTokenInfo: (token: string) => API.Chain | undefined;
|
|
1607
1650
|
|
|
1651
|
+
type Portfolio$1 = {
|
|
1652
|
+
holding?: API.Holding[];
|
|
1653
|
+
totalCollateral: Decimal;
|
|
1654
|
+
freeCollateral: Decimal;
|
|
1655
|
+
totalValue: Decimal | null;
|
|
1656
|
+
availableBalance: number;
|
|
1657
|
+
unsettledPnL: number;
|
|
1658
|
+
totalUnrealizedROI: number;
|
|
1659
|
+
};
|
|
1660
|
+
declare const usePortfolio: () => Portfolio$1;
|
|
1661
|
+
|
|
1608
1662
|
type UseOrderEntryOptions = {
|
|
1609
1663
|
commify?: boolean;
|
|
1610
1664
|
watchOrderbook?: boolean;
|
|
@@ -2364,4 +2418,4 @@ declare const usePositionClose: (options: PositionCloseOptions) => {
|
|
|
2364
2418
|
declare const useMarketList: () => API.MarketInfoExt[];
|
|
2365
2419
|
declare const useMarketMap: () => Record<string, API.MarketInfoExt> | null;
|
|
2366
2420
|
|
|
2367
|
-
export { type APIKeyItem, type AccountRewardsHistory, type AccountRewardsHistoryRow, type Brokers, type Chain, type Chains, type CheckReferralCodeReturns, type CollateralOutputs, type ComputedAlgoOrder, type ConfigProviderProps, type ConnectedChain, type CurrentEpochEstimate, DefaultLayoutConfig, DistributionId, type DrawOptions, ENVType, type EpochInfoItem, type EpochInfoType, EpochStatus, type ExclusiveConfigProviderProps, ExtendedConfigStore, type Favorite, type FavoriteTab, type FundingRates, MaintenanceStatus, type MarginRatioReturn, type MarketsItem, MarketsStorageKey, type MarketsStore, MarketsType, type NewListing, ORDERLY_ORDERBOOK_DEPTH_KEY, type OrderBookItem, type OrderEntryReturn, type OrderMetadata, type OrderMetadataConfig, type OrderParams, type OrderValidationItem, type OrderValidationResult, type OrderbookData, type OrderbookOptions, type OrderlyConfigContextState, OrderlyConfigProvider, OrderlyContext, OrderlyProvider, type PosterLayoutConfig, type PriceMode, type Recent, RefferalAPI, type RestrictedInfoOptions, type RestrictedInfoReturns, ScopeType, type StatusInfo, StatusProvider, type SymbolsInfo, TWType, type UseChainsOptions, type UseChainsReturnObject, type UseOrderEntryMetaState, WalletConnectorContext, type WalletConnectorContextState, type WalletRewards, type WalletRewardsHistoryReturns, type WalletRewardsItem, type WalletState, WsNetworkStatus, type chainFilter, type chainFilterFunc, checkNotional, cleanStringStyle, fetcher, type filteredChains$1 as filteredChains, findPositionTPSLFromOrders, findTPSLFromOrder, findTPSLOrderPriceFromOrder, getMinNotional, getPriceKey, noCacheConfig, parseJSON, useAccount, useAccountInfo, useAccountInstance, useAccountRewardsHistory, useAllBrokers, useApiKeyManager, useAssetsHistory, useAudioPlayer, useBalanceSubscription, useBalanceTopic, useBoolean, useChain, useChains, useCheckReferralCode, useCollateral, useCommission, useComputedLTV, useConfig, useConvert, useCurEpochEstimate, useDaily, useDeposit, useDistribution, useDistributionHistory, useEpochInfo, useEventEmitter, useFeeState, useFundingDetails, useFundingFeeHistory, useFundingRate, useFundingRateHistory, useFundingRates, useFundingRatesStore, useGetClaimed, useGetEnv, useGetReferralCode, useHoldingStream, useIndexPrice, useIndexPricesStream, useInfiniteQuery, useInternalTransfer, useKeyStore, useLazyQuery, useLeverage, useLocalStorage, useMaintenanceStatus, useMarginRatio, useMarkPrice, useMarkPriceBySymbol, useMarkPricesStream, useMarket, useMarketList, useMarketMap, useMarketTradeStream, useMarkets, useMarketsStore, useMarketsStream, useMaxQty, useMediaQuery, useMemoizedFn, useMutation, useNetworkInfo, useOdosQuote, useOrderEntity, useOrderEntry, useOrderEntry$1 as useOrderEntry_deprecated, useOrderStore, useOrderStream, useOrderbookStream, useOrderlyContext, usePositionActions, usePositionClose, usePositionStream, usePoster, usePreLoadData, usePrivateDataObserver, usePrivateInfiniteQuery, usePrivateQuery, useQuery, type useQueryOptions, useRefereeHistory, useRefereeInfo, useRefereeRebateSummary, useReferralInfo, useReferralRebateSummary, useRestrictedInfo, useSessionStorage, useSettleSubscription, useSimpleDI, useStatisticsDaily, useStorageChain, useStorageLedgerAddress, useSubAccountDataObserver, useSubAccountMaxWithdrawal, useSubAccountMutation, useSubAccountQuery, useSubAccountWS, useSymbolLeverage, useSymbolPriceRange, useSymbolsInfo, useSymbolsInfoStore, useTPSLOrder, useTickerStream, useTokenInfo, useTokensInfo, useTrack, useTrackingInstance, useTradingRewardsStatus, useTransfer, useTransferHistory, useUpdatedRef, useVaultsHistory, useWS, useWalletConnector, useWalletRewardsHistory, useWalletSubscription, useWalletTopic, useWithdraw, useWsStatus, index as utils, _default as version };
|
|
2421
|
+
export { type APIKeyItem, type AccountRewardsHistory, type AccountRewardsHistoryRow, type Brokers, type Chain, type Chains, type CheckReferralCodeReturns, type CollateralOutputs, type ComputedAlgoOrder, type ConfigProviderProps, type ConnectedChain, type CurrentEpochEstimate, DefaultLayoutConfig, DistributionId, type DrawOptions, ENVType, type EpochInfoItem, type EpochInfoType, EpochStatus, type ExclusiveConfigProviderProps, ExtendedConfigStore, type Favorite, type FavoriteTab, type FundingRates, MaintenanceStatus, type MarginRatioReturn, type MarketsItem, MarketsStorageKey, type MarketsStore, MarketsType, type NewListing, ORDERLY_ORDERBOOK_DEPTH_KEY, type OrderBookItem, type OrderEntryReturn, type OrderMetadata, type OrderMetadataConfig, type OrderParams, type OrderValidationItem, type OrderValidationResult, type OrderbookData, type OrderbookOptions, type OrderlyConfigContextState, OrderlyConfigProvider, OrderlyContext, OrderlyProvider, type PosterLayoutConfig, type PriceMode, type Recent, RefferalAPI, type RestrictedInfoOptions, type RestrictedInfoReturns, ScopeType, type StatusInfo, StatusProvider, type SymbolsInfo, TWType, type UseChainsOptions, type UseChainsReturnObject, type UseOrderEntryMetaState, WalletConnectorContext, type WalletConnectorContextState, type WalletRewards, type WalletRewardsHistoryReturns, type WalletRewardsItem, type WalletState, WsNetworkStatus, type chainFilter, type chainFilterFunc, checkNotional, cleanStringStyle, fetcher, type filteredChains$1 as filteredChains, findPositionTPSLFromOrders, findTPSLFromOrder, findTPSLOrderPriceFromOrder, getMinNotional, getPriceKey, noCacheConfig, parseJSON, useAccount, useAccountInfo, useAccountInstance, useAccountRewardsHistory, useAllBrokers, useApiKeyManager, useAssetsHistory, useAudioPlayer, useBalanceSubscription, useBalanceTopic, useBoolean, useChain, useChainInfo, useChains, useCheckReferralCode, useCollateral, useCommission, useComputedLTV, useConfig, useConvert, useCurEpochEstimate, useDaily, useDeposit, useDistribution, useDistributionHistory, useEpochInfo, useEventEmitter, useFeeState, useFundingDetails, useFundingFeeHistory, useFundingRate, useFundingRateHistory, useFundingRates, useFundingRatesStore, useGetClaimed, useGetEnv, useGetReferralCode, useHoldingStream, useIndexPrice, useIndexPricesStream, useInfiniteQuery, useInternalTransfer, useKeyStore, useLazyQuery, useLeverage, useLeverageBySymbol, useLocalStorage, useMaintenanceStatus, useMarginRatio, useMarkPrice, useMarkPriceBySymbol, useMarkPricesStream, useMarket, useMarketList, useMarketMap, useMarketTradeStream, useMarkets, useMarketsStore, useMarketsStream, useMaxLeverage, useMaxQty, useMediaQuery, useMemoizedFn, useMutation, useNetworkInfo, useOdosQuote, useOrderEntity, useOrderEntry, useOrderEntry$1 as useOrderEntry_deprecated, useOrderStore, useOrderStream, useOrderbookStream, useOrderlyContext, usePortfolio, usePositionActions, usePositionClose, usePositionStream, usePoster, usePreLoadData, usePrivateDataObserver, usePrivateInfiniteQuery, usePrivateQuery, useQuery, type useQueryOptions, useRefereeHistory, useRefereeInfo, useRefereeRebateSummary, useReferralInfo, useReferralRebateSummary, useRestrictedInfo, useSessionStorage, useSettleSubscription, useSimpleDI, useStatisticsDaily, useStorageChain, useStorageLedgerAddress, useSubAccountDataObserver, useSubAccountMaxWithdrawal, useSubAccountMutation, useSubAccountQuery, useSubAccountWS, useSymbolInfo, useSymbolLeverage, useSymbolPriceRange, useSymbolsInfo, useSymbolsInfoStore, useTPSLOrder, useTickerStream, useTokenInfo, useTokensInfo, useTrack, useTrackingInstance, useTradingRewardsStatus, useTransfer, useTransferHistory, useUpdatedRef, useVaultsHistory, useWS, useWalletConnector, useWalletRewardsHistory, useWalletSubscription, useWalletTopic, useWithdraw, useWsStatus, index as utils, _default as version };
|
package/dist/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ declare global {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
declare const _default: "2.
|
|
36
|
+
declare const _default: "2.7.0";
|
|
37
37
|
|
|
38
38
|
declare const fetcher: (url: string, init: RequestInit | undefined, queryOptions: useQueryOptions<any>) => Promise<any>;
|
|
39
39
|
type useQueryOptions<T> = SWRConfiguration & {
|
|
@@ -114,7 +114,7 @@ declare const useUpdatedRef: <T>(val: NotFunction<T>) => react.MutableRefObject<
|
|
|
114
114
|
|
|
115
115
|
type noop = (this: any, ...args: any[]) => any;
|
|
116
116
|
type PickFunction<T extends noop> = (this: ThisParameterType<T>, ...args: Parameters<T>) => ReturnType<T>;
|
|
117
|
-
declare const useMemoizedFn: <T extends noop>(fn
|
|
117
|
+
declare const useMemoizedFn: <T extends noop>(fn?: T) => PickFunction<T>;
|
|
118
118
|
|
|
119
119
|
interface AudioPlayerOptions {
|
|
120
120
|
volume?: number;
|
|
@@ -497,7 +497,7 @@ interface OrderlyConfigContextState {
|
|
|
497
497
|
/**
|
|
498
498
|
* custom `/v2/public/announcement` response data
|
|
499
499
|
*/
|
|
500
|
-
announcementList?: (data: any[]) => any[];
|
|
500
|
+
announcementList?: (data: any[] | ReadonlyArray<any>) => any[];
|
|
501
501
|
};
|
|
502
502
|
notification?: {
|
|
503
503
|
orderFilled?: {
|
|
@@ -679,6 +679,8 @@ declare const useSymbolsInfo: () => Record<string, <Key extends keyof _orderly_n
|
|
|
679
679
|
};
|
|
680
680
|
declare const useSymbolsInfoStore: () => Record<string, _orderly_network_types.API.SymbolExt> | undefined;
|
|
681
681
|
|
|
682
|
+
declare const useSymbolInfo: (symbol?: string) => ((<Key extends keyof _orderly_network_types.API.SymbolExt>(key: Key, defaultValue?: _orderly_network_types.API.SymbolExt[Key] | undefined) => _orderly_network_types.API.SymbolExt[Key]) & (() => _orderly_network_types.API.SymbolExt)) | null;
|
|
683
|
+
|
|
682
684
|
declare const useAccountInfo: () => swr.SWRResponse<API.AccountInfo, any, any>;
|
|
683
685
|
|
|
684
686
|
declare const useMarketsStream: () => {
|
|
@@ -1151,11 +1153,16 @@ declare function useStorageChain(): {
|
|
|
1151
1153
|
setStorageChain: (chainId: number) => void;
|
|
1152
1154
|
};
|
|
1153
1155
|
|
|
1156
|
+
/**
|
|
1157
|
+
* @param token @deprecated, use useTokenInfo instead
|
|
1158
|
+
*/
|
|
1154
1159
|
declare const useChain: (token: string) => {
|
|
1155
1160
|
chains: API.Chain | null;
|
|
1156
1161
|
isLoading: boolean;
|
|
1157
1162
|
};
|
|
1158
1163
|
|
|
1164
|
+
declare const useChainInfo: () => swr.SWRResponse<unknown, any, any>;
|
|
1165
|
+
|
|
1159
1166
|
type UseWithdrawOptions = {
|
|
1160
1167
|
srcChainId?: number;
|
|
1161
1168
|
token?: string;
|
|
@@ -1443,11 +1450,47 @@ position: Partial<API.PositionTPSLExt> & Pick<API.PositionTPSLExt, "symbol" | "a
|
|
|
1443
1450
|
*
|
|
1444
1451
|
* @example
|
|
1445
1452
|
* ```typescript
|
|
1446
|
-
* const leverage =
|
|
1453
|
+
* const leverage = useMaxLeverage("PERP_BTC_USDC");
|
|
1454
|
+
* console.log(`Maximum leverage for PERP_BTC_USDC: ${leverage}x`);
|
|
1455
|
+
* ```
|
|
1456
|
+
*/
|
|
1457
|
+
declare const useMaxLeverage: (symbol: string) => number;
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
* A custom hook that calculates the maximum allowed leverage for a given trading pair symbol.
|
|
1461
|
+
*
|
|
1462
|
+
* The final leverage is determined by taking the minimum value between the account's maximum
|
|
1463
|
+
* leverage and the symbol's maximum leverage.
|
|
1464
|
+
*
|
|
1465
|
+
* @param symbol - Trading pair symbol (e.g. "PERP_BTC_USDC")
|
|
1466
|
+
* @returns The maximum allowed leverage as a number, or "-" if the leverage cannot be determined
|
|
1467
|
+
*
|
|
1468
|
+
* @example
|
|
1469
|
+
* ```typescript
|
|
1470
|
+
* const leverage = useMaxSymbolLeverage("PERP_BTC_USDC");
|
|
1447
1471
|
* console.log(`Maximum leverage for PERP_BTC_USDC: ${leverage}x`);
|
|
1448
1472
|
* ```
|
|
1449
1473
|
*/
|
|
1450
|
-
declare const useSymbolLeverage: (symbol
|
|
1474
|
+
declare const useSymbolLeverage: (symbol?: string) => {
|
|
1475
|
+
maxLeverage: number;
|
|
1476
|
+
update: (this: unknown, data: Record<string, any> | null, params?: Record<string, any> | undefined, options?: swr_mutation.SWRMutationConfiguration<unknown, unknown> | undefined) => Promise<any>;
|
|
1477
|
+
isLoading: boolean;
|
|
1478
|
+
};
|
|
1479
|
+
|
|
1480
|
+
/**
|
|
1481
|
+
* A hook to fetch and subscribe to leverage for a given trading symbol.
|
|
1482
|
+
* It initially fetches the leverage data via a private query and then listens for real-time
|
|
1483
|
+
* updates through a WebSocket subscription to keep the leverage value current.
|
|
1484
|
+
*
|
|
1485
|
+
* @param symbol - The trading symbol (e.g. "PERP_BTC_USDC")
|
|
1486
|
+
* @returns The current leverage value associated with the symbol, or undefined if not available
|
|
1487
|
+
*
|
|
1488
|
+
* @example
|
|
1489
|
+
* ```typescript
|
|
1490
|
+
* const leverage = useLeverageBySymbol("PERP_BTC_USDC");
|
|
1491
|
+
* ```
|
|
1492
|
+
*/
|
|
1493
|
+
declare const useLeverageBySymbol: (symbol?: string) => number | undefined;
|
|
1451
1494
|
|
|
1452
1495
|
type AssetHistoryOptions = {
|
|
1453
1496
|
/** token name you want to search */
|
|
@@ -1575,7 +1618,7 @@ declare enum MaintenanceStatus {
|
|
|
1575
1618
|
None = 0,
|
|
1576
1619
|
Maintenance = 2
|
|
1577
1620
|
}
|
|
1578
|
-
declare
|
|
1621
|
+
declare const useMaintenanceStatus: () => {
|
|
1579
1622
|
status: number;
|
|
1580
1623
|
brokerName: string;
|
|
1581
1624
|
startTime: number | undefined;
|
|
@@ -1605,6 +1648,17 @@ declare const useTokensInfo: () => API.Chain[];
|
|
|
1605
1648
|
*/
|
|
1606
1649
|
declare const useTokenInfo: (token: string) => API.Chain | undefined;
|
|
1607
1650
|
|
|
1651
|
+
type Portfolio$1 = {
|
|
1652
|
+
holding?: API.Holding[];
|
|
1653
|
+
totalCollateral: Decimal;
|
|
1654
|
+
freeCollateral: Decimal;
|
|
1655
|
+
totalValue: Decimal | null;
|
|
1656
|
+
availableBalance: number;
|
|
1657
|
+
unsettledPnL: number;
|
|
1658
|
+
totalUnrealizedROI: number;
|
|
1659
|
+
};
|
|
1660
|
+
declare const usePortfolio: () => Portfolio$1;
|
|
1661
|
+
|
|
1608
1662
|
type UseOrderEntryOptions = {
|
|
1609
1663
|
commify?: boolean;
|
|
1610
1664
|
watchOrderbook?: boolean;
|
|
@@ -2364,4 +2418,4 @@ declare const usePositionClose: (options: PositionCloseOptions) => {
|
|
|
2364
2418
|
declare const useMarketList: () => API.MarketInfoExt[];
|
|
2365
2419
|
declare const useMarketMap: () => Record<string, API.MarketInfoExt> | null;
|
|
2366
2420
|
|
|
2367
|
-
export { type APIKeyItem, type AccountRewardsHistory, type AccountRewardsHistoryRow, type Brokers, type Chain, type Chains, type CheckReferralCodeReturns, type CollateralOutputs, type ComputedAlgoOrder, type ConfigProviderProps, type ConnectedChain, type CurrentEpochEstimate, DefaultLayoutConfig, DistributionId, type DrawOptions, ENVType, type EpochInfoItem, type EpochInfoType, EpochStatus, type ExclusiveConfigProviderProps, ExtendedConfigStore, type Favorite, type FavoriteTab, type FundingRates, MaintenanceStatus, type MarginRatioReturn, type MarketsItem, MarketsStorageKey, type MarketsStore, MarketsType, type NewListing, ORDERLY_ORDERBOOK_DEPTH_KEY, type OrderBookItem, type OrderEntryReturn, type OrderMetadata, type OrderMetadataConfig, type OrderParams, type OrderValidationItem, type OrderValidationResult, type OrderbookData, type OrderbookOptions, type OrderlyConfigContextState, OrderlyConfigProvider, OrderlyContext, OrderlyProvider, type PosterLayoutConfig, type PriceMode, type Recent, RefferalAPI, type RestrictedInfoOptions, type RestrictedInfoReturns, ScopeType, type StatusInfo, StatusProvider, type SymbolsInfo, TWType, type UseChainsOptions, type UseChainsReturnObject, type UseOrderEntryMetaState, WalletConnectorContext, type WalletConnectorContextState, type WalletRewards, type WalletRewardsHistoryReturns, type WalletRewardsItem, type WalletState, WsNetworkStatus, type chainFilter, type chainFilterFunc, checkNotional, cleanStringStyle, fetcher, type filteredChains$1 as filteredChains, findPositionTPSLFromOrders, findTPSLFromOrder, findTPSLOrderPriceFromOrder, getMinNotional, getPriceKey, noCacheConfig, parseJSON, useAccount, useAccountInfo, useAccountInstance, useAccountRewardsHistory, useAllBrokers, useApiKeyManager, useAssetsHistory, useAudioPlayer, useBalanceSubscription, useBalanceTopic, useBoolean, useChain, useChains, useCheckReferralCode, useCollateral, useCommission, useComputedLTV, useConfig, useConvert, useCurEpochEstimate, useDaily, useDeposit, useDistribution, useDistributionHistory, useEpochInfo, useEventEmitter, useFeeState, useFundingDetails, useFundingFeeHistory, useFundingRate, useFundingRateHistory, useFundingRates, useFundingRatesStore, useGetClaimed, useGetEnv, useGetReferralCode, useHoldingStream, useIndexPrice, useIndexPricesStream, useInfiniteQuery, useInternalTransfer, useKeyStore, useLazyQuery, useLeverage, useLocalStorage, useMaintenanceStatus, useMarginRatio, useMarkPrice, useMarkPriceBySymbol, useMarkPricesStream, useMarket, useMarketList, useMarketMap, useMarketTradeStream, useMarkets, useMarketsStore, useMarketsStream, useMaxQty, useMediaQuery, useMemoizedFn, useMutation, useNetworkInfo, useOdosQuote, useOrderEntity, useOrderEntry, useOrderEntry$1 as useOrderEntry_deprecated, useOrderStore, useOrderStream, useOrderbookStream, useOrderlyContext, usePositionActions, usePositionClose, usePositionStream, usePoster, usePreLoadData, usePrivateDataObserver, usePrivateInfiniteQuery, usePrivateQuery, useQuery, type useQueryOptions, useRefereeHistory, useRefereeInfo, useRefereeRebateSummary, useReferralInfo, useReferralRebateSummary, useRestrictedInfo, useSessionStorage, useSettleSubscription, useSimpleDI, useStatisticsDaily, useStorageChain, useStorageLedgerAddress, useSubAccountDataObserver, useSubAccountMaxWithdrawal, useSubAccountMutation, useSubAccountQuery, useSubAccountWS, useSymbolLeverage, useSymbolPriceRange, useSymbolsInfo, useSymbolsInfoStore, useTPSLOrder, useTickerStream, useTokenInfo, useTokensInfo, useTrack, useTrackingInstance, useTradingRewardsStatus, useTransfer, useTransferHistory, useUpdatedRef, useVaultsHistory, useWS, useWalletConnector, useWalletRewardsHistory, useWalletSubscription, useWalletTopic, useWithdraw, useWsStatus, index as utils, _default as version };
|
|
2421
|
+
export { type APIKeyItem, type AccountRewardsHistory, type AccountRewardsHistoryRow, type Brokers, type Chain, type Chains, type CheckReferralCodeReturns, type CollateralOutputs, type ComputedAlgoOrder, type ConfigProviderProps, type ConnectedChain, type CurrentEpochEstimate, DefaultLayoutConfig, DistributionId, type DrawOptions, ENVType, type EpochInfoItem, type EpochInfoType, EpochStatus, type ExclusiveConfigProviderProps, ExtendedConfigStore, type Favorite, type FavoriteTab, type FundingRates, MaintenanceStatus, type MarginRatioReturn, type MarketsItem, MarketsStorageKey, type MarketsStore, MarketsType, type NewListing, ORDERLY_ORDERBOOK_DEPTH_KEY, type OrderBookItem, type OrderEntryReturn, type OrderMetadata, type OrderMetadataConfig, type OrderParams, type OrderValidationItem, type OrderValidationResult, type OrderbookData, type OrderbookOptions, type OrderlyConfigContextState, OrderlyConfigProvider, OrderlyContext, OrderlyProvider, type PosterLayoutConfig, type PriceMode, type Recent, RefferalAPI, type RestrictedInfoOptions, type RestrictedInfoReturns, ScopeType, type StatusInfo, StatusProvider, type SymbolsInfo, TWType, type UseChainsOptions, type UseChainsReturnObject, type UseOrderEntryMetaState, WalletConnectorContext, type WalletConnectorContextState, type WalletRewards, type WalletRewardsHistoryReturns, type WalletRewardsItem, type WalletState, WsNetworkStatus, type chainFilter, type chainFilterFunc, checkNotional, cleanStringStyle, fetcher, type filteredChains$1 as filteredChains, findPositionTPSLFromOrders, findTPSLFromOrder, findTPSLOrderPriceFromOrder, getMinNotional, getPriceKey, noCacheConfig, parseJSON, useAccount, useAccountInfo, useAccountInstance, useAccountRewardsHistory, useAllBrokers, useApiKeyManager, useAssetsHistory, useAudioPlayer, useBalanceSubscription, useBalanceTopic, useBoolean, useChain, useChainInfo, useChains, useCheckReferralCode, useCollateral, useCommission, useComputedLTV, useConfig, useConvert, useCurEpochEstimate, useDaily, useDeposit, useDistribution, useDistributionHistory, useEpochInfo, useEventEmitter, useFeeState, useFundingDetails, useFundingFeeHistory, useFundingRate, useFundingRateHistory, useFundingRates, useFundingRatesStore, useGetClaimed, useGetEnv, useGetReferralCode, useHoldingStream, useIndexPrice, useIndexPricesStream, useInfiniteQuery, useInternalTransfer, useKeyStore, useLazyQuery, useLeverage, useLeverageBySymbol, useLocalStorage, useMaintenanceStatus, useMarginRatio, useMarkPrice, useMarkPriceBySymbol, useMarkPricesStream, useMarket, useMarketList, useMarketMap, useMarketTradeStream, useMarkets, useMarketsStore, useMarketsStream, useMaxLeverage, useMaxQty, useMediaQuery, useMemoizedFn, useMutation, useNetworkInfo, useOdosQuote, useOrderEntity, useOrderEntry, useOrderEntry$1 as useOrderEntry_deprecated, useOrderStore, useOrderStream, useOrderbookStream, useOrderlyContext, usePortfolio, usePositionActions, usePositionClose, usePositionStream, usePoster, usePreLoadData, usePrivateDataObserver, usePrivateInfiniteQuery, usePrivateQuery, useQuery, type useQueryOptions, useRefereeHistory, useRefereeInfo, useRefereeRebateSummary, useReferralInfo, useReferralRebateSummary, useRestrictedInfo, useSessionStorage, useSettleSubscription, useSimpleDI, useStatisticsDaily, useStorageChain, useStorageLedgerAddress, useSubAccountDataObserver, useSubAccountMaxWithdrawal, useSubAccountMutation, useSubAccountQuery, useSubAccountWS, useSymbolInfo, useSymbolLeverage, useSymbolPriceRange, useSymbolsInfo, useSymbolsInfoStore, useTPSLOrder, useTickerStream, useTokenInfo, useTokensInfo, useTrack, useTrackingInstance, useTradingRewardsStatus, useTransfer, useTransferHistory, useUpdatedRef, useVaultsHistory, useWS, useWalletConnector, useWalletRewardsHistory, useWalletSubscription, useWalletTopic, useWithdraw, useWsStatus, index as utils, _default as version };
|