@orderly.network/types 2.5.3 → 2.6.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +50 -15
- package/dist/index.d.ts +50 -15
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -8,7 +8,7 @@ declare global {
|
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
declare const _default: "2.
|
|
11
|
+
declare const _default: "2.6.0-alpha.0";
|
|
12
12
|
|
|
13
13
|
declare enum AccountStatusEnum {
|
|
14
14
|
EnableTradingWithoutConnected = -1,
|
|
@@ -47,6 +47,7 @@ declare const ARBITRUM_TESTNET_CHAINID_HEX = "0x66EEE";
|
|
|
47
47
|
declare const MANTLE_TESTNET_CHAINID = 5003;
|
|
48
48
|
declare const MANTLE_TESTNET_CHAINID_HEX = "0x138b";
|
|
49
49
|
declare const ARBITRUM_MAINNET_CHAINID = 42161;
|
|
50
|
+
declare const ETHEREUM_MAINNET_CHAINID = 1;
|
|
50
51
|
declare const ARBITRUM_MAINNET_CHAINID_HEX = "0xa4b1";
|
|
51
52
|
declare const MEDIA_TABLET = "(max-width: 768px)";
|
|
52
53
|
declare const DEPOSIT_FEE_RATE = 1.05;
|
|
@@ -115,8 +116,9 @@ declare const TesntTokenFallback: (testnetTokens: any) => {
|
|
|
115
116
|
minimum_withdraw_amount: number;
|
|
116
117
|
chain_details: any;
|
|
117
118
|
}[];
|
|
118
|
-
declare const EMPTY_LIST: any
|
|
119
|
-
declare const EMPTY_OBJECT:
|
|
119
|
+
declare const EMPTY_LIST: ReadonlyArray<any>;
|
|
120
|
+
declare const EMPTY_OBJECT: Readonly<Record<PropertyKey, any>>;
|
|
121
|
+
declare const EMPTY_OPERATION: () => void;
|
|
120
122
|
|
|
121
123
|
/**
|
|
122
124
|
* Supported types for placing an order
|
|
@@ -162,6 +164,10 @@ declare enum AlgoOrderRootType {
|
|
|
162
164
|
declare enum TriggerPriceType {
|
|
163
165
|
MARK_PRICE = "MARK_PRICE"
|
|
164
166
|
}
|
|
167
|
+
declare enum PositionType {
|
|
168
|
+
FULL = "FULL",
|
|
169
|
+
PARTIAL = "PARTIAL"
|
|
170
|
+
}
|
|
165
171
|
declare enum AlgoOrderType {
|
|
166
172
|
TAKE_PROFIT = "TAKE_PROFIT",
|
|
167
173
|
STOP_LOSS = "STOP_LOSS"
|
|
@@ -208,16 +214,16 @@ interface BaseOrder {
|
|
|
208
214
|
}
|
|
209
215
|
/** Scaled order fields */
|
|
210
216
|
interface ScaledOrder {
|
|
211
|
-
/**
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
|
|
215
|
-
/** total orders */
|
|
216
|
-
total_orders?:
|
|
217
|
+
/** user-defined price at the first order (index 0) */
|
|
218
|
+
start_price?: string;
|
|
219
|
+
/** user-defined price at the last order (index total_orders - 1) */
|
|
220
|
+
end_price?: string;
|
|
221
|
+
/** total number of orders */
|
|
222
|
+
total_orders?: string;
|
|
217
223
|
/** quantity distribution type */
|
|
218
224
|
distribution_type?: DistributionType;
|
|
219
|
-
/** the ratio
|
|
220
|
-
skew?:
|
|
225
|
+
/** the ratio of qty[end] / qty[start] */
|
|
226
|
+
skew?: string;
|
|
221
227
|
}
|
|
222
228
|
interface RegularOrder extends BaseOrder, OrderExt, ScaledOrder {
|
|
223
229
|
}
|
|
@@ -234,11 +240,16 @@ interface BracketOrder extends AlgoOrder, OrderExt {
|
|
|
234
240
|
/**
|
|
235
241
|
* Computed take profit
|
|
236
242
|
*/
|
|
243
|
+
position_type?: PositionType;
|
|
244
|
+
tp_enable?: boolean;
|
|
245
|
+
sl_enable?: boolean;
|
|
237
246
|
tp_pnl?: string;
|
|
238
247
|
tp_offset?: string;
|
|
239
248
|
tp_offset_percentage?: string;
|
|
240
249
|
tp_ROI?: string;
|
|
241
250
|
tp_trigger_price?: string;
|
|
251
|
+
tp_order_price?: string;
|
|
252
|
+
tp_order_type?: OrderType;
|
|
242
253
|
/**
|
|
243
254
|
* Computed stop loss
|
|
244
255
|
*/
|
|
@@ -247,6 +258,8 @@ interface BracketOrder extends AlgoOrder, OrderExt {
|
|
|
247
258
|
sl_offset_percentage?: string;
|
|
248
259
|
sl_ROI?: string;
|
|
249
260
|
sl_trigger_price?: string;
|
|
261
|
+
sl_order_price?: string;
|
|
262
|
+
sl_order_type?: OrderType;
|
|
250
263
|
}
|
|
251
264
|
type OrderlyOrder = RegularOrder & AlgoOrder & BracketOrder;
|
|
252
265
|
interface AlgoOrderChildOrders {
|
|
@@ -260,6 +273,7 @@ interface ChildOrder {
|
|
|
260
273
|
side: string;
|
|
261
274
|
type: OrderType;
|
|
262
275
|
trigger_price: string;
|
|
276
|
+
price?: string;
|
|
263
277
|
reduce_only: boolean;
|
|
264
278
|
trigger_price_type?: string;
|
|
265
279
|
}
|
|
@@ -312,8 +326,15 @@ interface BaseAlgoOrderEntity<T extends AlgoOrderRootType> extends OrderEntity {
|
|
|
312
326
|
is_activated?: boolean;
|
|
313
327
|
tp_trigger_price?: string | number;
|
|
314
328
|
sl_trigger_price?: string | number;
|
|
329
|
+
tp_order_price?: string | number;
|
|
330
|
+
tp_order_type?: OrderType;
|
|
331
|
+
sl_order_price?: string | number;
|
|
332
|
+
sl_order_type?: OrderType;
|
|
333
|
+
tp_enable?: boolean;
|
|
334
|
+
sl_enable?: boolean;
|
|
335
|
+
position_type?: PositionType;
|
|
315
336
|
}
|
|
316
|
-
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"> : Omit<BaseAlgoOrderEntity<T>, "child_orders" | "order_type">;
|
|
337
|
+
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">;
|
|
317
338
|
type TPSLOrderEntry = Optional<AlgoOrderEntity<AlgoOrderRootType.TP_SL>, "side" | "type" | "trigger_price">;
|
|
318
339
|
type BracketOrderEntry = Optional<AlgoOrderEntity<AlgoOrderRootType.BRACKET>, "side">;
|
|
319
340
|
|
|
@@ -616,8 +637,17 @@ declare namespace API {
|
|
|
616
637
|
mm: number;
|
|
617
638
|
}
|
|
618
639
|
interface PositionTPSLExt extends PositionExt {
|
|
619
|
-
|
|
620
|
-
|
|
640
|
+
full_tp_sl?: {
|
|
641
|
+
tp_trigger_price?: number;
|
|
642
|
+
sl_trigger_price?: number;
|
|
643
|
+
algo_order?: AlgoOrder;
|
|
644
|
+
};
|
|
645
|
+
partial_tp_sl?: {
|
|
646
|
+
tp_trigger_price?: number;
|
|
647
|
+
sl_trigger_price?: number;
|
|
648
|
+
order_num?: number;
|
|
649
|
+
algo_order?: AlgoOrder;
|
|
650
|
+
};
|
|
621
651
|
/**
|
|
622
652
|
* related position tp/sl order
|
|
623
653
|
*/
|
|
@@ -682,6 +712,7 @@ declare namespace API {
|
|
|
682
712
|
withdrawal_fee?: number;
|
|
683
713
|
minimum_withdraw_amount?: number;
|
|
684
714
|
vault_address: string;
|
|
715
|
+
currency_decimal?: number;
|
|
685
716
|
cross_chain_router: string;
|
|
686
717
|
depositor: string;
|
|
687
718
|
}
|
|
@@ -766,6 +797,8 @@ declare namespace API {
|
|
|
766
797
|
to_account_id: string;
|
|
767
798
|
token: string;
|
|
768
799
|
updated_time: number;
|
|
800
|
+
chain_id: string;
|
|
801
|
+
block_time: number;
|
|
769
802
|
}
|
|
770
803
|
interface TransferHistory {
|
|
771
804
|
meta: RecordsMeta;
|
|
@@ -1755,4 +1788,6 @@ declare enum AssetHistorySideEnum {
|
|
|
1755
1788
|
WITHDRAW = "WITHDRAW"
|
|
1756
1789
|
}
|
|
1757
1790
|
|
|
1758
|
-
|
|
1791
|
+
declare const DEFAUL_ORDERLY_KEY_SCOPE = "read,trading";
|
|
1792
|
+
|
|
1793
|
+
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, 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, TriggerPriceType, WSMessage, WS_WalletStatusEnum, WithdrawStatus, chainsInfoMap, defaultMainnetChains, defaultTestnetChains, definedTypes, isNativeTokenChecker, nativeETHAddress, nativeTokenAddress, _default as version, zkSyncEra };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ declare global {
|
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
declare const _default: "2.
|
|
11
|
+
declare const _default: "2.6.0-alpha.0";
|
|
12
12
|
|
|
13
13
|
declare enum AccountStatusEnum {
|
|
14
14
|
EnableTradingWithoutConnected = -1,
|
|
@@ -47,6 +47,7 @@ declare const ARBITRUM_TESTNET_CHAINID_HEX = "0x66EEE";
|
|
|
47
47
|
declare const MANTLE_TESTNET_CHAINID = 5003;
|
|
48
48
|
declare const MANTLE_TESTNET_CHAINID_HEX = "0x138b";
|
|
49
49
|
declare const ARBITRUM_MAINNET_CHAINID = 42161;
|
|
50
|
+
declare const ETHEREUM_MAINNET_CHAINID = 1;
|
|
50
51
|
declare const ARBITRUM_MAINNET_CHAINID_HEX = "0xa4b1";
|
|
51
52
|
declare const MEDIA_TABLET = "(max-width: 768px)";
|
|
52
53
|
declare const DEPOSIT_FEE_RATE = 1.05;
|
|
@@ -115,8 +116,9 @@ declare const TesntTokenFallback: (testnetTokens: any) => {
|
|
|
115
116
|
minimum_withdraw_amount: number;
|
|
116
117
|
chain_details: any;
|
|
117
118
|
}[];
|
|
118
|
-
declare const EMPTY_LIST: any
|
|
119
|
-
declare const EMPTY_OBJECT:
|
|
119
|
+
declare const EMPTY_LIST: ReadonlyArray<any>;
|
|
120
|
+
declare const EMPTY_OBJECT: Readonly<Record<PropertyKey, any>>;
|
|
121
|
+
declare const EMPTY_OPERATION: () => void;
|
|
120
122
|
|
|
121
123
|
/**
|
|
122
124
|
* Supported types for placing an order
|
|
@@ -162,6 +164,10 @@ declare enum AlgoOrderRootType {
|
|
|
162
164
|
declare enum TriggerPriceType {
|
|
163
165
|
MARK_PRICE = "MARK_PRICE"
|
|
164
166
|
}
|
|
167
|
+
declare enum PositionType {
|
|
168
|
+
FULL = "FULL",
|
|
169
|
+
PARTIAL = "PARTIAL"
|
|
170
|
+
}
|
|
165
171
|
declare enum AlgoOrderType {
|
|
166
172
|
TAKE_PROFIT = "TAKE_PROFIT",
|
|
167
173
|
STOP_LOSS = "STOP_LOSS"
|
|
@@ -208,16 +214,16 @@ interface BaseOrder {
|
|
|
208
214
|
}
|
|
209
215
|
/** Scaled order fields */
|
|
210
216
|
interface ScaledOrder {
|
|
211
|
-
/**
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
|
|
215
|
-
/** total orders */
|
|
216
|
-
total_orders?:
|
|
217
|
+
/** user-defined price at the first order (index 0) */
|
|
218
|
+
start_price?: string;
|
|
219
|
+
/** user-defined price at the last order (index total_orders - 1) */
|
|
220
|
+
end_price?: string;
|
|
221
|
+
/** total number of orders */
|
|
222
|
+
total_orders?: string;
|
|
217
223
|
/** quantity distribution type */
|
|
218
224
|
distribution_type?: DistributionType;
|
|
219
|
-
/** the ratio
|
|
220
|
-
skew?:
|
|
225
|
+
/** the ratio of qty[end] / qty[start] */
|
|
226
|
+
skew?: string;
|
|
221
227
|
}
|
|
222
228
|
interface RegularOrder extends BaseOrder, OrderExt, ScaledOrder {
|
|
223
229
|
}
|
|
@@ -234,11 +240,16 @@ interface BracketOrder extends AlgoOrder, OrderExt {
|
|
|
234
240
|
/**
|
|
235
241
|
* Computed take profit
|
|
236
242
|
*/
|
|
243
|
+
position_type?: PositionType;
|
|
244
|
+
tp_enable?: boolean;
|
|
245
|
+
sl_enable?: boolean;
|
|
237
246
|
tp_pnl?: string;
|
|
238
247
|
tp_offset?: string;
|
|
239
248
|
tp_offset_percentage?: string;
|
|
240
249
|
tp_ROI?: string;
|
|
241
250
|
tp_trigger_price?: string;
|
|
251
|
+
tp_order_price?: string;
|
|
252
|
+
tp_order_type?: OrderType;
|
|
242
253
|
/**
|
|
243
254
|
* Computed stop loss
|
|
244
255
|
*/
|
|
@@ -247,6 +258,8 @@ interface BracketOrder extends AlgoOrder, OrderExt {
|
|
|
247
258
|
sl_offset_percentage?: string;
|
|
248
259
|
sl_ROI?: string;
|
|
249
260
|
sl_trigger_price?: string;
|
|
261
|
+
sl_order_price?: string;
|
|
262
|
+
sl_order_type?: OrderType;
|
|
250
263
|
}
|
|
251
264
|
type OrderlyOrder = RegularOrder & AlgoOrder & BracketOrder;
|
|
252
265
|
interface AlgoOrderChildOrders {
|
|
@@ -260,6 +273,7 @@ interface ChildOrder {
|
|
|
260
273
|
side: string;
|
|
261
274
|
type: OrderType;
|
|
262
275
|
trigger_price: string;
|
|
276
|
+
price?: string;
|
|
263
277
|
reduce_only: boolean;
|
|
264
278
|
trigger_price_type?: string;
|
|
265
279
|
}
|
|
@@ -312,8 +326,15 @@ interface BaseAlgoOrderEntity<T extends AlgoOrderRootType> extends OrderEntity {
|
|
|
312
326
|
is_activated?: boolean;
|
|
313
327
|
tp_trigger_price?: string | number;
|
|
314
328
|
sl_trigger_price?: string | number;
|
|
329
|
+
tp_order_price?: string | number;
|
|
330
|
+
tp_order_type?: OrderType;
|
|
331
|
+
sl_order_price?: string | number;
|
|
332
|
+
sl_order_type?: OrderType;
|
|
333
|
+
tp_enable?: boolean;
|
|
334
|
+
sl_enable?: boolean;
|
|
335
|
+
position_type?: PositionType;
|
|
315
336
|
}
|
|
316
|
-
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"> : Omit<BaseAlgoOrderEntity<T>, "child_orders" | "order_type">;
|
|
337
|
+
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">;
|
|
317
338
|
type TPSLOrderEntry = Optional<AlgoOrderEntity<AlgoOrderRootType.TP_SL>, "side" | "type" | "trigger_price">;
|
|
318
339
|
type BracketOrderEntry = Optional<AlgoOrderEntity<AlgoOrderRootType.BRACKET>, "side">;
|
|
319
340
|
|
|
@@ -616,8 +637,17 @@ declare namespace API {
|
|
|
616
637
|
mm: number;
|
|
617
638
|
}
|
|
618
639
|
interface PositionTPSLExt extends PositionExt {
|
|
619
|
-
|
|
620
|
-
|
|
640
|
+
full_tp_sl?: {
|
|
641
|
+
tp_trigger_price?: number;
|
|
642
|
+
sl_trigger_price?: number;
|
|
643
|
+
algo_order?: AlgoOrder;
|
|
644
|
+
};
|
|
645
|
+
partial_tp_sl?: {
|
|
646
|
+
tp_trigger_price?: number;
|
|
647
|
+
sl_trigger_price?: number;
|
|
648
|
+
order_num?: number;
|
|
649
|
+
algo_order?: AlgoOrder;
|
|
650
|
+
};
|
|
621
651
|
/**
|
|
622
652
|
* related position tp/sl order
|
|
623
653
|
*/
|
|
@@ -682,6 +712,7 @@ declare namespace API {
|
|
|
682
712
|
withdrawal_fee?: number;
|
|
683
713
|
minimum_withdraw_amount?: number;
|
|
684
714
|
vault_address: string;
|
|
715
|
+
currency_decimal?: number;
|
|
685
716
|
cross_chain_router: string;
|
|
686
717
|
depositor: string;
|
|
687
718
|
}
|
|
@@ -766,6 +797,8 @@ declare namespace API {
|
|
|
766
797
|
to_account_id: string;
|
|
767
798
|
token: string;
|
|
768
799
|
updated_time: number;
|
|
800
|
+
chain_id: string;
|
|
801
|
+
block_time: number;
|
|
769
802
|
}
|
|
770
803
|
interface TransferHistory {
|
|
771
804
|
meta: RecordsMeta;
|
|
@@ -1755,4 +1788,6 @@ declare enum AssetHistorySideEnum {
|
|
|
1755
1788
|
WITHDRAW = "WITHDRAW"
|
|
1756
1789
|
}
|
|
1757
1790
|
|
|
1758
|
-
|
|
1791
|
+
declare const DEFAUL_ORDERLY_KEY_SCOPE = "read,trading";
|
|
1792
|
+
|
|
1793
|
+
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, 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, TriggerPriceType, WSMessage, WS_WalletStatusEnum, WithdrawStatus, chainsInfoMap, defaultMainnetChains, defaultTestnetChains, definedTypes, isNativeTokenChecker, nativeETHAddress, nativeTokenAddress, _default as version, zkSyncEra };
|
package/dist/index.js
CHANGED
|
@@ -61,10 +61,13 @@ __export(src_exports, {
|
|
|
61
61
|
ChainKey: () => ChainKey,
|
|
62
62
|
ChainNamespace: () => ChainNamespace,
|
|
63
63
|
ConnectorKey: () => ConnectorKey,
|
|
64
|
+
DEFAUL_ORDERLY_KEY_SCOPE: () => DEFAUL_ORDERLY_KEY_SCOPE,
|
|
64
65
|
DEPOSIT_FEE_RATE: () => DEPOSIT_FEE_RATE,
|
|
65
66
|
DistributionType: () => DistributionType,
|
|
66
67
|
EMPTY_LIST: () => EMPTY_LIST,
|
|
67
68
|
EMPTY_OBJECT: () => EMPTY_OBJECT,
|
|
69
|
+
EMPTY_OPERATION: () => EMPTY_OPERATION,
|
|
70
|
+
ETHEREUM_MAINNET_CHAINID: () => ETHEREUM_MAINNET_CHAINID,
|
|
68
71
|
Ethereum: () => Ethereum,
|
|
69
72
|
ExchangeStatusEnum: () => ExchangeStatusEnum,
|
|
70
73
|
Fantom: () => Fantom,
|
|
@@ -90,6 +93,7 @@ __export(src_exports, {
|
|
|
90
93
|
Polygon: () => Polygon,
|
|
91
94
|
PolygonAmoy: () => PolygonAmoy,
|
|
92
95
|
PolygonzkEVM: () => PolygonzkEVM,
|
|
96
|
+
PositionType: () => PositionType,
|
|
93
97
|
SDKError: () => SDKError,
|
|
94
98
|
SOLANA_MAINNET_CHAINID: () => SOLANA_MAINNET_CHAINID,
|
|
95
99
|
SOLANA_TESTNET_CHAINID: () => SOLANA_TESTNET_CHAINID,
|
|
@@ -125,9 +129,9 @@ module.exports = __toCommonJS(src_exports);
|
|
|
125
129
|
// src/version.ts
|
|
126
130
|
if (typeof window !== "undefined") {
|
|
127
131
|
window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
|
|
128
|
-
window.__ORDERLY_VERSION__["@orderly.network/types"] = "2.
|
|
132
|
+
window.__ORDERLY_VERSION__["@orderly.network/types"] = "2.6.0-alpha.0";
|
|
129
133
|
}
|
|
130
|
-
var version_default = "2.
|
|
134
|
+
var version_default = "2.6.0-alpha.0";
|
|
131
135
|
|
|
132
136
|
// src/constants.ts
|
|
133
137
|
var AccountStatusEnum = /* @__PURE__ */ ((AccountStatusEnum2) => {
|
|
@@ -173,6 +177,7 @@ var ARBITRUM_TESTNET_CHAINID_HEX = "0x66EEE";
|
|
|
173
177
|
var MANTLE_TESTNET_CHAINID = 5003;
|
|
174
178
|
var MANTLE_TESTNET_CHAINID_HEX = "0x138b";
|
|
175
179
|
var ARBITRUM_MAINNET_CHAINID = 42161;
|
|
180
|
+
var ETHEREUM_MAINNET_CHAINID = 1;
|
|
176
181
|
var ARBITRUM_MAINNET_CHAINID_HEX = "0xa4b1";
|
|
177
182
|
var MEDIA_TABLET = "(max-width: 768px)";
|
|
178
183
|
var DEPOSIT_FEE_RATE = 1.05;
|
|
@@ -244,6 +249,8 @@ var TesntTokenFallback = (testnetTokens) => [
|
|
|
244
249
|
];
|
|
245
250
|
var EMPTY_LIST = [];
|
|
246
251
|
var EMPTY_OBJECT = {};
|
|
252
|
+
var EMPTY_OPERATION = () => {
|
|
253
|
+
};
|
|
247
254
|
|
|
248
255
|
// src/types/api.ts
|
|
249
256
|
var AnnouncementType = /* @__PURE__ */ ((AnnouncementType2) => {
|
|
@@ -294,6 +301,11 @@ var TriggerPriceType = /* @__PURE__ */ ((TriggerPriceType2) => {
|
|
|
294
301
|
TriggerPriceType2["MARK_PRICE"] = "MARK_PRICE";
|
|
295
302
|
return TriggerPriceType2;
|
|
296
303
|
})(TriggerPriceType || {});
|
|
304
|
+
var PositionType = /* @__PURE__ */ ((PositionType2) => {
|
|
305
|
+
PositionType2["FULL"] = "FULL";
|
|
306
|
+
PositionType2["PARTIAL"] = "PARTIAL";
|
|
307
|
+
return PositionType2;
|
|
308
|
+
})(PositionType || {});
|
|
297
309
|
var AlgoOrderType = /* @__PURE__ */ ((AlgoOrderType2) => {
|
|
298
310
|
AlgoOrderType2["TAKE_PROFIT"] = "TAKE_PROFIT";
|
|
299
311
|
AlgoOrderType2["STOP_LOSS"] = "STOP_LOSS";
|
|
@@ -1122,6 +1134,9 @@ var AssetHistorySideEnum = /* @__PURE__ */ ((AssetHistorySideEnum2) => {
|
|
|
1122
1134
|
AssetHistorySideEnum2["WITHDRAW"] = "WITHDRAW";
|
|
1123
1135
|
return AssetHistorySideEnum2;
|
|
1124
1136
|
})(AssetHistorySideEnum || {});
|
|
1137
|
+
|
|
1138
|
+
// src/account.ts
|
|
1139
|
+
var DEFAUL_ORDERLY_KEY_SCOPE = "read,trading";
|
|
1125
1140
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1126
1141
|
0 && (module.exports = {
|
|
1127
1142
|
ABSTRACT_CHAIN_ID_MAP,
|
|
@@ -1155,10 +1170,13 @@ var AssetHistorySideEnum = /* @__PURE__ */ ((AssetHistorySideEnum2) => {
|
|
|
1155
1170
|
ChainKey,
|
|
1156
1171
|
ChainNamespace,
|
|
1157
1172
|
ConnectorKey,
|
|
1173
|
+
DEFAUL_ORDERLY_KEY_SCOPE,
|
|
1158
1174
|
DEPOSIT_FEE_RATE,
|
|
1159
1175
|
DistributionType,
|
|
1160
1176
|
EMPTY_LIST,
|
|
1161
1177
|
EMPTY_OBJECT,
|
|
1178
|
+
EMPTY_OPERATION,
|
|
1179
|
+
ETHEREUM_MAINNET_CHAINID,
|
|
1162
1180
|
Ethereum,
|
|
1163
1181
|
ExchangeStatusEnum,
|
|
1164
1182
|
Fantom,
|
|
@@ -1184,6 +1202,7 @@ var AssetHistorySideEnum = /* @__PURE__ */ ((AssetHistorySideEnum2) => {
|
|
|
1184
1202
|
Polygon,
|
|
1185
1203
|
PolygonAmoy,
|
|
1186
1204
|
PolygonzkEVM,
|
|
1205
|
+
PositionType,
|
|
1187
1206
|
SDKError,
|
|
1188
1207
|
SOLANA_MAINNET_CHAINID,
|
|
1189
1208
|
SOLANA_TESTNET_CHAINID,
|