@myx-trade/sdk 0.1.92 → 0.1.94
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 +86 -84
- package/dist/index.d.ts +86 -84
- package/dist/index.js +15 -1
- package/dist/index.mjs +14 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AddressLike, Signer, ethers as ethers$1 } from 'ethers';
|
|
1
|
+
import { AddressLike, Signer, ethers } from 'ethers';
|
|
3
2
|
export { formatUnits, parseUnits } from 'ethers';
|
|
4
3
|
import { Options, Event } from 'reconnecting-websocket';
|
|
5
4
|
import { WalletClient } from 'viem';
|
|
@@ -49,49 +48,49 @@ interface CancelTpSLParams {
|
|
|
49
48
|
orderId: string;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<
|
|
51
|
+
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<any>;
|
|
53
52
|
|
|
54
|
-
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<
|
|
55
|
-
declare const getMarketPools: (chainId: ChainId) => Promise<
|
|
53
|
+
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<any>;
|
|
54
|
+
declare const getMarketPools: (chainId: ChainId) => Promise<any>;
|
|
56
55
|
declare const getPoolInfo$1: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
|
|
57
56
|
quotePool: {
|
|
58
|
-
poolToken:
|
|
59
|
-
exchangeRate:
|
|
60
|
-
poolTokenPrice:
|
|
61
|
-
poolTokenSupply:
|
|
57
|
+
poolToken: any;
|
|
58
|
+
exchangeRate: any;
|
|
59
|
+
poolTokenPrice: any;
|
|
60
|
+
poolTokenSupply: any;
|
|
62
61
|
};
|
|
63
62
|
basePool: {
|
|
64
|
-
poolToken:
|
|
65
|
-
exchangeRate:
|
|
66
|
-
poolTokenPrice:
|
|
67
|
-
poolTokenSupply:
|
|
63
|
+
poolToken: any;
|
|
64
|
+
exchangeRate: any;
|
|
65
|
+
poolTokenPrice: any;
|
|
66
|
+
poolTokenSupply: any;
|
|
68
67
|
};
|
|
69
68
|
reserveInfo: {
|
|
70
|
-
baseTotalAmount:
|
|
71
|
-
baseReservedAmount:
|
|
72
|
-
quoteTotalAmount:
|
|
73
|
-
quoteReservedAmount:
|
|
69
|
+
baseTotalAmount: any;
|
|
70
|
+
baseReservedAmount: any;
|
|
71
|
+
quoteTotalAmount: any;
|
|
72
|
+
quoteReservedAmount: any;
|
|
74
73
|
};
|
|
75
74
|
fundingInfo: {
|
|
76
|
-
nextFundingRate:
|
|
77
|
-
lastFundingFeeTracker:
|
|
78
|
-
nextEpochTime:
|
|
75
|
+
nextFundingRate: any;
|
|
76
|
+
lastFundingFeeTracker: any;
|
|
77
|
+
nextEpochTime: any;
|
|
79
78
|
};
|
|
80
79
|
ioTracker: {
|
|
81
|
-
tracker:
|
|
82
|
-
longSize:
|
|
83
|
-
shortSize:
|
|
84
|
-
poolEntryPrice:
|
|
80
|
+
tracker: any;
|
|
81
|
+
longSize: any;
|
|
82
|
+
shortSize: any;
|
|
83
|
+
poolEntryPrice: any;
|
|
85
84
|
};
|
|
86
85
|
}>;
|
|
87
86
|
|
|
88
|
-
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<
|
|
87
|
+
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<any>;
|
|
89
88
|
|
|
90
|
-
declare const addTpSl: (params: AddTpSLParams) => Promise<
|
|
89
|
+
declare const addTpSl: (params: AddTpSLParams) => Promise<any>;
|
|
91
90
|
|
|
92
|
-
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<
|
|
91
|
+
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<any>;
|
|
93
92
|
|
|
94
|
-
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<
|
|
93
|
+
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<any>;
|
|
95
94
|
|
|
96
95
|
/**
|
|
97
96
|
* Trading related types and enums
|
|
@@ -570,6 +569,17 @@ declare enum OperationEnum {
|
|
|
570
569
|
Increase = 0,
|
|
571
570
|
Decrease = 1
|
|
572
571
|
}
|
|
572
|
+
declare enum TradeFlowTypeEnum {
|
|
573
|
+
Increase = 0,
|
|
574
|
+
Decrease = 1,
|
|
575
|
+
AddMargin = 2,
|
|
576
|
+
RemoveMargin = 3,
|
|
577
|
+
CancelOrder = 4,
|
|
578
|
+
ADL = 5,
|
|
579
|
+
Liquidation = 6,
|
|
580
|
+
MarketClose = 7,
|
|
581
|
+
EarlyClose = 8
|
|
582
|
+
}
|
|
573
583
|
declare enum TriggerTypeEnum {
|
|
574
584
|
Unknown = 0,
|
|
575
585
|
GTE = 1,
|
|
@@ -675,7 +685,7 @@ interface TradeFlowItem {
|
|
|
675
685
|
baseSymbol: string;
|
|
676
686
|
quoteSymbol: string;
|
|
677
687
|
executionFee: string;
|
|
678
|
-
type:
|
|
688
|
+
type: TradeFlowTypeEnum;
|
|
679
689
|
}
|
|
680
690
|
declare const getTradeFlow: ({ accessToken, ...params }: GetHistoryOrdersParams & AccessTokenRequest) => Promise<ApiResponse<TradeFlowItem[]>>;
|
|
681
691
|
|
|
@@ -869,21 +879,21 @@ interface PreviewWithdrawDataParams {
|
|
|
869
879
|
amount: string | number;
|
|
870
880
|
}
|
|
871
881
|
|
|
872
|
-
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<
|
|
873
|
-
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
882
|
+
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
|
|
883
|
+
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
|
|
874
884
|
|
|
875
|
-
declare const deposit$1: (params: Deposit) => Promise<
|
|
885
|
+
declare const deposit$1: (params: Deposit) => Promise<any>;
|
|
876
886
|
|
|
877
|
-
declare const withdraw$1: (params: WithdrawParams) => Promise<
|
|
887
|
+
declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
|
|
878
888
|
|
|
879
|
-
declare const getRewards$1: (params: RewardsParams) => Promise<
|
|
889
|
+
declare const getRewards$1: (params: RewardsParams) => Promise<any>;
|
|
880
890
|
|
|
881
891
|
declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
|
|
882
|
-
baseAmountOut:
|
|
883
|
-
rebateAmount:
|
|
892
|
+
baseAmountOut: any;
|
|
893
|
+
rebateAmount: any;
|
|
884
894
|
} | undefined>;
|
|
885
895
|
|
|
886
|
-
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<
|
|
896
|
+
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
|
|
887
897
|
|
|
888
898
|
declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
|
|
889
899
|
declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
|
|
@@ -892,18 +902,18 @@ declare namespace index$2 {
|
|
|
892
902
|
export { index$2_claimBasePoolRebate as claimBasePoolRebate, index$2_claimBasePoolRebates as claimBasePoolRebates, deposit$1 as deposit, getLpPrice$1 as getLpPrice, getRewards$1 as getRewards, index$2_previewUserWithdrawData as previewUserWithdrawData, withdraw$1 as withdraw };
|
|
893
903
|
}
|
|
894
904
|
|
|
895
|
-
declare const deposit: (params: Deposit) => Promise<
|
|
905
|
+
declare const deposit: (params: Deposit) => Promise<any>;
|
|
896
906
|
|
|
897
|
-
declare const withdraw: (params: WithdrawParams) => Promise<
|
|
907
|
+
declare const withdraw: (params: WithdrawParams) => Promise<any>;
|
|
898
908
|
|
|
899
|
-
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<
|
|
909
|
+
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
|
|
900
910
|
|
|
901
|
-
declare const getRewards: (params: RewardsParams) => Promise<
|
|
911
|
+
declare const getRewards: (params: RewardsParams) => Promise<any>;
|
|
902
912
|
|
|
903
|
-
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<
|
|
904
|
-
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
913
|
+
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
|
|
914
|
+
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
|
|
905
915
|
|
|
906
|
-
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<
|
|
916
|
+
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
|
|
907
917
|
|
|
908
918
|
declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
|
|
909
919
|
declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
|
|
@@ -916,17 +926,9 @@ declare namespace index$1 {
|
|
|
916
926
|
export { index$1_claimQuotePoolRebate as claimQuotePoolRebate, index$1_claimQuotePoolRebates as claimQuotePoolRebates, index$1_deposit as deposit, index$1_getLpPrice as getLpPrice, index$1_getRewards as getRewards, index$1_transfer as transfer, index$1_withdraw as withdraw };
|
|
917
927
|
}
|
|
918
928
|
|
|
919
|
-
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<
|
|
920
|
-
marketId: string;
|
|
921
|
-
quoteToken: string;
|
|
922
|
-
baseReserveRatio: bigint;
|
|
923
|
-
quoteReserveRatio: bigint;
|
|
924
|
-
oracleFeeUsd: bigint;
|
|
925
|
-
oracleRefundFeeUsd: bigint;
|
|
926
|
-
poolPrimeThreshold: bigint;
|
|
927
|
-
}) | undefined>;
|
|
929
|
+
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
|
|
928
930
|
|
|
929
|
-
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<
|
|
931
|
+
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
|
|
930
932
|
|
|
931
933
|
declare const index_getMarket: typeof getMarket;
|
|
932
934
|
declare const index_getOracleFee: typeof getOracleFee;
|
|
@@ -969,9 +971,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
|
|
|
969
971
|
declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
|
|
970
972
|
balance?: number | undefined;
|
|
971
973
|
address: string;
|
|
972
|
-
name:
|
|
973
|
-
symbol:
|
|
974
|
-
decimals:
|
|
974
|
+
name: any;
|
|
975
|
+
symbol: any;
|
|
976
|
+
decimals: any;
|
|
975
977
|
icon: string;
|
|
976
978
|
totalSupply: number;
|
|
977
979
|
}>;
|
|
@@ -1185,7 +1187,7 @@ interface MyxClientConfig {
|
|
|
1185
1187
|
signer?: Signer;
|
|
1186
1188
|
seamlessAccount?: {
|
|
1187
1189
|
masterAddress: string;
|
|
1188
|
-
wallet: ethers
|
|
1190
|
+
wallet: ethers.Wallet | null;
|
|
1189
1191
|
authorized: boolean;
|
|
1190
1192
|
};
|
|
1191
1193
|
walletClient?: WalletClient;
|
|
@@ -1205,7 +1207,7 @@ declare class ConfigManager {
|
|
|
1205
1207
|
clear(): void;
|
|
1206
1208
|
startSeamlessMode(open: boolean): void;
|
|
1207
1209
|
updateSeamlessWallet({ wallet, authorized, masterAddress }: {
|
|
1208
|
-
wallet?: ethers
|
|
1210
|
+
wallet?: ethers.Wallet;
|
|
1209
1211
|
authorized?: boolean;
|
|
1210
1212
|
masterAddress?: string;
|
|
1211
1213
|
}): void;
|
|
@@ -1524,9 +1526,9 @@ declare class Seamless {
|
|
|
1524
1526
|
private utils;
|
|
1525
1527
|
private account;
|
|
1526
1528
|
constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
|
|
1527
|
-
onCheckRelayer(account: string, relayer: string): Promise<
|
|
1529
|
+
onCheckRelayer(account: string, relayer: string): Promise<any>;
|
|
1528
1530
|
getUSDPermitParams(deadline: number): Promise<{
|
|
1529
|
-
token: string | ethers
|
|
1531
|
+
token: string | ethers.Addressable;
|
|
1530
1532
|
owner: Promise<string> | undefined;
|
|
1531
1533
|
spender: string;
|
|
1532
1534
|
value: bigint;
|
|
@@ -1543,7 +1545,7 @@ declare class Seamless {
|
|
|
1543
1545
|
deadline: number;
|
|
1544
1546
|
data: string;
|
|
1545
1547
|
nonce: string;
|
|
1546
|
-
}, provider?: ethers
|
|
1548
|
+
}, provider?: ethers.Signer): Promise<ApiResponse<any>>;
|
|
1547
1549
|
authorizeSeamlessAccount({ approve, seamlessAddress }: {
|
|
1548
1550
|
approve: boolean;
|
|
1549
1551
|
seamlessAddress: string;
|
|
@@ -1563,7 +1565,7 @@ declare class Seamless {
|
|
|
1563
1565
|
data: {
|
|
1564
1566
|
masterAddress: string;
|
|
1565
1567
|
seamlessAccount: string;
|
|
1566
|
-
authorized:
|
|
1568
|
+
authorized: any;
|
|
1567
1569
|
};
|
|
1568
1570
|
}>;
|
|
1569
1571
|
exportSeamlessPrivateKey({ password, apiKey }: {
|
|
@@ -1581,9 +1583,9 @@ declare class Seamless {
|
|
|
1581
1583
|
}): Promise<{
|
|
1582
1584
|
code: number;
|
|
1583
1585
|
data: {
|
|
1584
|
-
masterAddress:
|
|
1586
|
+
masterAddress: any;
|
|
1585
1587
|
seamlessAccount: string;
|
|
1586
|
-
authorized:
|
|
1588
|
+
authorized: any;
|
|
1587
1589
|
apiKey: string;
|
|
1588
1590
|
};
|
|
1589
1591
|
}>;
|
|
@@ -1602,7 +1604,7 @@ declare class Seamless {
|
|
|
1602
1604
|
data: {
|
|
1603
1605
|
masterAddress: string;
|
|
1604
1606
|
seamlessAccount: string;
|
|
1605
|
-
authorized:
|
|
1607
|
+
authorized: any;
|
|
1606
1608
|
apiKey: string;
|
|
1607
1609
|
};
|
|
1608
1610
|
message?: undefined;
|
|
@@ -1629,13 +1631,13 @@ declare class Order {
|
|
|
1629
1631
|
data: {
|
|
1630
1632
|
success: boolean;
|
|
1631
1633
|
orderId: string | null;
|
|
1632
|
-
transactionHash:
|
|
1633
|
-
blockNumber:
|
|
1634
|
-
gasUsed:
|
|
1634
|
+
transactionHash: any;
|
|
1635
|
+
blockNumber: any;
|
|
1636
|
+
gasUsed: any;
|
|
1635
1637
|
status: string;
|
|
1636
1638
|
confirmations: number;
|
|
1637
1639
|
timestamp: number;
|
|
1638
|
-
receipt:
|
|
1640
|
+
receipt: any;
|
|
1639
1641
|
};
|
|
1640
1642
|
} | {
|
|
1641
1643
|
code: number;
|
|
@@ -1646,13 +1648,13 @@ declare class Order {
|
|
|
1646
1648
|
code: number;
|
|
1647
1649
|
message: string;
|
|
1648
1650
|
data: string | null;
|
|
1649
|
-
transactionHash:
|
|
1650
|
-
blockNumber:
|
|
1651
|
-
gasUsed:
|
|
1651
|
+
transactionHash: any;
|
|
1652
|
+
blockNumber: any;
|
|
1653
|
+
gasUsed: any;
|
|
1652
1654
|
status: string;
|
|
1653
1655
|
confirmations: number;
|
|
1654
1656
|
timestamp: number;
|
|
1655
|
-
receipt:
|
|
1657
|
+
receipt: any;
|
|
1656
1658
|
} | {
|
|
1657
1659
|
code: number;
|
|
1658
1660
|
message: any;
|
|
@@ -1671,13 +1673,13 @@ declare class Order {
|
|
|
1671
1673
|
data: {
|
|
1672
1674
|
success: boolean;
|
|
1673
1675
|
orderId: string | null;
|
|
1674
|
-
transactionHash:
|
|
1675
|
-
blockNumber:
|
|
1676
|
-
gasUsed:
|
|
1676
|
+
transactionHash: any;
|
|
1677
|
+
blockNumber: any;
|
|
1678
|
+
gasUsed: any;
|
|
1677
1679
|
status: string;
|
|
1678
1680
|
confirmations: number;
|
|
1679
1681
|
timestamp: number;
|
|
1680
|
-
receipt:
|
|
1682
|
+
receipt: any;
|
|
1681
1683
|
};
|
|
1682
1684
|
} | {
|
|
1683
1685
|
code: number;
|
|
@@ -1690,13 +1692,13 @@ declare class Order {
|
|
|
1690
1692
|
data: {
|
|
1691
1693
|
success: boolean;
|
|
1692
1694
|
orderId: string | null;
|
|
1693
|
-
transactionHash:
|
|
1694
|
-
blockNumber:
|
|
1695
|
-
gasUsed:
|
|
1695
|
+
transactionHash: any;
|
|
1696
|
+
blockNumber: any;
|
|
1697
|
+
gasUsed: any;
|
|
1696
1698
|
status: string;
|
|
1697
1699
|
confirmations: number;
|
|
1698
1700
|
timestamp: number;
|
|
1699
|
-
receipt:
|
|
1701
|
+
receipt: any;
|
|
1700
1702
|
};
|
|
1701
1703
|
} | {
|
|
1702
1704
|
code: number;
|
|
@@ -1717,7 +1719,7 @@ declare class Order {
|
|
|
1717
1719
|
}>;
|
|
1718
1720
|
updateOrderTpSl(params: UpdateOrderParams, chainId: number): Promise<{
|
|
1719
1721
|
code: number;
|
|
1720
|
-
data:
|
|
1722
|
+
data: any;
|
|
1721
1723
|
message: string;
|
|
1722
1724
|
} | {
|
|
1723
1725
|
code: number;
|
|
@@ -1775,4 +1777,4 @@ declare class MyxClient {
|
|
|
1775
1777
|
getAccessToken(): Promise<string | null>;
|
|
1776
1778
|
}
|
|
1777
1779
|
|
|
1778
|
-
export { type AccessTokenRequest, type AccessTokenResponse$1 as AccessTokenResponse, type AccessTokenType, type AddFavoriteParams, type Address$1 as Address, type ApiResponse, type BaseDetailResponse, type BaseResponse, COMMON_LP_AMOUNT_DECIMALS, COMMON_PRICE_DECIMALS, ChainId, type ChainIdRequest, CloseTypeEnum, type DashboardType, Direction, DirectionEnum, ErrorCode, ExecTypeEnum, type FavoritesListItem, type FavoritesListParams, type FavoritesTimeInterval, type FavoritesType, type FetchForwarderGetParams, type FetchForwarderGetResponse, type FetchForwarderGetResponseData, ForwarderGetStatus, type ForwarderTxParams, type GetBaseDetailParams, type GetHistoryOrdersParams, type GetKlineDataParams, type GetMarketDetailParams, type GetPoolLevelConfigParams, type GetTickerDataParams, type HistoryOrderItem, HttpKlineIntervalEnum, type KlineDataItemType, type KlineDataResponse, type KlineResolution, type LevelConfig, MarketCapType, type MarketDetailResponse, type MarketInfo, type MarketPool, type MarketPoolResponse, MarketPoolState, MarketType, MyxClient, type MyxClientConfig, type MyxSubscriptionOptions, type NetWorkFee, type ObjectType, type OnKlineCallback, type OnOrderCallback, type OnPositionCallback, type OnTickersAllCallback, type OnTickersCallback, OperationEnum, OperationType, OracleType, type Order$1 as Order, OrderStatus, OrderStatusEnum, OrderType, OrderTypeEnum, type PlaceOrderParams, type PoolLevelConfig, type PoolOpenOrder, type PoolOpenOrdersResponse, type PoolResponse, type Position$1 as Position, type PositionHistoryItem, type PositionResponse, type PositionTpSlOrderParams, type PositionType, type PriceResponse, type PriceType, type RemoveFavoriteParams, type SearchMarketParams, type SearchResultContractItem, type SearchResultCookItem, type SearchResultEarnItem, type SearchResultResponse, SearchSecondTypeEnum, SearchTypeEnum, type StatDashBoardResponse, type TickerDataItem, type TickersDataResponse, TimeInForce, type TradeFlowItem, type TradingResult, TriggerType, TriggerTypeEnum, type UpdateOrderTpSlParams, addFavorite, approve, index$2 as base, baseUrl, bigintAmountSlipperCalculator, bigintTradingGasPriceWithRatio, bigintTradingGasToRatioCalculator, fetchForwarderGetApi, forwardUrl, forwarderTxApi, getAllTickers, getAllowanceApproved, getBalanceOf, getBaseDetail, getFavoritesList, getHistoryOrders, getKlineData, getKlineLatestBar, getMarketDetail, getMarketList, getOraclePrice, getOrders, getPoolDetail, getPoolLevelConfig, getPoolOpenOrders, getPositionHistory, getPositions, getPriceData, getPricesData, getTickerData, getTokenInfo, getTradeFlow, index as market, index$3 as pool, index$1 as quote, removeFavorite, searchMarket, searchMarketAuth };
|
|
1780
|
+
export { type AccessTokenRequest, type AccessTokenResponse$1 as AccessTokenResponse, type AccessTokenType, type AddFavoriteParams, type Address$1 as Address, type ApiResponse, type BaseDetailResponse, type BaseResponse, COMMON_LP_AMOUNT_DECIMALS, COMMON_PRICE_DECIMALS, ChainId, type ChainIdRequest, CloseTypeEnum, type DashboardType, Direction, DirectionEnum, ErrorCode, ExecTypeEnum, type FavoritesListItem, type FavoritesListParams, type FavoritesTimeInterval, type FavoritesType, type FetchForwarderGetParams, type FetchForwarderGetResponse, type FetchForwarderGetResponseData, ForwarderGetStatus, type ForwarderTxParams, type GetBaseDetailParams, type GetHistoryOrdersParams, type GetKlineDataParams, type GetMarketDetailParams, type GetPoolLevelConfigParams, type GetTickerDataParams, type HistoryOrderItem, HttpKlineIntervalEnum, type KlineDataItemType, type KlineDataResponse, type KlineResolution, type LevelConfig, MarketCapType, type MarketDetailResponse, type MarketInfo, type MarketPool, type MarketPoolResponse, MarketPoolState, MarketType, MyxClient, type MyxClientConfig, type MyxSubscriptionOptions, type NetWorkFee, type ObjectType, type OnKlineCallback, type OnOrderCallback, type OnPositionCallback, type OnTickersAllCallback, type OnTickersCallback, OperationEnum, OperationType, OracleType, type Order$1 as Order, OrderStatus, OrderStatusEnum, OrderType, OrderTypeEnum, type PlaceOrderParams, type PoolLevelConfig, type PoolOpenOrder, type PoolOpenOrdersResponse, type PoolResponse, type Position$1 as Position, type PositionHistoryItem, type PositionResponse, type PositionTpSlOrderParams, type PositionType, type PriceResponse, type PriceType, type RemoveFavoriteParams, type SearchMarketParams, type SearchResultContractItem, type SearchResultCookItem, type SearchResultEarnItem, type SearchResultResponse, SearchSecondTypeEnum, SearchTypeEnum, type StatDashBoardResponse, type TickerDataItem, type TickersDataResponse, TimeInForce, type TradeFlowItem, TradeFlowTypeEnum, type TradingResult, TriggerType, TriggerTypeEnum, type UpdateOrderTpSlParams, addFavorite, approve, index$2 as base, baseUrl, bigintAmountSlipperCalculator, bigintTradingGasPriceWithRatio, bigintTradingGasToRatioCalculator, fetchForwarderGetApi, forwardUrl, forwarderTxApi, getAllTickers, getAllowanceApproved, getBalanceOf, getBaseDetail, getFavoritesList, getHistoryOrders, getKlineData, getKlineLatestBar, getMarketDetail, getMarketList, getOraclePrice, getOrders, getPoolDetail, getPoolLevelConfig, getPoolOpenOrders, getPositionHistory, getPositions, getPriceData, getPricesData, getTickerData, getTokenInfo, getTradeFlow, index as market, index$3 as pool, index$1 as quote, removeFavorite, searchMarket, searchMarketAuth };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AddressLike, Signer, ethers as ethers$1 } from 'ethers';
|
|
1
|
+
import { AddressLike, Signer, ethers } from 'ethers';
|
|
3
2
|
export { formatUnits, parseUnits } from 'ethers';
|
|
4
3
|
import { Options, Event } from 'reconnecting-websocket';
|
|
5
4
|
import { WalletClient } from 'viem';
|
|
@@ -49,49 +48,49 @@ interface CancelTpSLParams {
|
|
|
49
48
|
orderId: string;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<
|
|
51
|
+
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<any>;
|
|
53
52
|
|
|
54
|
-
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<
|
|
55
|
-
declare const getMarketPools: (chainId: ChainId) => Promise<
|
|
53
|
+
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<any>;
|
|
54
|
+
declare const getMarketPools: (chainId: ChainId) => Promise<any>;
|
|
56
55
|
declare const getPoolInfo$1: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
|
|
57
56
|
quotePool: {
|
|
58
|
-
poolToken:
|
|
59
|
-
exchangeRate:
|
|
60
|
-
poolTokenPrice:
|
|
61
|
-
poolTokenSupply:
|
|
57
|
+
poolToken: any;
|
|
58
|
+
exchangeRate: any;
|
|
59
|
+
poolTokenPrice: any;
|
|
60
|
+
poolTokenSupply: any;
|
|
62
61
|
};
|
|
63
62
|
basePool: {
|
|
64
|
-
poolToken:
|
|
65
|
-
exchangeRate:
|
|
66
|
-
poolTokenPrice:
|
|
67
|
-
poolTokenSupply:
|
|
63
|
+
poolToken: any;
|
|
64
|
+
exchangeRate: any;
|
|
65
|
+
poolTokenPrice: any;
|
|
66
|
+
poolTokenSupply: any;
|
|
68
67
|
};
|
|
69
68
|
reserveInfo: {
|
|
70
|
-
baseTotalAmount:
|
|
71
|
-
baseReservedAmount:
|
|
72
|
-
quoteTotalAmount:
|
|
73
|
-
quoteReservedAmount:
|
|
69
|
+
baseTotalAmount: any;
|
|
70
|
+
baseReservedAmount: any;
|
|
71
|
+
quoteTotalAmount: any;
|
|
72
|
+
quoteReservedAmount: any;
|
|
74
73
|
};
|
|
75
74
|
fundingInfo: {
|
|
76
|
-
nextFundingRate:
|
|
77
|
-
lastFundingFeeTracker:
|
|
78
|
-
nextEpochTime:
|
|
75
|
+
nextFundingRate: any;
|
|
76
|
+
lastFundingFeeTracker: any;
|
|
77
|
+
nextEpochTime: any;
|
|
79
78
|
};
|
|
80
79
|
ioTracker: {
|
|
81
|
-
tracker:
|
|
82
|
-
longSize:
|
|
83
|
-
shortSize:
|
|
84
|
-
poolEntryPrice:
|
|
80
|
+
tracker: any;
|
|
81
|
+
longSize: any;
|
|
82
|
+
shortSize: any;
|
|
83
|
+
poolEntryPrice: any;
|
|
85
84
|
};
|
|
86
85
|
}>;
|
|
87
86
|
|
|
88
|
-
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<
|
|
87
|
+
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<any>;
|
|
89
88
|
|
|
90
|
-
declare const addTpSl: (params: AddTpSLParams) => Promise<
|
|
89
|
+
declare const addTpSl: (params: AddTpSLParams) => Promise<any>;
|
|
91
90
|
|
|
92
|
-
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<
|
|
91
|
+
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<any>;
|
|
93
92
|
|
|
94
|
-
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<
|
|
93
|
+
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<any>;
|
|
95
94
|
|
|
96
95
|
/**
|
|
97
96
|
* Trading related types and enums
|
|
@@ -570,6 +569,17 @@ declare enum OperationEnum {
|
|
|
570
569
|
Increase = 0,
|
|
571
570
|
Decrease = 1
|
|
572
571
|
}
|
|
572
|
+
declare enum TradeFlowTypeEnum {
|
|
573
|
+
Increase = 0,
|
|
574
|
+
Decrease = 1,
|
|
575
|
+
AddMargin = 2,
|
|
576
|
+
RemoveMargin = 3,
|
|
577
|
+
CancelOrder = 4,
|
|
578
|
+
ADL = 5,
|
|
579
|
+
Liquidation = 6,
|
|
580
|
+
MarketClose = 7,
|
|
581
|
+
EarlyClose = 8
|
|
582
|
+
}
|
|
573
583
|
declare enum TriggerTypeEnum {
|
|
574
584
|
Unknown = 0,
|
|
575
585
|
GTE = 1,
|
|
@@ -675,7 +685,7 @@ interface TradeFlowItem {
|
|
|
675
685
|
baseSymbol: string;
|
|
676
686
|
quoteSymbol: string;
|
|
677
687
|
executionFee: string;
|
|
678
|
-
type:
|
|
688
|
+
type: TradeFlowTypeEnum;
|
|
679
689
|
}
|
|
680
690
|
declare const getTradeFlow: ({ accessToken, ...params }: GetHistoryOrdersParams & AccessTokenRequest) => Promise<ApiResponse<TradeFlowItem[]>>;
|
|
681
691
|
|
|
@@ -869,21 +879,21 @@ interface PreviewWithdrawDataParams {
|
|
|
869
879
|
amount: string | number;
|
|
870
880
|
}
|
|
871
881
|
|
|
872
|
-
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<
|
|
873
|
-
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
882
|
+
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
|
|
883
|
+
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
|
|
874
884
|
|
|
875
|
-
declare const deposit$1: (params: Deposit) => Promise<
|
|
885
|
+
declare const deposit$1: (params: Deposit) => Promise<any>;
|
|
876
886
|
|
|
877
|
-
declare const withdraw$1: (params: WithdrawParams) => Promise<
|
|
887
|
+
declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
|
|
878
888
|
|
|
879
|
-
declare const getRewards$1: (params: RewardsParams) => Promise<
|
|
889
|
+
declare const getRewards$1: (params: RewardsParams) => Promise<any>;
|
|
880
890
|
|
|
881
891
|
declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
|
|
882
|
-
baseAmountOut:
|
|
883
|
-
rebateAmount:
|
|
892
|
+
baseAmountOut: any;
|
|
893
|
+
rebateAmount: any;
|
|
884
894
|
} | undefined>;
|
|
885
895
|
|
|
886
|
-
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<
|
|
896
|
+
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
|
|
887
897
|
|
|
888
898
|
declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
|
|
889
899
|
declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
|
|
@@ -892,18 +902,18 @@ declare namespace index$2 {
|
|
|
892
902
|
export { index$2_claimBasePoolRebate as claimBasePoolRebate, index$2_claimBasePoolRebates as claimBasePoolRebates, deposit$1 as deposit, getLpPrice$1 as getLpPrice, getRewards$1 as getRewards, index$2_previewUserWithdrawData as previewUserWithdrawData, withdraw$1 as withdraw };
|
|
893
903
|
}
|
|
894
904
|
|
|
895
|
-
declare const deposit: (params: Deposit) => Promise<
|
|
905
|
+
declare const deposit: (params: Deposit) => Promise<any>;
|
|
896
906
|
|
|
897
|
-
declare const withdraw: (params: WithdrawParams) => Promise<
|
|
907
|
+
declare const withdraw: (params: WithdrawParams) => Promise<any>;
|
|
898
908
|
|
|
899
|
-
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<
|
|
909
|
+
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
|
|
900
910
|
|
|
901
|
-
declare const getRewards: (params: RewardsParams) => Promise<
|
|
911
|
+
declare const getRewards: (params: RewardsParams) => Promise<any>;
|
|
902
912
|
|
|
903
|
-
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<
|
|
904
|
-
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
913
|
+
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
|
|
914
|
+
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
|
|
905
915
|
|
|
906
|
-
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<
|
|
916
|
+
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
|
|
907
917
|
|
|
908
918
|
declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
|
|
909
919
|
declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
|
|
@@ -916,17 +926,9 @@ declare namespace index$1 {
|
|
|
916
926
|
export { index$1_claimQuotePoolRebate as claimQuotePoolRebate, index$1_claimQuotePoolRebates as claimQuotePoolRebates, index$1_deposit as deposit, index$1_getLpPrice as getLpPrice, index$1_getRewards as getRewards, index$1_transfer as transfer, index$1_withdraw as withdraw };
|
|
917
927
|
}
|
|
918
928
|
|
|
919
|
-
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<
|
|
920
|
-
marketId: string;
|
|
921
|
-
quoteToken: string;
|
|
922
|
-
baseReserveRatio: bigint;
|
|
923
|
-
quoteReserveRatio: bigint;
|
|
924
|
-
oracleFeeUsd: bigint;
|
|
925
|
-
oracleRefundFeeUsd: bigint;
|
|
926
|
-
poolPrimeThreshold: bigint;
|
|
927
|
-
}) | undefined>;
|
|
929
|
+
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
|
|
928
930
|
|
|
929
|
-
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<
|
|
931
|
+
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
|
|
930
932
|
|
|
931
933
|
declare const index_getMarket: typeof getMarket;
|
|
932
934
|
declare const index_getOracleFee: typeof getOracleFee;
|
|
@@ -969,9 +971,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
|
|
|
969
971
|
declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
|
|
970
972
|
balance?: number | undefined;
|
|
971
973
|
address: string;
|
|
972
|
-
name:
|
|
973
|
-
symbol:
|
|
974
|
-
decimals:
|
|
974
|
+
name: any;
|
|
975
|
+
symbol: any;
|
|
976
|
+
decimals: any;
|
|
975
977
|
icon: string;
|
|
976
978
|
totalSupply: number;
|
|
977
979
|
}>;
|
|
@@ -1185,7 +1187,7 @@ interface MyxClientConfig {
|
|
|
1185
1187
|
signer?: Signer;
|
|
1186
1188
|
seamlessAccount?: {
|
|
1187
1189
|
masterAddress: string;
|
|
1188
|
-
wallet: ethers
|
|
1190
|
+
wallet: ethers.Wallet | null;
|
|
1189
1191
|
authorized: boolean;
|
|
1190
1192
|
};
|
|
1191
1193
|
walletClient?: WalletClient;
|
|
@@ -1205,7 +1207,7 @@ declare class ConfigManager {
|
|
|
1205
1207
|
clear(): void;
|
|
1206
1208
|
startSeamlessMode(open: boolean): void;
|
|
1207
1209
|
updateSeamlessWallet({ wallet, authorized, masterAddress }: {
|
|
1208
|
-
wallet?: ethers
|
|
1210
|
+
wallet?: ethers.Wallet;
|
|
1209
1211
|
authorized?: boolean;
|
|
1210
1212
|
masterAddress?: string;
|
|
1211
1213
|
}): void;
|
|
@@ -1524,9 +1526,9 @@ declare class Seamless {
|
|
|
1524
1526
|
private utils;
|
|
1525
1527
|
private account;
|
|
1526
1528
|
constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
|
|
1527
|
-
onCheckRelayer(account: string, relayer: string): Promise<
|
|
1529
|
+
onCheckRelayer(account: string, relayer: string): Promise<any>;
|
|
1528
1530
|
getUSDPermitParams(deadline: number): Promise<{
|
|
1529
|
-
token: string | ethers
|
|
1531
|
+
token: string | ethers.Addressable;
|
|
1530
1532
|
owner: Promise<string> | undefined;
|
|
1531
1533
|
spender: string;
|
|
1532
1534
|
value: bigint;
|
|
@@ -1543,7 +1545,7 @@ declare class Seamless {
|
|
|
1543
1545
|
deadline: number;
|
|
1544
1546
|
data: string;
|
|
1545
1547
|
nonce: string;
|
|
1546
|
-
}, provider?: ethers
|
|
1548
|
+
}, provider?: ethers.Signer): Promise<ApiResponse<any>>;
|
|
1547
1549
|
authorizeSeamlessAccount({ approve, seamlessAddress }: {
|
|
1548
1550
|
approve: boolean;
|
|
1549
1551
|
seamlessAddress: string;
|
|
@@ -1563,7 +1565,7 @@ declare class Seamless {
|
|
|
1563
1565
|
data: {
|
|
1564
1566
|
masterAddress: string;
|
|
1565
1567
|
seamlessAccount: string;
|
|
1566
|
-
authorized:
|
|
1568
|
+
authorized: any;
|
|
1567
1569
|
};
|
|
1568
1570
|
}>;
|
|
1569
1571
|
exportSeamlessPrivateKey({ password, apiKey }: {
|
|
@@ -1581,9 +1583,9 @@ declare class Seamless {
|
|
|
1581
1583
|
}): Promise<{
|
|
1582
1584
|
code: number;
|
|
1583
1585
|
data: {
|
|
1584
|
-
masterAddress:
|
|
1586
|
+
masterAddress: any;
|
|
1585
1587
|
seamlessAccount: string;
|
|
1586
|
-
authorized:
|
|
1588
|
+
authorized: any;
|
|
1587
1589
|
apiKey: string;
|
|
1588
1590
|
};
|
|
1589
1591
|
}>;
|
|
@@ -1602,7 +1604,7 @@ declare class Seamless {
|
|
|
1602
1604
|
data: {
|
|
1603
1605
|
masterAddress: string;
|
|
1604
1606
|
seamlessAccount: string;
|
|
1605
|
-
authorized:
|
|
1607
|
+
authorized: any;
|
|
1606
1608
|
apiKey: string;
|
|
1607
1609
|
};
|
|
1608
1610
|
message?: undefined;
|
|
@@ -1629,13 +1631,13 @@ declare class Order {
|
|
|
1629
1631
|
data: {
|
|
1630
1632
|
success: boolean;
|
|
1631
1633
|
orderId: string | null;
|
|
1632
|
-
transactionHash:
|
|
1633
|
-
blockNumber:
|
|
1634
|
-
gasUsed:
|
|
1634
|
+
transactionHash: any;
|
|
1635
|
+
blockNumber: any;
|
|
1636
|
+
gasUsed: any;
|
|
1635
1637
|
status: string;
|
|
1636
1638
|
confirmations: number;
|
|
1637
1639
|
timestamp: number;
|
|
1638
|
-
receipt:
|
|
1640
|
+
receipt: any;
|
|
1639
1641
|
};
|
|
1640
1642
|
} | {
|
|
1641
1643
|
code: number;
|
|
@@ -1646,13 +1648,13 @@ declare class Order {
|
|
|
1646
1648
|
code: number;
|
|
1647
1649
|
message: string;
|
|
1648
1650
|
data: string | null;
|
|
1649
|
-
transactionHash:
|
|
1650
|
-
blockNumber:
|
|
1651
|
-
gasUsed:
|
|
1651
|
+
transactionHash: any;
|
|
1652
|
+
blockNumber: any;
|
|
1653
|
+
gasUsed: any;
|
|
1652
1654
|
status: string;
|
|
1653
1655
|
confirmations: number;
|
|
1654
1656
|
timestamp: number;
|
|
1655
|
-
receipt:
|
|
1657
|
+
receipt: any;
|
|
1656
1658
|
} | {
|
|
1657
1659
|
code: number;
|
|
1658
1660
|
message: any;
|
|
@@ -1671,13 +1673,13 @@ declare class Order {
|
|
|
1671
1673
|
data: {
|
|
1672
1674
|
success: boolean;
|
|
1673
1675
|
orderId: string | null;
|
|
1674
|
-
transactionHash:
|
|
1675
|
-
blockNumber:
|
|
1676
|
-
gasUsed:
|
|
1676
|
+
transactionHash: any;
|
|
1677
|
+
blockNumber: any;
|
|
1678
|
+
gasUsed: any;
|
|
1677
1679
|
status: string;
|
|
1678
1680
|
confirmations: number;
|
|
1679
1681
|
timestamp: number;
|
|
1680
|
-
receipt:
|
|
1682
|
+
receipt: any;
|
|
1681
1683
|
};
|
|
1682
1684
|
} | {
|
|
1683
1685
|
code: number;
|
|
@@ -1690,13 +1692,13 @@ declare class Order {
|
|
|
1690
1692
|
data: {
|
|
1691
1693
|
success: boolean;
|
|
1692
1694
|
orderId: string | null;
|
|
1693
|
-
transactionHash:
|
|
1694
|
-
blockNumber:
|
|
1695
|
-
gasUsed:
|
|
1695
|
+
transactionHash: any;
|
|
1696
|
+
blockNumber: any;
|
|
1697
|
+
gasUsed: any;
|
|
1696
1698
|
status: string;
|
|
1697
1699
|
confirmations: number;
|
|
1698
1700
|
timestamp: number;
|
|
1699
|
-
receipt:
|
|
1701
|
+
receipt: any;
|
|
1700
1702
|
};
|
|
1701
1703
|
} | {
|
|
1702
1704
|
code: number;
|
|
@@ -1717,7 +1719,7 @@ declare class Order {
|
|
|
1717
1719
|
}>;
|
|
1718
1720
|
updateOrderTpSl(params: UpdateOrderParams, chainId: number): Promise<{
|
|
1719
1721
|
code: number;
|
|
1720
|
-
data:
|
|
1722
|
+
data: any;
|
|
1721
1723
|
message: string;
|
|
1722
1724
|
} | {
|
|
1723
1725
|
code: number;
|
|
@@ -1775,4 +1777,4 @@ declare class MyxClient {
|
|
|
1775
1777
|
getAccessToken(): Promise<string | null>;
|
|
1776
1778
|
}
|
|
1777
1779
|
|
|
1778
|
-
export { type AccessTokenRequest, type AccessTokenResponse$1 as AccessTokenResponse, type AccessTokenType, type AddFavoriteParams, type Address$1 as Address, type ApiResponse, type BaseDetailResponse, type BaseResponse, COMMON_LP_AMOUNT_DECIMALS, COMMON_PRICE_DECIMALS, ChainId, type ChainIdRequest, CloseTypeEnum, type DashboardType, Direction, DirectionEnum, ErrorCode, ExecTypeEnum, type FavoritesListItem, type FavoritesListParams, type FavoritesTimeInterval, type FavoritesType, type FetchForwarderGetParams, type FetchForwarderGetResponse, type FetchForwarderGetResponseData, ForwarderGetStatus, type ForwarderTxParams, type GetBaseDetailParams, type GetHistoryOrdersParams, type GetKlineDataParams, type GetMarketDetailParams, type GetPoolLevelConfigParams, type GetTickerDataParams, type HistoryOrderItem, HttpKlineIntervalEnum, type KlineDataItemType, type KlineDataResponse, type KlineResolution, type LevelConfig, MarketCapType, type MarketDetailResponse, type MarketInfo, type MarketPool, type MarketPoolResponse, MarketPoolState, MarketType, MyxClient, type MyxClientConfig, type MyxSubscriptionOptions, type NetWorkFee, type ObjectType, type OnKlineCallback, type OnOrderCallback, type OnPositionCallback, type OnTickersAllCallback, type OnTickersCallback, OperationEnum, OperationType, OracleType, type Order$1 as Order, OrderStatus, OrderStatusEnum, OrderType, OrderTypeEnum, type PlaceOrderParams, type PoolLevelConfig, type PoolOpenOrder, type PoolOpenOrdersResponse, type PoolResponse, type Position$1 as Position, type PositionHistoryItem, type PositionResponse, type PositionTpSlOrderParams, type PositionType, type PriceResponse, type PriceType, type RemoveFavoriteParams, type SearchMarketParams, type SearchResultContractItem, type SearchResultCookItem, type SearchResultEarnItem, type SearchResultResponse, SearchSecondTypeEnum, SearchTypeEnum, type StatDashBoardResponse, type TickerDataItem, type TickersDataResponse, TimeInForce, type TradeFlowItem, type TradingResult, TriggerType, TriggerTypeEnum, type UpdateOrderTpSlParams, addFavorite, approve, index$2 as base, baseUrl, bigintAmountSlipperCalculator, bigintTradingGasPriceWithRatio, bigintTradingGasToRatioCalculator, fetchForwarderGetApi, forwardUrl, forwarderTxApi, getAllTickers, getAllowanceApproved, getBalanceOf, getBaseDetail, getFavoritesList, getHistoryOrders, getKlineData, getKlineLatestBar, getMarketDetail, getMarketList, getOraclePrice, getOrders, getPoolDetail, getPoolLevelConfig, getPoolOpenOrders, getPositionHistory, getPositions, getPriceData, getPricesData, getTickerData, getTokenInfo, getTradeFlow, index as market, index$3 as pool, index$1 as quote, removeFavorite, searchMarket, searchMarketAuth };
|
|
1780
|
+
export { type AccessTokenRequest, type AccessTokenResponse$1 as AccessTokenResponse, type AccessTokenType, type AddFavoriteParams, type Address$1 as Address, type ApiResponse, type BaseDetailResponse, type BaseResponse, COMMON_LP_AMOUNT_DECIMALS, COMMON_PRICE_DECIMALS, ChainId, type ChainIdRequest, CloseTypeEnum, type DashboardType, Direction, DirectionEnum, ErrorCode, ExecTypeEnum, type FavoritesListItem, type FavoritesListParams, type FavoritesTimeInterval, type FavoritesType, type FetchForwarderGetParams, type FetchForwarderGetResponse, type FetchForwarderGetResponseData, ForwarderGetStatus, type ForwarderTxParams, type GetBaseDetailParams, type GetHistoryOrdersParams, type GetKlineDataParams, type GetMarketDetailParams, type GetPoolLevelConfigParams, type GetTickerDataParams, type HistoryOrderItem, HttpKlineIntervalEnum, type KlineDataItemType, type KlineDataResponse, type KlineResolution, type LevelConfig, MarketCapType, type MarketDetailResponse, type MarketInfo, type MarketPool, type MarketPoolResponse, MarketPoolState, MarketType, MyxClient, type MyxClientConfig, type MyxSubscriptionOptions, type NetWorkFee, type ObjectType, type OnKlineCallback, type OnOrderCallback, type OnPositionCallback, type OnTickersAllCallback, type OnTickersCallback, OperationEnum, OperationType, OracleType, type Order$1 as Order, OrderStatus, OrderStatusEnum, OrderType, OrderTypeEnum, type PlaceOrderParams, type PoolLevelConfig, type PoolOpenOrder, type PoolOpenOrdersResponse, type PoolResponse, type Position$1 as Position, type PositionHistoryItem, type PositionResponse, type PositionTpSlOrderParams, type PositionType, type PriceResponse, type PriceType, type RemoveFavoriteParams, type SearchMarketParams, type SearchResultContractItem, type SearchResultCookItem, type SearchResultEarnItem, type SearchResultResponse, SearchSecondTypeEnum, SearchTypeEnum, type StatDashBoardResponse, type TickerDataItem, type TickersDataResponse, TimeInForce, type TradeFlowItem, TradeFlowTypeEnum, type TradingResult, TriggerType, TriggerTypeEnum, type UpdateOrderTpSlParams, addFavorite, approve, index$2 as base, baseUrl, bigintAmountSlipperCalculator, bigintTradingGasPriceWithRatio, bigintTradingGasToRatioCalculator, fetchForwarderGetApi, forwardUrl, forwarderTxApi, getAllTickers, getAllowanceApproved, getBalanceOf, getBaseDetail, getFavoritesList, getHistoryOrders, getKlineData, getKlineLatestBar, getMarketDetail, getMarketList, getOraclePrice, getOrders, getPoolDetail, getPoolLevelConfig, getPoolOpenOrders, getPositionHistory, getPositions, getPriceData, getPricesData, getTickerData, getTokenInfo, getTradeFlow, index as market, index$3 as pool, index$1 as quote, removeFavorite, searchMarket, searchMarketAuth };
|
package/dist/index.js
CHANGED
|
@@ -54,6 +54,7 @@ __export(index_exports, {
|
|
|
54
54
|
SearchSecondTypeEnum: () => SearchSecondTypeEnum,
|
|
55
55
|
SearchTypeEnum: () => SearchTypeEnum,
|
|
56
56
|
TimeInForce: () => TimeInForce2,
|
|
57
|
+
TradeFlowTypeEnum: () => TradeFlowTypeEnum,
|
|
57
58
|
TriggerType: () => TriggerType2,
|
|
58
59
|
TriggerTypeEnum: () => TriggerTypeEnum,
|
|
59
60
|
addFavorite: () => addFavorite,
|
|
@@ -1838,7 +1839,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
|
|
|
1838
1839
|
// package.json
|
|
1839
1840
|
var package_default = {
|
|
1840
1841
|
name: "@myx-trade/sdk",
|
|
1841
|
-
version: "0.1.
|
|
1842
|
+
version: "0.1.94",
|
|
1842
1843
|
private: false,
|
|
1843
1844
|
publishConfig: {
|
|
1844
1845
|
access: "public"
|
|
@@ -2053,6 +2054,18 @@ var OperationEnum = /* @__PURE__ */ ((OperationEnum2) => {
|
|
|
2053
2054
|
OperationEnum2[OperationEnum2["Decrease"] = 1] = "Decrease";
|
|
2054
2055
|
return OperationEnum2;
|
|
2055
2056
|
})(OperationEnum || {});
|
|
2057
|
+
var TradeFlowTypeEnum = /* @__PURE__ */ ((TradeFlowTypeEnum2) => {
|
|
2058
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["Increase"] = 0] = "Increase";
|
|
2059
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["Decrease"] = 1] = "Decrease";
|
|
2060
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["AddMargin"] = 2] = "AddMargin";
|
|
2061
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["RemoveMargin"] = 3] = "RemoveMargin";
|
|
2062
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["CancelOrder"] = 4] = "CancelOrder";
|
|
2063
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["ADL"] = 5] = "ADL";
|
|
2064
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["Liquidation"] = 6] = "Liquidation";
|
|
2065
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["MarketClose"] = 7] = "MarketClose";
|
|
2066
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["EarlyClose"] = 8] = "EarlyClose";
|
|
2067
|
+
return TradeFlowTypeEnum2;
|
|
2068
|
+
})(TradeFlowTypeEnum || {});
|
|
2056
2069
|
var TriggerTypeEnum = /* @__PURE__ */ ((TriggerTypeEnum2) => {
|
|
2057
2070
|
TriggerTypeEnum2[TriggerTypeEnum2["Unknown"] = 0] = "Unknown";
|
|
2058
2071
|
TriggerTypeEnum2[TriggerTypeEnum2["GTE"] = 1] = "GTE";
|
|
@@ -21005,6 +21018,7 @@ var MyxClient = class {
|
|
|
21005
21018
|
SearchSecondTypeEnum,
|
|
21006
21019
|
SearchTypeEnum,
|
|
21007
21020
|
TimeInForce,
|
|
21021
|
+
TradeFlowTypeEnum,
|
|
21008
21022
|
TriggerType,
|
|
21009
21023
|
TriggerTypeEnum,
|
|
21010
21024
|
addFavorite,
|
package/dist/index.mjs
CHANGED
|
@@ -1749,7 +1749,7 @@ var RotationProvider = class extends BaseProvider {
|
|
|
1749
1749
|
// package.json
|
|
1750
1750
|
var package_default = {
|
|
1751
1751
|
name: "@myx-trade/sdk",
|
|
1752
|
-
version: "0.1.
|
|
1752
|
+
version: "0.1.94",
|
|
1753
1753
|
private: false,
|
|
1754
1754
|
publishConfig: {
|
|
1755
1755
|
access: "public"
|
|
@@ -1964,6 +1964,18 @@ var OperationEnum = /* @__PURE__ */ ((OperationEnum2) => {
|
|
|
1964
1964
|
OperationEnum2[OperationEnum2["Decrease"] = 1] = "Decrease";
|
|
1965
1965
|
return OperationEnum2;
|
|
1966
1966
|
})(OperationEnum || {});
|
|
1967
|
+
var TradeFlowTypeEnum = /* @__PURE__ */ ((TradeFlowTypeEnum2) => {
|
|
1968
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["Increase"] = 0] = "Increase";
|
|
1969
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["Decrease"] = 1] = "Decrease";
|
|
1970
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["AddMargin"] = 2] = "AddMargin";
|
|
1971
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["RemoveMargin"] = 3] = "RemoveMargin";
|
|
1972
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["CancelOrder"] = 4] = "CancelOrder";
|
|
1973
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["ADL"] = 5] = "ADL";
|
|
1974
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["Liquidation"] = 6] = "Liquidation";
|
|
1975
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["MarketClose"] = 7] = "MarketClose";
|
|
1976
|
+
TradeFlowTypeEnum2[TradeFlowTypeEnum2["EarlyClose"] = 8] = "EarlyClose";
|
|
1977
|
+
return TradeFlowTypeEnum2;
|
|
1978
|
+
})(TradeFlowTypeEnum || {});
|
|
1967
1979
|
var TriggerTypeEnum = /* @__PURE__ */ ((TriggerTypeEnum2) => {
|
|
1968
1980
|
TriggerTypeEnum2[TriggerTypeEnum2["Unknown"] = 0] = "Unknown";
|
|
1969
1981
|
TriggerTypeEnum2[TriggerTypeEnum2["GTE"] = 1] = "GTE";
|
|
@@ -20915,6 +20927,7 @@ export {
|
|
|
20915
20927
|
SearchSecondTypeEnum,
|
|
20916
20928
|
SearchTypeEnum,
|
|
20917
20929
|
TimeInForce2 as TimeInForce,
|
|
20930
|
+
TradeFlowTypeEnum,
|
|
20918
20931
|
TriggerType2 as TriggerType,
|
|
20919
20932
|
TriggerTypeEnum,
|
|
20920
20933
|
addFavorite,
|