@kodiak-finance/orderly-types 2.8.18 → 2.8.19

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
@@ -109,7 +109,7 @@ declare const ArbitrumSepoliaTokenInfo: {
109
109
  cross_chain_withdrawal_fee: number;
110
110
  display_name: string;
111
111
  };
112
- declare const TesntTokenFallback: (testnetTokens: any) => {
112
+ declare const TesnetTokenFallback: (testnetTokens: any) => {
113
113
  token: string;
114
114
  token_hash: string;
115
115
  decimals: number;
@@ -250,8 +250,6 @@ interface BracketOrder extends AlgoOrder, OrderExt {
250
250
  * Computed take profit
251
251
  */
252
252
  position_type?: PositionType;
253
- tp_enable?: boolean;
254
- sl_enable?: boolean;
255
253
  tp_pnl?: string;
256
254
  tp_offset?: string;
257
255
  tp_offset_percentage?: string;
@@ -364,11 +362,9 @@ interface BaseAlgoOrderEntity<T extends AlgoOrderRootType> extends OrderEntity {
364
362
  tp_order_type?: OrderType;
365
363
  sl_order_price?: string | number;
366
364
  sl_order_type?: OrderType;
367
- tp_enable?: boolean;
368
- sl_enable?: boolean;
369
365
  position_type?: PositionType;
370
366
  }
371
- type AlgoOrderEntity<T extends AlgoOrderRootType = AlgoOrderRootType.STOP> = T extends AlgoOrderRootType.TP_SL ? Optional<BaseAlgoOrderEntity<T>, "side" | "type" | "trigger_price" | "order_type"> : T extends AlgoOrderRootType.POSITIONAL_TP_SL ? Optional<BaseAlgoOrderEntity<T>, "side" | "type" | "trigger_price" | "order_type" | "quantity" | "tp_enable" | "sl_enable" | "tp_order_price" | "tp_order_type" | "sl_order_price" | "sl_order_type" | "position_type"> : Omit<BaseAlgoOrderEntity<T>, "child_orders" | "order_type">;
367
+ type AlgoOrderEntity<T extends AlgoOrderRootType = AlgoOrderRootType.STOP> = T extends AlgoOrderRootType.TP_SL ? Optional<BaseAlgoOrderEntity<T>, "side" | "type" | "trigger_price" | "order_type"> : T extends AlgoOrderRootType.POSITIONAL_TP_SL ? Optional<BaseAlgoOrderEntity<T>, "side" | "type" | "trigger_price" | "order_type" | "quantity" | "tp_order_price" | "tp_order_type" | "sl_order_price" | "sl_order_type" | "position_type"> : Omit<BaseAlgoOrderEntity<T>, "child_orders" | "order_type">;
372
368
  type TPSLOrderEntry = Optional<AlgoOrderEntity<AlgoOrderRootType.TP_SL>, "side" | "type" | "trigger_price">;
373
369
  type BracketOrderEntry = Optional<AlgoOrderEntity<AlgoOrderRootType.BRACKET>, "side">;
374
370
 
@@ -388,6 +384,12 @@ declare namespace API {
388
384
  token_hash: string;
389
385
  decimals: number;
390
386
  minimum_withdraw_amount: number;
387
+ base_weight: number;
388
+ discount_factor: number;
389
+ haircut: number;
390
+ user_max_qty: number;
391
+ is_collateral: boolean;
392
+ on_chain_swap: boolean;
391
393
  chain_details: ChainDetail[];
392
394
  }
393
395
  interface ChainDetail {
@@ -427,6 +429,7 @@ declare namespace API {
427
429
  url?: string | null;
428
430
  type?: AnnouncementType | null;
429
431
  updated_time?: number | null;
432
+ coverImage?: string;
430
433
  }
431
434
  interface Announcement {
432
435
  last_updated_time?: number | null;
@@ -480,6 +483,16 @@ declare namespace API {
480
483
  type: string;
481
484
  name: string;
482
485
  }
486
+ interface RwaSymbol {
487
+ symbol: string;
488
+ status: "open" | "close";
489
+ next_open: number;
490
+ next_close: number;
491
+ base: string;
492
+ quote: string;
493
+ type: string;
494
+ name: string;
495
+ }
483
496
  interface Order {
484
497
  symbol: string;
485
498
  status: string;
@@ -721,6 +734,8 @@ declare namespace API {
721
734
  maintenance_cancel_orders: boolean;
722
735
  taker_fee_rate: number;
723
736
  maker_fee_rate: number;
737
+ rwa_taker_fee_rate?: number;
738
+ rwa_maker_fee_rate?: number;
724
739
  max_leverage: number;
725
740
  futures_taker_fee_rate: number;
726
741
  futures_maker_fee_rate: number;
@@ -1064,6 +1079,17 @@ declare namespace WSMessage {
1064
1079
  }
1065
1080
  }
1066
1081
 
1082
+ type RouteOption = {
1083
+ href: string;
1084
+ name: string;
1085
+ scope?: string;
1086
+ target?: string;
1087
+ };
1088
+ type RouterAdapter = {
1089
+ onRouteChange: (option: RouteOption) => void;
1090
+ currentPath?: string;
1091
+ };
1092
+
1067
1093
  declare enum WithdrawStatus {
1068
1094
  NotSupported = "NotSupported",
1069
1095
  NotConnected = "NotConnected",
@@ -1731,7 +1757,8 @@ declare enum TrackerEventName {
1731
1757
  vaultDepositFailed = "vault_deposit_failed",
1732
1758
  vaultWithdrawSuccess = "vault_withdraw_success",
1733
1759
  vaultWithdrawFailed = "vault_withdraw_failed",
1734
- clickBBOButton = "click_bbo_button"
1760
+ clickBBOButton = "click_bbo_button",
1761
+ confirmCloseAllPositions = "confirm_close_all_positions"
1735
1762
  }
1736
1763
 
1737
1764
  type CurrentChain = {
@@ -1896,4 +1923,4 @@ declare enum AssetHistorySideEnum {
1896
1923
 
1897
1924
  declare const DEFAUL_ORDERLY_KEY_SCOPE = "read,trading";
1898
1925
 
1899
- export { ABSTRACT_CHAIN_ID_MAP, ABSTRACT_MAINNET_CHAINID, ABSTRACT_TESTNET_CHAINID, API, ARBITRUM_MAINNET_CHAINID, ARBITRUM_MAINNET_CHAINID_HEX, ARBITRUM_TESTNET_CHAINID, ARBITRUM_TESTNET_CHAINID_HEX, AbstractChains, AbstractTestnetChainInfo, AbstractTestnetTokenInfo, AccountStatusEnum, type AlgoOrder, type AlgoOrderChildOrders, type AlgoOrderEntity, AlgoOrderRootType, AlgoOrderType, AnnouncementType, ApiError, Arbitrum, ArbitrumGoerli, ArbitrumSepolia, ArbitrumSepoliaChainInfo, ArbitrumSepoliaTokenInfo, AssetHistorySideEnum, AssetHistoryStatusEnum, Avalanche, BBOOrderType, BNB, BSC_TESTNET_CHAINID, Base, type BaseAlgoOrderEntity, type BaseOrder, BaseSepolia, type BracketOrder, type BracketOrderEntry, type Chain, type Chain as ChainConfig, type ChainInfo, ChainKey, ChainNamespace, type ChildOrder, ConnectorKey, type CurrentChain, DEFAUL_ORDERLY_KEY_SCOPE, DEPOSIT_FEE_RATE, DistributionType, EMPTY_LIST, EMPTY_OBJECT, EMPTY_OPERATION, ETHEREUM_MAINNET_CHAINID, Ethereum, ExchangeStatusEnum, Fantom, Fuji, LedgerWalletKey, Linea, LinkDeviceKey, MANTLE_TESTNET_CHAINID, MANTLE_TESTNET_CHAINID_HEX, MEDIA_TABLET, MONAD_TESTNET_CHAINID, Mantle, MantleSepolia, MaxUint256, type NativeCurrency, type NetworkId, NetworkStatusEnum, Optimism, OptimismGoerli, OptimismSepolia, type Optional, type OrderEntity, OrderEntrySortKeys, OrderLevel, OrderSide, OrderStatus, OrderType, type OrderlyOrder, Polygon, PolygonAmoy, PolygonzkEVM, PositionSide, PositionType, type RegularOrder, type RequireKeys, SDKError, SOLANA_MAINNET_CHAINID, SOLANA_TESTNET_CHAINID, STORY_TESTNET_CHAINID, Sei, SolanaChains, SolanaDevnet, SolanaDevnetChainInfo, SolanaDevnetTokenInfo, StoryOdysseyTestnet, StoryTestnet, SystemStateEnum, type TPSLOrderEntry, TesntTokenFallback, TestnetChains, TrackerEventName, TradingviewFullscreenKey, TrailingCallbackType, TriggerPriceType, WSMessage, WS_WalletStatusEnum, WithdrawStatus, chainsInfoMap, defaultMainnetChains, defaultTestnetChains, definedTypes, isNativeTokenChecker, nativeETHAddress, nativeTokenAddress, _default as version, zkSyncEra };
1926
+ export { ABSTRACT_CHAIN_ID_MAP, ABSTRACT_MAINNET_CHAINID, ABSTRACT_TESTNET_CHAINID, API, ARBITRUM_MAINNET_CHAINID, ARBITRUM_MAINNET_CHAINID_HEX, ARBITRUM_TESTNET_CHAINID, ARBITRUM_TESTNET_CHAINID_HEX, AbstractChains, AbstractTestnetChainInfo, AbstractTestnetTokenInfo, AccountStatusEnum, type AlgoOrder, type AlgoOrderChildOrders, type AlgoOrderEntity, AlgoOrderRootType, AlgoOrderType, AnnouncementType, ApiError, Arbitrum, ArbitrumGoerli, ArbitrumSepolia, ArbitrumSepoliaChainInfo, ArbitrumSepoliaTokenInfo, AssetHistorySideEnum, AssetHistoryStatusEnum, Avalanche, BBOOrderType, BNB, BSC_TESTNET_CHAINID, Base, type BaseAlgoOrderEntity, type BaseOrder, BaseSepolia, type BracketOrder, type BracketOrderEntry, type Chain, type Chain as ChainConfig, type ChainInfo, ChainKey, ChainNamespace, type ChildOrder, ConnectorKey, type CurrentChain, DEFAUL_ORDERLY_KEY_SCOPE, DEPOSIT_FEE_RATE, DistributionType, EMPTY_LIST, EMPTY_OBJECT, EMPTY_OPERATION, ETHEREUM_MAINNET_CHAINID, Ethereum, ExchangeStatusEnum, Fantom, Fuji, LedgerWalletKey, Linea, LinkDeviceKey, MANTLE_TESTNET_CHAINID, MANTLE_TESTNET_CHAINID_HEX, MEDIA_TABLET, MONAD_TESTNET_CHAINID, Mantle, MantleSepolia, MaxUint256, type NativeCurrency, type NetworkId, NetworkStatusEnum, Optimism, OptimismGoerli, OptimismSepolia, type Optional, type OrderEntity, OrderEntrySortKeys, OrderLevel, OrderSide, OrderStatus, OrderType, type OrderlyOrder, Polygon, PolygonAmoy, PolygonzkEVM, PositionSide, PositionType, type RegularOrder, type RequireKeys, type RouteOption, type RouterAdapter, SDKError, SOLANA_MAINNET_CHAINID, SOLANA_TESTNET_CHAINID, STORY_TESTNET_CHAINID, Sei, SolanaChains, SolanaDevnet, SolanaDevnetChainInfo, SolanaDevnetTokenInfo, StoryOdysseyTestnet, StoryTestnet, SystemStateEnum, type TPSLOrderEntry, TesnetTokenFallback, TestnetChains, TrackerEventName, TradingviewFullscreenKey, TrailingCallbackType, TriggerPriceType, WSMessage, WS_WalletStatusEnum, WithdrawStatus, chainsInfoMap, defaultMainnetChains, defaultTestnetChains, definedTypes, isNativeTokenChecker, nativeETHAddress, nativeTokenAddress, _default as version, zkSyncEra };
package/dist/index.d.ts CHANGED
@@ -109,7 +109,7 @@ declare const ArbitrumSepoliaTokenInfo: {
109
109
  cross_chain_withdrawal_fee: number;
110
110
  display_name: string;
111
111
  };
112
- declare const TesntTokenFallback: (testnetTokens: any) => {
112
+ declare const TesnetTokenFallback: (testnetTokens: any) => {
113
113
  token: string;
114
114
  token_hash: string;
115
115
  decimals: number;
@@ -250,8 +250,6 @@ interface BracketOrder extends AlgoOrder, OrderExt {
250
250
  * Computed take profit
251
251
  */
252
252
  position_type?: PositionType;
253
- tp_enable?: boolean;
254
- sl_enable?: boolean;
255
253
  tp_pnl?: string;
256
254
  tp_offset?: string;
257
255
  tp_offset_percentage?: string;
@@ -364,11 +362,9 @@ interface BaseAlgoOrderEntity<T extends AlgoOrderRootType> extends OrderEntity {
364
362
  tp_order_type?: OrderType;
365
363
  sl_order_price?: string | number;
366
364
  sl_order_type?: OrderType;
367
- tp_enable?: boolean;
368
- sl_enable?: boolean;
369
365
  position_type?: PositionType;
370
366
  }
371
- type AlgoOrderEntity<T extends AlgoOrderRootType = AlgoOrderRootType.STOP> = T extends AlgoOrderRootType.TP_SL ? Optional<BaseAlgoOrderEntity<T>, "side" | "type" | "trigger_price" | "order_type"> : T extends AlgoOrderRootType.POSITIONAL_TP_SL ? Optional<BaseAlgoOrderEntity<T>, "side" | "type" | "trigger_price" | "order_type" | "quantity" | "tp_enable" | "sl_enable" | "tp_order_price" | "tp_order_type" | "sl_order_price" | "sl_order_type" | "position_type"> : Omit<BaseAlgoOrderEntity<T>, "child_orders" | "order_type">;
367
+ type AlgoOrderEntity<T extends AlgoOrderRootType = AlgoOrderRootType.STOP> = T extends AlgoOrderRootType.TP_SL ? Optional<BaseAlgoOrderEntity<T>, "side" | "type" | "trigger_price" | "order_type"> : T extends AlgoOrderRootType.POSITIONAL_TP_SL ? Optional<BaseAlgoOrderEntity<T>, "side" | "type" | "trigger_price" | "order_type" | "quantity" | "tp_order_price" | "tp_order_type" | "sl_order_price" | "sl_order_type" | "position_type"> : Omit<BaseAlgoOrderEntity<T>, "child_orders" | "order_type">;
372
368
  type TPSLOrderEntry = Optional<AlgoOrderEntity<AlgoOrderRootType.TP_SL>, "side" | "type" | "trigger_price">;
373
369
  type BracketOrderEntry = Optional<AlgoOrderEntity<AlgoOrderRootType.BRACKET>, "side">;
374
370
 
@@ -388,6 +384,12 @@ declare namespace API {
388
384
  token_hash: string;
389
385
  decimals: number;
390
386
  minimum_withdraw_amount: number;
387
+ base_weight: number;
388
+ discount_factor: number;
389
+ haircut: number;
390
+ user_max_qty: number;
391
+ is_collateral: boolean;
392
+ on_chain_swap: boolean;
391
393
  chain_details: ChainDetail[];
392
394
  }
393
395
  interface ChainDetail {
@@ -427,6 +429,7 @@ declare namespace API {
427
429
  url?: string | null;
428
430
  type?: AnnouncementType | null;
429
431
  updated_time?: number | null;
432
+ coverImage?: string;
430
433
  }
431
434
  interface Announcement {
432
435
  last_updated_time?: number | null;
@@ -480,6 +483,16 @@ declare namespace API {
480
483
  type: string;
481
484
  name: string;
482
485
  }
486
+ interface RwaSymbol {
487
+ symbol: string;
488
+ status: "open" | "close";
489
+ next_open: number;
490
+ next_close: number;
491
+ base: string;
492
+ quote: string;
493
+ type: string;
494
+ name: string;
495
+ }
483
496
  interface Order {
484
497
  symbol: string;
485
498
  status: string;
@@ -721,6 +734,8 @@ declare namespace API {
721
734
  maintenance_cancel_orders: boolean;
722
735
  taker_fee_rate: number;
723
736
  maker_fee_rate: number;
737
+ rwa_taker_fee_rate?: number;
738
+ rwa_maker_fee_rate?: number;
724
739
  max_leverage: number;
725
740
  futures_taker_fee_rate: number;
726
741
  futures_maker_fee_rate: number;
@@ -1064,6 +1079,17 @@ declare namespace WSMessage {
1064
1079
  }
1065
1080
  }
1066
1081
 
1082
+ type RouteOption = {
1083
+ href: string;
1084
+ name: string;
1085
+ scope?: string;
1086
+ target?: string;
1087
+ };
1088
+ type RouterAdapter = {
1089
+ onRouteChange: (option: RouteOption) => void;
1090
+ currentPath?: string;
1091
+ };
1092
+
1067
1093
  declare enum WithdrawStatus {
1068
1094
  NotSupported = "NotSupported",
1069
1095
  NotConnected = "NotConnected",
@@ -1731,7 +1757,8 @@ declare enum TrackerEventName {
1731
1757
  vaultDepositFailed = "vault_deposit_failed",
1732
1758
  vaultWithdrawSuccess = "vault_withdraw_success",
1733
1759
  vaultWithdrawFailed = "vault_withdraw_failed",
1734
- clickBBOButton = "click_bbo_button"
1760
+ clickBBOButton = "click_bbo_button",
1761
+ confirmCloseAllPositions = "confirm_close_all_positions"
1735
1762
  }
1736
1763
 
1737
1764
  type CurrentChain = {
@@ -1896,4 +1923,4 @@ declare enum AssetHistorySideEnum {
1896
1923
 
1897
1924
  declare const DEFAUL_ORDERLY_KEY_SCOPE = "read,trading";
1898
1925
 
1899
- export { ABSTRACT_CHAIN_ID_MAP, ABSTRACT_MAINNET_CHAINID, ABSTRACT_TESTNET_CHAINID, API, ARBITRUM_MAINNET_CHAINID, ARBITRUM_MAINNET_CHAINID_HEX, ARBITRUM_TESTNET_CHAINID, ARBITRUM_TESTNET_CHAINID_HEX, AbstractChains, AbstractTestnetChainInfo, AbstractTestnetTokenInfo, AccountStatusEnum, type AlgoOrder, type AlgoOrderChildOrders, type AlgoOrderEntity, AlgoOrderRootType, AlgoOrderType, AnnouncementType, ApiError, Arbitrum, ArbitrumGoerli, ArbitrumSepolia, ArbitrumSepoliaChainInfo, ArbitrumSepoliaTokenInfo, AssetHistorySideEnum, AssetHistoryStatusEnum, Avalanche, BBOOrderType, BNB, BSC_TESTNET_CHAINID, Base, type BaseAlgoOrderEntity, type BaseOrder, BaseSepolia, type BracketOrder, type BracketOrderEntry, type Chain, type Chain as ChainConfig, type ChainInfo, ChainKey, ChainNamespace, type ChildOrder, ConnectorKey, type CurrentChain, DEFAUL_ORDERLY_KEY_SCOPE, DEPOSIT_FEE_RATE, DistributionType, EMPTY_LIST, EMPTY_OBJECT, EMPTY_OPERATION, ETHEREUM_MAINNET_CHAINID, Ethereum, ExchangeStatusEnum, Fantom, Fuji, LedgerWalletKey, Linea, LinkDeviceKey, MANTLE_TESTNET_CHAINID, MANTLE_TESTNET_CHAINID_HEX, MEDIA_TABLET, MONAD_TESTNET_CHAINID, Mantle, MantleSepolia, MaxUint256, type NativeCurrency, type NetworkId, NetworkStatusEnum, Optimism, OptimismGoerli, OptimismSepolia, type Optional, type OrderEntity, OrderEntrySortKeys, OrderLevel, OrderSide, OrderStatus, OrderType, type OrderlyOrder, Polygon, PolygonAmoy, PolygonzkEVM, PositionSide, PositionType, type RegularOrder, type RequireKeys, SDKError, SOLANA_MAINNET_CHAINID, SOLANA_TESTNET_CHAINID, STORY_TESTNET_CHAINID, Sei, SolanaChains, SolanaDevnet, SolanaDevnetChainInfo, SolanaDevnetTokenInfo, StoryOdysseyTestnet, StoryTestnet, SystemStateEnum, type TPSLOrderEntry, TesntTokenFallback, TestnetChains, TrackerEventName, TradingviewFullscreenKey, TrailingCallbackType, TriggerPriceType, WSMessage, WS_WalletStatusEnum, WithdrawStatus, chainsInfoMap, defaultMainnetChains, defaultTestnetChains, definedTypes, isNativeTokenChecker, nativeETHAddress, nativeTokenAddress, _default as version, zkSyncEra };
1926
+ export { ABSTRACT_CHAIN_ID_MAP, ABSTRACT_MAINNET_CHAINID, ABSTRACT_TESTNET_CHAINID, API, ARBITRUM_MAINNET_CHAINID, ARBITRUM_MAINNET_CHAINID_HEX, ARBITRUM_TESTNET_CHAINID, ARBITRUM_TESTNET_CHAINID_HEX, AbstractChains, AbstractTestnetChainInfo, AbstractTestnetTokenInfo, AccountStatusEnum, type AlgoOrder, type AlgoOrderChildOrders, type AlgoOrderEntity, AlgoOrderRootType, AlgoOrderType, AnnouncementType, ApiError, Arbitrum, ArbitrumGoerli, ArbitrumSepolia, ArbitrumSepoliaChainInfo, ArbitrumSepoliaTokenInfo, AssetHistorySideEnum, AssetHistoryStatusEnum, Avalanche, BBOOrderType, BNB, BSC_TESTNET_CHAINID, Base, type BaseAlgoOrderEntity, type BaseOrder, BaseSepolia, type BracketOrder, type BracketOrderEntry, type Chain, type Chain as ChainConfig, type ChainInfo, ChainKey, ChainNamespace, type ChildOrder, ConnectorKey, type CurrentChain, DEFAUL_ORDERLY_KEY_SCOPE, DEPOSIT_FEE_RATE, DistributionType, EMPTY_LIST, EMPTY_OBJECT, EMPTY_OPERATION, ETHEREUM_MAINNET_CHAINID, Ethereum, ExchangeStatusEnum, Fantom, Fuji, LedgerWalletKey, Linea, LinkDeviceKey, MANTLE_TESTNET_CHAINID, MANTLE_TESTNET_CHAINID_HEX, MEDIA_TABLET, MONAD_TESTNET_CHAINID, Mantle, MantleSepolia, MaxUint256, type NativeCurrency, type NetworkId, NetworkStatusEnum, Optimism, OptimismGoerli, OptimismSepolia, type Optional, type OrderEntity, OrderEntrySortKeys, OrderLevel, OrderSide, OrderStatus, OrderType, type OrderlyOrder, Polygon, PolygonAmoy, PolygonzkEVM, PositionSide, PositionType, type RegularOrder, type RequireKeys, type RouteOption, type RouterAdapter, SDKError, SOLANA_MAINNET_CHAINID, SOLANA_TESTNET_CHAINID, STORY_TESTNET_CHAINID, Sei, SolanaChains, SolanaDevnet, SolanaDevnetChainInfo, SolanaDevnetTokenInfo, StoryOdysseyTestnet, StoryTestnet, SystemStateEnum, type TPSLOrderEntry, TesnetTokenFallback, TestnetChains, TrackerEventName, TradingviewFullscreenKey, TrailingCallbackType, TriggerPriceType, WSMessage, WS_WalletStatusEnum, WithdrawStatus, chainsInfoMap, defaultMainnetChains, defaultTestnetChains, definedTypes, isNativeTokenChecker, nativeETHAddress, nativeTokenAddress, _default as version, zkSyncEra };
package/dist/index.js CHANGED
@@ -107,7 +107,7 @@ __export(src_exports, {
107
107
  StoryOdysseyTestnet: () => StoryOdysseyTestnet,
108
108
  StoryTestnet: () => StoryTestnet,
109
109
  SystemStateEnum: () => SystemStateEnum,
110
- TesntTokenFallback: () => TesntTokenFallback,
110
+ TesnetTokenFallback: () => TesnetTokenFallback,
111
111
  TestnetChains: () => TestnetChains,
112
112
  TrackerEventName: () => TrackerEventName,
113
113
  TradingviewFullscreenKey: () => TradingviewFullscreenKey,
@@ -240,7 +240,7 @@ var ArbitrumSepoliaTokenInfo = {
240
240
  cross_chain_withdrawal_fee: 2,
241
241
  display_name: "USDC"
242
242
  };
243
- var TesntTokenFallback = (testnetTokens) => [
243
+ var TesnetTokenFallback = (testnetTokens) => [
244
244
  {
245
245
  token: "USDC",
246
246
  token_hash: "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa",
@@ -1056,6 +1056,7 @@ var TrackerEventName = /* @__PURE__ */ ((TrackerEventName2) => {
1056
1056
  TrackerEventName2["vaultWithdrawSuccess"] = "vault_withdraw_success";
1057
1057
  TrackerEventName2["vaultWithdrawFailed"] = "vault_withdraw_failed";
1058
1058
  TrackerEventName2["clickBBOButton"] = "click_bbo_button";
1059
+ TrackerEventName2["confirmCloseAllPositions"] = "confirm_close_all_positions";
1059
1060
  return TrackerEventName2;
1060
1061
  })(TrackerEventName || {});
1061
1062
 
@@ -1247,7 +1248,7 @@ var DEFAUL_ORDERLY_KEY_SCOPE = "read,trading";
1247
1248
  StoryOdysseyTestnet,
1248
1249
  StoryTestnet,
1249
1250
  SystemStateEnum,
1250
- TesntTokenFallback,
1251
+ TesnetTokenFallback,
1251
1252
  TestnetChains,
1252
1253
  TrackerEventName,
1253
1254
  TradingviewFullscreenKey,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/version.ts","../src/constants.ts","../src/types/api.ts","../src/order.ts","../src/withdraw.ts","../src/chains.ts","../src/track.ts","../src/wallet.ts","../src/storageKey.ts","../src/errors.ts","../src/sign.ts","../src/assetHistory.ts","../src/account.ts"],"sourcesContent":["export { default as version } from \"./version\";\nexport * from \"./constants\";\nexport * from \"./types/api\";\n// export * from \"./order\";\nexport {\n OrderType,\n OrderSide,\n OrderStatus,\n AlgoOrderRootType,\n PositionType,\n AlgoOrderType,\n TriggerPriceType,\n BBOOrderType,\n OrderLevel,\n DistributionType,\n TrailingCallbackType,\n} from \"./order\";\nexport type {\n OrderEntity,\n AlgoOrderEntity,\n TPSLOrderEntry,\n BaseAlgoOrderEntity,\n AlgoOrderChildOrders,\n Optional,\n PositionSide,\n BracketOrderEntry,\n RequireKeys,\n BaseOrder,\n RegularOrder,\n AlgoOrder,\n OrderlyOrder,\n ChildOrder,\n BracketOrder,\n} from \"./order\";\nexport * from \"./withdraw\";\nexport * from \"./chains\";\nexport * from \"./track\";\nexport type { Chain as ChainConfig, ChainInfo, NativeCurrency } from \"./chains\";\nexport * from \"./wallet\";\nexport * from \"./storageKey\";\nexport { ApiError, SDKError } from \"./errors\";\n\nexport { definedTypes } from \"./sign\";\nexport * as superstruct from \"superstruct\";\nexport * from \"./assetHistory\";\nexport * from \"./account\";\n","declare global {\n interface Window {\n __ORDERLY_VERSION__?: {\n [key: string]: string;\n };\n }\n}\nif (typeof window !== \"undefined\") {\n window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};\n window.__ORDERLY_VERSION__[\"@kodiak-finance/orderly-types\"] = \"2.7.4\";\n}\n\nexport default \"2.7.4\";\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport enum AccountStatusEnum {\n EnableTradingWithoutConnected = -1,\n NotConnected = 0,\n Connected = 1,\n NotSignedIn = 2,\n SignedIn = 3,\n DisabledTrading = 4,\n EnableTrading = 5,\n}\n\nexport enum SystemStateEnum {\n Loading = 0,\n Error = 1,\n Ready = 10,\n}\n\nexport enum ExchangeStatusEnum {\n Normal = 0,\n Maintain = 1,\n}\n\nexport type NetworkId = \"testnet\" | \"mainnet\";\n\nexport enum NetworkStatusEnum {\n unknown = 0,\n unsupported = 1,\n supported = 2,\n}\n\n// Testnet\n// Arbitrum Goerli\n// export const ARBITRUM_TESTNET_CHAINID = 421613;\n// export const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EED\";\n\n// Arbitrum Sepolia\nexport const ARBITRUM_TESTNET_CHAINID = 421614;\nexport const SOLANA_TESTNET_CHAINID = 901901901;\nexport const SOLANA_MAINNET_CHAINID = 900900900;\nexport const STORY_TESTNET_CHAINID = 1516;\nexport const MONAD_TESTNET_CHAINID = 10143;\nexport const ABSTRACT_TESTNET_CHAINID = 11124;\nexport const ABSTRACT_MAINNET_CHAINID = 2741;\nexport const BSC_TESTNET_CHAINID = 97;\nexport const ABSTRACT_CHAIN_ID_MAP = new Set([\n ABSTRACT_TESTNET_CHAINID,\n ABSTRACT_MAINNET_CHAINID,\n]);\n\nexport const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EEE\";\n\nexport const MANTLE_TESTNET_CHAINID = 5003;\nexport const MANTLE_TESTNET_CHAINID_HEX = \"0x138b\";\n\n// Mainnet\nexport const ARBITRUM_MAINNET_CHAINID = 42161;\nexport const ETHEREUM_MAINNET_CHAINID = 1;\nexport const ARBITRUM_MAINNET_CHAINID_HEX = \"0xa4b1\";\n\nexport const MEDIA_TABLET = \"(max-width: 768px)\";\n\nexport const DEPOSIT_FEE_RATE = 1.05;\n\n/**\n * A constant for the maximum value for a ``uint256``.\n */\nexport const MaxUint256: bigint = BigInt(\n \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n);\n\nexport const nativeTokenAddress = \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\";\n\nexport const nativeETHAddress = \"0x0000000000000000000000000000000000000000\";\n\nexport const isNativeTokenChecker = (address: string) =>\n address === nativeTokenAddress || address === nativeETHAddress;\n\nexport const ArbitrumSepoliaChainInfo = {\n name: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.gateway.tenderly.co\",\n chain_id: \"421614\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n vault_address: \"0x0EaC556c0C2321BA25b9DC01e4e3c95aD5CDCd2f\",\n};\nexport const AbstractTestnetChainInfo = {\n name: \"Abstract Testnet\",\n public_rpc_url: \"https://api.testnet.abs.xyz\",\n chain_id: \"11124\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.abscan.org\",\n vault_address: \"0xf14Ff11F3bb1011ff42665Ec869c7827c43745Fd\",\n};\nexport const AbstractTestnetTokenInfo = {\n chain_id: \"11124\",\n contract_address: \"0xa0BB43E2eA7fcE91F07e628d72fD6333e80F47D2\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\",\n};\nexport const SolanaDevnetChainInfo = {\n chain_id: \"901901901\",\n currency_decimal: 9,\n currency_symbol: \"SOL\",\n explorer_base_url: \"https://explorer.solana.com/?cluster=devnet\",\n name: \"Solana-Devnet\",\n public_rpc_url: \"https://api.devnet.solana.com\",\n vault_address: \"9shwxWDUNhtwkHocsUAmrNAQfBH2DHh4njdAEdHZZkF2\",\n};\n\nexport const SolanaDevnetTokenInfo = {\n chain_id: \"901901901\",\n contract_address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 5,\n display_name: \"USDC\",\n};\nexport const ArbitrumSepoliaTokenInfo = {\n chain_id: \"421614\",\n contract_address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\",\n};\n\nexport const TesntTokenFallback = (testnetTokens: any) => [\n {\n token: \"USDC\",\n token_hash:\n \"0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa\",\n decimals: 6,\n minimum_withdraw_amount: 0.000001,\n chain_details: testnetTokens,\n },\n];\n\nexport const EMPTY_LIST: ReadonlyArray<any> = [];\n\nexport const EMPTY_OBJECT: Readonly<Record<PropertyKey, any>> = {};\n\nexport const EMPTY_OPERATION = () => {};\n","/* eslint-disable @typescript-eslint/no-namespace */\nimport { AlgoOrderRootType, OrderSide, OrderType } from \"../order\";\n\nexport enum AnnouncementType {\n Listing = \"LISTING\",\n Maintenance = \"MAINTENANCE\",\n Delisting = \"DELISTING\",\n Campaign = \"CAMPAIGN\",\n}\n\nexport declare namespace API {\n // /v1/public/auto_convert_threshold\n export interface ConvertThreshold {\n ltv_threshold: number;\n negative_usdc_threshold: number;\n }\n\n //v1/public/token\n export interface Token {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n //v1/public/token\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n }\n\n // ws market, api v1/public/futures\n export interface MarketInfo {\n symbol: string;\n index_price: number;\n mark_price: number;\n sum_unitary_funding: number;\n est_funding_rate: number;\n last_funding_rate: number;\n next_funding_time: number;\n open_interest: string;\n \"24h_open\": number;\n \"24h_close\": number;\n \"24h_high\": number;\n \"24h_low\": number;\n /**\n * @deprecated\n * spelling mistake, use 24h_volume to instead, will be remove next version\n */\n \"24h_volumn\": number;\n \"24h_volume\": number;\n \"24h_amount\": number;\n }\n\n export interface MarketInfoExt extends MarketInfo {\n change: number;\n \"24h_volume\": number;\n }\n\n export interface AnnouncementRow {\n announcement_id: number | string;\n message: string;\n i18n?: Record<PropertyKey, string | null>;\n url?: string | null;\n type?: AnnouncementType | null;\n updated_time?: number | null;\n }\n\n export interface Announcement {\n last_updated_time?: number | null;\n rows?: AnnouncementRow[];\n }\n\n /**\n * v1/public/info\n */\n export interface Symbol {\n symbol: string;\n quote_min: number;\n quote_max: number;\n quote_tick: number;\n base_min: number;\n base_max: number;\n base_tick: number;\n min_notional: number;\n price_range: number;\n price_scope: number;\n std_liquidation_fee: number;\n liquidator_fee: number;\n claim_insurance_fund_discount: number;\n funding_period: number;\n cap_funding: number;\n floor_funding: number;\n interest_rate: number;\n created_time: number;\n updated_time: number;\n imr_factor: number;\n base_mmr: number;\n base_imr: number;\n }\n\n export interface TokenItem {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n }\n\n export interface SymbolExt extends Symbol {\n base: string;\n base_dp: number;\n\n quote: string;\n quote_dp: number;\n type: string;\n name: string;\n }\n\n export interface Order {\n symbol: string;\n status: string;\n side: string;\n order_id: number;\n algo_order_id?: number;\n user_id: number;\n price: number | null;\n type: string;\n quantity: number;\n amount: null;\n visible: number;\n executed: number;\n total_fee: number;\n fee_asset: string;\n client_order_id?: string;\n average_executed_price: number;\n total_executed_quantity: number;\n visible_quantity: number;\n created_time: number;\n updated_time: number;\n reduce_only: boolean;\n trigger_price?: number;\n order_tag?: string;\n }\n\n export interface OrderExt extends Order {\n mark_price: string;\n }\n\n export interface AlgoOrder {\n algo_order_id: number;\n root_algo_order_id: number;\n parent_algo_order_id: number;\n parent_algo_type: AlgoOrderRootType;\n symbol: string;\n algo_type: string;\n child_orders: AlgoOrder[];\n side: string;\n quantity: number;\n is_triggered: boolean;\n is_activated: boolean;\n trigger_price: number;\n trigger_price_type: string;\n type: OrderType;\n root_algo_status: string;\n algo_status: string;\n price?: number;\n total_executed_quantity: number;\n visible_quantity: number;\n total_fee: number;\n fee_asset: string;\n reduce_only: boolean;\n created_time: number;\n updated_time: number;\n order_tag?: string;\n client_order_id?: string;\n\n // trailing stop order\n activated_price?: number;\n callback_value?: number;\n callback_rate?: number;\n extreme_price?: number;\n }\n\n export interface AlgoOrderExt extends AlgoOrder {\n mark_price: string;\n position?: Partial<Position>;\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n }\n\n export interface OrderResponse {\n rows: (Order | AlgoOrder)[];\n meta: {\n total: number;\n current_page: number;\n records_per_page: number;\n };\n }\n\n export interface FundingRate {\n symbol: string;\n est_funding_rate: number;\n est_funding_rate_timestamp: number;\n last_funding_rate: number;\n last_funding_rate_timestamp: number;\n next_funding_time: number;\n sum_unitary_funding: number;\n }\n\n export interface FundingPeriodData {\n rate: number;\n positive: number;\n negative: number;\n }\n\n export interface FundingDetails {\n symbol: string;\n quote_min: number;\n quote_max: number;\n quote_tick: number;\n base_min: number;\n base_max: number;\n base_tick: number;\n min_notional: number;\n price_range: number;\n price_scope: number;\n std_liquidation_fee: number;\n liquidator_fee: number;\n claim_insurance_fund_discount: number;\n funding_period: number;\n cap_funding: number;\n floor_funding: number;\n interest_rate: number;\n created_time: number;\n updated_time: number;\n liquidation_tier: number;\n cap_ir: number;\n floor_ir: number;\n mark_index_price_deviation_floor: number;\n mark_index_price_deviation_cap: number;\n global_max_oi_cap: number;\n base_mmr: number;\n base_imr: number;\n imr_factor: number;\n deviation_factor: number;\n }\n\n export interface FundingHistory {\n symbol: string;\n data_start_time: string;\n funding: {\n last: FundingPeriodData;\n \"1d\": FundingPeriodData;\n \"3d\": FundingPeriodData;\n \"7d\": FundingPeriodData;\n \"14d\": FundingPeriodData;\n \"30d\": FundingPeriodData;\n \"90d\": FundingPeriodData;\n };\n }\n\n export interface PositionInfo extends PositionAggregated {\n // margin_ratio: number;\n // initial_margin_ratio: number;\n // maintenance_margin_ratio: number;\n // open_margin_ratio: number;\n // current_margin_ratio_with_orders: number;\n // initial_margin_ratio_with_orders: number;\n // maintenance_margin_ratio_with_orders: number;\n // total_collateral_value: number;\n // free_collateral: number;\n rows: Position[];\n // total_pnl_24_h: number;\n }\n\n export interface PositionAggregated {\n margin_ratio: number;\n initial_margin_ratio: number;\n maintenance_margin_ratio: number;\n open_margin_ratio: number;\n current_margin_ratio_with_orders: number;\n initial_margin_ratio_with_orders: number;\n maintenance_margin_ratio_with_orders: number;\n total_collateral_value: number;\n free_collateral: number;\n total_pnl_24_h: number;\n /**\n * @deprecated use total_unreal_pnl instead\n */\n unrealPnL: number;\n total_unreal_pnl: number;\n total_unreal_pnl_index?: number;\n /**\n * @deprecated use total_unsettled_pnl instead\n */\n unsettledPnL: number;\n total_unsettled_pnl: number;\n notional: number;\n unrealPnlROI: number;\n unrealPnlROI_index?: number;\n }\n\n export interface Position {\n account_id?: string;\n symbol: string;\n position_qty: number;\n cost_position: number;\n last_sum_unitary_funding: number;\n pending_long_qty: number;\n pending_short_qty: number;\n settle_price: number;\n average_open_price: number;\n unrealized_pnl: number;\n unrealized_pnl_index?: number;\n unrealized_pnl_ROI: number;\n unsettled_pnl: number;\n unsettled_pnl_ROI: number;\n unrealized_pnl_ROI_index?: number;\n mark_price: number;\n index_price?: number;\n est_liq_price: number | null;\n timestamp: number;\n /**\n * Maintenance margin ratio\n */\n mmr: number;\n imr: number;\n IMR_withdraw_orders: number;\n MMR_with_orders: number;\n pnl_24_h: number;\n fee_24_h: number;\n fundingFee?: number;\n leverage: number;\n }\n\n export interface PositionExt extends Position {\n notional: number;\n mm: number;\n }\n\n export interface PositionTPSLExt extends PositionExt {\n full_tp_sl?: {\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n algo_order?: AlgoOrder;\n };\n partial_tp_sl?: {\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n order_num?: number;\n algo_order?: AlgoOrder;\n };\n\n // has_position_tp_sl: boolean;\n\n /**\n * related position tp/sl order\n */\n algo_order?: AlgoOrder;\n }\n\n export interface PositionsTPSLExt extends PositionAggregated {\n rows: PositionTPSLExt[];\n }\n\n export interface Trade {\n symbol: Symbol;\n side: OrderSide;\n ts: number;\n executed_price: number;\n executed_quantity: number;\n executed_timestamp: number;\n }\n\n export interface Holding {\n token: string;\n holding: number;\n frozen: number;\n pending_short: number;\n updated_time: number;\n }\n\n export interface AccountInfo {\n account_id: string;\n email: string;\n account_mode: string;\n tier: string;\n futures_tier: string;\n maintenance_cancel_orders: boolean;\n taker_fee_rate: number;\n maker_fee_rate: number;\n max_leverage: number;\n futures_taker_fee_rate: number;\n futures_maker_fee_rate: number;\n imr_factor: { [key: string]: number };\n max_notional: { [key: string]: number };\n }\n\n export interface Chain {\n dexs: string[];\n network_infos: NetworkInfos;\n token_infos: TokenInfo[];\n nativeToken?: TokenInfo;\n address?: string;\n symbol?: string;\n on_chain_swap?: boolean;\n // nativeToken\n }\n\n export interface NetworkInfos {\n name: string;\n shortName: string;\n public_rpc_url: string;\n chain_id: number;\n currency_symbol: string;\n bridge_enable: boolean;\n mainnet: boolean;\n est_txn_mins: number | null;\n explorer_base_url: string;\n bridgeless?: boolean;\n withdrawal_fee?: number;\n minimum_withdraw_amount?: number;\n vault_address: string;\n currency_decimal?: number;\n\n cross_chain_router: string;\n depositor: string;\n }\n\n export interface TokenInfo {\n address?: string;\n base_weight: number;\n decimals?: number;\n /** token decimals */\n token_decimal?: number;\n discount_factor?: number | null;\n display_name?: string;\n haircut: number;\n is_collateral: boolean;\n symbol?: string;\n user_max_qty: number;\n precision?: number;\n minimum_withdraw_amount: number;\n swap_enable?: boolean;\n }\n\n export interface Chain {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n base_weight: number;\n discount_factor?: number | null;\n haircut: number;\n user_max_qty: number;\n is_collateral: boolean;\n chain_details: ChainDetail[];\n }\n\n // export interface Token{\n\n // }\n\n export interface ChainDetail {\n chain_id: string;\n chain_name?: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n cross_chain_withdrawal_fee: number;\n display_name: string;\n }\n\n export interface AssetHistory {\n meta: RecordsMeta;\n rows: AssetHistoryRow[];\n }\n\n export interface RecordsMeta {\n total: number;\n records_per_page: number;\n current_page: number;\n }\n\n export interface AssetHistoryRow {\n id: string;\n tx_id: string;\n side: string;\n token: string;\n amount: number;\n fee: number;\n trans_status: string;\n created_time: number;\n updated_time: number;\n chain_id: string;\n }\n\n export interface FundingFeeHistory {\n meta: RecordsMeta;\n rows: FundingFeeRow[];\n }\n\n export interface FundingFeeRow {\n symbol: string;\n funding_rate: number;\n mark_price: number;\n funding_fee: number;\n payment_type: string;\n status: string;\n created_time: number;\n updated_time: number;\n }\n\n export interface StrategyVaultHistoryRow {\n vault_id: string;\n created_time: number;\n type: \"withdrawal\" | \"deposit\";\n status: string;\n amount_change: number;\n token?: string; // need to hard code for now\n vaultName?: string; // need to hard code for now\n }\n\n export interface StrategyVaultHistory {\n rows: StrategyVaultHistoryRow[];\n meta: RecordsMeta;\n }\n\n export interface TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\n updated_time: number;\n chain_id: string;\n // timestamp\n block_time: number;\n }\n\n export interface TransferHistory {\n meta: RecordsMeta;\n rows: TransferHistoryRow[];\n }\n\n export interface TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\n updated_time: number;\n }\n\n export interface DailyRow {\n account_value: number;\n broker_id: string;\n date: string;\n perp_volume: number;\n pnl: number;\n snapshot_time?: number;\n }\n\n export interface PositionHistory {\n position_id: number; // Unique identifier for the position\n liquidation_id?: number; // Unique identifier for the position\n position_status: string; // Status of the position\n type: string; // Type of the position activity\n symbol: string; // Trading pair symbol\n avg_open_price: number; // Average open price of the position\n avg_close_price: number; // Average close price of the position\n max_position_qty: number; // Maximum quantity held in the position\n closed_position_qty: number; // Quantity closed in the position\n side: \"LONG\" | \"SHORT\"; // Side of the position\n trading_fee: number; // Fee charged for trading\n accumulated_funding_fee: number; // Accumulated funding fee for the position\n insurance_fund_fee: number; // Fee contributed to the insurance fund\n liquidator_fee: number; // Fee paid to the liquidator\n realized_pnl: number; // Realized profit and loss\n open_timestamp: number; // Timestamp when the position was opened\n close_timestamp: number; // Timestamp when the position was closed\n last_update_time: number; // Timestamp of the last update to the position\n leverage: number; // Leverage of the position\n }\n\n export interface LiquidationPositionByPerp {\n abs_liquidation_fee: number;\n cost_position_transfer: number;\n liquidator_fee: number;\n position_qty: number;\n symbol: string;\n transfer_price: number;\n mark_price: number;\n }\n\n export interface Liquidation {\n liquidation_id: number;\n timestamp: number;\n transfer_amount_to_insurance_fund: number;\n margin_ratio: number;\n account_mmr: number;\n collateral_value: number;\n position_notional: number;\n positions_by_perp: LiquidationPositionByPerp[];\n }\n\n export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n pending_rebalance: number;\n }\n\n export interface RestrictedAreas {\n invalid_web_country: string;\n invalid_web_city: string;\n }\n\n export interface IpInfo {\n ip: string;\n city: string;\n region: string;\n checked: boolean;\n }\n\n export interface LeverageInfo {\n symbol: string;\n leverage: number;\n }\n}\n\nexport declare namespace WSMessage {\n export interface Ticker {\n symbol: string;\n open: number;\n close: number;\n high: number;\n low: number;\n volume: number;\n amount: number;\n count: number;\n change: number;\n open_interest?: number;\n index_price?: number;\n }\n\n export interface MarkPrice {\n symbol: string;\n price: number;\n }\n\n export interface Position {\n symbol: string;\n positionQty: number;\n costPosition: number;\n lastSumUnitaryFunding: number;\n sumUnitaryFundingVersion: number;\n pendingLongQty: number;\n pendingShortQty: number;\n settlePrice: number;\n averageOpenPrice: number;\n unsettledPnl: number;\n pnl24H: number;\n fee24H: number;\n markPrice: number;\n estLiqPrice: number;\n version: number;\n imr: number;\n imrwithOrders: number;\n mmrwithOrders: number;\n mmr: number;\n }\n\n export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n pending_rebalance: number;\n }\n\n export interface Order {\n symbol: string;\n clientOrderId: string;\n orderId: number;\n type: string;\n side: string;\n quantity: number;\n price: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n avgPrice: number;\n status: string;\n reason: string;\n totalFee: number;\n visible: number;\n /**\n * update time\n */\n timestamp: number;\n reduceOnly: boolean;\n maker: boolean;\n }\n\n export interface Holding {\n holding: number;\n frozen: number;\n interest: number;\n pendingShortQty: number;\n pendingExposure: number;\n pendingLongQty: number;\n pendingLongExposure: number;\n version: number;\n staked: number;\n unbonding: number;\n vault: number;\n fee24H: number;\n markPrice: number;\n }\n\n export interface AlgoOrder {\n symbol: string;\n rootAlgoOrderId: number;\n parentAlgoOrderId: number;\n algoOrderId: number;\n status: string;\n algoType: string;\n side: string;\n quantity: number;\n triggerStatus: string;\n price: number;\n type: string;\n triggerTradePrice: number;\n triggerTime: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n averageExecutedPrice: number;\n totalFee: number;\n timestamp: number;\n visibleQuantity: number;\n reduceOnly: boolean;\n triggered: boolean;\n maker: boolean;\n rootAlgoStatus: string;\n algoStatus: string;\n }\n\n export interface Announcement {\n announcement_id: string;\n message: string;\n i18n: Record<PropertyKey, string | null>;\n url?: string | null;\n type: AnnouncementType | null;\n updated_time: number;\n }\n}\n","/**\n * Supported types for placing an order\n */\nexport enum OrderType {\n LIMIT = \"LIMIT\",\n MARKET = \"MARKET\",\n IOC = \"IOC\",\n FOK = \"FOK\",\n POST_ONLY = \"POST_ONLY\",\n ASK = \"ASK\",\n BID = \"BID\",\n STOP_LIMIT = \"STOP_LIMIT\",\n STOP_MARKET = \"STOP_MARKET\",\n /**\n * Only for POSITIONAL_TP_SL type algo order\n */\n CLOSE_POSITION = \"CLOSE_POSITION\",\n /**\n * Scaled order\n */\n SCALED = \"SCALED\",\n /**\n * trailing stop\n */\n TRAILING_STOP = \"TRAILING_STOP\",\n}\n\nexport enum BBOOrderType {\n COUNTERPARTY1 = \"counterparty1\",\n COUNTERPARTY5 = \"counterparty5\",\n QUEUE1 = \"queue1\",\n QUEUE5 = \"queue5\",\n}\n\nexport enum OrderLevel {\n ONE = 0,\n TWO = 1,\n THREE = 2,\n FOUR = 3,\n FIVE = 4,\n}\n\nexport enum AlgoOrderRootType {\n TP_SL = \"TP_SL\",\n POSITIONAL_TP_SL = \"POSITIONAL_TP_SL\",\n STOP = \"STOP\",\n BRACKET = \"BRACKET\",\n TRAILING_STOP = \"TRAILING_STOP\",\n}\n\nexport enum TriggerPriceType {\n MARK_PRICE = \"MARK_PRICE\",\n}\nexport enum PositionType {\n FULL = \"FULL\",\n PARTIAL = \"PARTIAL\",\n}\n\nexport enum AlgoOrderType {\n TAKE_PROFIT = \"TAKE_PROFIT\",\n STOP_LOSS = \"STOP_LOSS\",\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\",\n}\n\nexport enum PositionSide {\n LONG = \"LONG\",\n SHORT = \"SHORT\",\n}\n\nexport enum OrderStatus {\n /** @deprecated */\n OPEN = \"OPEN\",\n NEW = \"NEW\",\n FILLED = \"FILLED\",\n PARTIAL_FILLED = \"PARTIAL_FILLED\",\n CANCELLED = \"CANCELLED\",\n REPLACED = \"REPLACED\",\n // CANCELLED + FILLED\n COMPLETED = \"COMPLETED\",\n // NEW + PARTIAL_FILLED\n INCOMPLETE = \"INCOMPLETE\",\n REJECTED = \"REJECTED\",\n}\n\nexport interface OrderExt {\n total: string;\n}\n\nexport interface BaseOrder {\n symbol: string;\n order_type: OrderType;\n order_type_ext?: OrderType;\n order_price: string;\n order_quantity: string;\n order_amount?: number;\n visible_quantity: number;\n side: OrderSide;\n reduce_only: boolean;\n slippage: number;\n order_tag: string;\n level: OrderLevel;\n post_only_adjust: boolean;\n /** custom order id, it is used to identify the order from ws */\n client_order_id: string;\n}\n\n/** Scaled order fields */\nexport interface ScaledOrder {\n /** user-defined price at the first order (index 0) */\n start_price?: string;\n /** user-defined price at the last order (index total_orders - 1) */\n end_price?: string;\n /** total number of orders */\n total_orders?: string;\n /** quantity distribution type */\n distribution_type?: DistributionType;\n /** the ratio of qty[end] / qty[start] */\n skew?: string;\n}\n\nexport enum TrailingCallbackType {\n VALUE = \"value\",\n RATE = \"rate\",\n}\n\n/**\n * Trailing Stop that allows users to set an activation price and a trailing amount (value / rate).\n * The order is only activated when the market reaches the activation price,\n * after which the trailing stop logic tracks the extreme price and triggers when the price retraces by the specified trailing amount.\n */\nexport interface TrailingStopOrder {\n /**\n * activated price\n */\n activated_price?: string;\n /**\n * i.e. the value = 100\n */\n callback_value?: string;\n /**\n * i.e. the value = 0.1 represent to 10%\n */\n callback_rate?: string;\n}\n\nexport interface RegularOrder\n extends BaseOrder,\n OrderExt,\n ScaledOrder,\n TrailingStopOrder {\n // symbol: string;\n // client_order_id: string;\n // type: OrderType;\n // price: number;\n // quantity: number;\n}\n\nexport interface AlgoOrder extends BaseOrder, OrderExt {\n // symbol: string;\n quantity: string;\n type: OrderType;\n price: string;\n algo_type: AlgoOrderRootType;\n trigger_price_type: string;\n trigger_price: string;\n child_orders: AlgoOrderChildOrders[];\n}\n\nexport interface BracketOrder extends AlgoOrder, OrderExt {\n /**\n * Computed take profit\n */\n position_type?: PositionType;\n tp_enable?: boolean;\n sl_enable?: boolean;\n tp_pnl?: string;\n tp_offset?: string;\n tp_offset_percentage?: string;\n tp_ROI?: string;\n tp_trigger_price?: string;\n tp_order_price?: string;\n tp_order_type?: OrderType;\n\n /**\n * Computed stop loss\n */\n sl_pnl?: string;\n sl_offset?: string;\n sl_offset_percentage?: string;\n sl_ROI?: string;\n sl_trigger_price?: string;\n sl_order_price?: string;\n sl_order_type?: OrderType;\n}\n\nexport type OrderlyOrder = RegularOrder & AlgoOrder & BracketOrder;\n\nexport interface AlgoOrderChildOrders {\n symbol: string;\n algo_type: string;\n child_orders: ChildOrder[];\n}\n\nexport interface ChildOrder {\n symbol: string;\n algo_type: AlgoOrderType;\n side: string;\n type: OrderType;\n trigger_price: string;\n price?: string;\n reduce_only: boolean;\n trigger_price_type?: string;\n}\n\nexport interface TrailingStopOrder {\n activated_price?: string;\n callback_value?: string;\n callback_rate?: string;\n}\n\nexport interface OrderEntity extends ScaledOrder, TrailingStopOrder {\n symbol: string;\n order_type: OrderType;\n algo_type?: AlgoOrderRootType;\n order_type_ext?: OrderType;\n order_price?: string;\n order_quantity?: string;\n order_amount?: number;\n // Whether to display in the orderbook, default=order_quantity, not displayed when =0,\n visible_quantity?: number;\n reduce_only?: boolean;\n side: OrderSide;\n broker_id?: string;\n slippage?: number;\n\n // internal fields\n total?: string;\n // hideInOrderbook?: boolean;\n isStopOrder?: boolean;\n trigger_price?: string;\n order_tag?: string;\n client_order_id?: string;\n level?: OrderLevel;\n}\n\nexport enum DistributionType {\n // enum value need to use lowercase to match the track params\n FLAT = \"flat\",\n ASCENDING = \"ascending\",\n DESCENDING = \"descending\",\n CUSTOM = \"custom\",\n}\n\nexport type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\nexport type RequireKeys<T extends object, K extends keyof T> = Required<\n Pick<T, K>\n> &\n Partial<Omit<T, K>>;\n\nexport interface BaseAlgoOrderEntity<T extends AlgoOrderRootType>\n extends OrderEntity {\n algo_type: AlgoOrderRootType;\n child_orders: (Partial<Omit<AlgoOrderEntity<T>, \"algo_type\" | \"type\">> & {\n algo_type: AlgoOrderType;\n type: OrderType;\n child_orders?: BaseAlgoOrderEntity<T>[\"child_orders\"];\n // trigger_price: number | string;\n })[];\n // if update the order, then need to provide the order_id\n algo_order_id?: number;\n client_order_id?: string;\n order_tag?: string;\n price?: number | string;\n quantity: number | string;\n reduce_only?: boolean;\n side: OrderSide;\n symbol: string;\n trigger_price: string;\n trigger_price_type: TriggerPriceType;\n type: OrderType;\n visible_quantity?: number;\n is_activated?: boolean;\n tp_trigger_price?: string | number;\n sl_trigger_price?: string | number;\n tp_order_price?: string | number;\n tp_order_type?: OrderType;\n sl_order_price?: string | number;\n sl_order_type?: OrderType;\n tp_enable?: boolean;\n sl_enable?: boolean;\n position_type?: PositionType;\n}\n\nexport type AlgoOrderEntity<\n T extends AlgoOrderRootType = AlgoOrderRootType.STOP,\n> = T extends AlgoOrderRootType.TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n \"side\" | \"type\" | \"trigger_price\" | \"order_type\"\n >\n : T extends AlgoOrderRootType.POSITIONAL_TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n | \"side\"\n | \"type\"\n | \"trigger_price\"\n | \"order_type\"\n | \"quantity\"\n | \"tp_enable\"\n | \"sl_enable\"\n | \"tp_order_price\"\n | \"tp_order_type\"\n | \"sl_order_price\"\n | \"sl_order_type\"\n | \"position_type\"\n >\n : Omit<BaseAlgoOrderEntity<T>, \"child_orders\" | \"order_type\">;\n\nexport type TPSLOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.TP_SL>,\n \"side\" | \"type\" | \"trigger_price\"\n>;\n\nexport type BracketOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.BRACKET>,\n \"side\"\n>;\n","export enum WithdrawStatus {\n NotSupported = \"NotSupported\",\n NotConnected = \"NotConnected\",\n Unsettle = \"Unsettle\",\n InsufficientBalance = \"InsufficientBalance\",\n Normal = \"Normal\",\n}\n","export interface Chain {\n id: number;\n chainNameShort: string;\n chainLogo: string;\n chainInfo: ChainInfo;\n minGasBalance: number;\n minCrossGasBalance: number;\n maxPrepayCrossGas: number;\n blockExplorerName: string;\n chainName: string;\n requestRpc: string;\n}\n\nexport interface ChainInfo {\n chainId: string;\n chainName: string;\n nativeCurrency: NativeCurrency;\n rpcUrls: string[];\n blockExplorerUrls: string[];\n}\n\nexport interface NativeCurrency {\n name: string;\n symbol: string;\n decimals: number;\n fix: number;\n}\n\nexport const Ethereum = {\n chainNameShort: \"Ethereum\",\n id: 1,\n chainLogo: \"\",\n chainInfo: {\n chainId: `0x${(1).toString(16)}`,\n chainName: \"Ethereum Mainnet\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 8,\n },\n rpcUrls: [\"https://mainnet.infura.io/v3/9155d40884554acdb17699a18a1fe348\"],\n blockExplorerUrls: [\"https://etherscan.io/\"],\n },\n minGasBalance: 0.002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.025,\n blockExplorerName: \"EthScan\",\n chainName: \"Ethereum Mainnet\",\n requestRpc: \"https://rpc.ankr.com/eth\",\n};\n\nexport const Avalanche = {\n id: 43114,\n chainInfo: {\n chainId: `0x${(43114).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche\",\n chainNameShort: \"Avalanche\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const Fuji = {\n id: 43113,\n chainInfo: {\n chainId: `0x${(43113).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche Fuji Testnet\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche Fuji\",\n chainNameShort: \"Avalanche Fuji\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const BNB = {\n id: 56,\n chainInfo: {\n chainId: `0x${(56).toString(16)}`, // 0x38\n chainName: \"BNB Chain\",\n nativeCurrency: {\n name: \"bnb\",\n symbol: \"BNB\",\n decimals: 18,\n fix: 6,\n },\n rpcUrls: [\"https://bsc-dataseed1.binance.org/\"],\n blockExplorerUrls: [\"https://bscscan.com/\"],\n },\n minGasBalance: 0.02,\n minCrossGasBalance: 0.02,\n maxPrepayCrossGas: 0.1,\n blockExplorerName: \"BscScan\",\n chainName: \"Binance Smart Chain\",\n chainNameShort: \"BNB Chain\",\n requestRpc: \"https://rpc.ankr.com/bsc\",\n chainLogo: \"\",\n};\n\nexport const Fantom = {\n id: 250,\n chainInfo: {\n chainId: `0x${(250).toString(16)}`, // 0x38\n chainName: \"Fantom\",\n nativeCurrency: {\n name: \"ftm\",\n symbol: \"FTM\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpcapi.fantom.network\"],\n blockExplorerUrls: [\"https://ftmscan.com/\"],\n },\n minGasBalance: 1,\n minCrossGasBalance: 10,\n maxPrepayCrossGas: 60,\n blockExplorerName: \"FTMScan\",\n chainName: \"Fantom\",\n chainNameShort: \"Fantom\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/fantom\",\n};\n\nexport const Polygon = {\n id: 137,\n chainInfo: {\n chainId: `0x${(137).toString(16)}`,\n chainName: \"Polygon\",\n nativeCurrency: {\n name: \"matic\",\n symbol: \"MATIC\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-mainnet.matic.network\"],\n blockExplorerUrls: [\"https://polygonscan.com/\"],\n },\n minGasBalance: 0.1,\n minCrossGasBalance: 1,\n maxPrepayCrossGas: 30,\n blockExplorerName: \"Polygonscan\",\n chainName: \"Polygon\",\n chainNameShort: \"Polygon\",\n requestRpc: \"https://rpc.ankr.com/polygon\",\n chainLogo: \"\",\n};\n\nexport const Arbitrum = {\n id: 42161,\n chainInfo: {\n chainId: `0x${(42161).toString(16)}`,\n chainName: \"Arbitrum\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arb1.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://arbiscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbiscan\",\n chainName: \"Arbitrum\",\n chainNameShort: \"Arbitrum\",\n requestRpc: \"https://arb1.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const Optimism = {\n id: 10,\n chainInfo: {\n chainId: `0x${(10).toString(16)}`,\n chainName: \"Optimism\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://mainnet.optimism.io\"],\n blockExplorerUrls: [\"https://optimistic.etherscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism\",\n chainName: \"Optimism\",\n chainNameShort: \"Optimism\",\n requestRpc: \"https://rpc.ankr.com/optimism\",\n chainLogo: \"\",\n};\n\nexport const zkSyncEra = {\n id: 324,\n chainInfo: {\n chainId: `0x${(324).toString(16)}`,\n chainName: \"zkSync Era\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zksync2-mainnet.zksync.io\"],\n blockExplorerUrls: [\"https://explorer.zksync.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"zkSync Era\",\n chainName: \"zkSync Era\",\n chainNameShort: \"zkSync Era\",\n requestRpc: \"https://zksync2-mainnet.zksync.io/\",\n chainLogo: \"\",\n // blockExplorerName: 'zkSync Era Goerli',\n // chainName: 'zkSync Era Goerli',\n // chainNameShort: 'zkSync Era Goerli',\n // requestRpc: 'https://zksync2-testnet.zksync.dev/',\n // chainLogo: '',\n};\n\nexport const PolygonzkEVM = {\n id: 1101,\n chainInfo: {\n chainId: `0x${(1101).toString(16)}`,\n chainName: \"Polygon zkEVM\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zkevm-rpc.com\"],\n blockExplorerUrls: [\"https://zkevm.polygonscan.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon zkEVM\",\n chainName: \"Polygon zkEVM\",\n chainNameShort: \"Polygon zkEVM\",\n requestRpc: \"https://zkevm-rpc.com\",\n chainLogo: \"\",\n};\n\nexport const Linea = {\n id: 59144,\n chainInfo: {\n chainId: `0x${(59144).toString(16)}`,\n chainName: \"Linea\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.linea.build\"],\n blockExplorerUrls: [\"https://lineascan.build/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Linea\",\n chainName: \"Linea\",\n chainNameShort: \"Linea\",\n requestRpc: \"https://rpc.linea.build\",\n chainLogo: \"\",\n};\n\nexport const Base = {\n id: 8453,\n chainInfo: {\n chainId: `0x${(8453).toString(16)}`,\n chainName: \"Base Network\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://developer-access-mainnet.base.org/\"],\n blockExplorerUrls: [\"https://basescan.org\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base\",\n chainName: \"Base\",\n chainNameShort: \"Base\",\n requestRpc: \"https://developer-access-mainnet.base.org/\",\n chainLogo: \"\",\n};\n\nexport const Mantle = {\n id: 5000,\n chainInfo: {\n chainId: `0x${(5000).toString(16)}`,\n chainName: \"Mantle\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.mantle.xyz/\"],\n blockExplorerUrls: [\"https://mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle\",\n chainName: \"Mantle\",\n chainNameShort: \"Mantle\",\n requestRpc: \"https://rpc.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumGoerli = {\n id: 421613,\n chainInfo: {\n chainId: `0x${(421613).toString(16)}`,\n chainName: \"Arbitrum Goerli\",\n nativeCurrency: {\n name: \"AGOR\",\n symbol: \"AGOR\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://goerli-rollup.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://goerli-rollup-explorer.arbitrum.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Goerli\",\n chainName: \"Arbitrum Goerli\",\n chainNameShort: \"Arbitrum Goerli\",\n requestRpc: \"https://goerli-rollup.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumSepolia = {\n id: 421614,\n chainInfo: {\n chainId: `0x${(421614).toString(16)}`,\n chainName: \"Arbitrum Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\"],\n blockExplorerUrls: [\"https://sepolia-explorer.arbitrum.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Sepolia\",\n chainName: \"Arbitrum Sepolia\",\n chainNameShort: \"Arbitrum Sepolia\",\n requestRpc: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chainLogo: \"\",\n};\n\nexport const OptimismGoerli = {\n id: 420,\n chainInfo: {\n chainId: `0x${(420).toString(16)}`,\n chainName: \"Optimism Goerli\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://optimism-goerli.gateway.tenderly.co\"],\n blockExplorerUrls: [\"https://goerli-optimism.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Goerli\",\n chainName: \"Optimism Goerli\",\n chainNameShort: \"Optimism Goerli\",\n requestRpc: \"https://optimism-goerli.gateway.tenderly.co\",\n chainLogo: \"\",\n};\n\nexport const OptimismSepolia = {\n id: 11155420,\n chainInfo: {\n chainId: `0x${(11155420).toString(16)}`,\n chainName: \"Optimism Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://sepolia.optimism.io\"],\n blockExplorerUrls: [\"https://sepolia-optimistic.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Sepolia\",\n chainName: \"Optimism Sepolia\",\n chainNameShort: \"Optimism Sepolia\",\n requestRpc: \"https://sepolia.optimism.io\",\n chainLogo: \"\",\n};\n\nexport const BaseSepolia = {\n id: 84532,\n chainInfo: {\n chainId: `0x${(84532).toString(16)}`,\n chainName: \"Base Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://base-sepolia-rpc.publicnode.com\"],\n blockExplorerUrls: [\"https://base-sepolia.blockscout.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base Sepolia\",\n chainName: \"Base Sepolia\",\n chainNameShort: \"Base Sepolia\",\n requestRpc: \"https://base-sepolia-rpc.publicnode.com\",\n chainLogo: \"\",\n};\n\nexport const MantleSepolia = {\n id: 5003,\n chainInfo: {\n chainId: `0x${(5003).toString(16)}`,\n chainName: \"Mantle Sepolia\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.sepolia.mantle.xyz/\"],\n blockExplorerUrls: [\"https://sepolia.mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle Sepolia\",\n chainName: \"Mantle Sepolia\",\n chainNameShort: \"Mantle Sepolia\",\n requestRpc: \"https://rpc.sepolia.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const PolygonAmoy = {\n id: 80002,\n chainInfo: {\n chainId: `0x${(80002).toString(16)}`,\n chainName: \"Polygon Amoy\",\n nativeCurrency: {\n name: \"MATIC\",\n symbol: \"MATIC\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-amoy.polygon.technology/\"],\n blockExplorerUrls: [\"https://www.oklink.com/amoy\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon Amoy\",\n chainName: \"Polygon Amoy\",\n chainNameShort: \"Polygon Amoy\",\n requestRpc: \"https://rpc-amoy.polygon.technology/\",\n chainLogo: \"\",\n};\n\nexport const Sei = {\n id: 1329,\n chainInfo: {\n chainId: `0x${(1329).toString(16)}`,\n chainName: \"Sei Network\",\n nativeCurrency: {\n name: \"SEI\",\n symbol: \"SEI\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://evm-rpc.sei-apis.com\"],\n blockExplorerUrls: [\"https://seitrace.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\n\nexport const StoryTestnet = {\n name: \"Story Odyssey Testnet\",\n public_rpc_url: \"https://rpc.odyssey.storyrpc.io/\",\n chain_id: 1516,\n currency_symbol: \"IP\",\n explorer_base_url: \"\",\n vault_address: \"\",\n};\nexport const StoryOdysseyTestnet = {\n id: 1329,\n chainInfo: {\n chainId: `0x${StoryTestnet.chain_id.toString(16)}`,\n chainName: StoryTestnet.name,\n nativeCurrency: {\n name: \"IP\",\n symbol: \"IP\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [StoryTestnet.public_rpc_url],\n blockExplorerUrls: [],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\nexport const chainsInfoMap: Map<number, Chain> = new Map([\n [Ethereum.id, Ethereum],\n [Avalanche.id, Avalanche],\n [Fuji.id, Fuji],\n [BNB.id, BNB],\n [Fantom.id, Fantom],\n [Polygon.id, Polygon],\n [Arbitrum.id, Arbitrum],\n [Optimism.id, Optimism],\n [zkSyncEra.id, zkSyncEra],\n [PolygonzkEVM.id, PolygonzkEVM],\n [Linea.id, Linea],\n [Base.id, Base],\n [Mantle.id, Mantle],\n [ArbitrumGoerli.id, ArbitrumGoerli],\n [ArbitrumSepolia.id, ArbitrumSepolia],\n [OptimismGoerli.id, OptimismGoerli],\n [OptimismSepolia.id, OptimismSepolia],\n [BaseSepolia.id, BaseSepolia],\n [MantleSepolia.id, MantleSepolia],\n [PolygonAmoy.id, PolygonAmoy],\n [Sei.id, Sei],\n [StoryOdysseyTestnet.id, StoryOdysseyTestnet],\n]);\n\nexport const SolanaDevnet = {\n id: 901901901,\n chainInfo: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chainId: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n} as unknown as typeof Arbitrum;\n\nexport const TestnetChains = [\n {\n network_infos: {\n name: \"Arbitrum Sepolia\",\n shortName: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chain_id: 421614,\n currency_symbol: \"ETH\",\n bridge_enable: true,\n mainnet: false,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n est_txn_mins: null,\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chain_id: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: StoryTestnet,\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0xF1815bd50389c46847f0Bda824eC8da914045D14\",\n decimals: 6,\n },\n ],\n },\n // {\n // network_infos: {\n // name: \"Mantle Sepolia\",\n // shortName: \"Mantle Sepolia\",\n // public_rpc_url: \"https://rpc.sepolia.mantle.xyz/\",\n // chain_id: 5003,\n // currency_symbol: \"MNT\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://sepolia.mantlescan.xyz/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xAcab8129E2cE587fD203FD770ec9ECAFA2C88080\",\n // decimals: 6,\n // display_name: \"USDC.e\",\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Arbitrum Goerli\",\n // shortName: \"Arbitrum Goerli\",\n // public_rpc_url: \"https://goerli-rollup.arbitrum.io/rpc\",\n // chain_id: 421613,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli.arbiscan.io/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xfd064A18f3BF249cf1f87FC203E90D8f650f2d63\",\n // decimals: 6,\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Optimism Goerli\",\n // shortName: \"Optimism Goerli\",\n // public_rpc_url: \"https://optimism-goerli.gateway.tenderly.co\",\n // chain_id: 420,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli-optimism.etherscan.io\",\n // est_txn_mins: null,\n // },\n // },\n];\n\nexport const defaultMainnetChains = [Arbitrum, Base, Optimism];\nexport const defaultTestnetChains = [ArbitrumSepolia];\n\nexport enum ChainNamespace {\n evm = \"EVM\",\n solana = \"SOL\",\n}\n\nexport const AbstractChains = new Set([2741, 11124]);\nexport const SolanaChains = new Set([901901901, 900900900]);\n","export enum TrackerEventName {\n /** virtual event (not send this event name to tracker) */\n trackIdentifyUserId = \"track_identify_user_id\",\n trackIdentify = \"track_identify\",\n trackCustomEvent = \"track_custom_event\",\n\n /** real event name (send this event name to tracker) */\n withdrawSuccess = \"withdraw_request_success\",\n withdrawFailed = \"withdraw_request_failure\",\n depositSuccess = \"deposit_request_success\",\n depositFailed = \"deposit_request_failure\",\n signinSuccess = \"sign_message_success\",\n placeOrderSuccess = \"place_order_success\",\n walletConnect = \"connect_wallet_success\",\n clickLinkDeviceButton = \"click_link_device_button\",\n signLinkDeviceMessageSuccess = \"sign_link_device_message_success\",\n linkDeviceModalClickConfirm = \"link_device_modal_click_confirm\",\n socialLoginSuccess = \"social_login_success\",\n clickSwitchNetwork = \"click_switch_network\",\n clickSwitchWallet = \"click_switch_wallet\",\n switchNetworkSuccess = \"switch_network_success\",\n clickExportPrivateKey = \"click_export_private_key\",\n switchLanguage = \"switch_language\",\n leaderboardCampaignClickTradeNow = \"leaderboard_campaign_click_trade_now\",\n leaderboardCampaignClickLearnMore = \"leaderboard_campaign_click_learn_more\",\n vaultDepositSuccess = \"vault_deposit_success\",\n vaultDepositFailed = \"vault_deposit_failed\",\n vaultWithdrawSuccess = \"vault_withdraw_success\",\n vaultWithdrawFailed = \"vault_withdraw_failed\",\n clickBBOButton = \"click_bbo_button\",\n}\n","import { API } from \"./types/api\";\n\n// export type Chain = {\n// id: string;\n// name?: string;\n// };\n\nexport type CurrentChain = {\n id: number;\n info: API.Chain;\n};\n\nexport enum WS_WalletStatusEnum {\n NO = \"NO\",\n FAILED = \"FAILED\",\n PENDING = \"PENDING\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n}\n","export const LedgerWalletKey = \"orderly:ledger-wallet\";\nexport const ConnectorKey = \"orderly:connectorKey\";\nexport const ChainKey = \"order:chain\";\nexport const LinkDeviceKey = \"orderly_link_device\";\nexport const TradingviewFullscreenKey = \"orderly:tradingview-fullscreen\";\nexport const OrderEntrySortKeys = \"orderly:order_entry_sort_keys\";\n","export class ApiError extends Error {\n constructor(message: string, private readonly code: number) {\n super(message);\n this.name = \"ApiError\";\n }\n}\n\nexport class SDKError extends Error {\n constructor(message: string) {\n super(`[ORDERLY SDK ERROR]:${message}`);\n this.name = \"SDKError\";\n }\n}\n","export const definedTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n ],\n Registration: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"registrationNonce\", type: \"uint256\" },\n ],\n Withdraw: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"receiver\", type: \"address\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"withdrawNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n AddOrderlyKey: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"orderlyKey\", type: \"string\" },\n { name: \"scope\", type: \"string\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"expiration\", type: \"uint64\" },\n ],\n SettlePnl: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"settleNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n DexRequest: [\n { name: \"payloadType\", type: \"uint8\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"receiver\", type: \"address\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"vaultId\", type: \"bytes32\" },\n { name: \"token\", type: \"string\" },\n { name: \"dexBrokerId\", type: \"string\" },\n ],\n InternalTransfer: [\n { name: \"receiver\", type: \"bytes32\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"transferNonce\", type: \"uint64\" },\n ],\n} as const;\n","export enum AssetHistoryStatusEnum {\n /** @deprecated, this status is not used */\n NEW = \"NEW\",\n PENDING = \"PENDING\",\n CONFIRM = \"CONFIRM\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n FAILED = \"FAILED\",\n PENDING_REBALANCE = \"PENDING_REBALANCE\",\n}\n\nexport enum AssetHistorySideEnum {\n DEPOSIT = \"DEPOSIT\",\n WITHDRAW = \"WITHDRAW\",\n}\n","export const DEFAUL_ORDERLY_KEY_SCOPE = \"read,trading\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,IAAI,OAAO,WAAW,aAAa;AACjC,SAAO,sBAAsB,OAAO,uBAAuB,CAAC;AAC5D,SAAO,oBAAoB,+BAA+B,IAAI;AAChE;AAEA,IAAO,kBAAQ;;;ACVR,IAAK,oBAAL,kBAAKA,uBAAL;AACL,EAAAA,sCAAA,mCAAgC,MAAhC;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ACnC,EAAE,MAAM,eAAe,MAAM,SAAS;AAAA,IACtC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,EACtC;AAAA,EACA,YAAY;AAAA,IACV,EAAE,MAAM,eAAe,MAAM,QAAQ;AAAA,IACrC,EAAE,MAAM,SAAS,MAAM,UAAU;AAAA,IACjC,EAAE,MAAM,YAAY,MAAM,UAAU;AAAA,IACpC,EAAE,MAAM,UAAU,MAAM,UAAU;AAAA,IAClC,EAAE,MAAM,WAAW,MAAM,UAAU;AAAA,IACnC,EAAE,MAAM,SAAS,MAAM,SAAS;AAAA,IAChC,EAAE,MAAM,eAAe,MAAM,SAAS;AAAA,EACxC;AAAA,EACA,kBAAkB;AAAA,IAChB,EAAE,MAAM,YAAY,MAAM,UAAU;AAAA,IACpC,EAAE,MAAM,SAAS,MAAM,SAAS;AAAA,IAChC,EAAE,MAAM,UAAU,MAAM,UAAU;AAAA,IAClC,EAAE,MAAM,iBAAiB,MAAM,SAAS;AAAA,EAC1C;AACF;;;AXRA,kBAA6B;;;AY3CtB,IAAK,yBAAL,kBAAKC,4BAAL;AAEL,EAAAA,wBAAA,SAAM;AACN,EAAAA,wBAAA,aAAU;AACV,EAAAA,wBAAA,aAAU;AACV,EAAAA,wBAAA,gBAAa;AACb,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,YAAS;AACT,EAAAA,wBAAA,uBAAoB;AARV,SAAAA;AAAA,GAAA;AAWL,IAAK,uBAAL,kBAAKC,0BAAL;AACL,EAAAA,sBAAA,aAAU;AACV,EAAAA,sBAAA,cAAW;AAFD,SAAAA;AAAA,GAAA;;;ACXL,IAAM,2BAA2B;","names":["AccountStatusEnum","SystemStateEnum","ExchangeStatusEnum","NetworkStatusEnum","AnnouncementType","OrderType","BBOOrderType","OrderLevel","AlgoOrderRootType","TriggerPriceType","PositionType","AlgoOrderType","OrderSide","OrderStatus","TrailingCallbackType","DistributionType","WithdrawStatus","ChainNamespace","TrackerEventName","WS_WalletStatusEnum","AssetHistoryStatusEnum","AssetHistorySideEnum"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/version.ts","../src/constants.ts","../src/types/api.ts","../src/order.ts","../src/withdraw.ts","../src/chains.ts","../src/track.ts","../src/wallet.ts","../src/storageKey.ts","../src/errors.ts","../src/sign.ts","../src/assetHistory.ts","../src/account.ts"],"sourcesContent":["export { default as version } from \"./version\";\nexport * from \"./constants\";\nexport * from \"./types/api\";\n// export * from \"./order\";\nexport {\n OrderType,\n OrderSide,\n OrderStatus,\n AlgoOrderRootType,\n PositionType,\n AlgoOrderType,\n TriggerPriceType,\n BBOOrderType,\n OrderLevel,\n DistributionType,\n TrailingCallbackType,\n} from \"./order\";\nexport type {\n OrderEntity,\n AlgoOrderEntity,\n TPSLOrderEntry,\n BaseAlgoOrderEntity,\n AlgoOrderChildOrders,\n Optional,\n PositionSide,\n BracketOrderEntry,\n RequireKeys,\n BaseOrder,\n RegularOrder,\n AlgoOrder,\n OrderlyOrder,\n ChildOrder,\n BracketOrder,\n} from \"./order\";\nexport * from \"./context\";\nexport * from \"./withdraw\";\nexport * from \"./chains\";\nexport * from \"./track\";\nexport type { Chain as ChainConfig, ChainInfo, NativeCurrency } from \"./chains\";\nexport * from \"./wallet\";\nexport * from \"./storageKey\";\nexport { ApiError, SDKError } from \"./errors\";\n\nexport { definedTypes } from \"./sign\";\nexport * as superstruct from \"superstruct\";\nexport * from \"./assetHistory\";\nexport * from \"./account\";\n","declare global {\n interface Window {\n __ORDERLY_VERSION__?: {\n [key: string]: string;\n };\n }\n}\nif (typeof window !== \"undefined\") {\n window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};\n window.__ORDERLY_VERSION__[\"@kodiak-finance/orderly-types\"] = \"2.7.4\";\n}\n\nexport default \"2.7.4\";\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport enum AccountStatusEnum {\n EnableTradingWithoutConnected = -1,\n NotConnected = 0,\n Connected = 1,\n NotSignedIn = 2,\n SignedIn = 3,\n DisabledTrading = 4,\n EnableTrading = 5,\n}\n\nexport enum SystemStateEnum {\n Loading = 0,\n Error = 1,\n Ready = 10,\n}\n\nexport enum ExchangeStatusEnum {\n Normal = 0,\n Maintain = 1,\n}\n\nexport type NetworkId = \"testnet\" | \"mainnet\";\n\nexport enum NetworkStatusEnum {\n unknown = 0,\n unsupported = 1,\n supported = 2,\n}\n\n// Testnet\n// Arbitrum Goerli\n// export const ARBITRUM_TESTNET_CHAINID = 421613;\n// export const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EED\";\n\n// Arbitrum Sepolia\nexport const ARBITRUM_TESTNET_CHAINID = 421614;\nexport const SOLANA_TESTNET_CHAINID = 901901901;\nexport const SOLANA_MAINNET_CHAINID = 900900900;\nexport const STORY_TESTNET_CHAINID = 1516;\nexport const MONAD_TESTNET_CHAINID = 10143;\nexport const ABSTRACT_TESTNET_CHAINID = 11124;\nexport const ABSTRACT_MAINNET_CHAINID = 2741;\nexport const BSC_TESTNET_CHAINID = 97;\nexport const ABSTRACT_CHAIN_ID_MAP = new Set([\n ABSTRACT_TESTNET_CHAINID,\n ABSTRACT_MAINNET_CHAINID,\n]);\n\nexport const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EEE\";\n\nexport const MANTLE_TESTNET_CHAINID = 5003;\nexport const MANTLE_TESTNET_CHAINID_HEX = \"0x138b\";\n\n// Mainnet\nexport const ARBITRUM_MAINNET_CHAINID = 42161;\nexport const ETHEREUM_MAINNET_CHAINID = 1;\nexport const ARBITRUM_MAINNET_CHAINID_HEX = \"0xa4b1\";\n\nexport const MEDIA_TABLET = \"(max-width: 768px)\";\n\nexport const DEPOSIT_FEE_RATE = 1.05;\n\n/**\n * A constant for the maximum value for a ``uint256``.\n */\nexport const MaxUint256: bigint = BigInt(\n \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n);\n\nexport const nativeTokenAddress = \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\";\n\nexport const nativeETHAddress = \"0x0000000000000000000000000000000000000000\";\n\nexport const isNativeTokenChecker = (address: string) =>\n address === nativeTokenAddress || address === nativeETHAddress;\n\nexport const ArbitrumSepoliaChainInfo = {\n name: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.gateway.tenderly.co\",\n chain_id: \"421614\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n vault_address: \"0x0EaC556c0C2321BA25b9DC01e4e3c95aD5CDCd2f\",\n};\nexport const AbstractTestnetChainInfo = {\n name: \"Abstract Testnet\",\n public_rpc_url: \"https://api.testnet.abs.xyz\",\n chain_id: \"11124\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.abscan.org\",\n vault_address: \"0xf14Ff11F3bb1011ff42665Ec869c7827c43745Fd\",\n};\nexport const AbstractTestnetTokenInfo = {\n chain_id: \"11124\",\n contract_address: \"0xa0BB43E2eA7fcE91F07e628d72fD6333e80F47D2\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\",\n};\nexport const SolanaDevnetChainInfo = {\n chain_id: \"901901901\",\n currency_decimal: 9,\n currency_symbol: \"SOL\",\n explorer_base_url: \"https://explorer.solana.com/?cluster=devnet\",\n name: \"Solana-Devnet\",\n public_rpc_url: \"https://api.devnet.solana.com\",\n vault_address: \"9shwxWDUNhtwkHocsUAmrNAQfBH2DHh4njdAEdHZZkF2\",\n};\n\nexport const SolanaDevnetTokenInfo = {\n chain_id: \"901901901\",\n contract_address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 5,\n display_name: \"USDC\",\n};\nexport const ArbitrumSepoliaTokenInfo = {\n chain_id: \"421614\",\n contract_address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\",\n};\n\nexport const TesnetTokenFallback = (testnetTokens: any) => [\n {\n token: \"USDC\",\n token_hash:\n \"0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa\",\n decimals: 6,\n minimum_withdraw_amount: 0.000001,\n chain_details: testnetTokens,\n },\n];\n\nexport const EMPTY_LIST: ReadonlyArray<any> = [];\n\nexport const EMPTY_OBJECT: Readonly<Record<PropertyKey, any>> = {};\n\nexport const EMPTY_OPERATION = () => {};\n","/* eslint-disable @typescript-eslint/no-namespace */\nimport { AlgoOrderRootType, OrderSide, OrderType } from \"../order\";\n\nexport enum AnnouncementType {\n Listing = \"LISTING\",\n Maintenance = \"MAINTENANCE\",\n Delisting = \"DELISTING\",\n Campaign = \"CAMPAIGN\",\n}\n\nexport declare namespace API {\n // /v1/public/auto_convert_threshold\n export interface ConvertThreshold {\n ltv_threshold: number;\n negative_usdc_threshold: number;\n }\n\n //v1/public/token\n export interface Token {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n base_weight: number;\n discount_factor: number;\n haircut: number;\n user_max_qty: number;\n is_collateral: boolean;\n on_chain_swap: boolean;\n chain_details: ChainDetail[];\n }\n\n //v1/public/token\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n }\n\n // ws market, api v1/public/futures\n export interface MarketInfo {\n symbol: string;\n index_price: number;\n mark_price: number;\n sum_unitary_funding: number;\n est_funding_rate: number;\n last_funding_rate: number;\n next_funding_time: number;\n open_interest: string;\n \"24h_open\": number;\n \"24h_close\": number;\n \"24h_high\": number;\n \"24h_low\": number;\n /**\n * @deprecated\n * spelling mistake, use 24h_volume to instead, will be remove next version\n */\n \"24h_volumn\": number;\n \"24h_volume\": number;\n \"24h_amount\": number;\n }\n\n export interface MarketInfoExt extends MarketInfo {\n change: number;\n \"24h_volume\": number;\n }\n\n export interface AnnouncementRow {\n announcement_id: number | string;\n message: string;\n i18n?: Record<PropertyKey, string | null>;\n url?: string | null;\n type?: AnnouncementType | null;\n updated_time?: number | null;\n coverImage?: string;\n }\n\n export interface Announcement {\n last_updated_time?: number | null;\n rows?: AnnouncementRow[];\n }\n\n /**\n * v1/public/info\n */\n export interface Symbol {\n symbol: string;\n quote_min: number;\n quote_max: number;\n quote_tick: number;\n base_min: number;\n base_max: number;\n base_tick: number;\n min_notional: number;\n price_range: number;\n price_scope: number;\n std_liquidation_fee: number;\n liquidator_fee: number;\n claim_insurance_fund_discount: number;\n funding_period: number;\n cap_funding: number;\n floor_funding: number;\n interest_rate: number;\n created_time: number;\n updated_time: number;\n imr_factor: number;\n base_mmr: number;\n base_imr: number;\n }\n\n export interface TokenItem {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n }\n\n export interface SymbolExt extends Symbol {\n base: string;\n base_dp: number;\n\n quote: string;\n quote_dp: number;\n type: string;\n name: string;\n }\n\n export interface RwaSymbol {\n symbol: string;\n status: \"open\" | \"close\";\n next_open: number;\n next_close: number;\n\n base: string;\n quote: string;\n type: string;\n name: string;\n }\n\n export interface Order {\n symbol: string;\n status: string;\n side: string;\n order_id: number;\n algo_order_id?: number;\n user_id: number;\n price: number | null;\n type: string;\n quantity: number;\n amount: null;\n visible: number;\n executed: number;\n total_fee: number;\n fee_asset: string;\n client_order_id?: string;\n average_executed_price: number;\n total_executed_quantity: number;\n visible_quantity: number;\n created_time: number;\n updated_time: number;\n reduce_only: boolean;\n trigger_price?: number;\n order_tag?: string;\n }\n\n export interface OrderExt extends Order {\n mark_price: string;\n }\n\n export interface AlgoOrder {\n algo_order_id: number;\n root_algo_order_id: number;\n parent_algo_order_id: number;\n parent_algo_type: AlgoOrderRootType;\n symbol: string;\n algo_type: string;\n child_orders: AlgoOrder[];\n side: string;\n quantity: number;\n is_triggered: boolean;\n is_activated: boolean;\n trigger_price: number;\n trigger_price_type: string;\n type: OrderType;\n root_algo_status: string;\n algo_status: string;\n price?: number;\n total_executed_quantity: number;\n visible_quantity: number;\n total_fee: number;\n fee_asset: string;\n reduce_only: boolean;\n created_time: number;\n updated_time: number;\n order_tag?: string;\n client_order_id?: string;\n\n // trailing stop order\n activated_price?: number;\n callback_value?: number;\n callback_rate?: number;\n extreme_price?: number;\n }\n\n export interface AlgoOrderExt extends AlgoOrder {\n mark_price: string;\n position?: Partial<Position>;\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n }\n\n export interface OrderResponse {\n rows: (Order | AlgoOrder)[];\n meta: {\n total: number;\n current_page: number;\n records_per_page: number;\n };\n }\n\n export interface FundingRate {\n symbol: string;\n est_funding_rate: number;\n est_funding_rate_timestamp: number;\n last_funding_rate: number;\n last_funding_rate_timestamp: number;\n next_funding_time: number;\n sum_unitary_funding: number;\n }\n\n export interface FundingPeriodData {\n rate: number;\n positive: number;\n negative: number;\n }\n\n export interface FundingDetails {\n symbol: string;\n quote_min: number;\n quote_max: number;\n quote_tick: number;\n base_min: number;\n base_max: number;\n base_tick: number;\n min_notional: number;\n price_range: number;\n price_scope: number;\n std_liquidation_fee: number;\n liquidator_fee: number;\n claim_insurance_fund_discount: number;\n funding_period: number;\n cap_funding: number;\n floor_funding: number;\n interest_rate: number;\n created_time: number;\n updated_time: number;\n liquidation_tier: number;\n cap_ir: number;\n floor_ir: number;\n mark_index_price_deviation_floor: number;\n mark_index_price_deviation_cap: number;\n global_max_oi_cap: number;\n base_mmr: number;\n base_imr: number;\n imr_factor: number;\n deviation_factor: number;\n }\n\n export interface FundingHistory {\n symbol: string;\n data_start_time: string;\n funding: {\n last: FundingPeriodData;\n \"1d\": FundingPeriodData;\n \"3d\": FundingPeriodData;\n \"7d\": FundingPeriodData;\n \"14d\": FundingPeriodData;\n \"30d\": FundingPeriodData;\n \"90d\": FundingPeriodData;\n };\n }\n\n export interface PositionInfo extends PositionAggregated {\n // margin_ratio: number;\n // initial_margin_ratio: number;\n // maintenance_margin_ratio: number;\n // open_margin_ratio: number;\n // current_margin_ratio_with_orders: number;\n // initial_margin_ratio_with_orders: number;\n // maintenance_margin_ratio_with_orders: number;\n // total_collateral_value: number;\n // free_collateral: number;\n rows: Position[];\n // total_pnl_24_h: number;\n }\n\n export interface PositionAggregated {\n margin_ratio: number;\n initial_margin_ratio: number;\n maintenance_margin_ratio: number;\n open_margin_ratio: number;\n current_margin_ratio_with_orders: number;\n initial_margin_ratio_with_orders: number;\n maintenance_margin_ratio_with_orders: number;\n total_collateral_value: number;\n free_collateral: number;\n total_pnl_24_h: number;\n /**\n * @deprecated use total_unreal_pnl instead\n */\n unrealPnL: number;\n total_unreal_pnl: number;\n total_unreal_pnl_index?: number;\n /**\n * @deprecated use total_unsettled_pnl instead\n */\n unsettledPnL: number;\n total_unsettled_pnl: number;\n notional: number;\n unrealPnlROI: number;\n unrealPnlROI_index?: number;\n }\n\n export interface Position {\n account_id?: string;\n symbol: string;\n position_qty: number;\n cost_position: number;\n last_sum_unitary_funding: number;\n pending_long_qty: number;\n pending_short_qty: number;\n settle_price: number;\n average_open_price: number;\n unrealized_pnl: number;\n unrealized_pnl_index?: number;\n unrealized_pnl_ROI: number;\n unsettled_pnl: number;\n unsettled_pnl_ROI: number;\n unrealized_pnl_ROI_index?: number;\n mark_price: number;\n index_price?: number;\n est_liq_price: number | null;\n timestamp: number;\n /**\n * Maintenance margin ratio\n */\n mmr: number;\n imr: number;\n IMR_withdraw_orders: number;\n MMR_with_orders: number;\n pnl_24_h: number;\n fee_24_h: number;\n fundingFee?: number;\n leverage: number;\n }\n\n export interface PositionExt extends Position {\n notional: number;\n mm: number;\n }\n\n export interface PositionTPSLExt extends PositionExt {\n full_tp_sl?: {\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n algo_order?: AlgoOrder;\n };\n partial_tp_sl?: {\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n order_num?: number;\n algo_order?: AlgoOrder;\n };\n\n // has_position_tp_sl: boolean;\n\n /**\n * related position tp/sl order\n */\n algo_order?: AlgoOrder;\n }\n\n export interface PositionsTPSLExt extends PositionAggregated {\n rows: PositionTPSLExt[];\n }\n\n export interface Trade {\n symbol: Symbol;\n side: OrderSide;\n ts: number;\n executed_price: number;\n executed_quantity: number;\n executed_timestamp: number;\n }\n\n export interface Holding {\n token: string;\n holding: number;\n frozen: number;\n pending_short: number;\n updated_time: number;\n }\n\n export interface AccountInfo {\n account_id: string;\n email: string;\n account_mode: string;\n tier: string;\n futures_tier: string;\n maintenance_cancel_orders: boolean;\n taker_fee_rate: number;\n maker_fee_rate: number;\n rwa_taker_fee_rate?: number;\n rwa_maker_fee_rate?: number;\n max_leverage: number;\n futures_taker_fee_rate: number;\n futures_maker_fee_rate: number;\n imr_factor: { [key: string]: number };\n max_notional: { [key: string]: number };\n }\n\n export interface Chain {\n dexs: string[];\n network_infos: NetworkInfos;\n token_infos: TokenInfo[];\n nativeToken?: TokenInfo;\n address?: string;\n symbol?: string;\n on_chain_swap?: boolean;\n // nativeToken\n }\n\n export interface NetworkInfos {\n name: string;\n shortName: string;\n public_rpc_url: string;\n chain_id: number;\n currency_symbol: string;\n bridge_enable: boolean;\n mainnet: boolean;\n est_txn_mins: number | null;\n explorer_base_url: string;\n bridgeless?: boolean;\n withdrawal_fee?: number;\n minimum_withdraw_amount?: number;\n vault_address: string;\n currency_decimal?: number;\n\n cross_chain_router: string;\n depositor: string;\n }\n\n export interface TokenInfo {\n address?: string;\n base_weight: number;\n decimals?: number;\n /** token decimals */\n token_decimal?: number;\n discount_factor?: number | null;\n display_name?: string;\n haircut: number;\n is_collateral: boolean;\n symbol?: string;\n user_max_qty: number;\n precision?: number;\n minimum_withdraw_amount: number;\n swap_enable?: boolean;\n }\n\n export interface Chain {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n base_weight: number;\n discount_factor?: number | null;\n haircut: number;\n user_max_qty: number;\n is_collateral: boolean;\n chain_details: ChainDetail[];\n }\n\n // export interface Token{\n\n // }\n\n export interface ChainDetail {\n chain_id: string;\n chain_name?: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n cross_chain_withdrawal_fee: number;\n display_name: string;\n }\n\n export interface AssetHistory {\n meta: RecordsMeta;\n rows: AssetHistoryRow[];\n }\n\n export interface RecordsMeta {\n total: number;\n records_per_page: number;\n current_page: number;\n }\n\n export interface AssetHistoryRow {\n id: string;\n tx_id: string;\n side: string;\n token: string;\n amount: number;\n fee: number;\n trans_status: string;\n created_time: number;\n updated_time: number;\n chain_id: string;\n }\n\n export interface FundingFeeHistory {\n meta: RecordsMeta;\n rows: FundingFeeRow[];\n }\n\n export interface FundingFeeRow {\n symbol: string;\n funding_rate: number;\n mark_price: number;\n funding_fee: number;\n payment_type: string;\n status: string;\n created_time: number;\n updated_time: number;\n }\n\n export interface StrategyVaultHistoryRow {\n vault_id: string;\n created_time: number;\n type: \"withdrawal\" | \"deposit\";\n status: string;\n amount_change: number;\n token?: string; // need to hard code for now\n vaultName?: string; // need to hard code for now\n }\n\n export interface StrategyVaultHistory {\n rows: StrategyVaultHistoryRow[];\n meta: RecordsMeta;\n }\n\n export interface TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\n updated_time: number;\n chain_id: string;\n // timestamp\n block_time: number;\n }\n\n export interface TransferHistory {\n meta: RecordsMeta;\n rows: TransferHistoryRow[];\n }\n\n export interface TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\n updated_time: number;\n }\n\n export interface DailyRow {\n account_value: number;\n broker_id: string;\n date: string;\n perp_volume: number;\n pnl: number;\n snapshot_time?: number;\n }\n\n export interface PositionHistory {\n position_id: number; // Unique identifier for the position\n liquidation_id?: number; // Unique identifier for the position\n position_status: string; // Status of the position\n type: string; // Type of the position activity\n symbol: string; // Trading pair symbol\n avg_open_price: number; // Average open price of the position\n avg_close_price: number; // Average close price of the position\n max_position_qty: number; // Maximum quantity held in the position\n closed_position_qty: number; // Quantity closed in the position\n side: \"LONG\" | \"SHORT\"; // Side of the position\n trading_fee: number; // Fee charged for trading\n accumulated_funding_fee: number; // Accumulated funding fee for the position\n insurance_fund_fee: number; // Fee contributed to the insurance fund\n liquidator_fee: number; // Fee paid to the liquidator\n realized_pnl: number; // Realized profit and loss\n open_timestamp: number; // Timestamp when the position was opened\n close_timestamp: number; // Timestamp when the position was closed\n last_update_time: number; // Timestamp of the last update to the position\n leverage: number; // Leverage of the position\n }\n\n export interface LiquidationPositionByPerp {\n abs_liquidation_fee: number;\n cost_position_transfer: number;\n liquidator_fee: number;\n position_qty: number;\n symbol: string;\n transfer_price: number;\n mark_price: number;\n }\n\n export interface Liquidation {\n liquidation_id: number;\n timestamp: number;\n transfer_amount_to_insurance_fund: number;\n margin_ratio: number;\n account_mmr: number;\n collateral_value: number;\n position_notional: number;\n positions_by_perp: LiquidationPositionByPerp[];\n }\n\n export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n pending_rebalance: number;\n }\n\n export interface RestrictedAreas {\n invalid_web_country: string;\n invalid_web_city: string;\n }\n\n export interface IpInfo {\n ip: string;\n city: string;\n region: string;\n checked: boolean;\n }\n\n export interface LeverageInfo {\n symbol: string;\n leverage: number;\n }\n}\n\nexport declare namespace WSMessage {\n export interface Ticker {\n symbol: string;\n open: number;\n close: number;\n high: number;\n low: number;\n volume: number;\n amount: number;\n count: number;\n change: number;\n open_interest?: number;\n index_price?: number;\n }\n\n export interface MarkPrice {\n symbol: string;\n price: number;\n }\n\n export interface Position {\n symbol: string;\n positionQty: number;\n costPosition: number;\n lastSumUnitaryFunding: number;\n sumUnitaryFundingVersion: number;\n pendingLongQty: number;\n pendingShortQty: number;\n settlePrice: number;\n averageOpenPrice: number;\n unsettledPnl: number;\n pnl24H: number;\n fee24H: number;\n markPrice: number;\n estLiqPrice: number;\n version: number;\n imr: number;\n imrwithOrders: number;\n mmrwithOrders: number;\n mmr: number;\n }\n\n export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n pending_rebalance: number;\n }\n\n export interface Order {\n symbol: string;\n clientOrderId: string;\n orderId: number;\n type: string;\n side: string;\n quantity: number;\n price: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n avgPrice: number;\n status: string;\n reason: string;\n totalFee: number;\n visible: number;\n /**\n * update time\n */\n timestamp: number;\n reduceOnly: boolean;\n maker: boolean;\n }\n\n export interface Holding {\n holding: number;\n frozen: number;\n interest: number;\n pendingShortQty: number;\n pendingExposure: number;\n pendingLongQty: number;\n pendingLongExposure: number;\n version: number;\n staked: number;\n unbonding: number;\n vault: number;\n fee24H: number;\n markPrice: number;\n }\n\n export interface AlgoOrder {\n symbol: string;\n rootAlgoOrderId: number;\n parentAlgoOrderId: number;\n algoOrderId: number;\n status: string;\n algoType: string;\n side: string;\n quantity: number;\n triggerStatus: string;\n price: number;\n type: string;\n triggerTradePrice: number;\n triggerTime: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n averageExecutedPrice: number;\n totalFee: number;\n timestamp: number;\n visibleQuantity: number;\n reduceOnly: boolean;\n triggered: boolean;\n maker: boolean;\n rootAlgoStatus: string;\n algoStatus: string;\n }\n\n export interface Announcement {\n announcement_id: string;\n message: string;\n i18n: Record<PropertyKey, string | null>;\n url?: string | null;\n type: AnnouncementType | null;\n updated_time: number;\n }\n}\n","/**\n * Supported types for placing an order\n */\nexport enum OrderType {\n LIMIT = \"LIMIT\",\n MARKET = \"MARKET\",\n IOC = \"IOC\",\n FOK = \"FOK\",\n POST_ONLY = \"POST_ONLY\",\n ASK = \"ASK\",\n BID = \"BID\",\n STOP_LIMIT = \"STOP_LIMIT\",\n STOP_MARKET = \"STOP_MARKET\",\n /**\n * Only for POSITIONAL_TP_SL type algo order\n */\n CLOSE_POSITION = \"CLOSE_POSITION\",\n /**\n * Scaled order\n */\n SCALED = \"SCALED\",\n /**\n * trailing stop\n */\n TRAILING_STOP = \"TRAILING_STOP\",\n}\n\nexport enum BBOOrderType {\n COUNTERPARTY1 = \"counterparty1\",\n COUNTERPARTY5 = \"counterparty5\",\n QUEUE1 = \"queue1\",\n QUEUE5 = \"queue5\",\n}\n\nexport enum OrderLevel {\n ONE = 0,\n TWO = 1,\n THREE = 2,\n FOUR = 3,\n FIVE = 4,\n}\n\nexport enum AlgoOrderRootType {\n TP_SL = \"TP_SL\",\n POSITIONAL_TP_SL = \"POSITIONAL_TP_SL\",\n STOP = \"STOP\",\n BRACKET = \"BRACKET\",\n TRAILING_STOP = \"TRAILING_STOP\",\n}\n\nexport enum TriggerPriceType {\n MARK_PRICE = \"MARK_PRICE\",\n}\nexport enum PositionType {\n FULL = \"FULL\",\n PARTIAL = \"PARTIAL\",\n}\n\nexport enum AlgoOrderType {\n TAKE_PROFIT = \"TAKE_PROFIT\",\n STOP_LOSS = \"STOP_LOSS\",\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\",\n}\n\nexport enum PositionSide {\n LONG = \"LONG\",\n SHORT = \"SHORT\",\n}\n\nexport enum OrderStatus {\n /** @deprecated */\n OPEN = \"OPEN\",\n NEW = \"NEW\",\n FILLED = \"FILLED\",\n PARTIAL_FILLED = \"PARTIAL_FILLED\",\n CANCELLED = \"CANCELLED\",\n REPLACED = \"REPLACED\",\n // CANCELLED + FILLED\n COMPLETED = \"COMPLETED\",\n // NEW + PARTIAL_FILLED\n INCOMPLETE = \"INCOMPLETE\",\n REJECTED = \"REJECTED\",\n}\n\nexport interface OrderExt {\n total: string;\n}\n\nexport interface BaseOrder {\n symbol: string;\n order_type: OrderType;\n order_type_ext?: OrderType;\n order_price: string;\n order_quantity: string;\n order_amount?: number;\n visible_quantity: number;\n side: OrderSide;\n reduce_only: boolean;\n slippage: number;\n order_tag: string;\n level: OrderLevel;\n post_only_adjust: boolean;\n /** custom order id, it is used to identify the order from ws */\n client_order_id: string;\n}\n\n/** Scaled order fields */\nexport interface ScaledOrder {\n /** user-defined price at the first order (index 0) */\n start_price?: string;\n /** user-defined price at the last order (index total_orders - 1) */\n end_price?: string;\n /** total number of orders */\n total_orders?: string;\n /** quantity distribution type */\n distribution_type?: DistributionType;\n /** the ratio of qty[end] / qty[start] */\n skew?: string;\n}\n\nexport enum TrailingCallbackType {\n VALUE = \"value\",\n RATE = \"rate\",\n}\n\n/**\n * Trailing Stop that allows users to set an activation price and a trailing amount (value / rate).\n * The order is only activated when the market reaches the activation price,\n * after which the trailing stop logic tracks the extreme price and triggers when the price retraces by the specified trailing amount.\n */\nexport interface TrailingStopOrder {\n /**\n * activated price\n */\n activated_price?: string;\n /**\n * i.e. the value = 100\n */\n callback_value?: string;\n /**\n * i.e. the value = 0.1 represent to 10%\n */\n callback_rate?: string;\n}\n\nexport interface RegularOrder\n extends BaseOrder,\n OrderExt,\n ScaledOrder,\n TrailingStopOrder {\n // symbol: string;\n // client_order_id: string;\n // type: OrderType;\n // price: number;\n // quantity: number;\n}\n\nexport interface AlgoOrder extends BaseOrder, OrderExt {\n // symbol: string;\n quantity: string;\n type: OrderType;\n price: string;\n algo_type: AlgoOrderRootType;\n trigger_price_type: string;\n trigger_price: string;\n child_orders: AlgoOrderChildOrders[];\n}\n\nexport interface BracketOrder extends AlgoOrder, OrderExt {\n /**\n * Computed take profit\n */\n position_type?: PositionType;\n // tp_enable?: boolean;\n // sl_enable?: boolean;\n tp_pnl?: string;\n tp_offset?: string;\n tp_offset_percentage?: string;\n tp_ROI?: string;\n tp_trigger_price?: string;\n tp_order_price?: string;\n tp_order_type?: OrderType;\n\n /**\n * Computed stop loss\n */\n sl_pnl?: string;\n sl_offset?: string;\n sl_offset_percentage?: string;\n sl_ROI?: string;\n sl_trigger_price?: string;\n sl_order_price?: string;\n sl_order_type?: OrderType;\n}\n\nexport type OrderlyOrder = RegularOrder & AlgoOrder & BracketOrder;\n\nexport interface AlgoOrderChildOrders {\n symbol: string;\n algo_type: string;\n child_orders: ChildOrder[];\n}\n\nexport interface ChildOrder {\n symbol: string;\n algo_type: AlgoOrderType;\n side: string;\n type: OrderType;\n trigger_price: string;\n price?: string;\n reduce_only: boolean;\n trigger_price_type?: string;\n}\n\nexport interface TrailingStopOrder {\n activated_price?: string;\n callback_value?: string;\n callback_rate?: string;\n}\n\nexport interface OrderEntity extends ScaledOrder, TrailingStopOrder {\n symbol: string;\n order_type: OrderType;\n algo_type?: AlgoOrderRootType;\n order_type_ext?: OrderType;\n order_price?: string;\n order_quantity?: string;\n order_amount?: number;\n // Whether to display in the orderbook, default=order_quantity, not displayed when =0,\n visible_quantity?: number;\n reduce_only?: boolean;\n side: OrderSide;\n broker_id?: string;\n slippage?: number;\n\n // internal fields\n total?: string;\n // hideInOrderbook?: boolean;\n isStopOrder?: boolean;\n trigger_price?: string;\n order_tag?: string;\n client_order_id?: string;\n level?: OrderLevel;\n}\n\nexport enum DistributionType {\n // enum value need to use lowercase to match the track params\n FLAT = \"flat\",\n ASCENDING = \"ascending\",\n DESCENDING = \"descending\",\n CUSTOM = \"custom\",\n}\n\nexport type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\nexport type RequireKeys<T extends object, K extends keyof T> = Required<\n Pick<T, K>\n> &\n Partial<Omit<T, K>>;\n\nexport interface BaseAlgoOrderEntity<T extends AlgoOrderRootType>\n extends OrderEntity {\n algo_type: AlgoOrderRootType;\n child_orders: (Partial<Omit<AlgoOrderEntity<T>, \"algo_type\" | \"type\">> & {\n algo_type: AlgoOrderType;\n type: OrderType;\n child_orders?: BaseAlgoOrderEntity<T>[\"child_orders\"];\n // trigger_price: number | string;\n })[];\n // if update the order, then need to provide the order_id\n algo_order_id?: number;\n client_order_id?: string;\n order_tag?: string;\n price?: number | string;\n quantity: number | string;\n reduce_only?: boolean;\n side: OrderSide;\n symbol: string;\n trigger_price: string;\n trigger_price_type: TriggerPriceType;\n type: OrderType;\n visible_quantity?: number;\n is_activated?: boolean;\n tp_trigger_price?: string | number;\n sl_trigger_price?: string | number;\n tp_order_price?: string | number;\n tp_order_type?: OrderType;\n sl_order_price?: string | number;\n sl_order_type?: OrderType;\n // tp_enable?: boolean;\n // sl_enable?: boolean;\n position_type?: PositionType;\n}\n\nexport type AlgoOrderEntity<\n T extends AlgoOrderRootType = AlgoOrderRootType.STOP,\n> = T extends AlgoOrderRootType.TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n \"side\" | \"type\" | \"trigger_price\" | \"order_type\"\n >\n : T extends AlgoOrderRootType.POSITIONAL_TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n | \"side\"\n | \"type\"\n | \"trigger_price\"\n | \"order_type\"\n | \"quantity\"\n // | \"tp_enable\"\n // | \"sl_enable\"\n | \"tp_order_price\"\n | \"tp_order_type\"\n | \"sl_order_price\"\n | \"sl_order_type\"\n | \"position_type\"\n >\n : Omit<BaseAlgoOrderEntity<T>, \"child_orders\" | \"order_type\">;\n\nexport type TPSLOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.TP_SL>,\n \"side\" | \"type\" | \"trigger_price\"\n>;\n\nexport type BracketOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.BRACKET>,\n \"side\"\n>;\n","export enum WithdrawStatus {\n NotSupported = \"NotSupported\",\n NotConnected = \"NotConnected\",\n Unsettle = \"Unsettle\",\n InsufficientBalance = \"InsufficientBalance\",\n Normal = \"Normal\",\n}\n","export interface Chain {\n id: number;\n chainNameShort: string;\n chainLogo: string;\n chainInfo: ChainInfo;\n minGasBalance: number;\n minCrossGasBalance: number;\n maxPrepayCrossGas: number;\n blockExplorerName: string;\n chainName: string;\n requestRpc: string;\n}\n\nexport interface ChainInfo {\n chainId: string;\n chainName: string;\n nativeCurrency: NativeCurrency;\n rpcUrls: string[];\n blockExplorerUrls: string[];\n}\n\nexport interface NativeCurrency {\n name: string;\n symbol: string;\n decimals: number;\n fix: number;\n}\n\nexport const Ethereum = {\n chainNameShort: \"Ethereum\",\n id: 1,\n chainLogo: \"\",\n chainInfo: {\n chainId: `0x${(1).toString(16)}`,\n chainName: \"Ethereum Mainnet\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 8,\n },\n rpcUrls: [\"https://mainnet.infura.io/v3/9155d40884554acdb17699a18a1fe348\"],\n blockExplorerUrls: [\"https://etherscan.io/\"],\n },\n minGasBalance: 0.002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.025,\n blockExplorerName: \"EthScan\",\n chainName: \"Ethereum Mainnet\",\n requestRpc: \"https://rpc.ankr.com/eth\",\n};\n\nexport const Avalanche = {\n id: 43114,\n chainInfo: {\n chainId: `0x${(43114).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche\",\n chainNameShort: \"Avalanche\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const Fuji = {\n id: 43113,\n chainInfo: {\n chainId: `0x${(43113).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche Fuji Testnet\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche Fuji\",\n chainNameShort: \"Avalanche Fuji\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const BNB = {\n id: 56,\n chainInfo: {\n chainId: `0x${(56).toString(16)}`, // 0x38\n chainName: \"BNB Chain\",\n nativeCurrency: {\n name: \"bnb\",\n symbol: \"BNB\",\n decimals: 18,\n fix: 6,\n },\n rpcUrls: [\"https://bsc-dataseed1.binance.org/\"],\n blockExplorerUrls: [\"https://bscscan.com/\"],\n },\n minGasBalance: 0.02,\n minCrossGasBalance: 0.02,\n maxPrepayCrossGas: 0.1,\n blockExplorerName: \"BscScan\",\n chainName: \"Binance Smart Chain\",\n chainNameShort: \"BNB Chain\",\n requestRpc: \"https://rpc.ankr.com/bsc\",\n chainLogo: \"\",\n};\n\nexport const Fantom = {\n id: 250,\n chainInfo: {\n chainId: `0x${(250).toString(16)}`, // 0x38\n chainName: \"Fantom\",\n nativeCurrency: {\n name: \"ftm\",\n symbol: \"FTM\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpcapi.fantom.network\"],\n blockExplorerUrls: [\"https://ftmscan.com/\"],\n },\n minGasBalance: 1,\n minCrossGasBalance: 10,\n maxPrepayCrossGas: 60,\n blockExplorerName: \"FTMScan\",\n chainName: \"Fantom\",\n chainNameShort: \"Fantom\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/fantom\",\n};\n\nexport const Polygon = {\n id: 137,\n chainInfo: {\n chainId: `0x${(137).toString(16)}`,\n chainName: \"Polygon\",\n nativeCurrency: {\n name: \"matic\",\n symbol: \"MATIC\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-mainnet.matic.network\"],\n blockExplorerUrls: [\"https://polygonscan.com/\"],\n },\n minGasBalance: 0.1,\n minCrossGasBalance: 1,\n maxPrepayCrossGas: 30,\n blockExplorerName: \"Polygonscan\",\n chainName: \"Polygon\",\n chainNameShort: \"Polygon\",\n requestRpc: \"https://rpc.ankr.com/polygon\",\n chainLogo: \"\",\n};\n\nexport const Arbitrum = {\n id: 42161,\n chainInfo: {\n chainId: `0x${(42161).toString(16)}`,\n chainName: \"Arbitrum\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arb1.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://arbiscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbiscan\",\n chainName: \"Arbitrum\",\n chainNameShort: \"Arbitrum\",\n requestRpc: \"https://arb1.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const Optimism = {\n id: 10,\n chainInfo: {\n chainId: `0x${(10).toString(16)}`,\n chainName: \"Optimism\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://mainnet.optimism.io\"],\n blockExplorerUrls: [\"https://optimistic.etherscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism\",\n chainName: \"Optimism\",\n chainNameShort: \"Optimism\",\n requestRpc: \"https://rpc.ankr.com/optimism\",\n chainLogo: \"\",\n};\n\nexport const zkSyncEra = {\n id: 324,\n chainInfo: {\n chainId: `0x${(324).toString(16)}`,\n chainName: \"zkSync Era\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zksync2-mainnet.zksync.io\"],\n blockExplorerUrls: [\"https://explorer.zksync.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"zkSync Era\",\n chainName: \"zkSync Era\",\n chainNameShort: \"zkSync Era\",\n requestRpc: \"https://zksync2-mainnet.zksync.io/\",\n chainLogo: \"\",\n // blockExplorerName: 'zkSync Era Goerli',\n // chainName: 'zkSync Era Goerli',\n // chainNameShort: 'zkSync Era Goerli',\n // requestRpc: 'https://zksync2-testnet.zksync.dev/',\n // chainLogo: '',\n};\n\nexport const PolygonzkEVM = {\n id: 1101,\n chainInfo: {\n chainId: `0x${(1101).toString(16)}`,\n chainName: \"Polygon zkEVM\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zkevm-rpc.com\"],\n blockExplorerUrls: [\"https://zkevm.polygonscan.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon zkEVM\",\n chainName: \"Polygon zkEVM\",\n chainNameShort: \"Polygon zkEVM\",\n requestRpc: \"https://zkevm-rpc.com\",\n chainLogo: \"\",\n};\n\nexport const Linea = {\n id: 59144,\n chainInfo: {\n chainId: `0x${(59144).toString(16)}`,\n chainName: \"Linea\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.linea.build\"],\n blockExplorerUrls: [\"https://lineascan.build/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Linea\",\n chainName: \"Linea\",\n chainNameShort: \"Linea\",\n requestRpc: \"https://rpc.linea.build\",\n chainLogo: \"\",\n};\n\nexport const Base = {\n id: 8453,\n chainInfo: {\n chainId: `0x${(8453).toString(16)}`,\n chainName: \"Base Network\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://developer-access-mainnet.base.org/\"],\n blockExplorerUrls: [\"https://basescan.org\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base\",\n chainName: \"Base\",\n chainNameShort: \"Base\",\n requestRpc: \"https://developer-access-mainnet.base.org/\",\n chainLogo: \"\",\n};\n\nexport const Mantle = {\n id: 5000,\n chainInfo: {\n chainId: `0x${(5000).toString(16)}`,\n chainName: \"Mantle\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.mantle.xyz/\"],\n blockExplorerUrls: [\"https://mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle\",\n chainName: \"Mantle\",\n chainNameShort: \"Mantle\",\n requestRpc: \"https://rpc.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumGoerli = {\n id: 421613,\n chainInfo: {\n chainId: `0x${(421613).toString(16)}`,\n chainName: \"Arbitrum Goerli\",\n nativeCurrency: {\n name: \"AGOR\",\n symbol: \"AGOR\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://goerli-rollup.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://goerli-rollup-explorer.arbitrum.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Goerli\",\n chainName: \"Arbitrum Goerli\",\n chainNameShort: \"Arbitrum Goerli\",\n requestRpc: \"https://goerli-rollup.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumSepolia = {\n id: 421614,\n chainInfo: {\n chainId: `0x${(421614).toString(16)}`,\n chainName: \"Arbitrum Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\"],\n blockExplorerUrls: [\"https://sepolia-explorer.arbitrum.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Sepolia\",\n chainName: \"Arbitrum Sepolia\",\n chainNameShort: \"Arbitrum Sepolia\",\n requestRpc: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chainLogo: \"\",\n};\n\nexport const OptimismGoerli = {\n id: 420,\n chainInfo: {\n chainId: `0x${(420).toString(16)}`,\n chainName: \"Optimism Goerli\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://optimism-goerli.gateway.tenderly.co\"],\n blockExplorerUrls: [\"https://goerli-optimism.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Goerli\",\n chainName: \"Optimism Goerli\",\n chainNameShort: \"Optimism Goerli\",\n requestRpc: \"https://optimism-goerli.gateway.tenderly.co\",\n chainLogo: \"\",\n};\n\nexport const OptimismSepolia = {\n id: 11155420,\n chainInfo: {\n chainId: `0x${(11155420).toString(16)}`,\n chainName: \"Optimism Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://sepolia.optimism.io\"],\n blockExplorerUrls: [\"https://sepolia-optimistic.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Sepolia\",\n chainName: \"Optimism Sepolia\",\n chainNameShort: \"Optimism Sepolia\",\n requestRpc: \"https://sepolia.optimism.io\",\n chainLogo: \"\",\n};\n\nexport const BaseSepolia = {\n id: 84532,\n chainInfo: {\n chainId: `0x${(84532).toString(16)}`,\n chainName: \"Base Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://base-sepolia-rpc.publicnode.com\"],\n blockExplorerUrls: [\"https://base-sepolia.blockscout.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base Sepolia\",\n chainName: \"Base Sepolia\",\n chainNameShort: \"Base Sepolia\",\n requestRpc: \"https://base-sepolia-rpc.publicnode.com\",\n chainLogo: \"\",\n};\n\nexport const MantleSepolia = {\n id: 5003,\n chainInfo: {\n chainId: `0x${(5003).toString(16)}`,\n chainName: \"Mantle Sepolia\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.sepolia.mantle.xyz/\"],\n blockExplorerUrls: [\"https://sepolia.mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle Sepolia\",\n chainName: \"Mantle Sepolia\",\n chainNameShort: \"Mantle Sepolia\",\n requestRpc: \"https://rpc.sepolia.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const PolygonAmoy = {\n id: 80002,\n chainInfo: {\n chainId: `0x${(80002).toString(16)}`,\n chainName: \"Polygon Amoy\",\n nativeCurrency: {\n name: \"MATIC\",\n symbol: \"MATIC\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-amoy.polygon.technology/\"],\n blockExplorerUrls: [\"https://www.oklink.com/amoy\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon Amoy\",\n chainName: \"Polygon Amoy\",\n chainNameShort: \"Polygon Amoy\",\n requestRpc: \"https://rpc-amoy.polygon.technology/\",\n chainLogo: \"\",\n};\n\nexport const Sei = {\n id: 1329,\n chainInfo: {\n chainId: `0x${(1329).toString(16)}`,\n chainName: \"Sei Network\",\n nativeCurrency: {\n name: \"SEI\",\n symbol: \"SEI\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://evm-rpc.sei-apis.com\"],\n blockExplorerUrls: [\"https://seitrace.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\n\nexport const StoryTestnet = {\n name: \"Story Odyssey Testnet\",\n public_rpc_url: \"https://rpc.odyssey.storyrpc.io/\",\n chain_id: 1516,\n currency_symbol: \"IP\",\n explorer_base_url: \"\",\n vault_address: \"\",\n};\nexport const StoryOdysseyTestnet = {\n id: 1329,\n chainInfo: {\n chainId: `0x${StoryTestnet.chain_id.toString(16)}`,\n chainName: StoryTestnet.name,\n nativeCurrency: {\n name: \"IP\",\n symbol: \"IP\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [StoryTestnet.public_rpc_url],\n blockExplorerUrls: [],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\nexport const chainsInfoMap: Map<number, Chain> = new Map([\n [Ethereum.id, Ethereum],\n [Avalanche.id, Avalanche],\n [Fuji.id, Fuji],\n [BNB.id, BNB],\n [Fantom.id, Fantom],\n [Polygon.id, Polygon],\n [Arbitrum.id, Arbitrum],\n [Optimism.id, Optimism],\n [zkSyncEra.id, zkSyncEra],\n [PolygonzkEVM.id, PolygonzkEVM],\n [Linea.id, Linea],\n [Base.id, Base],\n [Mantle.id, Mantle],\n [ArbitrumGoerli.id, ArbitrumGoerli],\n [ArbitrumSepolia.id, ArbitrumSepolia],\n [OptimismGoerli.id, OptimismGoerli],\n [OptimismSepolia.id, OptimismSepolia],\n [BaseSepolia.id, BaseSepolia],\n [MantleSepolia.id, MantleSepolia],\n [PolygonAmoy.id, PolygonAmoy],\n [Sei.id, Sei],\n [StoryOdysseyTestnet.id, StoryOdysseyTestnet],\n]);\n\nexport const SolanaDevnet = {\n id: 901901901,\n chainInfo: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chainId: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n} as unknown as typeof Arbitrum;\n\nexport const TestnetChains = [\n {\n network_infos: {\n name: \"Arbitrum Sepolia\",\n shortName: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chain_id: 421614,\n currency_symbol: \"ETH\",\n bridge_enable: true,\n mainnet: false,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n est_txn_mins: null,\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chain_id: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: StoryTestnet,\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0xF1815bd50389c46847f0Bda824eC8da914045D14\",\n decimals: 6,\n },\n ],\n },\n // {\n // network_infos: {\n // name: \"Mantle Sepolia\",\n // shortName: \"Mantle Sepolia\",\n // public_rpc_url: \"https://rpc.sepolia.mantle.xyz/\",\n // chain_id: 5003,\n // currency_symbol: \"MNT\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://sepolia.mantlescan.xyz/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xAcab8129E2cE587fD203FD770ec9ECAFA2C88080\",\n // decimals: 6,\n // display_name: \"USDC.e\",\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Arbitrum Goerli\",\n // shortName: \"Arbitrum Goerli\",\n // public_rpc_url: \"https://goerli-rollup.arbitrum.io/rpc\",\n // chain_id: 421613,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli.arbiscan.io/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xfd064A18f3BF249cf1f87FC203E90D8f650f2d63\",\n // decimals: 6,\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Optimism Goerli\",\n // shortName: \"Optimism Goerli\",\n // public_rpc_url: \"https://optimism-goerli.gateway.tenderly.co\",\n // chain_id: 420,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli-optimism.etherscan.io\",\n // est_txn_mins: null,\n // },\n // },\n];\n\nexport const defaultMainnetChains = [Arbitrum, Base, Optimism];\nexport const defaultTestnetChains = [ArbitrumSepolia];\n\nexport enum ChainNamespace {\n evm = \"EVM\",\n solana = \"SOL\",\n}\n\nexport const AbstractChains = new Set([2741, 11124]);\nexport const SolanaChains = new Set([901901901, 900900900]);\n","export enum TrackerEventName {\n /** virtual event (not send this event name to tracker) */\n trackIdentifyUserId = \"track_identify_user_id\",\n trackIdentify = \"track_identify\",\n trackCustomEvent = \"track_custom_event\",\n\n /** real event name (send this event name to tracker) */\n withdrawSuccess = \"withdraw_request_success\",\n withdrawFailed = \"withdraw_request_failure\",\n depositSuccess = \"deposit_request_success\",\n depositFailed = \"deposit_request_failure\",\n signinSuccess = \"sign_message_success\",\n placeOrderSuccess = \"place_order_success\",\n walletConnect = \"connect_wallet_success\",\n clickLinkDeviceButton = \"click_link_device_button\",\n signLinkDeviceMessageSuccess = \"sign_link_device_message_success\",\n linkDeviceModalClickConfirm = \"link_device_modal_click_confirm\",\n socialLoginSuccess = \"social_login_success\",\n clickSwitchNetwork = \"click_switch_network\",\n clickSwitchWallet = \"click_switch_wallet\",\n switchNetworkSuccess = \"switch_network_success\",\n clickExportPrivateKey = \"click_export_private_key\",\n switchLanguage = \"switch_language\",\n leaderboardCampaignClickTradeNow = \"leaderboard_campaign_click_trade_now\",\n leaderboardCampaignClickLearnMore = \"leaderboard_campaign_click_learn_more\",\n vaultDepositSuccess = \"vault_deposit_success\",\n vaultDepositFailed = \"vault_deposit_failed\",\n vaultWithdrawSuccess = \"vault_withdraw_success\",\n vaultWithdrawFailed = \"vault_withdraw_failed\",\n clickBBOButton = \"click_bbo_button\",\n confirmCloseAllPositions = \"confirm_close_all_positions\",\n}\n","import { API } from \"./types/api\";\n\n// export type Chain = {\n// id: string;\n// name?: string;\n// };\n\nexport type CurrentChain = {\n id: number;\n info: API.Chain;\n};\n\nexport enum WS_WalletStatusEnum {\n NO = \"NO\",\n FAILED = \"FAILED\",\n PENDING = \"PENDING\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n}\n","export const LedgerWalletKey = \"orderly:ledger-wallet\";\nexport const ConnectorKey = \"orderly:connectorKey\";\nexport const ChainKey = \"order:chain\";\nexport const LinkDeviceKey = \"orderly_link_device\";\nexport const TradingviewFullscreenKey = \"orderly:tradingview-fullscreen\";\nexport const OrderEntrySortKeys = \"orderly:order_entry_sort_keys\";\n","export class ApiError extends Error {\n constructor(message: string, private readonly code: number) {\n super(message);\n this.name = \"ApiError\";\n }\n}\n\nexport class SDKError extends Error {\n constructor(message: string) {\n super(`[ORDERLY SDK ERROR]:${message}`);\n this.name = \"SDKError\";\n }\n}\n","export const definedTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n ],\n Registration: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"registrationNonce\", type: \"uint256\" },\n ],\n Withdraw: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"receiver\", type: \"address\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"withdrawNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n AddOrderlyKey: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"orderlyKey\", type: \"string\" },\n { name: \"scope\", type: \"string\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"expiration\", type: \"uint64\" },\n ],\n SettlePnl: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"settleNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n DexRequest: [\n { name: \"payloadType\", type: \"uint8\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"receiver\", type: \"address\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"vaultId\", type: \"bytes32\" },\n { name: \"token\", type: \"string\" },\n { name: \"dexBrokerId\", type: \"string\" },\n ],\n InternalTransfer: [\n { name: \"receiver\", type: \"bytes32\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"transferNonce\", type: \"uint64\" },\n ],\n} as const;\n","export enum AssetHistoryStatusEnum {\n /** @deprecated, this status is not used */\n NEW = \"NEW\",\n PENDING = \"PENDING\",\n CONFIRM = \"CONFIRM\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n FAILED = \"FAILED\",\n PENDING_REBALANCE = \"PENDING_REBALANCE\",\n}\n\nexport enum AssetHistorySideEnum {\n DEPOSIT = \"DEPOSIT\",\n WITHDRAW = \"WITHDRAW\",\n}\n","export const DEFAUL_ORDERLY_KEY_SCOPE = \"read,trading\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;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SAAS;AAAA,EACxC;AAAA,EACA,kBAAkB;AAAA,IAChB,EAAE,MAAM,YAAY,MAAM,UAAU;AAAA,IACpC,EAAE,MAAM,SAAS,MAAM,SAAS;AAAA,IAChC,EAAE,MAAM,UAAU,MAAM,UAAU;AAAA,IAClC,EAAE,MAAM,iBAAiB,MAAM,SAAS;AAAA,EAC1C;AACF;;;AXPA,kBAA6B;;;AY5CtB,IAAK,yBAAL,kBAAKC,4BAAL;AAEL,EAAAA,wBAAA,SAAM;AACN,EAAAA,wBAAA,aAAU;AACV,EAAAA,wBAAA,aAAU;AACV,EAAAA,wBAAA,gBAAa;AACb,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,YAAS;AACT,EAAAA,wBAAA,uBAAoB;AARV,SAAAA;AAAA,GAAA;AAWL,IAAK,uBAAL,kBAAKC,0BAAL;AACL,EAAAA,sBAAA,aAAU;AACV,EAAAA,sBAAA,cAAW;AAFD,SAAAA;AAAA,GAAA;;;ACXL,IAAM,2BAA2B;","names":["AccountStatusEnum","SystemStateEnum","ExchangeStatusEnum","NetworkStatusEnum","AnnouncementType","OrderType","BBOOrderType","OrderLevel","AlgoOrderRootType","TriggerPriceType","PositionType","AlgoOrderType","OrderSide","OrderStatus","TrailingCallbackType","DistributionType","WithdrawStatus","ChainNamespace","TrackerEventName","WS_WalletStatusEnum","AssetHistoryStatusEnum","AssetHistorySideEnum"]}
package/dist/index.mjs CHANGED
@@ -110,7 +110,7 @@ var ArbitrumSepoliaTokenInfo = {
110
110
  cross_chain_withdrawal_fee: 2,
111
111
  display_name: "USDC"
112
112
  };
113
- var TesntTokenFallback = (testnetTokens) => [
113
+ var TesnetTokenFallback = (testnetTokens) => [
114
114
  {
115
115
  token: "USDC",
116
116
  token_hash: "0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa",
@@ -926,6 +926,7 @@ var TrackerEventName = /* @__PURE__ */ ((TrackerEventName2) => {
926
926
  TrackerEventName2["vaultWithdrawSuccess"] = "vault_withdraw_success";
927
927
  TrackerEventName2["vaultWithdrawFailed"] = "vault_withdraw_failed";
928
928
  TrackerEventName2["clickBBOButton"] = "click_bbo_button";
929
+ TrackerEventName2["confirmCloseAllPositions"] = "confirm_close_all_positions";
929
930
  return TrackerEventName2;
930
931
  })(TrackerEventName || {});
931
932
 
@@ -1116,7 +1117,7 @@ export {
1116
1117
  StoryOdysseyTestnet,
1117
1118
  StoryTestnet,
1118
1119
  SystemStateEnum,
1119
- TesntTokenFallback,
1120
+ TesnetTokenFallback,
1120
1121
  TestnetChains,
1121
1122
  TrackerEventName,
1122
1123
  TradingviewFullscreenKey,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/version.ts","../src/constants.ts","../src/types/api.ts","../src/order.ts","../src/withdraw.ts","../src/chains.ts","../src/track.ts","../src/wallet.ts","../src/storageKey.ts","../src/errors.ts","../src/sign.ts","../src/index.ts","../src/assetHistory.ts","../src/account.ts"],"sourcesContent":["declare global {\n interface Window {\n __ORDERLY_VERSION__?: {\n [key: string]: string;\n };\n }\n}\nif (typeof window !== \"undefined\") {\n window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};\n window.__ORDERLY_VERSION__[\"@kodiak-finance/orderly-types\"] = \"2.7.4\";\n}\n\nexport default \"2.7.4\";\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport enum AccountStatusEnum {\n EnableTradingWithoutConnected = -1,\n NotConnected = 0,\n Connected = 1,\n NotSignedIn = 2,\n SignedIn = 3,\n DisabledTrading = 4,\n EnableTrading = 5,\n}\n\nexport enum SystemStateEnum {\n Loading = 0,\n Error = 1,\n Ready = 10,\n}\n\nexport enum ExchangeStatusEnum {\n Normal = 0,\n Maintain = 1,\n}\n\nexport type NetworkId = \"testnet\" | \"mainnet\";\n\nexport enum NetworkStatusEnum {\n unknown = 0,\n unsupported = 1,\n supported = 2,\n}\n\n// Testnet\n// Arbitrum Goerli\n// export const ARBITRUM_TESTNET_CHAINID = 421613;\n// export const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EED\";\n\n// Arbitrum Sepolia\nexport const ARBITRUM_TESTNET_CHAINID = 421614;\nexport const SOLANA_TESTNET_CHAINID = 901901901;\nexport const SOLANA_MAINNET_CHAINID = 900900900;\nexport const STORY_TESTNET_CHAINID = 1516;\nexport const MONAD_TESTNET_CHAINID = 10143;\nexport const ABSTRACT_TESTNET_CHAINID = 11124;\nexport const ABSTRACT_MAINNET_CHAINID = 2741;\nexport const BSC_TESTNET_CHAINID = 97;\nexport const ABSTRACT_CHAIN_ID_MAP = new Set([\n ABSTRACT_TESTNET_CHAINID,\n ABSTRACT_MAINNET_CHAINID,\n]);\n\nexport const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EEE\";\n\nexport const MANTLE_TESTNET_CHAINID = 5003;\nexport const MANTLE_TESTNET_CHAINID_HEX = \"0x138b\";\n\n// Mainnet\nexport const ARBITRUM_MAINNET_CHAINID = 42161;\nexport const ETHEREUM_MAINNET_CHAINID = 1;\nexport const ARBITRUM_MAINNET_CHAINID_HEX = \"0xa4b1\";\n\nexport const MEDIA_TABLET = \"(max-width: 768px)\";\n\nexport const DEPOSIT_FEE_RATE = 1.05;\n\n/**\n * A constant for the maximum value for a ``uint256``.\n */\nexport const MaxUint256: bigint = BigInt(\n \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n);\n\nexport const nativeTokenAddress = \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\";\n\nexport const nativeETHAddress = \"0x0000000000000000000000000000000000000000\";\n\nexport const isNativeTokenChecker = (address: string) =>\n address === nativeTokenAddress || address === nativeETHAddress;\n\nexport const ArbitrumSepoliaChainInfo = {\n name: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.gateway.tenderly.co\",\n chain_id: \"421614\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n vault_address: \"0x0EaC556c0C2321BA25b9DC01e4e3c95aD5CDCd2f\",\n};\nexport const AbstractTestnetChainInfo = {\n name: \"Abstract Testnet\",\n public_rpc_url: \"https://api.testnet.abs.xyz\",\n chain_id: \"11124\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.abscan.org\",\n vault_address: \"0xf14Ff11F3bb1011ff42665Ec869c7827c43745Fd\",\n};\nexport const AbstractTestnetTokenInfo = {\n chain_id: \"11124\",\n contract_address: \"0xa0BB43E2eA7fcE91F07e628d72fD6333e80F47D2\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\",\n};\nexport const SolanaDevnetChainInfo = {\n chain_id: \"901901901\",\n currency_decimal: 9,\n currency_symbol: \"SOL\",\n explorer_base_url: \"https://explorer.solana.com/?cluster=devnet\",\n name: \"Solana-Devnet\",\n public_rpc_url: \"https://api.devnet.solana.com\",\n vault_address: \"9shwxWDUNhtwkHocsUAmrNAQfBH2DHh4njdAEdHZZkF2\",\n};\n\nexport const SolanaDevnetTokenInfo = {\n chain_id: \"901901901\",\n contract_address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 5,\n display_name: \"USDC\",\n};\nexport const ArbitrumSepoliaTokenInfo = {\n chain_id: \"421614\",\n contract_address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\",\n};\n\nexport const TesntTokenFallback = (testnetTokens: any) => [\n {\n token: \"USDC\",\n token_hash:\n \"0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa\",\n decimals: 6,\n minimum_withdraw_amount: 0.000001,\n chain_details: testnetTokens,\n },\n];\n\nexport const EMPTY_LIST: ReadonlyArray<any> = [];\n\nexport const EMPTY_OBJECT: Readonly<Record<PropertyKey, any>> = {};\n\nexport const EMPTY_OPERATION = () => {};\n","/* eslint-disable @typescript-eslint/no-namespace */\nimport { AlgoOrderRootType, OrderSide, OrderType } from \"../order\";\n\nexport enum AnnouncementType {\n Listing = \"LISTING\",\n Maintenance = \"MAINTENANCE\",\n Delisting = \"DELISTING\",\n Campaign = \"CAMPAIGN\",\n}\n\nexport declare namespace API {\n // /v1/public/auto_convert_threshold\n export interface ConvertThreshold {\n ltv_threshold: number;\n negative_usdc_threshold: number;\n }\n\n //v1/public/token\n export interface Token {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n //v1/public/token\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n }\n\n // ws market, api v1/public/futures\n export interface MarketInfo {\n symbol: string;\n index_price: number;\n mark_price: number;\n sum_unitary_funding: number;\n est_funding_rate: number;\n last_funding_rate: number;\n next_funding_time: number;\n open_interest: string;\n \"24h_open\": number;\n \"24h_close\": number;\n \"24h_high\": number;\n \"24h_low\": number;\n /**\n * @deprecated\n * spelling mistake, use 24h_volume to instead, will be remove next version\n */\n \"24h_volumn\": number;\n \"24h_volume\": number;\n \"24h_amount\": number;\n }\n\n export interface MarketInfoExt extends MarketInfo {\n change: number;\n \"24h_volume\": number;\n }\n\n export interface AnnouncementRow {\n announcement_id: number | string;\n message: string;\n i18n?: Record<PropertyKey, string | null>;\n url?: string | null;\n type?: AnnouncementType | null;\n updated_time?: number | null;\n }\n\n export interface Announcement {\n last_updated_time?: number | null;\n rows?: AnnouncementRow[];\n }\n\n /**\n * v1/public/info\n */\n export interface Symbol {\n symbol: string;\n quote_min: number;\n quote_max: number;\n quote_tick: number;\n base_min: number;\n base_max: number;\n base_tick: number;\n min_notional: number;\n price_range: number;\n price_scope: number;\n std_liquidation_fee: number;\n liquidator_fee: number;\n claim_insurance_fund_discount: number;\n funding_period: number;\n cap_funding: number;\n floor_funding: number;\n interest_rate: number;\n created_time: number;\n updated_time: number;\n imr_factor: number;\n base_mmr: number;\n base_imr: number;\n }\n\n export interface TokenItem {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n }\n\n export interface SymbolExt extends Symbol {\n base: string;\n base_dp: number;\n\n quote: string;\n quote_dp: number;\n type: string;\n name: string;\n }\n\n export interface Order {\n symbol: string;\n status: string;\n side: string;\n order_id: number;\n algo_order_id?: number;\n user_id: number;\n price: number | null;\n type: string;\n quantity: number;\n amount: null;\n visible: number;\n executed: number;\n total_fee: number;\n fee_asset: string;\n client_order_id?: string;\n average_executed_price: number;\n total_executed_quantity: number;\n visible_quantity: number;\n created_time: number;\n updated_time: number;\n reduce_only: boolean;\n trigger_price?: number;\n order_tag?: string;\n }\n\n export interface OrderExt extends Order {\n mark_price: string;\n }\n\n export interface AlgoOrder {\n algo_order_id: number;\n root_algo_order_id: number;\n parent_algo_order_id: number;\n parent_algo_type: AlgoOrderRootType;\n symbol: string;\n algo_type: string;\n child_orders: AlgoOrder[];\n side: string;\n quantity: number;\n is_triggered: boolean;\n is_activated: boolean;\n trigger_price: number;\n trigger_price_type: string;\n type: OrderType;\n root_algo_status: string;\n algo_status: string;\n price?: number;\n total_executed_quantity: number;\n visible_quantity: number;\n total_fee: number;\n fee_asset: string;\n reduce_only: boolean;\n created_time: number;\n updated_time: number;\n order_tag?: string;\n client_order_id?: string;\n\n // trailing stop order\n activated_price?: number;\n callback_value?: number;\n callback_rate?: number;\n extreme_price?: number;\n }\n\n export interface AlgoOrderExt extends AlgoOrder {\n mark_price: string;\n position?: Partial<Position>;\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n }\n\n export interface OrderResponse {\n rows: (Order | AlgoOrder)[];\n meta: {\n total: number;\n current_page: number;\n records_per_page: number;\n };\n }\n\n export interface FundingRate {\n symbol: string;\n est_funding_rate: number;\n est_funding_rate_timestamp: number;\n last_funding_rate: number;\n last_funding_rate_timestamp: number;\n next_funding_time: number;\n sum_unitary_funding: number;\n }\n\n export interface FundingPeriodData {\n rate: number;\n positive: number;\n negative: number;\n }\n\n export interface FundingDetails {\n symbol: string;\n quote_min: number;\n quote_max: number;\n quote_tick: number;\n base_min: number;\n base_max: number;\n base_tick: number;\n min_notional: number;\n price_range: number;\n price_scope: number;\n std_liquidation_fee: number;\n liquidator_fee: number;\n claim_insurance_fund_discount: number;\n funding_period: number;\n cap_funding: number;\n floor_funding: number;\n interest_rate: number;\n created_time: number;\n updated_time: number;\n liquidation_tier: number;\n cap_ir: number;\n floor_ir: number;\n mark_index_price_deviation_floor: number;\n mark_index_price_deviation_cap: number;\n global_max_oi_cap: number;\n base_mmr: number;\n base_imr: number;\n imr_factor: number;\n deviation_factor: number;\n }\n\n export interface FundingHistory {\n symbol: string;\n data_start_time: string;\n funding: {\n last: FundingPeriodData;\n \"1d\": FundingPeriodData;\n \"3d\": FundingPeriodData;\n \"7d\": FundingPeriodData;\n \"14d\": FundingPeriodData;\n \"30d\": FundingPeriodData;\n \"90d\": FundingPeriodData;\n };\n }\n\n export interface PositionInfo extends PositionAggregated {\n // margin_ratio: number;\n // initial_margin_ratio: number;\n // maintenance_margin_ratio: number;\n // open_margin_ratio: number;\n // current_margin_ratio_with_orders: number;\n // initial_margin_ratio_with_orders: number;\n // maintenance_margin_ratio_with_orders: number;\n // total_collateral_value: number;\n // free_collateral: number;\n rows: Position[];\n // total_pnl_24_h: number;\n }\n\n export interface PositionAggregated {\n margin_ratio: number;\n initial_margin_ratio: number;\n maintenance_margin_ratio: number;\n open_margin_ratio: number;\n current_margin_ratio_with_orders: number;\n initial_margin_ratio_with_orders: number;\n maintenance_margin_ratio_with_orders: number;\n total_collateral_value: number;\n free_collateral: number;\n total_pnl_24_h: number;\n /**\n * @deprecated use total_unreal_pnl instead\n */\n unrealPnL: number;\n total_unreal_pnl: number;\n total_unreal_pnl_index?: number;\n /**\n * @deprecated use total_unsettled_pnl instead\n */\n unsettledPnL: number;\n total_unsettled_pnl: number;\n notional: number;\n unrealPnlROI: number;\n unrealPnlROI_index?: number;\n }\n\n export interface Position {\n account_id?: string;\n symbol: string;\n position_qty: number;\n cost_position: number;\n last_sum_unitary_funding: number;\n pending_long_qty: number;\n pending_short_qty: number;\n settle_price: number;\n average_open_price: number;\n unrealized_pnl: number;\n unrealized_pnl_index?: number;\n unrealized_pnl_ROI: number;\n unsettled_pnl: number;\n unsettled_pnl_ROI: number;\n unrealized_pnl_ROI_index?: number;\n mark_price: number;\n index_price?: number;\n est_liq_price: number | null;\n timestamp: number;\n /**\n * Maintenance margin ratio\n */\n mmr: number;\n imr: number;\n IMR_withdraw_orders: number;\n MMR_with_orders: number;\n pnl_24_h: number;\n fee_24_h: number;\n fundingFee?: number;\n leverage: number;\n }\n\n export interface PositionExt extends Position {\n notional: number;\n mm: number;\n }\n\n export interface PositionTPSLExt extends PositionExt {\n full_tp_sl?: {\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n algo_order?: AlgoOrder;\n };\n partial_tp_sl?: {\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n order_num?: number;\n algo_order?: AlgoOrder;\n };\n\n // has_position_tp_sl: boolean;\n\n /**\n * related position tp/sl order\n */\n algo_order?: AlgoOrder;\n }\n\n export interface PositionsTPSLExt extends PositionAggregated {\n rows: PositionTPSLExt[];\n }\n\n export interface Trade {\n symbol: Symbol;\n side: OrderSide;\n ts: number;\n executed_price: number;\n executed_quantity: number;\n executed_timestamp: number;\n }\n\n export interface Holding {\n token: string;\n holding: number;\n frozen: number;\n pending_short: number;\n updated_time: number;\n }\n\n export interface AccountInfo {\n account_id: string;\n email: string;\n account_mode: string;\n tier: string;\n futures_tier: string;\n maintenance_cancel_orders: boolean;\n taker_fee_rate: number;\n maker_fee_rate: number;\n max_leverage: number;\n futures_taker_fee_rate: number;\n futures_maker_fee_rate: number;\n imr_factor: { [key: string]: number };\n max_notional: { [key: string]: number };\n }\n\n export interface Chain {\n dexs: string[];\n network_infos: NetworkInfos;\n token_infos: TokenInfo[];\n nativeToken?: TokenInfo;\n address?: string;\n symbol?: string;\n on_chain_swap?: boolean;\n // nativeToken\n }\n\n export interface NetworkInfos {\n name: string;\n shortName: string;\n public_rpc_url: string;\n chain_id: number;\n currency_symbol: string;\n bridge_enable: boolean;\n mainnet: boolean;\n est_txn_mins: number | null;\n explorer_base_url: string;\n bridgeless?: boolean;\n withdrawal_fee?: number;\n minimum_withdraw_amount?: number;\n vault_address: string;\n currency_decimal?: number;\n\n cross_chain_router: string;\n depositor: string;\n }\n\n export interface TokenInfo {\n address?: string;\n base_weight: number;\n decimals?: number;\n /** token decimals */\n token_decimal?: number;\n discount_factor?: number | null;\n display_name?: string;\n haircut: number;\n is_collateral: boolean;\n symbol?: string;\n user_max_qty: number;\n precision?: number;\n minimum_withdraw_amount: number;\n swap_enable?: boolean;\n }\n\n export interface Chain {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n base_weight: number;\n discount_factor?: number | null;\n haircut: number;\n user_max_qty: number;\n is_collateral: boolean;\n chain_details: ChainDetail[];\n }\n\n // export interface Token{\n\n // }\n\n export interface ChainDetail {\n chain_id: string;\n chain_name?: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n cross_chain_withdrawal_fee: number;\n display_name: string;\n }\n\n export interface AssetHistory {\n meta: RecordsMeta;\n rows: AssetHistoryRow[];\n }\n\n export interface RecordsMeta {\n total: number;\n records_per_page: number;\n current_page: number;\n }\n\n export interface AssetHistoryRow {\n id: string;\n tx_id: string;\n side: string;\n token: string;\n amount: number;\n fee: number;\n trans_status: string;\n created_time: number;\n updated_time: number;\n chain_id: string;\n }\n\n export interface FundingFeeHistory {\n meta: RecordsMeta;\n rows: FundingFeeRow[];\n }\n\n export interface FundingFeeRow {\n symbol: string;\n funding_rate: number;\n mark_price: number;\n funding_fee: number;\n payment_type: string;\n status: string;\n created_time: number;\n updated_time: number;\n }\n\n export interface StrategyVaultHistoryRow {\n vault_id: string;\n created_time: number;\n type: \"withdrawal\" | \"deposit\";\n status: string;\n amount_change: number;\n token?: string; // need to hard code for now\n vaultName?: string; // need to hard code for now\n }\n\n export interface StrategyVaultHistory {\n rows: StrategyVaultHistoryRow[];\n meta: RecordsMeta;\n }\n\n export interface TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\n updated_time: number;\n chain_id: string;\n // timestamp\n block_time: number;\n }\n\n export interface TransferHistory {\n meta: RecordsMeta;\n rows: TransferHistoryRow[];\n }\n\n export interface TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\n updated_time: number;\n }\n\n export interface DailyRow {\n account_value: number;\n broker_id: string;\n date: string;\n perp_volume: number;\n pnl: number;\n snapshot_time?: number;\n }\n\n export interface PositionHistory {\n position_id: number; // Unique identifier for the position\n liquidation_id?: number; // Unique identifier for the position\n position_status: string; // Status of the position\n type: string; // Type of the position activity\n symbol: string; // Trading pair symbol\n avg_open_price: number; // Average open price of the position\n avg_close_price: number; // Average close price of the position\n max_position_qty: number; // Maximum quantity held in the position\n closed_position_qty: number; // Quantity closed in the position\n side: \"LONG\" | \"SHORT\"; // Side of the position\n trading_fee: number; // Fee charged for trading\n accumulated_funding_fee: number; // Accumulated funding fee for the position\n insurance_fund_fee: number; // Fee contributed to the insurance fund\n liquidator_fee: number; // Fee paid to the liquidator\n realized_pnl: number; // Realized profit and loss\n open_timestamp: number; // Timestamp when the position was opened\n close_timestamp: number; // Timestamp when the position was closed\n last_update_time: number; // Timestamp of the last update to the position\n leverage: number; // Leverage of the position\n }\n\n export interface LiquidationPositionByPerp {\n abs_liquidation_fee: number;\n cost_position_transfer: number;\n liquidator_fee: number;\n position_qty: number;\n symbol: string;\n transfer_price: number;\n mark_price: number;\n }\n\n export interface Liquidation {\n liquidation_id: number;\n timestamp: number;\n transfer_amount_to_insurance_fund: number;\n margin_ratio: number;\n account_mmr: number;\n collateral_value: number;\n position_notional: number;\n positions_by_perp: LiquidationPositionByPerp[];\n }\n\n export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n pending_rebalance: number;\n }\n\n export interface RestrictedAreas {\n invalid_web_country: string;\n invalid_web_city: string;\n }\n\n export interface IpInfo {\n ip: string;\n city: string;\n region: string;\n checked: boolean;\n }\n\n export interface LeverageInfo {\n symbol: string;\n leverage: number;\n }\n}\n\nexport declare namespace WSMessage {\n export interface Ticker {\n symbol: string;\n open: number;\n close: number;\n high: number;\n low: number;\n volume: number;\n amount: number;\n count: number;\n change: number;\n open_interest?: number;\n index_price?: number;\n }\n\n export interface MarkPrice {\n symbol: string;\n price: number;\n }\n\n export interface Position {\n symbol: string;\n positionQty: number;\n costPosition: number;\n lastSumUnitaryFunding: number;\n sumUnitaryFundingVersion: number;\n pendingLongQty: number;\n pendingShortQty: number;\n settlePrice: number;\n averageOpenPrice: number;\n unsettledPnl: number;\n pnl24H: number;\n fee24H: number;\n markPrice: number;\n estLiqPrice: number;\n version: number;\n imr: number;\n imrwithOrders: number;\n mmrwithOrders: number;\n mmr: number;\n }\n\n export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n pending_rebalance: number;\n }\n\n export interface Order {\n symbol: string;\n clientOrderId: string;\n orderId: number;\n type: string;\n side: string;\n quantity: number;\n price: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n avgPrice: number;\n status: string;\n reason: string;\n totalFee: number;\n visible: number;\n /**\n * update time\n */\n timestamp: number;\n reduceOnly: boolean;\n maker: boolean;\n }\n\n export interface Holding {\n holding: number;\n frozen: number;\n interest: number;\n pendingShortQty: number;\n pendingExposure: number;\n pendingLongQty: number;\n pendingLongExposure: number;\n version: number;\n staked: number;\n unbonding: number;\n vault: number;\n fee24H: number;\n markPrice: number;\n }\n\n export interface AlgoOrder {\n symbol: string;\n rootAlgoOrderId: number;\n parentAlgoOrderId: number;\n algoOrderId: number;\n status: string;\n algoType: string;\n side: string;\n quantity: number;\n triggerStatus: string;\n price: number;\n type: string;\n triggerTradePrice: number;\n triggerTime: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n averageExecutedPrice: number;\n totalFee: number;\n timestamp: number;\n visibleQuantity: number;\n reduceOnly: boolean;\n triggered: boolean;\n maker: boolean;\n rootAlgoStatus: string;\n algoStatus: string;\n }\n\n export interface Announcement {\n announcement_id: string;\n message: string;\n i18n: Record<PropertyKey, string | null>;\n url?: string | null;\n type: AnnouncementType | null;\n updated_time: number;\n }\n}\n","/**\n * Supported types for placing an order\n */\nexport enum OrderType {\n LIMIT = \"LIMIT\",\n MARKET = \"MARKET\",\n IOC = \"IOC\",\n FOK = \"FOK\",\n POST_ONLY = \"POST_ONLY\",\n ASK = \"ASK\",\n BID = \"BID\",\n STOP_LIMIT = \"STOP_LIMIT\",\n STOP_MARKET = \"STOP_MARKET\",\n /**\n * Only for POSITIONAL_TP_SL type algo order\n */\n CLOSE_POSITION = \"CLOSE_POSITION\",\n /**\n * Scaled order\n */\n SCALED = \"SCALED\",\n /**\n * trailing stop\n */\n TRAILING_STOP = \"TRAILING_STOP\",\n}\n\nexport enum BBOOrderType {\n COUNTERPARTY1 = \"counterparty1\",\n COUNTERPARTY5 = \"counterparty5\",\n QUEUE1 = \"queue1\",\n QUEUE5 = \"queue5\",\n}\n\nexport enum OrderLevel {\n ONE = 0,\n TWO = 1,\n THREE = 2,\n FOUR = 3,\n FIVE = 4,\n}\n\nexport enum AlgoOrderRootType {\n TP_SL = \"TP_SL\",\n POSITIONAL_TP_SL = \"POSITIONAL_TP_SL\",\n STOP = \"STOP\",\n BRACKET = \"BRACKET\",\n TRAILING_STOP = \"TRAILING_STOP\",\n}\n\nexport enum TriggerPriceType {\n MARK_PRICE = \"MARK_PRICE\",\n}\nexport enum PositionType {\n FULL = \"FULL\",\n PARTIAL = \"PARTIAL\",\n}\n\nexport enum AlgoOrderType {\n TAKE_PROFIT = \"TAKE_PROFIT\",\n STOP_LOSS = \"STOP_LOSS\",\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\",\n}\n\nexport enum PositionSide {\n LONG = \"LONG\",\n SHORT = \"SHORT\",\n}\n\nexport enum OrderStatus {\n /** @deprecated */\n OPEN = \"OPEN\",\n NEW = \"NEW\",\n FILLED = \"FILLED\",\n PARTIAL_FILLED = \"PARTIAL_FILLED\",\n CANCELLED = \"CANCELLED\",\n REPLACED = \"REPLACED\",\n // CANCELLED + FILLED\n COMPLETED = \"COMPLETED\",\n // NEW + PARTIAL_FILLED\n INCOMPLETE = \"INCOMPLETE\",\n REJECTED = \"REJECTED\",\n}\n\nexport interface OrderExt {\n total: string;\n}\n\nexport interface BaseOrder {\n symbol: string;\n order_type: OrderType;\n order_type_ext?: OrderType;\n order_price: string;\n order_quantity: string;\n order_amount?: number;\n visible_quantity: number;\n side: OrderSide;\n reduce_only: boolean;\n slippage: number;\n order_tag: string;\n level: OrderLevel;\n post_only_adjust: boolean;\n /** custom order id, it is used to identify the order from ws */\n client_order_id: string;\n}\n\n/** Scaled order fields */\nexport interface ScaledOrder {\n /** user-defined price at the first order (index 0) */\n start_price?: string;\n /** user-defined price at the last order (index total_orders - 1) */\n end_price?: string;\n /** total number of orders */\n total_orders?: string;\n /** quantity distribution type */\n distribution_type?: DistributionType;\n /** the ratio of qty[end] / qty[start] */\n skew?: string;\n}\n\nexport enum TrailingCallbackType {\n VALUE = \"value\",\n RATE = \"rate\",\n}\n\n/**\n * Trailing Stop that allows users to set an activation price and a trailing amount (value / rate).\n * The order is only activated when the market reaches the activation price,\n * after which the trailing stop logic tracks the extreme price and triggers when the price retraces by the specified trailing amount.\n */\nexport interface TrailingStopOrder {\n /**\n * activated price\n */\n activated_price?: string;\n /**\n * i.e. the value = 100\n */\n callback_value?: string;\n /**\n * i.e. the value = 0.1 represent to 10%\n */\n callback_rate?: string;\n}\n\nexport interface RegularOrder\n extends BaseOrder,\n OrderExt,\n ScaledOrder,\n TrailingStopOrder {\n // symbol: string;\n // client_order_id: string;\n // type: OrderType;\n // price: number;\n // quantity: number;\n}\n\nexport interface AlgoOrder extends BaseOrder, OrderExt {\n // symbol: string;\n quantity: string;\n type: OrderType;\n price: string;\n algo_type: AlgoOrderRootType;\n trigger_price_type: string;\n trigger_price: string;\n child_orders: AlgoOrderChildOrders[];\n}\n\nexport interface BracketOrder extends AlgoOrder, OrderExt {\n /**\n * Computed take profit\n */\n position_type?: PositionType;\n tp_enable?: boolean;\n sl_enable?: boolean;\n tp_pnl?: string;\n tp_offset?: string;\n tp_offset_percentage?: string;\n tp_ROI?: string;\n tp_trigger_price?: string;\n tp_order_price?: string;\n tp_order_type?: OrderType;\n\n /**\n * Computed stop loss\n */\n sl_pnl?: string;\n sl_offset?: string;\n sl_offset_percentage?: string;\n sl_ROI?: string;\n sl_trigger_price?: string;\n sl_order_price?: string;\n sl_order_type?: OrderType;\n}\n\nexport type OrderlyOrder = RegularOrder & AlgoOrder & BracketOrder;\n\nexport interface AlgoOrderChildOrders {\n symbol: string;\n algo_type: string;\n child_orders: ChildOrder[];\n}\n\nexport interface ChildOrder {\n symbol: string;\n algo_type: AlgoOrderType;\n side: string;\n type: OrderType;\n trigger_price: string;\n price?: string;\n reduce_only: boolean;\n trigger_price_type?: string;\n}\n\nexport interface TrailingStopOrder {\n activated_price?: string;\n callback_value?: string;\n callback_rate?: string;\n}\n\nexport interface OrderEntity extends ScaledOrder, TrailingStopOrder {\n symbol: string;\n order_type: OrderType;\n algo_type?: AlgoOrderRootType;\n order_type_ext?: OrderType;\n order_price?: string;\n order_quantity?: string;\n order_amount?: number;\n // Whether to display in the orderbook, default=order_quantity, not displayed when =0,\n visible_quantity?: number;\n reduce_only?: boolean;\n side: OrderSide;\n broker_id?: string;\n slippage?: number;\n\n // internal fields\n total?: string;\n // hideInOrderbook?: boolean;\n isStopOrder?: boolean;\n trigger_price?: string;\n order_tag?: string;\n client_order_id?: string;\n level?: OrderLevel;\n}\n\nexport enum DistributionType {\n // enum value need to use lowercase to match the track params\n FLAT = \"flat\",\n ASCENDING = \"ascending\",\n DESCENDING = \"descending\",\n CUSTOM = \"custom\",\n}\n\nexport type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\nexport type RequireKeys<T extends object, K extends keyof T> = Required<\n Pick<T, K>\n> &\n Partial<Omit<T, K>>;\n\nexport interface BaseAlgoOrderEntity<T extends AlgoOrderRootType>\n extends OrderEntity {\n algo_type: AlgoOrderRootType;\n child_orders: (Partial<Omit<AlgoOrderEntity<T>, \"algo_type\" | \"type\">> & {\n algo_type: AlgoOrderType;\n type: OrderType;\n child_orders?: BaseAlgoOrderEntity<T>[\"child_orders\"];\n // trigger_price: number | string;\n })[];\n // if update the order, then need to provide the order_id\n algo_order_id?: number;\n client_order_id?: string;\n order_tag?: string;\n price?: number | string;\n quantity: number | string;\n reduce_only?: boolean;\n side: OrderSide;\n symbol: string;\n trigger_price: string;\n trigger_price_type: TriggerPriceType;\n type: OrderType;\n visible_quantity?: number;\n is_activated?: boolean;\n tp_trigger_price?: string | number;\n sl_trigger_price?: string | number;\n tp_order_price?: string | number;\n tp_order_type?: OrderType;\n sl_order_price?: string | number;\n sl_order_type?: OrderType;\n tp_enable?: boolean;\n sl_enable?: boolean;\n position_type?: PositionType;\n}\n\nexport type AlgoOrderEntity<\n T extends AlgoOrderRootType = AlgoOrderRootType.STOP,\n> = T extends AlgoOrderRootType.TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n \"side\" | \"type\" | \"trigger_price\" | \"order_type\"\n >\n : T extends AlgoOrderRootType.POSITIONAL_TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n | \"side\"\n | \"type\"\n | \"trigger_price\"\n | \"order_type\"\n | \"quantity\"\n | \"tp_enable\"\n | \"sl_enable\"\n | \"tp_order_price\"\n | \"tp_order_type\"\n | \"sl_order_price\"\n | \"sl_order_type\"\n | \"position_type\"\n >\n : Omit<BaseAlgoOrderEntity<T>, \"child_orders\" | \"order_type\">;\n\nexport type TPSLOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.TP_SL>,\n \"side\" | \"type\" | \"trigger_price\"\n>;\n\nexport type BracketOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.BRACKET>,\n \"side\"\n>;\n","export enum WithdrawStatus {\n NotSupported = \"NotSupported\",\n NotConnected = \"NotConnected\",\n Unsettle = \"Unsettle\",\n InsufficientBalance = \"InsufficientBalance\",\n Normal = \"Normal\",\n}\n","export interface Chain {\n id: number;\n chainNameShort: string;\n chainLogo: string;\n chainInfo: ChainInfo;\n minGasBalance: number;\n minCrossGasBalance: number;\n maxPrepayCrossGas: number;\n blockExplorerName: string;\n chainName: string;\n requestRpc: string;\n}\n\nexport interface ChainInfo {\n chainId: string;\n chainName: string;\n nativeCurrency: NativeCurrency;\n rpcUrls: string[];\n blockExplorerUrls: string[];\n}\n\nexport interface NativeCurrency {\n name: string;\n symbol: string;\n decimals: number;\n fix: number;\n}\n\nexport const Ethereum = {\n chainNameShort: \"Ethereum\",\n id: 1,\n chainLogo: \"\",\n chainInfo: {\n chainId: `0x${(1).toString(16)}`,\n chainName: \"Ethereum Mainnet\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 8,\n },\n rpcUrls: [\"https://mainnet.infura.io/v3/9155d40884554acdb17699a18a1fe348\"],\n blockExplorerUrls: [\"https://etherscan.io/\"],\n },\n minGasBalance: 0.002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.025,\n blockExplorerName: \"EthScan\",\n chainName: \"Ethereum Mainnet\",\n requestRpc: \"https://rpc.ankr.com/eth\",\n};\n\nexport const Avalanche = {\n id: 43114,\n chainInfo: {\n chainId: `0x${(43114).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche\",\n chainNameShort: \"Avalanche\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const Fuji = {\n id: 43113,\n chainInfo: {\n chainId: `0x${(43113).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche Fuji Testnet\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche Fuji\",\n chainNameShort: \"Avalanche Fuji\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const BNB = {\n id: 56,\n chainInfo: {\n chainId: `0x${(56).toString(16)}`, // 0x38\n chainName: \"BNB Chain\",\n nativeCurrency: {\n name: \"bnb\",\n symbol: \"BNB\",\n decimals: 18,\n fix: 6,\n },\n rpcUrls: [\"https://bsc-dataseed1.binance.org/\"],\n blockExplorerUrls: [\"https://bscscan.com/\"],\n },\n minGasBalance: 0.02,\n minCrossGasBalance: 0.02,\n maxPrepayCrossGas: 0.1,\n blockExplorerName: \"BscScan\",\n chainName: \"Binance Smart Chain\",\n chainNameShort: \"BNB Chain\",\n requestRpc: \"https://rpc.ankr.com/bsc\",\n chainLogo: \"\",\n};\n\nexport const Fantom = {\n id: 250,\n chainInfo: {\n chainId: `0x${(250).toString(16)}`, // 0x38\n chainName: \"Fantom\",\n nativeCurrency: {\n name: \"ftm\",\n symbol: \"FTM\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpcapi.fantom.network\"],\n blockExplorerUrls: [\"https://ftmscan.com/\"],\n },\n minGasBalance: 1,\n minCrossGasBalance: 10,\n maxPrepayCrossGas: 60,\n blockExplorerName: \"FTMScan\",\n chainName: \"Fantom\",\n chainNameShort: \"Fantom\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/fantom\",\n};\n\nexport const Polygon = {\n id: 137,\n chainInfo: {\n chainId: `0x${(137).toString(16)}`,\n chainName: \"Polygon\",\n nativeCurrency: {\n name: \"matic\",\n symbol: \"MATIC\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-mainnet.matic.network\"],\n blockExplorerUrls: [\"https://polygonscan.com/\"],\n },\n minGasBalance: 0.1,\n minCrossGasBalance: 1,\n maxPrepayCrossGas: 30,\n blockExplorerName: \"Polygonscan\",\n chainName: \"Polygon\",\n chainNameShort: \"Polygon\",\n requestRpc: \"https://rpc.ankr.com/polygon\",\n chainLogo: \"\",\n};\n\nexport const Arbitrum = {\n id: 42161,\n chainInfo: {\n chainId: `0x${(42161).toString(16)}`,\n chainName: \"Arbitrum\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arb1.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://arbiscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbiscan\",\n chainName: \"Arbitrum\",\n chainNameShort: \"Arbitrum\",\n requestRpc: \"https://arb1.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const Optimism = {\n id: 10,\n chainInfo: {\n chainId: `0x${(10).toString(16)}`,\n chainName: \"Optimism\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://mainnet.optimism.io\"],\n blockExplorerUrls: [\"https://optimistic.etherscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism\",\n chainName: \"Optimism\",\n chainNameShort: \"Optimism\",\n requestRpc: \"https://rpc.ankr.com/optimism\",\n chainLogo: \"\",\n};\n\nexport const zkSyncEra = {\n id: 324,\n chainInfo: {\n chainId: `0x${(324).toString(16)}`,\n chainName: \"zkSync Era\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zksync2-mainnet.zksync.io\"],\n blockExplorerUrls: [\"https://explorer.zksync.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"zkSync Era\",\n chainName: \"zkSync Era\",\n chainNameShort: \"zkSync Era\",\n requestRpc: \"https://zksync2-mainnet.zksync.io/\",\n chainLogo: \"\",\n // blockExplorerName: 'zkSync Era Goerli',\n // chainName: 'zkSync Era Goerli',\n // chainNameShort: 'zkSync Era Goerli',\n // requestRpc: 'https://zksync2-testnet.zksync.dev/',\n // chainLogo: '',\n};\n\nexport const PolygonzkEVM = {\n id: 1101,\n chainInfo: {\n chainId: `0x${(1101).toString(16)}`,\n chainName: \"Polygon zkEVM\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zkevm-rpc.com\"],\n blockExplorerUrls: [\"https://zkevm.polygonscan.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon zkEVM\",\n chainName: \"Polygon zkEVM\",\n chainNameShort: \"Polygon zkEVM\",\n requestRpc: \"https://zkevm-rpc.com\",\n chainLogo: \"\",\n};\n\nexport const Linea = {\n id: 59144,\n chainInfo: {\n chainId: `0x${(59144).toString(16)}`,\n chainName: \"Linea\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.linea.build\"],\n blockExplorerUrls: [\"https://lineascan.build/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Linea\",\n chainName: \"Linea\",\n chainNameShort: \"Linea\",\n requestRpc: \"https://rpc.linea.build\",\n chainLogo: \"\",\n};\n\nexport const Base = {\n id: 8453,\n chainInfo: {\n chainId: `0x${(8453).toString(16)}`,\n chainName: \"Base Network\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://developer-access-mainnet.base.org/\"],\n blockExplorerUrls: [\"https://basescan.org\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base\",\n chainName: \"Base\",\n chainNameShort: \"Base\",\n requestRpc: \"https://developer-access-mainnet.base.org/\",\n chainLogo: \"\",\n};\n\nexport const Mantle = {\n id: 5000,\n chainInfo: {\n chainId: `0x${(5000).toString(16)}`,\n chainName: \"Mantle\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.mantle.xyz/\"],\n blockExplorerUrls: [\"https://mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle\",\n chainName: \"Mantle\",\n chainNameShort: \"Mantle\",\n requestRpc: \"https://rpc.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumGoerli = {\n id: 421613,\n chainInfo: {\n chainId: `0x${(421613).toString(16)}`,\n chainName: \"Arbitrum Goerli\",\n nativeCurrency: {\n name: \"AGOR\",\n symbol: \"AGOR\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://goerli-rollup.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://goerli-rollup-explorer.arbitrum.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Goerli\",\n chainName: \"Arbitrum Goerli\",\n chainNameShort: \"Arbitrum Goerli\",\n requestRpc: \"https://goerli-rollup.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumSepolia = {\n id: 421614,\n chainInfo: {\n chainId: `0x${(421614).toString(16)}`,\n chainName: \"Arbitrum Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\"],\n blockExplorerUrls: [\"https://sepolia-explorer.arbitrum.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Sepolia\",\n chainName: \"Arbitrum Sepolia\",\n chainNameShort: \"Arbitrum Sepolia\",\n requestRpc: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chainLogo: \"\",\n};\n\nexport const OptimismGoerli = {\n id: 420,\n chainInfo: {\n chainId: `0x${(420).toString(16)}`,\n chainName: \"Optimism Goerli\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://optimism-goerli.gateway.tenderly.co\"],\n blockExplorerUrls: [\"https://goerli-optimism.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Goerli\",\n chainName: \"Optimism Goerli\",\n chainNameShort: \"Optimism Goerli\",\n requestRpc: \"https://optimism-goerli.gateway.tenderly.co\",\n chainLogo: \"\",\n};\n\nexport const OptimismSepolia = {\n id: 11155420,\n chainInfo: {\n chainId: `0x${(11155420).toString(16)}`,\n chainName: \"Optimism Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://sepolia.optimism.io\"],\n blockExplorerUrls: [\"https://sepolia-optimistic.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Sepolia\",\n chainName: \"Optimism Sepolia\",\n chainNameShort: \"Optimism Sepolia\",\n requestRpc: \"https://sepolia.optimism.io\",\n chainLogo: \"\",\n};\n\nexport const BaseSepolia = {\n id: 84532,\n chainInfo: {\n chainId: `0x${(84532).toString(16)}`,\n chainName: \"Base Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://base-sepolia-rpc.publicnode.com\"],\n blockExplorerUrls: [\"https://base-sepolia.blockscout.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base Sepolia\",\n chainName: \"Base Sepolia\",\n chainNameShort: \"Base Sepolia\",\n requestRpc: \"https://base-sepolia-rpc.publicnode.com\",\n chainLogo: \"\",\n};\n\nexport const MantleSepolia = {\n id: 5003,\n chainInfo: {\n chainId: `0x${(5003).toString(16)}`,\n chainName: \"Mantle Sepolia\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.sepolia.mantle.xyz/\"],\n blockExplorerUrls: [\"https://sepolia.mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle Sepolia\",\n chainName: \"Mantle Sepolia\",\n chainNameShort: \"Mantle Sepolia\",\n requestRpc: \"https://rpc.sepolia.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const PolygonAmoy = {\n id: 80002,\n chainInfo: {\n chainId: `0x${(80002).toString(16)}`,\n chainName: \"Polygon Amoy\",\n nativeCurrency: {\n name: \"MATIC\",\n symbol: \"MATIC\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-amoy.polygon.technology/\"],\n blockExplorerUrls: [\"https://www.oklink.com/amoy\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon Amoy\",\n chainName: \"Polygon Amoy\",\n chainNameShort: \"Polygon Amoy\",\n requestRpc: \"https://rpc-amoy.polygon.technology/\",\n chainLogo: \"\",\n};\n\nexport const Sei = {\n id: 1329,\n chainInfo: {\n chainId: `0x${(1329).toString(16)}`,\n chainName: \"Sei Network\",\n nativeCurrency: {\n name: \"SEI\",\n symbol: \"SEI\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://evm-rpc.sei-apis.com\"],\n blockExplorerUrls: [\"https://seitrace.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\n\nexport const StoryTestnet = {\n name: \"Story Odyssey Testnet\",\n public_rpc_url: \"https://rpc.odyssey.storyrpc.io/\",\n chain_id: 1516,\n currency_symbol: \"IP\",\n explorer_base_url: \"\",\n vault_address: \"\",\n};\nexport const StoryOdysseyTestnet = {\n id: 1329,\n chainInfo: {\n chainId: `0x${StoryTestnet.chain_id.toString(16)}`,\n chainName: StoryTestnet.name,\n nativeCurrency: {\n name: \"IP\",\n symbol: \"IP\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [StoryTestnet.public_rpc_url],\n blockExplorerUrls: [],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\nexport const chainsInfoMap: Map<number, Chain> = new Map([\n [Ethereum.id, Ethereum],\n [Avalanche.id, Avalanche],\n [Fuji.id, Fuji],\n [BNB.id, BNB],\n [Fantom.id, Fantom],\n [Polygon.id, Polygon],\n [Arbitrum.id, Arbitrum],\n [Optimism.id, Optimism],\n [zkSyncEra.id, zkSyncEra],\n [PolygonzkEVM.id, PolygonzkEVM],\n [Linea.id, Linea],\n [Base.id, Base],\n [Mantle.id, Mantle],\n [ArbitrumGoerli.id, ArbitrumGoerli],\n [ArbitrumSepolia.id, ArbitrumSepolia],\n [OptimismGoerli.id, OptimismGoerli],\n [OptimismSepolia.id, OptimismSepolia],\n [BaseSepolia.id, BaseSepolia],\n [MantleSepolia.id, MantleSepolia],\n [PolygonAmoy.id, PolygonAmoy],\n [Sei.id, Sei],\n [StoryOdysseyTestnet.id, StoryOdysseyTestnet],\n]);\n\nexport const SolanaDevnet = {\n id: 901901901,\n chainInfo: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chainId: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n} as unknown as typeof Arbitrum;\n\nexport const TestnetChains = [\n {\n network_infos: {\n name: \"Arbitrum Sepolia\",\n shortName: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chain_id: 421614,\n currency_symbol: \"ETH\",\n bridge_enable: true,\n mainnet: false,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n est_txn_mins: null,\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chain_id: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: StoryTestnet,\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0xF1815bd50389c46847f0Bda824eC8da914045D14\",\n decimals: 6,\n },\n ],\n },\n // {\n // network_infos: {\n // name: \"Mantle Sepolia\",\n // shortName: \"Mantle Sepolia\",\n // public_rpc_url: \"https://rpc.sepolia.mantle.xyz/\",\n // chain_id: 5003,\n // currency_symbol: \"MNT\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://sepolia.mantlescan.xyz/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xAcab8129E2cE587fD203FD770ec9ECAFA2C88080\",\n // decimals: 6,\n // display_name: \"USDC.e\",\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Arbitrum Goerli\",\n // shortName: \"Arbitrum Goerli\",\n // public_rpc_url: \"https://goerli-rollup.arbitrum.io/rpc\",\n // chain_id: 421613,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli.arbiscan.io/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xfd064A18f3BF249cf1f87FC203E90D8f650f2d63\",\n // decimals: 6,\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Optimism Goerli\",\n // shortName: \"Optimism Goerli\",\n // public_rpc_url: \"https://optimism-goerli.gateway.tenderly.co\",\n // chain_id: 420,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli-optimism.etherscan.io\",\n // est_txn_mins: null,\n // },\n // },\n];\n\nexport const defaultMainnetChains = [Arbitrum, Base, Optimism];\nexport const defaultTestnetChains = [ArbitrumSepolia];\n\nexport enum ChainNamespace {\n evm = \"EVM\",\n solana = \"SOL\",\n}\n\nexport const AbstractChains = new Set([2741, 11124]);\nexport const SolanaChains = new Set([901901901, 900900900]);\n","export enum TrackerEventName {\n /** virtual event (not send this event name to tracker) */\n trackIdentifyUserId = \"track_identify_user_id\",\n trackIdentify = \"track_identify\",\n trackCustomEvent = \"track_custom_event\",\n\n /** real event name (send this event name to tracker) */\n withdrawSuccess = \"withdraw_request_success\",\n withdrawFailed = \"withdraw_request_failure\",\n depositSuccess = \"deposit_request_success\",\n depositFailed = \"deposit_request_failure\",\n signinSuccess = \"sign_message_success\",\n placeOrderSuccess = \"place_order_success\",\n walletConnect = \"connect_wallet_success\",\n clickLinkDeviceButton = \"click_link_device_button\",\n signLinkDeviceMessageSuccess = \"sign_link_device_message_success\",\n linkDeviceModalClickConfirm = \"link_device_modal_click_confirm\",\n socialLoginSuccess = \"social_login_success\",\n clickSwitchNetwork = \"click_switch_network\",\n clickSwitchWallet = \"click_switch_wallet\",\n switchNetworkSuccess = \"switch_network_success\",\n clickExportPrivateKey = \"click_export_private_key\",\n switchLanguage = \"switch_language\",\n leaderboardCampaignClickTradeNow = \"leaderboard_campaign_click_trade_now\",\n leaderboardCampaignClickLearnMore = \"leaderboard_campaign_click_learn_more\",\n vaultDepositSuccess = \"vault_deposit_success\",\n vaultDepositFailed = \"vault_deposit_failed\",\n vaultWithdrawSuccess = \"vault_withdraw_success\",\n vaultWithdrawFailed = \"vault_withdraw_failed\",\n clickBBOButton = \"click_bbo_button\",\n}\n","import { API } from \"./types/api\";\n\n// export type Chain = {\n// id: string;\n// name?: string;\n// };\n\nexport type CurrentChain = {\n id: number;\n info: API.Chain;\n};\n\nexport enum WS_WalletStatusEnum {\n NO = \"NO\",\n FAILED = \"FAILED\",\n PENDING = \"PENDING\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n}\n","export const LedgerWalletKey = \"orderly:ledger-wallet\";\nexport const ConnectorKey = \"orderly:connectorKey\";\nexport const ChainKey = \"order:chain\";\nexport const LinkDeviceKey = \"orderly_link_device\";\nexport const TradingviewFullscreenKey = \"orderly:tradingview-fullscreen\";\nexport const OrderEntrySortKeys = \"orderly:order_entry_sort_keys\";\n","export class ApiError extends Error {\n constructor(message: string, private readonly code: number) {\n super(message);\n this.name = \"ApiError\";\n }\n}\n\nexport class SDKError extends Error {\n constructor(message: string) {\n super(`[ORDERLY SDK ERROR]:${message}`);\n this.name = \"SDKError\";\n }\n}\n","export const definedTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n ],\n Registration: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"registrationNonce\", type: \"uint256\" },\n ],\n Withdraw: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"receiver\", type: \"address\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"withdrawNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n AddOrderlyKey: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"orderlyKey\", type: \"string\" },\n { name: \"scope\", type: \"string\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"expiration\", type: \"uint64\" },\n ],\n SettlePnl: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"settleNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n DexRequest: [\n { name: \"payloadType\", type: \"uint8\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"receiver\", type: \"address\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"vaultId\", type: \"bytes32\" },\n { name: \"token\", type: \"string\" },\n { name: \"dexBrokerId\", type: \"string\" },\n ],\n InternalTransfer: [\n { name: \"receiver\", type: \"bytes32\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"transferNonce\", type: \"uint64\" },\n ],\n} as const;\n","export { default as version } from \"./version\";\nexport * from \"./constants\";\nexport * from \"./types/api\";\n// export * from \"./order\";\nexport {\n OrderType,\n OrderSide,\n OrderStatus,\n AlgoOrderRootType,\n PositionType,\n AlgoOrderType,\n TriggerPriceType,\n BBOOrderType,\n OrderLevel,\n DistributionType,\n TrailingCallbackType,\n} from \"./order\";\nexport type {\n OrderEntity,\n AlgoOrderEntity,\n TPSLOrderEntry,\n BaseAlgoOrderEntity,\n AlgoOrderChildOrders,\n Optional,\n PositionSide,\n BracketOrderEntry,\n RequireKeys,\n BaseOrder,\n RegularOrder,\n AlgoOrder,\n OrderlyOrder,\n ChildOrder,\n BracketOrder,\n} from \"./order\";\nexport * from \"./withdraw\";\nexport * from \"./chains\";\nexport * from \"./track\";\nexport type { Chain as ChainConfig, ChainInfo, NativeCurrency } from \"./chains\";\nexport * from \"./wallet\";\nexport * from \"./storageKey\";\nexport { ApiError, SDKError } from \"./errors\";\n\nexport { definedTypes } from \"./sign\";\nexport * as superstruct from \"superstruct\";\nexport * from \"./assetHistory\";\nexport * from \"./account\";\n","export enum AssetHistoryStatusEnum {\n /** @deprecated, this status is not used */\n NEW = \"NEW\",\n PENDING = \"PENDING\",\n CONFIRM = \"CONFIRM\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n FAILED = \"FAILED\",\n PENDING_REBALANCE = \"PENDING_REBALANCE\",\n}\n\nexport enum AssetHistorySideEnum {\n DEPOSIT = \"DEPOSIT\",\n WITHDRAW = \"WITHDRAW\",\n}\n","export const DE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FD,SAAAA;AAAA,GAAA;;;ACXL,IAAM,2BAA2B;","names":["AccountStatusEnum","SystemStateEnum","ExchangeStatusEnum","NetworkStatusEnum","AnnouncementType","OrderType","BBOOrderType","OrderLevel","AlgoOrderRootType","TriggerPriceType","PositionType","AlgoOrderType","OrderSide","OrderStatus","TrailingCallbackType","DistributionType","WithdrawStatus","ChainNamespace","TrackerEventName","WS_WalletStatusEnum","AssetHistoryStatusEnum","AssetHistorySideEnum"]}
1
+ {"version":3,"sources":["../src/version.ts","../src/constants.ts","../src/types/api.ts","../src/order.ts","../src/withdraw.ts","../src/chains.ts","../src/track.ts","../src/wallet.ts","../src/storageKey.ts","../src/errors.ts","../src/sign.ts","../src/index.ts","../src/assetHistory.ts","../src/account.ts"],"sourcesContent":["declare global {\n interface Window {\n __ORDERLY_VERSION__?: {\n [key: string]: string;\n };\n }\n}\nif (typeof window !== \"undefined\") {\n window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};\n window.__ORDERLY_VERSION__[\"@kodiak-finance/orderly-types\"] = \"2.7.4\";\n}\n\nexport default \"2.7.4\";\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport enum AccountStatusEnum {\n EnableTradingWithoutConnected = -1,\n NotConnected = 0,\n Connected = 1,\n NotSignedIn = 2,\n SignedIn = 3,\n DisabledTrading = 4,\n EnableTrading = 5,\n}\n\nexport enum SystemStateEnum {\n Loading = 0,\n Error = 1,\n Ready = 10,\n}\n\nexport enum ExchangeStatusEnum {\n Normal = 0,\n Maintain = 1,\n}\n\nexport type NetworkId = \"testnet\" | \"mainnet\";\n\nexport enum NetworkStatusEnum {\n unknown = 0,\n unsupported = 1,\n supported = 2,\n}\n\n// Testnet\n// Arbitrum Goerli\n// export const ARBITRUM_TESTNET_CHAINID = 421613;\n// export const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EED\";\n\n// Arbitrum Sepolia\nexport const ARBITRUM_TESTNET_CHAINID = 421614;\nexport const SOLANA_TESTNET_CHAINID = 901901901;\nexport const SOLANA_MAINNET_CHAINID = 900900900;\nexport const STORY_TESTNET_CHAINID = 1516;\nexport const MONAD_TESTNET_CHAINID = 10143;\nexport const ABSTRACT_TESTNET_CHAINID = 11124;\nexport const ABSTRACT_MAINNET_CHAINID = 2741;\nexport const BSC_TESTNET_CHAINID = 97;\nexport const ABSTRACT_CHAIN_ID_MAP = new Set([\n ABSTRACT_TESTNET_CHAINID,\n ABSTRACT_MAINNET_CHAINID,\n]);\n\nexport const ARBITRUM_TESTNET_CHAINID_HEX = \"0x66EEE\";\n\nexport const MANTLE_TESTNET_CHAINID = 5003;\nexport const MANTLE_TESTNET_CHAINID_HEX = \"0x138b\";\n\n// Mainnet\nexport const ARBITRUM_MAINNET_CHAINID = 42161;\nexport const ETHEREUM_MAINNET_CHAINID = 1;\nexport const ARBITRUM_MAINNET_CHAINID_HEX = \"0xa4b1\";\n\nexport const MEDIA_TABLET = \"(max-width: 768px)\";\n\nexport const DEPOSIT_FEE_RATE = 1.05;\n\n/**\n * A constant for the maximum value for a ``uint256``.\n */\nexport const MaxUint256: bigint = BigInt(\n \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\",\n);\n\nexport const nativeTokenAddress = \"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\";\n\nexport const nativeETHAddress = \"0x0000000000000000000000000000000000000000\";\n\nexport const isNativeTokenChecker = (address: string) =>\n address === nativeTokenAddress || address === nativeETHAddress;\n\nexport const ArbitrumSepoliaChainInfo = {\n name: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.gateway.tenderly.co\",\n chain_id: \"421614\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n vault_address: \"0x0EaC556c0C2321BA25b9DC01e4e3c95aD5CDCd2f\",\n};\nexport const AbstractTestnetChainInfo = {\n name: \"Abstract Testnet\",\n public_rpc_url: \"https://api.testnet.abs.xyz\",\n chain_id: \"11124\",\n currency_symbol: \"ETH\",\n currency_decimal: 18,\n explorer_base_url: \"https://sepolia.abscan.org\",\n vault_address: \"0xf14Ff11F3bb1011ff42665Ec869c7827c43745Fd\",\n};\nexport const AbstractTestnetTokenInfo = {\n chain_id: \"11124\",\n contract_address: \"0xa0BB43E2eA7fcE91F07e628d72fD6333e80F47D2\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\",\n};\nexport const SolanaDevnetChainInfo = {\n chain_id: \"901901901\",\n currency_decimal: 9,\n currency_symbol: \"SOL\",\n explorer_base_url: \"https://explorer.solana.com/?cluster=devnet\",\n name: \"Solana-Devnet\",\n public_rpc_url: \"https://api.devnet.solana.com\",\n vault_address: \"9shwxWDUNhtwkHocsUAmrNAQfBH2DHh4njdAEdHZZkF2\",\n};\n\nexport const SolanaDevnetTokenInfo = {\n chain_id: \"901901901\",\n contract_address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 5,\n display_name: \"USDC\",\n};\nexport const ArbitrumSepoliaTokenInfo = {\n chain_id: \"421614\",\n contract_address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n withdrawal_fee: 1,\n cross_chain_withdrawal_fee: 2,\n display_name: \"USDC\",\n};\n\nexport const TesnetTokenFallback = (testnetTokens: any) => [\n {\n token: \"USDC\",\n token_hash:\n \"0xd6aca1be9729c13d677335161321649cccae6a591554772516700f986f942eaa\",\n decimals: 6,\n minimum_withdraw_amount: 0.000001,\n chain_details: testnetTokens,\n },\n];\n\nexport const EMPTY_LIST: ReadonlyArray<any> = [];\n\nexport const EMPTY_OBJECT: Readonly<Record<PropertyKey, any>> = {};\n\nexport const EMPTY_OPERATION = () => {};\n","/* eslint-disable @typescript-eslint/no-namespace */\nimport { AlgoOrderRootType, OrderSide, OrderType } from \"../order\";\n\nexport enum AnnouncementType {\n Listing = \"LISTING\",\n Maintenance = \"MAINTENANCE\",\n Delisting = \"DELISTING\",\n Campaign = \"CAMPAIGN\",\n}\n\nexport declare namespace API {\n // /v1/public/auto_convert_threshold\n export interface ConvertThreshold {\n ltv_threshold: number;\n negative_usdc_threshold: number;\n }\n\n //v1/public/token\n export interface Token {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n base_weight: number;\n discount_factor: number;\n haircut: number;\n user_max_qty: number;\n is_collateral: boolean;\n on_chain_swap: boolean;\n chain_details: ChainDetail[];\n }\n\n //v1/public/token\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n }\n\n // ws market, api v1/public/futures\n export interface MarketInfo {\n symbol: string;\n index_price: number;\n mark_price: number;\n sum_unitary_funding: number;\n est_funding_rate: number;\n last_funding_rate: number;\n next_funding_time: number;\n open_interest: string;\n \"24h_open\": number;\n \"24h_close\": number;\n \"24h_high\": number;\n \"24h_low\": number;\n /**\n * @deprecated\n * spelling mistake, use 24h_volume to instead, will be remove next version\n */\n \"24h_volumn\": number;\n \"24h_volume\": number;\n \"24h_amount\": number;\n }\n\n export interface MarketInfoExt extends MarketInfo {\n change: number;\n \"24h_volume\": number;\n }\n\n export interface AnnouncementRow {\n announcement_id: number | string;\n message: string;\n i18n?: Record<PropertyKey, string | null>;\n url?: string | null;\n type?: AnnouncementType | null;\n updated_time?: number | null;\n coverImage?: string;\n }\n\n export interface Announcement {\n last_updated_time?: number | null;\n rows?: AnnouncementRow[];\n }\n\n /**\n * v1/public/info\n */\n export interface Symbol {\n symbol: string;\n quote_min: number;\n quote_max: number;\n quote_tick: number;\n base_min: number;\n base_max: number;\n base_tick: number;\n min_notional: number;\n price_range: number;\n price_scope: number;\n std_liquidation_fee: number;\n liquidator_fee: number;\n claim_insurance_fund_discount: number;\n funding_period: number;\n cap_funding: number;\n floor_funding: number;\n interest_rate: number;\n created_time: number;\n updated_time: number;\n imr_factor: number;\n base_mmr: number;\n base_imr: number;\n }\n\n export interface TokenItem {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n chain_details: ChainDetail[];\n }\n\n export interface ChainDetail {\n chain_id: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n }\n\n export interface SymbolExt extends Symbol {\n base: string;\n base_dp: number;\n\n quote: string;\n quote_dp: number;\n type: string;\n name: string;\n }\n\n export interface RwaSymbol {\n symbol: string;\n status: \"open\" | \"close\";\n next_open: number;\n next_close: number;\n\n base: string;\n quote: string;\n type: string;\n name: string;\n }\n\n export interface Order {\n symbol: string;\n status: string;\n side: string;\n order_id: number;\n algo_order_id?: number;\n user_id: number;\n price: number | null;\n type: string;\n quantity: number;\n amount: null;\n visible: number;\n executed: number;\n total_fee: number;\n fee_asset: string;\n client_order_id?: string;\n average_executed_price: number;\n total_executed_quantity: number;\n visible_quantity: number;\n created_time: number;\n updated_time: number;\n reduce_only: boolean;\n trigger_price?: number;\n order_tag?: string;\n }\n\n export interface OrderExt extends Order {\n mark_price: string;\n }\n\n export interface AlgoOrder {\n algo_order_id: number;\n root_algo_order_id: number;\n parent_algo_order_id: number;\n parent_algo_type: AlgoOrderRootType;\n symbol: string;\n algo_type: string;\n child_orders: AlgoOrder[];\n side: string;\n quantity: number;\n is_triggered: boolean;\n is_activated: boolean;\n trigger_price: number;\n trigger_price_type: string;\n type: OrderType;\n root_algo_status: string;\n algo_status: string;\n price?: number;\n total_executed_quantity: number;\n visible_quantity: number;\n total_fee: number;\n fee_asset: string;\n reduce_only: boolean;\n created_time: number;\n updated_time: number;\n order_tag?: string;\n client_order_id?: string;\n\n // trailing stop order\n activated_price?: number;\n callback_value?: number;\n callback_rate?: number;\n extreme_price?: number;\n }\n\n export interface AlgoOrderExt extends AlgoOrder {\n mark_price: string;\n position?: Partial<Position>;\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n }\n\n export interface OrderResponse {\n rows: (Order | AlgoOrder)[];\n meta: {\n total: number;\n current_page: number;\n records_per_page: number;\n };\n }\n\n export interface FundingRate {\n symbol: string;\n est_funding_rate: number;\n est_funding_rate_timestamp: number;\n last_funding_rate: number;\n last_funding_rate_timestamp: number;\n next_funding_time: number;\n sum_unitary_funding: number;\n }\n\n export interface FundingPeriodData {\n rate: number;\n positive: number;\n negative: number;\n }\n\n export interface FundingDetails {\n symbol: string;\n quote_min: number;\n quote_max: number;\n quote_tick: number;\n base_min: number;\n base_max: number;\n base_tick: number;\n min_notional: number;\n price_range: number;\n price_scope: number;\n std_liquidation_fee: number;\n liquidator_fee: number;\n claim_insurance_fund_discount: number;\n funding_period: number;\n cap_funding: number;\n floor_funding: number;\n interest_rate: number;\n created_time: number;\n updated_time: number;\n liquidation_tier: number;\n cap_ir: number;\n floor_ir: number;\n mark_index_price_deviation_floor: number;\n mark_index_price_deviation_cap: number;\n global_max_oi_cap: number;\n base_mmr: number;\n base_imr: number;\n imr_factor: number;\n deviation_factor: number;\n }\n\n export interface FundingHistory {\n symbol: string;\n data_start_time: string;\n funding: {\n last: FundingPeriodData;\n \"1d\": FundingPeriodData;\n \"3d\": FundingPeriodData;\n \"7d\": FundingPeriodData;\n \"14d\": FundingPeriodData;\n \"30d\": FundingPeriodData;\n \"90d\": FundingPeriodData;\n };\n }\n\n export interface PositionInfo extends PositionAggregated {\n // margin_ratio: number;\n // initial_margin_ratio: number;\n // maintenance_margin_ratio: number;\n // open_margin_ratio: number;\n // current_margin_ratio_with_orders: number;\n // initial_margin_ratio_with_orders: number;\n // maintenance_margin_ratio_with_orders: number;\n // total_collateral_value: number;\n // free_collateral: number;\n rows: Position[];\n // total_pnl_24_h: number;\n }\n\n export interface PositionAggregated {\n margin_ratio: number;\n initial_margin_ratio: number;\n maintenance_margin_ratio: number;\n open_margin_ratio: number;\n current_margin_ratio_with_orders: number;\n initial_margin_ratio_with_orders: number;\n maintenance_margin_ratio_with_orders: number;\n total_collateral_value: number;\n free_collateral: number;\n total_pnl_24_h: number;\n /**\n * @deprecated use total_unreal_pnl instead\n */\n unrealPnL: number;\n total_unreal_pnl: number;\n total_unreal_pnl_index?: number;\n /**\n * @deprecated use total_unsettled_pnl instead\n */\n unsettledPnL: number;\n total_unsettled_pnl: number;\n notional: number;\n unrealPnlROI: number;\n unrealPnlROI_index?: number;\n }\n\n export interface Position {\n account_id?: string;\n symbol: string;\n position_qty: number;\n cost_position: number;\n last_sum_unitary_funding: number;\n pending_long_qty: number;\n pending_short_qty: number;\n settle_price: number;\n average_open_price: number;\n unrealized_pnl: number;\n unrealized_pnl_index?: number;\n unrealized_pnl_ROI: number;\n unsettled_pnl: number;\n unsettled_pnl_ROI: number;\n unrealized_pnl_ROI_index?: number;\n mark_price: number;\n index_price?: number;\n est_liq_price: number | null;\n timestamp: number;\n /**\n * Maintenance margin ratio\n */\n mmr: number;\n imr: number;\n IMR_withdraw_orders: number;\n MMR_with_orders: number;\n pnl_24_h: number;\n fee_24_h: number;\n fundingFee?: number;\n leverage: number;\n }\n\n export interface PositionExt extends Position {\n notional: number;\n mm: number;\n }\n\n export interface PositionTPSLExt extends PositionExt {\n full_tp_sl?: {\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n algo_order?: AlgoOrder;\n };\n partial_tp_sl?: {\n tp_trigger_price?: number;\n sl_trigger_price?: number;\n order_num?: number;\n algo_order?: AlgoOrder;\n };\n\n // has_position_tp_sl: boolean;\n\n /**\n * related position tp/sl order\n */\n algo_order?: AlgoOrder;\n }\n\n export interface PositionsTPSLExt extends PositionAggregated {\n rows: PositionTPSLExt[];\n }\n\n export interface Trade {\n symbol: Symbol;\n side: OrderSide;\n ts: number;\n executed_price: number;\n executed_quantity: number;\n executed_timestamp: number;\n }\n\n export interface Holding {\n token: string;\n holding: number;\n frozen: number;\n pending_short: number;\n updated_time: number;\n }\n\n export interface AccountInfo {\n account_id: string;\n email: string;\n account_mode: string;\n tier: string;\n futures_tier: string;\n maintenance_cancel_orders: boolean;\n taker_fee_rate: number;\n maker_fee_rate: number;\n rwa_taker_fee_rate?: number;\n rwa_maker_fee_rate?: number;\n max_leverage: number;\n futures_taker_fee_rate: number;\n futures_maker_fee_rate: number;\n imr_factor: { [key: string]: number };\n max_notional: { [key: string]: number };\n }\n\n export interface Chain {\n dexs: string[];\n network_infos: NetworkInfos;\n token_infos: TokenInfo[];\n nativeToken?: TokenInfo;\n address?: string;\n symbol?: string;\n on_chain_swap?: boolean;\n // nativeToken\n }\n\n export interface NetworkInfos {\n name: string;\n shortName: string;\n public_rpc_url: string;\n chain_id: number;\n currency_symbol: string;\n bridge_enable: boolean;\n mainnet: boolean;\n est_txn_mins: number | null;\n explorer_base_url: string;\n bridgeless?: boolean;\n withdrawal_fee?: number;\n minimum_withdraw_amount?: number;\n vault_address: string;\n currency_decimal?: number;\n\n cross_chain_router: string;\n depositor: string;\n }\n\n export interface TokenInfo {\n address?: string;\n base_weight: number;\n decimals?: number;\n /** token decimals */\n token_decimal?: number;\n discount_factor?: number | null;\n display_name?: string;\n haircut: number;\n is_collateral: boolean;\n symbol?: string;\n user_max_qty: number;\n precision?: number;\n minimum_withdraw_amount: number;\n swap_enable?: boolean;\n }\n\n export interface Chain {\n token: string;\n token_hash: string;\n decimals: number;\n minimum_withdraw_amount: number;\n base_weight: number;\n discount_factor?: number | null;\n haircut: number;\n user_max_qty: number;\n is_collateral: boolean;\n chain_details: ChainDetail[];\n }\n\n // export interface Token{\n\n // }\n\n export interface ChainDetail {\n chain_id: string;\n chain_name?: string;\n contract_address: string;\n decimals: number;\n withdrawal_fee: number;\n cross_chain_withdrawal_fee: number;\n display_name: string;\n }\n\n export interface AssetHistory {\n meta: RecordsMeta;\n rows: AssetHistoryRow[];\n }\n\n export interface RecordsMeta {\n total: number;\n records_per_page: number;\n current_page: number;\n }\n\n export interface AssetHistoryRow {\n id: string;\n tx_id: string;\n side: string;\n token: string;\n amount: number;\n fee: number;\n trans_status: string;\n created_time: number;\n updated_time: number;\n chain_id: string;\n }\n\n export interface FundingFeeHistory {\n meta: RecordsMeta;\n rows: FundingFeeRow[];\n }\n\n export interface FundingFeeRow {\n symbol: string;\n funding_rate: number;\n mark_price: number;\n funding_fee: number;\n payment_type: string;\n status: string;\n created_time: number;\n updated_time: number;\n }\n\n export interface StrategyVaultHistoryRow {\n vault_id: string;\n created_time: number;\n type: \"withdrawal\" | \"deposit\";\n status: string;\n amount_change: number;\n token?: string; // need to hard code for now\n vaultName?: string; // need to hard code for now\n }\n\n export interface StrategyVaultHistory {\n rows: StrategyVaultHistoryRow[];\n meta: RecordsMeta;\n }\n\n export interface TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\n updated_time: number;\n chain_id: string;\n // timestamp\n block_time: number;\n }\n\n export interface TransferHistory {\n meta: RecordsMeta;\n rows: TransferHistoryRow[];\n }\n\n export interface TransferHistoryRow {\n amount: number;\n created_time: number;\n from_account_id: string;\n id: string;\n status: \"CREATED\" | \"PENDING\" | \"COMPLETED\" | \"FAILED\";\n to_account_id: string;\n token: string;\n updated_time: number;\n }\n\n export interface DailyRow {\n account_value: number;\n broker_id: string;\n date: string;\n perp_volume: number;\n pnl: number;\n snapshot_time?: number;\n }\n\n export interface PositionHistory {\n position_id: number; // Unique identifier for the position\n liquidation_id?: number; // Unique identifier for the position\n position_status: string; // Status of the position\n type: string; // Type of the position activity\n symbol: string; // Trading pair symbol\n avg_open_price: number; // Average open price of the position\n avg_close_price: number; // Average close price of the position\n max_position_qty: number; // Maximum quantity held in the position\n closed_position_qty: number; // Quantity closed in the position\n side: \"LONG\" | \"SHORT\"; // Side of the position\n trading_fee: number; // Fee charged for trading\n accumulated_funding_fee: number; // Accumulated funding fee for the position\n insurance_fund_fee: number; // Fee contributed to the insurance fund\n liquidator_fee: number; // Fee paid to the liquidator\n realized_pnl: number; // Realized profit and loss\n open_timestamp: number; // Timestamp when the position was opened\n close_timestamp: number; // Timestamp when the position was closed\n last_update_time: number; // Timestamp of the last update to the position\n leverage: number; // Leverage of the position\n }\n\n export interface LiquidationPositionByPerp {\n abs_liquidation_fee: number;\n cost_position_transfer: number;\n liquidator_fee: number;\n position_qty: number;\n symbol: string;\n transfer_price: number;\n mark_price: number;\n }\n\n export interface Liquidation {\n liquidation_id: number;\n timestamp: number;\n transfer_amount_to_insurance_fund: number;\n margin_ratio: number;\n account_mmr: number;\n collateral_value: number;\n position_notional: number;\n positions_by_perp: LiquidationPositionByPerp[];\n }\n\n export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n pending_rebalance: number;\n }\n\n export interface RestrictedAreas {\n invalid_web_country: string;\n invalid_web_city: string;\n }\n\n export interface IpInfo {\n ip: string;\n city: string;\n region: string;\n checked: boolean;\n }\n\n export interface LeverageInfo {\n symbol: string;\n leverage: number;\n }\n}\n\nexport declare namespace WSMessage {\n export interface Ticker {\n symbol: string;\n open: number;\n close: number;\n high: number;\n low: number;\n volume: number;\n amount: number;\n count: number;\n change: number;\n open_interest?: number;\n index_price?: number;\n }\n\n export interface MarkPrice {\n symbol: string;\n price: number;\n }\n\n export interface Position {\n symbol: string;\n positionQty: number;\n costPosition: number;\n lastSumUnitaryFunding: number;\n sumUnitaryFundingVersion: number;\n pendingLongQty: number;\n pendingShortQty: number;\n settlePrice: number;\n averageOpenPrice: number;\n unsettledPnl: number;\n pnl24H: number;\n fee24H: number;\n markPrice: number;\n estLiqPrice: number;\n version: number;\n imr: number;\n imrwithOrders: number;\n mmrwithOrders: number;\n mmr: number;\n }\n\n export interface VaultBalance {\n chain_id: string;\n token: string;\n balance: number;\n pending_rebalance: number;\n }\n\n export interface Order {\n symbol: string;\n clientOrderId: string;\n orderId: number;\n type: string;\n side: string;\n quantity: number;\n price: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n avgPrice: number;\n status: string;\n reason: string;\n totalFee: number;\n visible: number;\n /**\n * update time\n */\n timestamp: number;\n reduceOnly: boolean;\n maker: boolean;\n }\n\n export interface Holding {\n holding: number;\n frozen: number;\n interest: number;\n pendingShortQty: number;\n pendingExposure: number;\n pendingLongQty: number;\n pendingLongExposure: number;\n version: number;\n staked: number;\n unbonding: number;\n vault: number;\n fee24H: number;\n markPrice: number;\n }\n\n export interface AlgoOrder {\n symbol: string;\n rootAlgoOrderId: number;\n parentAlgoOrderId: number;\n algoOrderId: number;\n status: string;\n algoType: string;\n side: string;\n quantity: number;\n triggerStatus: string;\n price: number;\n type: string;\n triggerTradePrice: number;\n triggerTime: number;\n tradeId: number;\n executedPrice: number;\n executedQuantity: number;\n fee: number;\n feeAsset: string;\n totalExecutedQuantity: number;\n averageExecutedPrice: number;\n totalFee: number;\n timestamp: number;\n visibleQuantity: number;\n reduceOnly: boolean;\n triggered: boolean;\n maker: boolean;\n rootAlgoStatus: string;\n algoStatus: string;\n }\n\n export interface Announcement {\n announcement_id: string;\n message: string;\n i18n: Record<PropertyKey, string | null>;\n url?: string | null;\n type: AnnouncementType | null;\n updated_time: number;\n }\n}\n","/**\n * Supported types for placing an order\n */\nexport enum OrderType {\n LIMIT = \"LIMIT\",\n MARKET = \"MARKET\",\n IOC = \"IOC\",\n FOK = \"FOK\",\n POST_ONLY = \"POST_ONLY\",\n ASK = \"ASK\",\n BID = \"BID\",\n STOP_LIMIT = \"STOP_LIMIT\",\n STOP_MARKET = \"STOP_MARKET\",\n /**\n * Only for POSITIONAL_TP_SL type algo order\n */\n CLOSE_POSITION = \"CLOSE_POSITION\",\n /**\n * Scaled order\n */\n SCALED = \"SCALED\",\n /**\n * trailing stop\n */\n TRAILING_STOP = \"TRAILING_STOP\",\n}\n\nexport enum BBOOrderType {\n COUNTERPARTY1 = \"counterparty1\",\n COUNTERPARTY5 = \"counterparty5\",\n QUEUE1 = \"queue1\",\n QUEUE5 = \"queue5\",\n}\n\nexport enum OrderLevel {\n ONE = 0,\n TWO = 1,\n THREE = 2,\n FOUR = 3,\n FIVE = 4,\n}\n\nexport enum AlgoOrderRootType {\n TP_SL = \"TP_SL\",\n POSITIONAL_TP_SL = \"POSITIONAL_TP_SL\",\n STOP = \"STOP\",\n BRACKET = \"BRACKET\",\n TRAILING_STOP = \"TRAILING_STOP\",\n}\n\nexport enum TriggerPriceType {\n MARK_PRICE = \"MARK_PRICE\",\n}\nexport enum PositionType {\n FULL = \"FULL\",\n PARTIAL = \"PARTIAL\",\n}\n\nexport enum AlgoOrderType {\n TAKE_PROFIT = \"TAKE_PROFIT\",\n STOP_LOSS = \"STOP_LOSS\",\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\",\n}\n\nexport enum PositionSide {\n LONG = \"LONG\",\n SHORT = \"SHORT\",\n}\n\nexport enum OrderStatus {\n /** @deprecated */\n OPEN = \"OPEN\",\n NEW = \"NEW\",\n FILLED = \"FILLED\",\n PARTIAL_FILLED = \"PARTIAL_FILLED\",\n CANCELLED = \"CANCELLED\",\n REPLACED = \"REPLACED\",\n // CANCELLED + FILLED\n COMPLETED = \"COMPLETED\",\n // NEW + PARTIAL_FILLED\n INCOMPLETE = \"INCOMPLETE\",\n REJECTED = \"REJECTED\",\n}\n\nexport interface OrderExt {\n total: string;\n}\n\nexport interface BaseOrder {\n symbol: string;\n order_type: OrderType;\n order_type_ext?: OrderType;\n order_price: string;\n order_quantity: string;\n order_amount?: number;\n visible_quantity: number;\n side: OrderSide;\n reduce_only: boolean;\n slippage: number;\n order_tag: string;\n level: OrderLevel;\n post_only_adjust: boolean;\n /** custom order id, it is used to identify the order from ws */\n client_order_id: string;\n}\n\n/** Scaled order fields */\nexport interface ScaledOrder {\n /** user-defined price at the first order (index 0) */\n start_price?: string;\n /** user-defined price at the last order (index total_orders - 1) */\n end_price?: string;\n /** total number of orders */\n total_orders?: string;\n /** quantity distribution type */\n distribution_type?: DistributionType;\n /** the ratio of qty[end] / qty[start] */\n skew?: string;\n}\n\nexport enum TrailingCallbackType {\n VALUE = \"value\",\n RATE = \"rate\",\n}\n\n/**\n * Trailing Stop that allows users to set an activation price and a trailing amount (value / rate).\n * The order is only activated when the market reaches the activation price,\n * after which the trailing stop logic tracks the extreme price and triggers when the price retraces by the specified trailing amount.\n */\nexport interface TrailingStopOrder {\n /**\n * activated price\n */\n activated_price?: string;\n /**\n * i.e. the value = 100\n */\n callback_value?: string;\n /**\n * i.e. the value = 0.1 represent to 10%\n */\n callback_rate?: string;\n}\n\nexport interface RegularOrder\n extends BaseOrder,\n OrderExt,\n ScaledOrder,\n TrailingStopOrder {\n // symbol: string;\n // client_order_id: string;\n // type: OrderType;\n // price: number;\n // quantity: number;\n}\n\nexport interface AlgoOrder extends BaseOrder, OrderExt {\n // symbol: string;\n quantity: string;\n type: OrderType;\n price: string;\n algo_type: AlgoOrderRootType;\n trigger_price_type: string;\n trigger_price: string;\n child_orders: AlgoOrderChildOrders[];\n}\n\nexport interface BracketOrder extends AlgoOrder, OrderExt {\n /**\n * Computed take profit\n */\n position_type?: PositionType;\n // tp_enable?: boolean;\n // sl_enable?: boolean;\n tp_pnl?: string;\n tp_offset?: string;\n tp_offset_percentage?: string;\n tp_ROI?: string;\n tp_trigger_price?: string;\n tp_order_price?: string;\n tp_order_type?: OrderType;\n\n /**\n * Computed stop loss\n */\n sl_pnl?: string;\n sl_offset?: string;\n sl_offset_percentage?: string;\n sl_ROI?: string;\n sl_trigger_price?: string;\n sl_order_price?: string;\n sl_order_type?: OrderType;\n}\n\nexport type OrderlyOrder = RegularOrder & AlgoOrder & BracketOrder;\n\nexport interface AlgoOrderChildOrders {\n symbol: string;\n algo_type: string;\n child_orders: ChildOrder[];\n}\n\nexport interface ChildOrder {\n symbol: string;\n algo_type: AlgoOrderType;\n side: string;\n type: OrderType;\n trigger_price: string;\n price?: string;\n reduce_only: boolean;\n trigger_price_type?: string;\n}\n\nexport interface TrailingStopOrder {\n activated_price?: string;\n callback_value?: string;\n callback_rate?: string;\n}\n\nexport interface OrderEntity extends ScaledOrder, TrailingStopOrder {\n symbol: string;\n order_type: OrderType;\n algo_type?: AlgoOrderRootType;\n order_type_ext?: OrderType;\n order_price?: string;\n order_quantity?: string;\n order_amount?: number;\n // Whether to display in the orderbook, default=order_quantity, not displayed when =0,\n visible_quantity?: number;\n reduce_only?: boolean;\n side: OrderSide;\n broker_id?: string;\n slippage?: number;\n\n // internal fields\n total?: string;\n // hideInOrderbook?: boolean;\n isStopOrder?: boolean;\n trigger_price?: string;\n order_tag?: string;\n client_order_id?: string;\n level?: OrderLevel;\n}\n\nexport enum DistributionType {\n // enum value need to use lowercase to match the track params\n FLAT = \"flat\",\n ASCENDING = \"ascending\",\n DESCENDING = \"descending\",\n CUSTOM = \"custom\",\n}\n\nexport type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\nexport type RequireKeys<T extends object, K extends keyof T> = Required<\n Pick<T, K>\n> &\n Partial<Omit<T, K>>;\n\nexport interface BaseAlgoOrderEntity<T extends AlgoOrderRootType>\n extends OrderEntity {\n algo_type: AlgoOrderRootType;\n child_orders: (Partial<Omit<AlgoOrderEntity<T>, \"algo_type\" | \"type\">> & {\n algo_type: AlgoOrderType;\n type: OrderType;\n child_orders?: BaseAlgoOrderEntity<T>[\"child_orders\"];\n // trigger_price: number | string;\n })[];\n // if update the order, then need to provide the order_id\n algo_order_id?: number;\n client_order_id?: string;\n order_tag?: string;\n price?: number | string;\n quantity: number | string;\n reduce_only?: boolean;\n side: OrderSide;\n symbol: string;\n trigger_price: string;\n trigger_price_type: TriggerPriceType;\n type: OrderType;\n visible_quantity?: number;\n is_activated?: boolean;\n tp_trigger_price?: string | number;\n sl_trigger_price?: string | number;\n tp_order_price?: string | number;\n tp_order_type?: OrderType;\n sl_order_price?: string | number;\n sl_order_type?: OrderType;\n // tp_enable?: boolean;\n // sl_enable?: boolean;\n position_type?: PositionType;\n}\n\nexport type AlgoOrderEntity<\n T extends AlgoOrderRootType = AlgoOrderRootType.STOP,\n> = T extends AlgoOrderRootType.TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n \"side\" | \"type\" | \"trigger_price\" | \"order_type\"\n >\n : T extends AlgoOrderRootType.POSITIONAL_TP_SL\n ? Optional<\n BaseAlgoOrderEntity<T>,\n | \"side\"\n | \"type\"\n | \"trigger_price\"\n | \"order_type\"\n | \"quantity\"\n // | \"tp_enable\"\n // | \"sl_enable\"\n | \"tp_order_price\"\n | \"tp_order_type\"\n | \"sl_order_price\"\n | \"sl_order_type\"\n | \"position_type\"\n >\n : Omit<BaseAlgoOrderEntity<T>, \"child_orders\" | \"order_type\">;\n\nexport type TPSLOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.TP_SL>,\n \"side\" | \"type\" | \"trigger_price\"\n>;\n\nexport type BracketOrderEntry = Optional<\n AlgoOrderEntity<AlgoOrderRootType.BRACKET>,\n \"side\"\n>;\n","export enum WithdrawStatus {\n NotSupported = \"NotSupported\",\n NotConnected = \"NotConnected\",\n Unsettle = \"Unsettle\",\n InsufficientBalance = \"InsufficientBalance\",\n Normal = \"Normal\",\n}\n","export interface Chain {\n id: number;\n chainNameShort: string;\n chainLogo: string;\n chainInfo: ChainInfo;\n minGasBalance: number;\n minCrossGasBalance: number;\n maxPrepayCrossGas: number;\n blockExplorerName: string;\n chainName: string;\n requestRpc: string;\n}\n\nexport interface ChainInfo {\n chainId: string;\n chainName: string;\n nativeCurrency: NativeCurrency;\n rpcUrls: string[];\n blockExplorerUrls: string[];\n}\n\nexport interface NativeCurrency {\n name: string;\n symbol: string;\n decimals: number;\n fix: number;\n}\n\nexport const Ethereum = {\n chainNameShort: \"Ethereum\",\n id: 1,\n chainLogo: \"\",\n chainInfo: {\n chainId: `0x${(1).toString(16)}`,\n chainName: \"Ethereum Mainnet\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 8,\n },\n rpcUrls: [\"https://mainnet.infura.io/v3/9155d40884554acdb17699a18a1fe348\"],\n blockExplorerUrls: [\"https://etherscan.io/\"],\n },\n minGasBalance: 0.002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.025,\n blockExplorerName: \"EthScan\",\n chainName: \"Ethereum Mainnet\",\n requestRpc: \"https://rpc.ankr.com/eth\",\n};\n\nexport const Avalanche = {\n id: 43114,\n chainInfo: {\n chainId: `0x${(43114).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche\",\n chainNameShort: \"Avalanche\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const Fuji = {\n id: 43113,\n chainInfo: {\n chainId: `0x${(43113).toString(16)}`, // '0xa86a'\n chainName: \"Avalanche Fuji Testnet\",\n nativeCurrency: {\n name: \"avax\",\n symbol: \"AVAX\",\n decimals: 18,\n fix: 5,\n },\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\n blockExplorerUrls: [\"https://snowtrace.io/\"],\n },\n minGasBalance: 0.05,\n minCrossGasBalance: 0.15,\n maxPrepayCrossGas: 2,\n blockExplorerName: \"Snowtrace\",\n chainName: \"Avalanche Fuji\",\n chainNameShort: \"Avalanche Fuji\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/avalanche\",\n};\n\nexport const BNB = {\n id: 56,\n chainInfo: {\n chainId: `0x${(56).toString(16)}`, // 0x38\n chainName: \"BNB Chain\",\n nativeCurrency: {\n name: \"bnb\",\n symbol: \"BNB\",\n decimals: 18,\n fix: 6,\n },\n rpcUrls: [\"https://bsc-dataseed1.binance.org/\"],\n blockExplorerUrls: [\"https://bscscan.com/\"],\n },\n minGasBalance: 0.02,\n minCrossGasBalance: 0.02,\n maxPrepayCrossGas: 0.1,\n blockExplorerName: \"BscScan\",\n chainName: \"Binance Smart Chain\",\n chainNameShort: \"BNB Chain\",\n requestRpc: \"https://rpc.ankr.com/bsc\",\n chainLogo: \"\",\n};\n\nexport const Fantom = {\n id: 250,\n chainInfo: {\n chainId: `0x${(250).toString(16)}`, // 0x38\n chainName: \"Fantom\",\n nativeCurrency: {\n name: \"ftm\",\n symbol: \"FTM\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpcapi.fantom.network\"],\n blockExplorerUrls: [\"https://ftmscan.com/\"],\n },\n minGasBalance: 1,\n minCrossGasBalance: 10,\n maxPrepayCrossGas: 60,\n blockExplorerName: \"FTMScan\",\n chainName: \"Fantom\",\n chainNameShort: \"Fantom\",\n chainLogo: \"\",\n requestRpc: \"https://rpc.ankr.com/fantom\",\n};\n\nexport const Polygon = {\n id: 137,\n chainInfo: {\n chainId: `0x${(137).toString(16)}`,\n chainName: \"Polygon\",\n nativeCurrency: {\n name: \"matic\",\n symbol: \"MATIC\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-mainnet.matic.network\"],\n blockExplorerUrls: [\"https://polygonscan.com/\"],\n },\n minGasBalance: 0.1,\n minCrossGasBalance: 1,\n maxPrepayCrossGas: 30,\n blockExplorerName: \"Polygonscan\",\n chainName: \"Polygon\",\n chainNameShort: \"Polygon\",\n requestRpc: \"https://rpc.ankr.com/polygon\",\n chainLogo: \"\",\n};\n\nexport const Arbitrum = {\n id: 42161,\n chainInfo: {\n chainId: `0x${(42161).toString(16)}`,\n chainName: \"Arbitrum\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arb1.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://arbiscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbiscan\",\n chainName: \"Arbitrum\",\n chainNameShort: \"Arbitrum\",\n requestRpc: \"https://arb1.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const Optimism = {\n id: 10,\n chainInfo: {\n chainId: `0x${(10).toString(16)}`,\n chainName: \"Optimism\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://mainnet.optimism.io\"],\n blockExplorerUrls: [\"https://optimistic.etherscan.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism\",\n chainName: \"Optimism\",\n chainNameShort: \"Optimism\",\n requestRpc: \"https://rpc.ankr.com/optimism\",\n chainLogo: \"\",\n};\n\nexport const zkSyncEra = {\n id: 324,\n chainInfo: {\n chainId: `0x${(324).toString(16)}`,\n chainName: \"zkSync Era\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zksync2-mainnet.zksync.io\"],\n blockExplorerUrls: [\"https://explorer.zksync.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"zkSync Era\",\n chainName: \"zkSync Era\",\n chainNameShort: \"zkSync Era\",\n requestRpc: \"https://zksync2-mainnet.zksync.io/\",\n chainLogo: \"\",\n // blockExplorerName: 'zkSync Era Goerli',\n // chainName: 'zkSync Era Goerli',\n // chainNameShort: 'zkSync Era Goerli',\n // requestRpc: 'https://zksync2-testnet.zksync.dev/',\n // chainLogo: '',\n};\n\nexport const PolygonzkEVM = {\n id: 1101,\n chainInfo: {\n chainId: `0x${(1101).toString(16)}`,\n chainName: \"Polygon zkEVM\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://zkevm-rpc.com\"],\n blockExplorerUrls: [\"https://zkevm.polygonscan.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon zkEVM\",\n chainName: \"Polygon zkEVM\",\n chainNameShort: \"Polygon zkEVM\",\n requestRpc: \"https://zkevm-rpc.com\",\n chainLogo: \"\",\n};\n\nexport const Linea = {\n id: 59144,\n chainInfo: {\n chainId: `0x${(59144).toString(16)}`,\n chainName: \"Linea\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.linea.build\"],\n blockExplorerUrls: [\"https://lineascan.build/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Linea\",\n chainName: \"Linea\",\n chainNameShort: \"Linea\",\n requestRpc: \"https://rpc.linea.build\",\n chainLogo: \"\",\n};\n\nexport const Base = {\n id: 8453,\n chainInfo: {\n chainId: `0x${(8453).toString(16)}`,\n chainName: \"Base Network\",\n nativeCurrency: {\n name: \"eth\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://developer-access-mainnet.base.org/\"],\n blockExplorerUrls: [\"https://basescan.org\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base\",\n chainName: \"Base\",\n chainNameShort: \"Base\",\n requestRpc: \"https://developer-access-mainnet.base.org/\",\n chainLogo: \"\",\n};\n\nexport const Mantle = {\n id: 5000,\n chainInfo: {\n chainId: `0x${(5000).toString(16)}`,\n chainName: \"Mantle\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.mantle.xyz/\"],\n blockExplorerUrls: [\"https://mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle\",\n chainName: \"Mantle\",\n chainNameShort: \"Mantle\",\n requestRpc: \"https://rpc.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumGoerli = {\n id: 421613,\n chainInfo: {\n chainId: `0x${(421613).toString(16)}`,\n chainName: \"Arbitrum Goerli\",\n nativeCurrency: {\n name: \"AGOR\",\n symbol: \"AGOR\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://goerli-rollup.arbitrum.io/rpc\"],\n blockExplorerUrls: [\"https://goerli-rollup-explorer.arbitrum.io/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Goerli\",\n chainName: \"Arbitrum Goerli\",\n chainNameShort: \"Arbitrum Goerli\",\n requestRpc: \"https://goerli-rollup.arbitrum.io/rpc\",\n chainLogo: \"\",\n};\n\nexport const ArbitrumSepolia = {\n id: 421614,\n chainInfo: {\n chainId: `0x${(421614).toString(16)}`,\n chainName: \"Arbitrum Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\"],\n blockExplorerUrls: [\"https://sepolia-explorer.arbitrum.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Arbitrum Sepolia\",\n chainName: \"Arbitrum Sepolia\",\n chainNameShort: \"Arbitrum Sepolia\",\n requestRpc: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chainLogo: \"\",\n};\n\nexport const OptimismGoerli = {\n id: 420,\n chainInfo: {\n chainId: `0x${(420).toString(16)}`,\n chainName: \"Optimism Goerli\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://optimism-goerli.gateway.tenderly.co\"],\n blockExplorerUrls: [\"https://goerli-optimism.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Goerli\",\n chainName: \"Optimism Goerli\",\n chainNameShort: \"Optimism Goerli\",\n requestRpc: \"https://optimism-goerli.gateway.tenderly.co\",\n chainLogo: \"\",\n};\n\nexport const OptimismSepolia = {\n id: 11155420,\n chainInfo: {\n chainId: `0x${(11155420).toString(16)}`,\n chainName: \"Optimism Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://sepolia.optimism.io\"],\n blockExplorerUrls: [\"https://sepolia-optimistic.etherscan.io\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Optimism Sepolia\",\n chainName: \"Optimism Sepolia\",\n chainNameShort: \"Optimism Sepolia\",\n requestRpc: \"https://sepolia.optimism.io\",\n chainLogo: \"\",\n};\n\nexport const BaseSepolia = {\n id: 84532,\n chainInfo: {\n chainId: `0x${(84532).toString(16)}`,\n chainName: \"Base Sepolia\",\n nativeCurrency: {\n name: \"ETH\",\n symbol: \"ETH\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://base-sepolia-rpc.publicnode.com\"],\n blockExplorerUrls: [\"https://base-sepolia.blockscout.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Base Sepolia\",\n chainName: \"Base Sepolia\",\n chainNameShort: \"Base Sepolia\",\n requestRpc: \"https://base-sepolia-rpc.publicnode.com\",\n chainLogo: \"\",\n};\n\nexport const MantleSepolia = {\n id: 5003,\n chainInfo: {\n chainId: `0x${(5003).toString(16)}`,\n chainName: \"Mantle Sepolia\",\n nativeCurrency: {\n name: \"MNT\",\n symbol: \"MNT\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc.sepolia.mantle.xyz/\"],\n blockExplorerUrls: [\"https://sepolia.mantlescan.xyz/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Mantle Sepolia\",\n chainName: \"Mantle Sepolia\",\n chainNameShort: \"Mantle Sepolia\",\n requestRpc: \"https://rpc.sepolia.mantle.xyz/\",\n chainLogo: \"\",\n};\n\nexport const PolygonAmoy = {\n id: 80002,\n chainInfo: {\n chainId: `0x${(80002).toString(16)}`,\n chainName: \"Polygon Amoy\",\n nativeCurrency: {\n name: \"MATIC\",\n symbol: \"MATIC\",\n decimals: 6,\n fix: 4,\n },\n rpcUrls: [\"https://rpc-amoy.polygon.technology/\"],\n blockExplorerUrls: [\"https://www.oklink.com/amoy\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"Polygon Amoy\",\n chainName: \"Polygon Amoy\",\n chainNameShort: \"Polygon Amoy\",\n requestRpc: \"https://rpc-amoy.polygon.technology/\",\n chainLogo: \"\",\n};\n\nexport const Sei = {\n id: 1329,\n chainInfo: {\n chainId: `0x${(1329).toString(16)}`,\n chainName: \"Sei Network\",\n nativeCurrency: {\n name: \"SEI\",\n symbol: \"SEI\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [\"https://evm-rpc.sei-apis.com\"],\n blockExplorerUrls: [\"https://seitrace.com/\"],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\n\nexport const StoryTestnet = {\n name: \"Story Odyssey Testnet\",\n public_rpc_url: \"https://rpc.odyssey.storyrpc.io/\",\n chain_id: 1516,\n currency_symbol: \"IP\",\n explorer_base_url: \"\",\n vault_address: \"\",\n};\nexport const StoryOdysseyTestnet = {\n id: 1329,\n chainInfo: {\n chainId: `0x${StoryTestnet.chain_id.toString(16)}`,\n chainName: StoryTestnet.name,\n nativeCurrency: {\n name: \"IP\",\n symbol: \"IP\",\n decimals: 18,\n fix: 4,\n },\n rpcUrls: [StoryTestnet.public_rpc_url],\n blockExplorerUrls: [],\n },\n minGasBalance: 0.0002,\n minCrossGasBalance: 0.002,\n maxPrepayCrossGas: 0.03,\n blockExplorerName: \"SEI\",\n chainName: \"Sei Network\",\n chainNameShort: \"SEI\",\n requestRpc: \"https://evm-rpc.sei-apis.com\",\n chainLogo: \"\",\n};\nexport const chainsInfoMap: Map<number, Chain> = new Map([\n [Ethereum.id, Ethereum],\n [Avalanche.id, Avalanche],\n [Fuji.id, Fuji],\n [BNB.id, BNB],\n [Fantom.id, Fantom],\n [Polygon.id, Polygon],\n [Arbitrum.id, Arbitrum],\n [Optimism.id, Optimism],\n [zkSyncEra.id, zkSyncEra],\n [PolygonzkEVM.id, PolygonzkEVM],\n [Linea.id, Linea],\n [Base.id, Base],\n [Mantle.id, Mantle],\n [ArbitrumGoerli.id, ArbitrumGoerli],\n [ArbitrumSepolia.id, ArbitrumSepolia],\n [OptimismGoerli.id, OptimismGoerli],\n [OptimismSepolia.id, OptimismSepolia],\n [BaseSepolia.id, BaseSepolia],\n [MantleSepolia.id, MantleSepolia],\n [PolygonAmoy.id, PolygonAmoy],\n [Sei.id, Sei],\n [StoryOdysseyTestnet.id, StoryOdysseyTestnet],\n]);\n\nexport const SolanaDevnet = {\n id: 901901901,\n chainInfo: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chainId: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n} as unknown as typeof Arbitrum;\n\nexport const TestnetChains = [\n {\n network_infos: {\n name: \"Arbitrum Sepolia\",\n shortName: \"Arbitrum Sepolia\",\n public_rpc_url: \"https://arbitrum-sepolia.blockpi.network/v1/rpc/public\",\n chain_id: 421614,\n currency_symbol: \"ETH\",\n bridge_enable: true,\n mainnet: false,\n explorer_base_url: \"https://sepolia.arbiscan.io\",\n est_txn_mins: null,\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: {\n name: \"Solana Devnet\",\n public_rpc_url: \"\",\n chain_id: 901901901,\n currency_symbol: \"SOL\",\n explorer_base_url: \"\",\n vault_address: \"\",\n },\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU\",\n decimals: 6,\n },\n ],\n },\n {\n network_infos: StoryTestnet,\n token_infos: [\n {\n symbol: \"USDC\",\n address: \"0xF1815bd50389c46847f0Bda824eC8da914045D14\",\n decimals: 6,\n },\n ],\n },\n // {\n // network_infos: {\n // name: \"Mantle Sepolia\",\n // shortName: \"Mantle Sepolia\",\n // public_rpc_url: \"https://rpc.sepolia.mantle.xyz/\",\n // chain_id: 5003,\n // currency_symbol: \"MNT\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://sepolia.mantlescan.xyz/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xAcab8129E2cE587fD203FD770ec9ECAFA2C88080\",\n // decimals: 6,\n // display_name: \"USDC.e\",\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Arbitrum Goerli\",\n // shortName: \"Arbitrum Goerli\",\n // public_rpc_url: \"https://goerli-rollup.arbitrum.io/rpc\",\n // chain_id: 421613,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli.arbiscan.io/\",\n // est_txn_mins: null,\n // },\n // token_infos: [\n // {\n // symbol: \"USDC\",\n // address: \"0xfd064A18f3BF249cf1f87FC203E90D8f650f2d63\",\n // decimals: 6,\n // },\n // ],\n // },\n // {\n // network_infos: {\n // name: \"Optimism Goerli\",\n // shortName: \"Optimism Goerli\",\n // public_rpc_url: \"https://optimism-goerli.gateway.tenderly.co\",\n // chain_id: 420,\n // currency_symbol: \"ETH\",\n // bridge_enable: true,\n // mainnet: false,\n // explorer_base_url: \"https://goerli-optimism.etherscan.io\",\n // est_txn_mins: null,\n // },\n // },\n];\n\nexport const defaultMainnetChains = [Arbitrum, Base, Optimism];\nexport const defaultTestnetChains = [ArbitrumSepolia];\n\nexport enum ChainNamespace {\n evm = \"EVM\",\n solana = \"SOL\",\n}\n\nexport const AbstractChains = new Set([2741, 11124]);\nexport const SolanaChains = new Set([901901901, 900900900]);\n","export enum TrackerEventName {\n /** virtual event (not send this event name to tracker) */\n trackIdentifyUserId = \"track_identify_user_id\",\n trackIdentify = \"track_identify\",\n trackCustomEvent = \"track_custom_event\",\n\n /** real event name (send this event name to tracker) */\n withdrawSuccess = \"withdraw_request_success\",\n withdrawFailed = \"withdraw_request_failure\",\n depositSuccess = \"deposit_request_success\",\n depositFailed = \"deposit_request_failure\",\n signinSuccess = \"sign_message_success\",\n placeOrderSuccess = \"place_order_success\",\n walletConnect = \"connect_wallet_success\",\n clickLinkDeviceButton = \"click_link_device_button\",\n signLinkDeviceMessageSuccess = \"sign_link_device_message_success\",\n linkDeviceModalClickConfirm = \"link_device_modal_click_confirm\",\n socialLoginSuccess = \"social_login_success\",\n clickSwitchNetwork = \"click_switch_network\",\n clickSwitchWallet = \"click_switch_wallet\",\n switchNetworkSuccess = \"switch_network_success\",\n clickExportPrivateKey = \"click_export_private_key\",\n switchLanguage = \"switch_language\",\n leaderboardCampaignClickTradeNow = \"leaderboard_campaign_click_trade_now\",\n leaderboardCampaignClickLearnMore = \"leaderboard_campaign_click_learn_more\",\n vaultDepositSuccess = \"vault_deposit_success\",\n vaultDepositFailed = \"vault_deposit_failed\",\n vaultWithdrawSuccess = \"vault_withdraw_success\",\n vaultWithdrawFailed = \"vault_withdraw_failed\",\n clickBBOButton = \"click_bbo_button\",\n confirmCloseAllPositions = \"confirm_close_all_positions\",\n}\n","import { API } from \"./types/api\";\n\n// export type Chain = {\n// id: string;\n// name?: string;\n// };\n\nexport type CurrentChain = {\n id: number;\n info: API.Chain;\n};\n\nexport enum WS_WalletStatusEnum {\n NO = \"NO\",\n FAILED = \"FAILED\",\n PENDING = \"PENDING\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n}\n","export const LedgerWalletKey = \"orderly:ledger-wallet\";\nexport const ConnectorKey = \"orderly:connectorKey\";\nexport const ChainKey = \"order:chain\";\nexport const LinkDeviceKey = \"orderly_link_device\";\nexport const TradingviewFullscreenKey = \"orderly:tradingview-fullscreen\";\nexport const OrderEntrySortKeys = \"orderly:order_entry_sort_keys\";\n","export class ApiError extends Error {\n constructor(message: string, private readonly code: number) {\n super(message);\n this.name = \"ApiError\";\n }\n}\n\nexport class SDKError extends Error {\n constructor(message: string) {\n super(`[ORDERLY SDK ERROR]:${message}`);\n this.name = \"SDKError\";\n }\n}\n","export const definedTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n ],\n Registration: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"registrationNonce\", type: \"uint256\" },\n ],\n Withdraw: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"receiver\", type: \"address\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"withdrawNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n AddOrderlyKey: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"orderlyKey\", type: \"string\" },\n { name: \"scope\", type: \"string\" },\n { name: \"timestamp\", type: \"uint64\" },\n { name: \"expiration\", type: \"uint64\" },\n ],\n SettlePnl: [\n { name: \"brokerId\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"settleNonce\", type: \"uint64\" },\n { name: \"timestamp\", type: \"uint64\" },\n ],\n DexRequest: [\n { name: \"payloadType\", type: \"uint8\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"receiver\", type: \"address\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"vaultId\", type: \"bytes32\" },\n { name: \"token\", type: \"string\" },\n { name: \"dexBrokerId\", type: \"string\" },\n ],\n InternalTransfer: [\n { name: \"receiver\", type: \"bytes32\" },\n { name: \"token\", type: \"string\" },\n { name: \"amount\", type: \"uint256\" },\n { name: \"transferNonce\", type: \"uint64\" },\n ],\n} as const;\n","export { default as version } from \"./version\";\nexport * from \"./constants\";\nexport * from \"./types/api\";\n// export * from \"./order\";\nexport {\n OrderType,\n OrderSide,\n OrderStatus,\n AlgoOrderRootType,\n PositionType,\n AlgoOrderType,\n TriggerPriceType,\n BBOOrderType,\n OrderLevel,\n DistributionType,\n TrailingCallbackType,\n} from \"./order\";\nexport type {\n OrderEntity,\n AlgoOrderEntity,\n TPSLOrderEntry,\n BaseAlgoOrderEntity,\n AlgoOrderChildOrders,\n Optional,\n PositionSide,\n BracketOrderEntry,\n RequireKeys,\n BaseOrder,\n RegularOrder,\n AlgoOrder,\n OrderlyOrder,\n ChildOrder,\n BracketOrder,\n} from \"./order\";\nexport * from \"./context\";\nexport * from \"./withdraw\";\nexport * from \"./chains\";\nexport * from \"./track\";\nexport type { Chain as ChainConfig, ChainInfo, NativeCurrency } from \"./chains\";\nexport * from \"./wallet\";\nexport * from \"./storageKey\";\nexport { ApiError, SDKError } from \"./errors\";\n\nexport { definedTypes } from \"./sign\";\nexport * as superstruct from \"superstruct\";\nexport * from \"./assetHistory\";\nexport * from \"./account\";\n","export enum AssetHistoryStatusEnum {\n /** @deprecated, this status is not used */\n NEW = \"NEW\",\n PENDING = \"PENDING\",\n CONFIRM = \"CONFIRM\",\n PROCESSING = \"PROCESSING\",\n COMPLETED = \"COMPLETED\",\n FAILED = \"FAILED\",\n PENDING_REBALANCE = \"PENDING_REBALANCE\",\n}\n\nexport enum AssetHistorySideEnum {\n DEPOSIT = \"DEPOSIT\",\n WITHDRAW = \"WITHDRAW\",\n}\n","export const DEFAUL_ORDERLY_KEY_SCOPE = \"read,trading\";\n"],"mappings":";AAOA,IAAI,OAAO,WAAW,aAAa;AACjC,SAAO,sBAAsB,OAAO,uBAAuB,CAAC;AAC5D,SAAO,oBAAoB,+BAA+B,IAAI;AAChE;AAEA,IAAO,kBAAQ;;;ACVR,IAAK,oBAAL,kBAAKA,uBAAL;AACL,EAAAA,sCAAA,mCAAgC,MAAhC;AACA,EAAAA,sCAAA,kBAAe,KAAf;AACA,EAAAA,sCAAA,eAAY,KAAZ;AACA,EAAAA,sCAAA,iBAAc,KAAd;AACA,EAAAA,sCAAA,cAAW,KAAX;AACA,EAAAA,sCAAA,qBAAkB,KAAlB;AACA,EAAAA,sCAAA,mBAAgB,KAAhB;AAPU,SAAAA;AAAA,GAAA;AAUL,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,kCAAA,aAAU,KAAV;AACA,EAAAA,kCAAA,WAAQ,KAAR;AACA,EAAAA,kCAAA,WAAQ,MAAR;AAHU,SAAAA;AAAA,GAAA;AAML,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,wCAAA,YAAS,KAAT;AACA,EAAAA,wCAAA,cAAW,KAAX;AAFU,SAAAA;AAAA,GAAA;AAOL,IAAK,oBAAL,kBAAKC,uBAAL;AACL,EAAAA,sCAAA,aAAU,KAAV;AACA,EAAAA,sCAAA,iBAAc,KAAd;AACA,EAAAA,sCAAA,eAAY,KAAZ;AAHU,SAAAA;AAAA,GAAA;AAYL,IAAM,2BAA2B;AACjC,IAAM,yBAAyB;AAC/B,IAAM,yBAAyB;AAC/B,IAAM,wBAAwB;AAC9B,IAAM,wBAAwB;AAC9B,IAAM,2BAA2B;AACjC,IAAM,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AAA,wBAAA,gBAAa;AACb,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,YAAS;AACT,EAAAA,wBAAA,uBAAoB;AARV,SAAAA;AAAA,GAAA;AAWL,IAAK,uBAAL,kBAAKC,0BAAL;AACL,EAAAA,sBAAA,aAAU;AACV,EAAAA,sBAAA,cAAW;AAFD,SAAAA;AAAA,GAAA;;;ACXL,IAAM,2BAA2B;","names":["AccountStatusEnum","SystemStateEnum","ExchangeStatusEnum","NetworkStatusEnum","AnnouncementType","OrderType","BBOOrderType","OrderLevel","AlgoOrderRootType","TriggerPriceType","PositionType","AlgoOrderType","OrderSide","OrderStatus","TrailingCallbackType","DistributionType","WithdrawStatus","ChainNamespace","TrackerEventName","WS_WalletStatusEnum","AssetHistoryStatusEnum","AssetHistorySideEnum"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kodiak-finance/orderly-types",
3
- "version": "2.8.18",
3
+ "version": "2.8.19",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -18,7 +18,7 @@
18
18
  "jest": "^29.6.1",
19
19
  "tsup": "^7.1.0",
20
20
  "typedoc": "^0.26.5",
21
- "tsconfig": "0.11.17"
21
+ "tsconfig": "0.11.18"
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"