@orderly.network/hooks 2.7.4 → 2.8.0-alpha.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 +108 -3
- package/dist/index.d.ts +108 -3
- package/dist/index.js +310 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +301 -42
- 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.8.0-alpha.0";
|
|
37
37
|
|
|
38
38
|
declare const fetcher: (url: string, init: RequestInit | undefined, queryOptions: useQueryOptions<any>) => Promise<any>;
|
|
39
39
|
type useQueryOptions<T> = SWRConfiguration & {
|
|
@@ -382,6 +382,10 @@ declare const useFeeState: () => {
|
|
|
382
382
|
readonly refereeRebate: number | undefined;
|
|
383
383
|
readonly effectiveTakerFee: string;
|
|
384
384
|
readonly effectiveMakerFee: string;
|
|
385
|
+
readonly rwaTakerFee: string;
|
|
386
|
+
readonly rwaMakerFee: string;
|
|
387
|
+
readonly rwaEffectiveTakerFee: string;
|
|
388
|
+
readonly rwaEffectiveMakerFee: string;
|
|
385
389
|
};
|
|
386
390
|
|
|
387
391
|
declare const useTrack: () => {
|
|
@@ -739,7 +743,8 @@ declare enum MarketsType {
|
|
|
739
743
|
FAVORITES = 0,
|
|
740
744
|
RECENT = 1,
|
|
741
745
|
ALL = 2,
|
|
742
|
-
|
|
746
|
+
RWA = 3,
|
|
747
|
+
NEW_LISTING = 4
|
|
743
748
|
}
|
|
744
749
|
interface FavoriteTab {
|
|
745
750
|
name: string;
|
|
@@ -782,6 +787,10 @@ type MarketsItem = {
|
|
|
782
787
|
openInterest: number;
|
|
783
788
|
isFavorite: boolean;
|
|
784
789
|
leverage?: number;
|
|
790
|
+
isRwa: boolean;
|
|
791
|
+
rwaNextOpen?: number;
|
|
792
|
+
rwaNextClose?: number;
|
|
793
|
+
rwaStatus?: "open" | "close";
|
|
785
794
|
};
|
|
786
795
|
type MarketsStore = ReturnType<typeof useMarketsStore>;
|
|
787
796
|
declare const MarketsStorageKey = "orderly_markets";
|
|
@@ -1658,6 +1667,102 @@ declare const useTokensInfo: () => API.Chain[];
|
|
|
1658
1667
|
*/
|
|
1659
1668
|
declare const useTokenInfo: (token: string) => API.Chain | undefined;
|
|
1660
1669
|
|
|
1670
|
+
/**
|
|
1671
|
+
* Check if currently trading based on next_open/next_close timestamps
|
|
1672
|
+
* @param nextOpen - Next open time timestamp
|
|
1673
|
+
* @param nextClose - Next close time timestamp
|
|
1674
|
+
* @param currentTime - Current time timestamp
|
|
1675
|
+
* @returns boolean - true if currently trading
|
|
1676
|
+
*/
|
|
1677
|
+
declare const isCurrentlyTrading: (nextClose: number, status: "open" | "close", currentTime?: number) => boolean;
|
|
1678
|
+
declare const isCurrentlyClosed: (nextOpen: number, status: "open" | "close", currentTime?: number) => boolean;
|
|
1679
|
+
/**
|
|
1680
|
+
* Type alias for the return type of useSymbolsInfo hook
|
|
1681
|
+
*/
|
|
1682
|
+
type RwaSymbolsInfo = ReturnType<typeof useRwaSymbolsInfo>;
|
|
1683
|
+
/**
|
|
1684
|
+
* A hook that provides access to symbol information.
|
|
1685
|
+
*
|
|
1686
|
+
* @returns A getter object that provides access to symbol information.
|
|
1687
|
+
* The getter allows accessing symbol data either by symbol name directly,
|
|
1688
|
+
* or through a two-level access pattern (symbol and property).
|
|
1689
|
+
*
|
|
1690
|
+
* @example
|
|
1691
|
+
* ```typescript
|
|
1692
|
+
* const rwaSymbolsInfo = useRwaSymbolsInfo();
|
|
1693
|
+
*
|
|
1694
|
+
* // Get all info for a symbol
|
|
1695
|
+
* const ethInfo = rwaSymbolsInfo["PERP_ETH_USDC"]();
|
|
1696
|
+
* ```
|
|
1697
|
+
*/
|
|
1698
|
+
declare const useRwaSymbolsInfo: () => Record<string, <Key extends keyof API.RwaSymbol>(key: Key, defaultValue?: API.RwaSymbol[Key] | undefined) => API.RwaSymbol[Key]> & Record<string, () => API.RwaSymbol> & {
|
|
1699
|
+
isNil: boolean;
|
|
1700
|
+
};
|
|
1701
|
+
declare const useRwaSymbolsInfoStore: () => Record<string, API.RwaSymbol> | undefined;
|
|
1702
|
+
/**
|
|
1703
|
+
* Return type definition for the hook
|
|
1704
|
+
*
|
|
1705
|
+
* - isRwa: true if the symbol is an RWA symbol
|
|
1706
|
+
* - open: true if the symbol is open for trading
|
|
1707
|
+
* - nextOpen: the next open time in milliseconds
|
|
1708
|
+
* - nextClose: the next close time in milliseconds
|
|
1709
|
+
* - closeTimeInterval: the time interval in seconds until the symbol closes (countdown format)
|
|
1710
|
+
* - openTimeInterval: the time interval in seconds until the symbol opens (countdown format)
|
|
1711
|
+
*/
|
|
1712
|
+
interface RwaSymbolResult {
|
|
1713
|
+
isRwa: boolean;
|
|
1714
|
+
open?: boolean;
|
|
1715
|
+
nextOpen?: number;
|
|
1716
|
+
nextClose?: number;
|
|
1717
|
+
closeTimeInterval?: number;
|
|
1718
|
+
openTimeInterval?: number;
|
|
1719
|
+
}
|
|
1720
|
+
/**
|
|
1721
|
+
* Hook to initialize and manage the global timer
|
|
1722
|
+
* This hook should be called once at the top level of the application to start and manage the global timer
|
|
1723
|
+
*/
|
|
1724
|
+
declare const useInitRwaSymbolsRuntime: () => void;
|
|
1725
|
+
/**
|
|
1726
|
+
* Hook to get current RWA symbol information with real-time updates
|
|
1727
|
+
* Retrieves the state of a specific symbol from the centralized store
|
|
1728
|
+
* @param symbol - The symbol to query
|
|
1729
|
+
* @returns RwaSymbolResult containing RWA status and countdown information
|
|
1730
|
+
*/
|
|
1731
|
+
declare const useGetRwaSymbolInfo: (symbol: string) => RwaSymbolResult;
|
|
1732
|
+
/**
|
|
1733
|
+
* Simplified hook to get RWA symbol open status with real-time updates
|
|
1734
|
+
* @param symbol - The symbol to query
|
|
1735
|
+
* @returns Object containing isRwa and open status
|
|
1736
|
+
*/
|
|
1737
|
+
declare const useGetRwaSymbolOpenStatus: (symbol: string) => {
|
|
1738
|
+
isRwa: boolean;
|
|
1739
|
+
open?: boolean;
|
|
1740
|
+
};
|
|
1741
|
+
/**
|
|
1742
|
+
* Hook to get RWA symbol close time interval with filtering
|
|
1743
|
+
* @param symbol - The symbol to query
|
|
1744
|
+
* @param thresholdMinutes - Time threshold in minutes, defaults to 30
|
|
1745
|
+
* @returns Close time interval in seconds, or undefined if not within threshold
|
|
1746
|
+
*/
|
|
1747
|
+
declare const useGetRwaSymbolCloseTimeInterval: (symbol: string, thresholdMinutes?: number) => {
|
|
1748
|
+
isRwa: boolean;
|
|
1749
|
+
open?: boolean;
|
|
1750
|
+
closeTimeInterval?: number;
|
|
1751
|
+
nextClose?: number;
|
|
1752
|
+
};
|
|
1753
|
+
/**
|
|
1754
|
+
* Hook to get RWA symbol open time interval with filtering
|
|
1755
|
+
* @param symbol - The symbol to query
|
|
1756
|
+
* @param thresholdMinutes - Time threshold in minutes, defaults to 30
|
|
1757
|
+
* @returns Open time interval in seconds, or undefined if not within threshold
|
|
1758
|
+
*/
|
|
1759
|
+
declare const useGetRwaSymbolOpenTimeInterval: (symbol: string, thresholdMinutes?: number) => {
|
|
1760
|
+
isRwa: boolean;
|
|
1761
|
+
open?: boolean;
|
|
1762
|
+
openTimeInterval?: number;
|
|
1763
|
+
nextOpen?: number;
|
|
1764
|
+
};
|
|
1765
|
+
|
|
1661
1766
|
type Portfolio$1 = {
|
|
1662
1767
|
holding?: API.Holding[];
|
|
1663
1768
|
totalCollateral: Decimal;
|
|
@@ -2431,4 +2536,4 @@ declare const usePositionClose: (options: PositionCloseOptions) => {
|
|
|
2431
2536
|
declare const useMarketList: () => API.MarketInfoExt[];
|
|
2432
2537
|
declare const useMarketMap: () => Record<string, API.MarketInfoExt> | null;
|
|
2433
2538
|
|
|
2434
|
-
export { type APIKeyItem, type AccountRewardsHistory, type AccountRewardsHistoryRow, type Brokers, type Chain, type ChainFilter, 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 FilteredChains, 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, checkNotional, cleanStringStyle, fetcher, 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, useMaxWithdrawal, 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 };
|
|
2539
|
+
export { type APIKeyItem, type AccountRewardsHistory, type AccountRewardsHistoryRow, type Brokers, type Chain, type ChainFilter, 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 FilteredChains, 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, type RwaSymbolResult, type RwaSymbolsInfo, 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, checkNotional, cleanStringStyle, fetcher, findPositionTPSLFromOrders, findTPSLFromOrder, findTPSLOrderPriceFromOrder, getMinNotional, getPriceKey, isCurrentlyClosed, isCurrentlyTrading, 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, useGetRwaSymbolCloseTimeInterval, useGetRwaSymbolInfo, useGetRwaSymbolOpenStatus, useGetRwaSymbolOpenTimeInterval, useHoldingStream, useIndexPrice, useIndexPricesStream, useInfiniteQuery, useInitRwaSymbolsRuntime, useInternalTransfer, useKeyStore, useLazyQuery, useLeverage, useLeverageBySymbol, useLocalStorage, useMaintenanceStatus, useMarginRatio, useMarkPrice, useMarkPriceBySymbol, useMarkPricesStream, useMarket, useMarketList, useMarketMap, useMarketTradeStream, useMarkets, useMarketsStore, useMarketsStream, useMaxLeverage, useMaxQty, useMaxWithdrawal, 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, useRwaSymbolsInfo, useRwaSymbolsInfoStore, 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.8.0-alpha.0";
|
|
37
37
|
|
|
38
38
|
declare const fetcher: (url: string, init: RequestInit | undefined, queryOptions: useQueryOptions<any>) => Promise<any>;
|
|
39
39
|
type useQueryOptions<T> = SWRConfiguration & {
|
|
@@ -382,6 +382,10 @@ declare const useFeeState: () => {
|
|
|
382
382
|
readonly refereeRebate: number | undefined;
|
|
383
383
|
readonly effectiveTakerFee: string;
|
|
384
384
|
readonly effectiveMakerFee: string;
|
|
385
|
+
readonly rwaTakerFee: string;
|
|
386
|
+
readonly rwaMakerFee: string;
|
|
387
|
+
readonly rwaEffectiveTakerFee: string;
|
|
388
|
+
readonly rwaEffectiveMakerFee: string;
|
|
385
389
|
};
|
|
386
390
|
|
|
387
391
|
declare const useTrack: () => {
|
|
@@ -739,7 +743,8 @@ declare enum MarketsType {
|
|
|
739
743
|
FAVORITES = 0,
|
|
740
744
|
RECENT = 1,
|
|
741
745
|
ALL = 2,
|
|
742
|
-
|
|
746
|
+
RWA = 3,
|
|
747
|
+
NEW_LISTING = 4
|
|
743
748
|
}
|
|
744
749
|
interface FavoriteTab {
|
|
745
750
|
name: string;
|
|
@@ -782,6 +787,10 @@ type MarketsItem = {
|
|
|
782
787
|
openInterest: number;
|
|
783
788
|
isFavorite: boolean;
|
|
784
789
|
leverage?: number;
|
|
790
|
+
isRwa: boolean;
|
|
791
|
+
rwaNextOpen?: number;
|
|
792
|
+
rwaNextClose?: number;
|
|
793
|
+
rwaStatus?: "open" | "close";
|
|
785
794
|
};
|
|
786
795
|
type MarketsStore = ReturnType<typeof useMarketsStore>;
|
|
787
796
|
declare const MarketsStorageKey = "orderly_markets";
|
|
@@ -1658,6 +1667,102 @@ declare const useTokensInfo: () => API.Chain[];
|
|
|
1658
1667
|
*/
|
|
1659
1668
|
declare const useTokenInfo: (token: string) => API.Chain | undefined;
|
|
1660
1669
|
|
|
1670
|
+
/**
|
|
1671
|
+
* Check if currently trading based on next_open/next_close timestamps
|
|
1672
|
+
* @param nextOpen - Next open time timestamp
|
|
1673
|
+
* @param nextClose - Next close time timestamp
|
|
1674
|
+
* @param currentTime - Current time timestamp
|
|
1675
|
+
* @returns boolean - true if currently trading
|
|
1676
|
+
*/
|
|
1677
|
+
declare const isCurrentlyTrading: (nextClose: number, status: "open" | "close", currentTime?: number) => boolean;
|
|
1678
|
+
declare const isCurrentlyClosed: (nextOpen: number, status: "open" | "close", currentTime?: number) => boolean;
|
|
1679
|
+
/**
|
|
1680
|
+
* Type alias for the return type of useSymbolsInfo hook
|
|
1681
|
+
*/
|
|
1682
|
+
type RwaSymbolsInfo = ReturnType<typeof useRwaSymbolsInfo>;
|
|
1683
|
+
/**
|
|
1684
|
+
* A hook that provides access to symbol information.
|
|
1685
|
+
*
|
|
1686
|
+
* @returns A getter object that provides access to symbol information.
|
|
1687
|
+
* The getter allows accessing symbol data either by symbol name directly,
|
|
1688
|
+
* or through a two-level access pattern (symbol and property).
|
|
1689
|
+
*
|
|
1690
|
+
* @example
|
|
1691
|
+
* ```typescript
|
|
1692
|
+
* const rwaSymbolsInfo = useRwaSymbolsInfo();
|
|
1693
|
+
*
|
|
1694
|
+
* // Get all info for a symbol
|
|
1695
|
+
* const ethInfo = rwaSymbolsInfo["PERP_ETH_USDC"]();
|
|
1696
|
+
* ```
|
|
1697
|
+
*/
|
|
1698
|
+
declare const useRwaSymbolsInfo: () => Record<string, <Key extends keyof API.RwaSymbol>(key: Key, defaultValue?: API.RwaSymbol[Key] | undefined) => API.RwaSymbol[Key]> & Record<string, () => API.RwaSymbol> & {
|
|
1699
|
+
isNil: boolean;
|
|
1700
|
+
};
|
|
1701
|
+
declare const useRwaSymbolsInfoStore: () => Record<string, API.RwaSymbol> | undefined;
|
|
1702
|
+
/**
|
|
1703
|
+
* Return type definition for the hook
|
|
1704
|
+
*
|
|
1705
|
+
* - isRwa: true if the symbol is an RWA symbol
|
|
1706
|
+
* - open: true if the symbol is open for trading
|
|
1707
|
+
* - nextOpen: the next open time in milliseconds
|
|
1708
|
+
* - nextClose: the next close time in milliseconds
|
|
1709
|
+
* - closeTimeInterval: the time interval in seconds until the symbol closes (countdown format)
|
|
1710
|
+
* - openTimeInterval: the time interval in seconds until the symbol opens (countdown format)
|
|
1711
|
+
*/
|
|
1712
|
+
interface RwaSymbolResult {
|
|
1713
|
+
isRwa: boolean;
|
|
1714
|
+
open?: boolean;
|
|
1715
|
+
nextOpen?: number;
|
|
1716
|
+
nextClose?: number;
|
|
1717
|
+
closeTimeInterval?: number;
|
|
1718
|
+
openTimeInterval?: number;
|
|
1719
|
+
}
|
|
1720
|
+
/**
|
|
1721
|
+
* Hook to initialize and manage the global timer
|
|
1722
|
+
* This hook should be called once at the top level of the application to start and manage the global timer
|
|
1723
|
+
*/
|
|
1724
|
+
declare const useInitRwaSymbolsRuntime: () => void;
|
|
1725
|
+
/**
|
|
1726
|
+
* Hook to get current RWA symbol information with real-time updates
|
|
1727
|
+
* Retrieves the state of a specific symbol from the centralized store
|
|
1728
|
+
* @param symbol - The symbol to query
|
|
1729
|
+
* @returns RwaSymbolResult containing RWA status and countdown information
|
|
1730
|
+
*/
|
|
1731
|
+
declare const useGetRwaSymbolInfo: (symbol: string) => RwaSymbolResult;
|
|
1732
|
+
/**
|
|
1733
|
+
* Simplified hook to get RWA symbol open status with real-time updates
|
|
1734
|
+
* @param symbol - The symbol to query
|
|
1735
|
+
* @returns Object containing isRwa and open status
|
|
1736
|
+
*/
|
|
1737
|
+
declare const useGetRwaSymbolOpenStatus: (symbol: string) => {
|
|
1738
|
+
isRwa: boolean;
|
|
1739
|
+
open?: boolean;
|
|
1740
|
+
};
|
|
1741
|
+
/**
|
|
1742
|
+
* Hook to get RWA symbol close time interval with filtering
|
|
1743
|
+
* @param symbol - The symbol to query
|
|
1744
|
+
* @param thresholdMinutes - Time threshold in minutes, defaults to 30
|
|
1745
|
+
* @returns Close time interval in seconds, or undefined if not within threshold
|
|
1746
|
+
*/
|
|
1747
|
+
declare const useGetRwaSymbolCloseTimeInterval: (symbol: string, thresholdMinutes?: number) => {
|
|
1748
|
+
isRwa: boolean;
|
|
1749
|
+
open?: boolean;
|
|
1750
|
+
closeTimeInterval?: number;
|
|
1751
|
+
nextClose?: number;
|
|
1752
|
+
};
|
|
1753
|
+
/**
|
|
1754
|
+
* Hook to get RWA symbol open time interval with filtering
|
|
1755
|
+
* @param symbol - The symbol to query
|
|
1756
|
+
* @param thresholdMinutes - Time threshold in minutes, defaults to 30
|
|
1757
|
+
* @returns Open time interval in seconds, or undefined if not within threshold
|
|
1758
|
+
*/
|
|
1759
|
+
declare const useGetRwaSymbolOpenTimeInterval: (symbol: string, thresholdMinutes?: number) => {
|
|
1760
|
+
isRwa: boolean;
|
|
1761
|
+
open?: boolean;
|
|
1762
|
+
openTimeInterval?: number;
|
|
1763
|
+
nextOpen?: number;
|
|
1764
|
+
};
|
|
1765
|
+
|
|
1661
1766
|
type Portfolio$1 = {
|
|
1662
1767
|
holding?: API.Holding[];
|
|
1663
1768
|
totalCollateral: Decimal;
|
|
@@ -2431,4 +2536,4 @@ declare const usePositionClose: (options: PositionCloseOptions) => {
|
|
|
2431
2536
|
declare const useMarketList: () => API.MarketInfoExt[];
|
|
2432
2537
|
declare const useMarketMap: () => Record<string, API.MarketInfoExt> | null;
|
|
2433
2538
|
|
|
2434
|
-
export { type APIKeyItem, type AccountRewardsHistory, type AccountRewardsHistoryRow, type Brokers, type Chain, type ChainFilter, 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 FilteredChains, 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, checkNotional, cleanStringStyle, fetcher, 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, useMaxWithdrawal, 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 };
|
|
2539
|
+
export { type APIKeyItem, type AccountRewardsHistory, type AccountRewardsHistoryRow, type Brokers, type Chain, type ChainFilter, 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 FilteredChains, 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, type RwaSymbolResult, type RwaSymbolsInfo, 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, checkNotional, cleanStringStyle, fetcher, findPositionTPSLFromOrders, findTPSLFromOrder, findTPSLOrderPriceFromOrder, getMinNotional, getPriceKey, isCurrentlyClosed, isCurrentlyTrading, 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, useGetRwaSymbolCloseTimeInterval, useGetRwaSymbolInfo, useGetRwaSymbolOpenStatus, useGetRwaSymbolOpenTimeInterval, useHoldingStream, useIndexPrice, useIndexPricesStream, useInfiniteQuery, useInitRwaSymbolsRuntime, useInternalTransfer, useKeyStore, useLazyQuery, useLeverage, useLeverageBySymbol, useLocalStorage, useMaintenanceStatus, useMarginRatio, useMarkPrice, useMarkPriceBySymbol, useMarkPricesStream, useMarket, useMarketList, useMarketMap, useMarketTradeStream, useMarkets, useMarketsStore, useMarketsStream, useMaxLeverage, useMaxQty, useMaxWithdrawal, 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, useRwaSymbolsInfo, useRwaSymbolsInfoStore, 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 };
|