bybit-api 3.4.2 → 3.5.0-beta.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.
Files changed (105) hide show
  1. package/README.md +5 -4
  2. package/lib/account-asset-client-v3.d.ts +1 -1
  3. package/lib/account-asset-client-v3.js.map +1 -1
  4. package/lib/account-asset-client.d.ts +1 -1
  5. package/lib/account-asset-client.js.map +1 -1
  6. package/lib/constants/enum.d.ts +1 -0
  7. package/lib/constants/enum.js +1 -0
  8. package/lib/constants/enum.js.map +1 -1
  9. package/lib/contract-client.d.ts +1 -1
  10. package/lib/contract-client.js.map +1 -1
  11. package/lib/copy-trading-client.d.ts +1 -1
  12. package/lib/copy-trading-client.js.map +1 -1
  13. package/lib/index.d.ts +1 -0
  14. package/lib/index.js +1 -0
  15. package/lib/index.js.map +1 -1
  16. package/lib/inverse-client.js +1 -0
  17. package/lib/inverse-client.js.map +1 -1
  18. package/lib/inverse-futures-client.js +1 -0
  19. package/lib/inverse-futures-client.js.map +1 -1
  20. package/lib/linear-client.js +1 -0
  21. package/lib/linear-client.js.map +1 -1
  22. package/lib/rest-client-v5.d.ts +626 -0
  23. package/lib/rest-client-v5.js +801 -0
  24. package/lib/rest-client-v5.js.map +1 -0
  25. package/lib/spot-client-v3.d.ts +1 -1
  26. package/lib/spot-client-v3.js +1 -0
  27. package/lib/spot-client-v3.js.map +1 -1
  28. package/lib/spot-client.d.ts +1 -1
  29. package/lib/spot-client.js.map +1 -1
  30. package/lib/types/index.d.ts +1 -0
  31. package/lib/types/index.js +1 -0
  32. package/lib/types/index.js.map +1 -1
  33. package/lib/types/request/index.d.ts +8 -1
  34. package/lib/types/request/index.js +8 -1
  35. package/lib/types/request/index.js.map +1 -1
  36. package/lib/types/request/spot.d.ts +1 -1
  37. package/lib/types/request/v5-account.d.ts +30 -0
  38. package/lib/types/request/v5-account.js +3 -0
  39. package/lib/types/request/v5-account.js.map +1 -0
  40. package/lib/types/request/v5-asset.d.ts +120 -0
  41. package/lib/types/request/v5-asset.js +3 -0
  42. package/lib/types/request/v5-asset.js.map +1 -0
  43. package/lib/types/request/v5-market.d.ts +97 -0
  44. package/lib/types/request/v5-market.js +3 -0
  45. package/lib/types/request/v5-market.js.map +1 -0
  46. package/lib/types/request/v5-position.d.ts +78 -0
  47. package/lib/types/request/v5-position.js +3 -0
  48. package/lib/types/request/v5-position.js.map +1 -0
  49. package/lib/types/request/v5-spot-leverage-token.d.ts +20 -0
  50. package/lib/types/request/v5-spot-leverage-token.js +3 -0
  51. package/lib/types/request/v5-spot-leverage-token.js.map +1 -0
  52. package/lib/types/request/v5-trade.d.ts +91 -0
  53. package/lib/types/request/v5-trade.js +3 -0
  54. package/lib/types/request/v5-trade.js.map +1 -0
  55. package/lib/types/request/v5-user.d.ts +18 -0
  56. package/lib/types/request/v5-user.js +3 -0
  57. package/lib/types/request/v5-user.js.map +1 -0
  58. package/lib/types/response/index.d.ts +7 -0
  59. package/lib/types/response/index.js +7 -0
  60. package/lib/types/response/index.js.map +1 -1
  61. package/lib/types/response/v5-account.d.ts +101 -0
  62. package/lib/types/response/v5-account.js +3 -0
  63. package/lib/types/response/v5-account.js.map +1 -0
  64. package/lib/types/response/v5-asset.d.ts +133 -0
  65. package/lib/types/response/v5-asset.js +3 -0
  66. package/lib/types/response/v5-asset.js.map +1 -0
  67. package/lib/types/response/v5-market.d.ts +234 -0
  68. package/lib/types/response/v5-market.js +3 -0
  69. package/lib/types/response/v5-market.js.map +1 -0
  70. package/lib/types/response/v5-position.d.ts +78 -0
  71. package/lib/types/response/v5-position.js +3 -0
  72. package/lib/types/response/v5-position.js.map +1 -0
  73. package/lib/types/response/v5-spot-leverage-token.d.ts +62 -0
  74. package/lib/types/response/v5-spot-leverage-token.js +3 -0
  75. package/lib/types/response/v5-spot-leverage-token.js.map +1 -0
  76. package/lib/types/response/v5-trade.d.ts +78 -0
  77. package/lib/types/response/v5-trade.js +3 -0
  78. package/lib/types/response/v5-trade.js.map +1 -0
  79. package/lib/types/response/v5-user.d.ts +53 -0
  80. package/lib/types/response/v5-user.js +3 -0
  81. package/lib/types/response/v5-user.js.map +1 -0
  82. package/lib/types/v5-shared.d.ts +87 -0
  83. package/lib/types/v5-shared.js +3 -0
  84. package/lib/types/v5-shared.js.map +1 -0
  85. package/lib/unified-margin-client.d.ts +1 -1
  86. package/lib/unified-margin-client.js.map +1 -1
  87. package/lib/usdc-option-client.d.ts +9 -3
  88. package/lib/usdc-option-client.js +8 -2
  89. package/lib/usdc-option-client.js.map +1 -1
  90. package/lib/usdc-perpetual-client.d.ts +4 -2
  91. package/lib/usdc-perpetual-client.js +3 -1
  92. package/lib/usdc-perpetual-client.js.map +1 -1
  93. package/lib/util/BaseRestClient.js +4 -2
  94. package/lib/util/BaseRestClient.js.map +1 -1
  95. package/lib/util/WsStore.d.ts +2 -1
  96. package/lib/util/WsStore.js.map +1 -1
  97. package/lib/util/browser-support.js +2 -0
  98. package/lib/util/browser-support.js.map +1 -1
  99. package/lib/util/logger.js.map +1 -1
  100. package/lib/util/requestUtils.js +1 -0
  101. package/lib/util/requestUtils.js.map +1 -1
  102. package/lib/util/websocket-util.js +2 -2
  103. package/lib/websocket-client.js +16 -12
  104. package/lib/websocket-client.js.map +1 -1
  105. package/package.json +6 -4
@@ -0,0 +1,18 @@
1
+ import { PermissionsV5 } from '../v5-shared';
2
+ export interface CreateSubApiKeyParamsV5 {
3
+ subuid: number;
4
+ note?: string;
5
+ readOnly: 0 | 1;
6
+ ips?: string[];
7
+ permissions: PermissionsV5;
8
+ }
9
+ export interface UpdateApiKeyParamsV5 {
10
+ readOnly?: 0 | 1;
11
+ ips?: string[];
12
+ permissions: PermissionsV5;
13
+ }
14
+ export interface UpdateSubApiKeyUpdateParamsV5 {
15
+ readOnly?: number;
16
+ ips?: string[];
17
+ permissions: PermissionsV5;
18
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-user.js","sourceRoot":"","sources":["../../../src/types/request/v5-user.ts"],"names":[],"mappings":""}
@@ -4,3 +4,10 @@ export * from './shared';
4
4
  export * from './spot';
5
5
  export * from './usdt-perp';
6
6
  export * from './unified-margin';
7
+ export * from './v5-account';
8
+ export * from './v5-asset';
9
+ export * from './v5-market';
10
+ export * from './v5-position';
11
+ export * from './v5-trade';
12
+ export * from './v5-user';
13
+ export * from './v5-spot-leverage-token';
@@ -16,4 +16,11 @@ __exportStar(require("./shared"), exports);
16
16
  __exportStar(require("./spot"), exports);
17
17
  __exportStar(require("./usdt-perp"), exports);
18
18
  __exportStar(require("./unified-margin"), exports);
19
+ __exportStar(require("./v5-account"), exports);
20
+ __exportStar(require("./v5-asset"), exports);
21
+ __exportStar(require("./v5-market"), exports);
22
+ __exportStar(require("./v5-position"), exports);
23
+ __exportStar(require("./v5-trade"), exports);
24
+ __exportStar(require("./v5-user"), exports);
25
+ __exportStar(require("./v5-spot-leverage-token"), exports);
19
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/response/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAgC;AAChC,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,8CAA4B;AAC5B,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/response/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAgC;AAChC,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,8CAA4B;AAC5B,mDAAiC;AACjC,+CAA6B;AAC7B,6CAA2B;AAC3B,8CAA4B;AAC5B,gDAA8B;AAC9B,6CAA2B;AAC3B,4CAA0B;AAC1B,2DAAyC"}
@@ -0,0 +1,101 @@
1
+ import { AccountMarginModeV5, AccountTypeV5, CategoryV5, TransactionTypeV5, UnifiedUpdateStatusV5 } from '../v5-shared';
2
+ export interface WalletBalanceV5Coin {
3
+ coin: string;
4
+ equity: string;
5
+ usdValue: string;
6
+ walletBalance: string;
7
+ borrowAmount: string;
8
+ availableToBorrow: string;
9
+ availableToWithdraw: string;
10
+ accruedInterest: string;
11
+ totalOrderIM: string;
12
+ totalPositionIM: string;
13
+ totalPositionMM: string;
14
+ unrealisedPnl: string;
15
+ cumRealisedPnl: string;
16
+ }
17
+ export interface WalletBalanceV5 {
18
+ accountType: AccountTypeV5;
19
+ accountIMRate: string;
20
+ accountMMRate: string;
21
+ totalEquity: string;
22
+ totalWalletBalance: string;
23
+ totalMarginBalance: string;
24
+ totalAvailableBalance: string;
25
+ totalPerpUPL: string;
26
+ totalInitialMargin: string;
27
+ totalMaintenanceMargin: string;
28
+ coin: WalletBalanceV5Coin[];
29
+ }
30
+ export interface UnifiedAccountUpgradeResultV5 {
31
+ unifiedUpdateStatus: UnifiedUpdateStatusV5;
32
+ unifiedUpdateMsg: {
33
+ msg: string[] | null;
34
+ };
35
+ }
36
+ export interface BorrowHistoryRecordV5 {
37
+ currency: string;
38
+ createdTime: number;
39
+ borrowCost: string;
40
+ hourlyBorrowRate: string;
41
+ InterestBearingBorrowSize: string;
42
+ costExemption: string;
43
+ }
44
+ export interface CollateralInfoV5 {
45
+ currency: string;
46
+ hourlyBorrowRate: string;
47
+ maxBorrowingAmount: string;
48
+ freeBorrowingAmount: string;
49
+ borrowAmount: string;
50
+ availableToBorrow: string;
51
+ borrowable: boolean;
52
+ marginCollateral: boolean;
53
+ collateralRatio: string;
54
+ }
55
+ export interface CoinGreeksV5 {
56
+ baseCoin: string;
57
+ totalDelta: string;
58
+ totalGamma: string;
59
+ totalVega: string;
60
+ totalTheta: string;
61
+ }
62
+ export interface FeeRateV5 {
63
+ symbol: string;
64
+ takerFeeRate: string;
65
+ makerFeeRate: string;
66
+ }
67
+ export interface AccountInfoV5 {
68
+ unifiedMarginStatus: number;
69
+ marginMode: AccountMarginModeV5;
70
+ updatedTime: string;
71
+ }
72
+ export interface TransactionLogV5 {
73
+ symbol: string;
74
+ category: CategoryV5;
75
+ side: string;
76
+ transactionTime: string;
77
+ type: TransactionTypeV5;
78
+ qty: string;
79
+ size: string;
80
+ currency: string;
81
+ tradePrice: string;
82
+ funding: string;
83
+ fee: string;
84
+ cashFlow: string;
85
+ change: string;
86
+ cashBalance: string;
87
+ feeRate: string;
88
+ tradeId: string;
89
+ orderId: string;
90
+ orderLinkId: string;
91
+ }
92
+ export interface MMPStateV5 {
93
+ baseCoin: string;
94
+ mmpEnabled: boolean;
95
+ window: string;
96
+ frozenPeriod: string;
97
+ qtyLimit: string;
98
+ deltaLimit: string;
99
+ mmpFrozenUntil: string;
100
+ mmpFrozen: boolean;
101
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-account.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-account.js","sourceRoot":"","sources":["../../../src/types/response/v5-account.ts"],"names":[],"mappings":""}
@@ -0,0 +1,133 @@
1
+ import { AccountTypeV5, OrderSideV5, WithdrawalTypeV5 } from '../v5-shared';
2
+ export interface CoinExchangeRecordV5 {
3
+ fromCoin: string;
4
+ fromAmount: string;
5
+ toCoin: string;
6
+ toAmount: string;
7
+ exchangeRate: string;
8
+ createdTime: string;
9
+ exchangeTxId: string;
10
+ }
11
+ export interface DeliveryRecordV5 {
12
+ deliveryTime: number;
13
+ symbol: string;
14
+ side: OrderSideV5;
15
+ position: string;
16
+ deliveryPrice: string;
17
+ strike: string;
18
+ fee: string;
19
+ deliveryRpl: string;
20
+ }
21
+ export interface SettlementRecordV5 {
22
+ symbol: string;
23
+ side: string;
24
+ size: number;
25
+ sessionAvgPrice: string;
26
+ markPrice: string;
27
+ realisedPnl: string;
28
+ createdTime: string;
29
+ }
30
+ export interface AssetInfoAssetV5 {
31
+ coin: string;
32
+ frozen: string;
33
+ free: string;
34
+ withdraw: string;
35
+ }
36
+ export interface AssetInfoV5 {
37
+ status: 'ACCOUNT_STATUS_NORMAL' | 'ACCOUNT_STATUS_UNSPECIFIED';
38
+ assets: AssetInfoAssetV5[];
39
+ }
40
+ export interface CoinBalanceV5 {
41
+ coin: string;
42
+ walletBalance: string;
43
+ transferBalance: string;
44
+ bonus?: string;
45
+ }
46
+ export interface AllCoinsBalanceV5 {
47
+ accountType: AccountTypeV5;
48
+ memberId?: string;
49
+ balance: CoinBalanceV5[];
50
+ }
51
+ export interface AccountCoinBalanceV5 {
52
+ accountType: AccountTypeV5;
53
+ bizType: number;
54
+ accountId: string;
55
+ memberId: string;
56
+ balance: {
57
+ coin: string;
58
+ walletBalance: string;
59
+ transferBalance: string;
60
+ bonus: string;
61
+ };
62
+ }
63
+ export interface InternalTransferRecordV5 {
64
+ transferId: string;
65
+ coin: string;
66
+ amount: string;
67
+ fromAccountType: AccountTypeV5;
68
+ toAccountType: AccountTypeV5;
69
+ timestamp: string;
70
+ status: string;
71
+ }
72
+ export interface AllowedDepositCoinInfoV5 {
73
+ coin: string;
74
+ chain: string;
75
+ coinShowName: string;
76
+ chainType: string;
77
+ blockConfirmNumber: number;
78
+ minDepositAmount: string;
79
+ }
80
+ export interface DepositRecordV5 {
81
+ coin: string;
82
+ chain: string;
83
+ amount: string;
84
+ txID: string;
85
+ status: number;
86
+ toAddress: string;
87
+ tag: string;
88
+ depositFee: string;
89
+ successAt: string;
90
+ confirmations: string;
91
+ txIndex: string;
92
+ blockHash: string;
93
+ }
94
+ export interface DepositAddressChainV5 {
95
+ chainType: string;
96
+ addressDeposit: string;
97
+ tagDeposit: string;
98
+ chain: string;
99
+ }
100
+ export interface DepositAddressResultV5 {
101
+ coin: string;
102
+ chains: DepositAddressChainV5[];
103
+ }
104
+ export interface CoinInfoV5 {
105
+ name: number;
106
+ coin: string;
107
+ remainAmount: string;
108
+ chains: {
109
+ chain: string;
110
+ chainType: string;
111
+ confirmation: string;
112
+ withdrawFee: string;
113
+ depositMin: string;
114
+ withdrawMin: string;
115
+ minAccuracy: string;
116
+ chainDeposit: string;
117
+ chainWithdraw: string;
118
+ }[];
119
+ }
120
+ export interface WithdrawalRecordV5 {
121
+ withdrawId: string;
122
+ txID: string;
123
+ withdrawType: WithdrawalTypeV5;
124
+ coin: string;
125
+ chain: string;
126
+ amount: string;
127
+ withdrawFee: string;
128
+ status: string;
129
+ toAddress: string;
130
+ tag: string;
131
+ createTime: string;
132
+ updateTime: string;
133
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-asset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-asset.js","sourceRoot":"","sources":["../../../src/types/response/v5-asset.ts"],"names":[],"mappings":""}
@@ -0,0 +1,234 @@
1
+ import { CategoryCursorListV5, ContractTypeV5, InstrumentStatusV5, OptionTypeV5, OrderSideV5 } from '../v5-shared';
2
+ /**
3
+ * OHLCVT candle used by v5 APIs
4
+ *
5
+ * - list[0]: startTime string Start time of the candle (ms)
6
+ * - list[1]: openPrice string Open price
7
+ * - list[2]: highPrice string Highest price
8
+ * - list[3]: lowPrice string Lowest price
9
+ * - list[4]: closePrice string Close price. Is the last traded price when the candle is not closed
10
+ * - list[5]: volume string Trade volume. Unit of contract: pieces of contract. Unit of spot: quantity of coins
11
+ * - list[6]: turnover string Turnover. Unit of figure: quantity of quota coin
12
+ */
13
+ export declare type OHLCVKlineV5 = [
14
+ string,
15
+ string,
16
+ string,
17
+ string,
18
+ string,
19
+ string,
20
+ string
21
+ ];
22
+ /**
23
+ * OHLC candle used by v5 APIs
24
+ *
25
+ * - list[0]: startTime string Start time of the candle (ms)
26
+ * - list[1]: openPrice string Open price
27
+ * - list[2]: highPrice string Highest price
28
+ * - list[3]: lowPrice string Lowest price
29
+ * - list[4]: closePrice string Close price. Is the last traded price when the candle is not closed
30
+ */
31
+ export declare type OHLCKlineV5 = [string, string, string, string, string];
32
+ export interface LinearInverseInstrumentInfoV5 {
33
+ symbol: string;
34
+ contractType: ContractTypeV5;
35
+ status: InstrumentStatusV5;
36
+ baseCoin: string;
37
+ quoteCoin: string;
38
+ launchTime: string;
39
+ deliveryTime?: string;
40
+ deliveryFeeRate?: string;
41
+ priceScale: string;
42
+ leverageFilter: {
43
+ minLeverage: string;
44
+ maxLeverage: string;
45
+ leverageStep: string;
46
+ };
47
+ priceFilter: {
48
+ minPrice: string;
49
+ maxPrice: string;
50
+ tickSize: string;
51
+ };
52
+ lotSizeFilter: {
53
+ maxOrderQty: string;
54
+ minOrderQty: string;
55
+ qtyStep: string;
56
+ postOnlyMaxOrderQty?: string;
57
+ };
58
+ unifiedMarginTrade: boolean;
59
+ fundingInterval: number;
60
+ settleCoin: string;
61
+ }
62
+ export interface OptionInstrumentInfoV5 {
63
+ symbol: string;
64
+ optionsType: OptionTypeV5;
65
+ status: InstrumentStatusV5;
66
+ baseCoin: string;
67
+ quoteCoin: string;
68
+ settleCoin: boolean;
69
+ launchTime: string;
70
+ deliveryTime: string;
71
+ deliveryFeeRate: string;
72
+ priceFilter: {
73
+ minPrice: string;
74
+ maxPrice: string;
75
+ tickSize: string;
76
+ };
77
+ lotSizeFilter: {
78
+ maxOrderQty: string;
79
+ minOrderQty: string;
80
+ qtyStep: string;
81
+ };
82
+ }
83
+ export interface SpotInstrumentInfoV5 {
84
+ symbol: string;
85
+ baseCoin: string;
86
+ quoteCoin: string;
87
+ innovation: '0' | '1';
88
+ status: InstrumentStatusV5;
89
+ lotSizeFilter: {
90
+ basePrecision: string;
91
+ quotePrecision: string;
92
+ minOrderQty: string;
93
+ maxOrderQty: string;
94
+ minOrderAmt: string;
95
+ maxOrderAmt: string;
96
+ };
97
+ priceFilter: {
98
+ tickSize: string;
99
+ };
100
+ }
101
+ export declare type InstrumentInfoResponseV5 = CategoryCursorListV5<LinearInverseInstrumentInfoV5[], 'linear' | 'inverse'> | CategoryCursorListV5<OptionInstrumentInfoV5[], 'option'> | CategoryCursorListV5<SpotInstrumentInfoV5[], 'spot'>;
102
+ export default interface OrderbookLevelV5 {
103
+ price: string;
104
+ size: string;
105
+ }
106
+ export interface OrderbookResponseV5 {
107
+ s: string;
108
+ b: OrderbookLevelV5[];
109
+ a: OrderbookLevelV5[];
110
+ ts: number;
111
+ u: number;
112
+ }
113
+ export interface TickerLinearInverseV5 {
114
+ symbol: string;
115
+ lastPrice: string;
116
+ indexPrice: string;
117
+ markPrice: string;
118
+ prevPrice24h: string;
119
+ price24hPcnt: string;
120
+ highPrice24h: string;
121
+ lowPrice24h: string;
122
+ prevPrice1h: string;
123
+ openInterest: string;
124
+ openInterestValue: string;
125
+ turnover24h: string;
126
+ volume24h: string;
127
+ fundingRate: string;
128
+ nextFundingTime: string;
129
+ predictedDeliveryPrice: string;
130
+ basisRate: string;
131
+ deliveryFeeRate: string;
132
+ deliveryTime: string;
133
+ ask1Size: string;
134
+ bid1Price: string;
135
+ ask1Price: string;
136
+ bid1Size: string;
137
+ }
138
+ export interface TickerOptionV5 {
139
+ symbol: string;
140
+ bid1Price: string;
141
+ bid1Size: string;
142
+ bid1Iv: string;
143
+ ask1Price: string;
144
+ ask1Size: string;
145
+ ask1Iv: string;
146
+ lastPrice: string;
147
+ highPrice24h: string;
148
+ lowPrice24h: string;
149
+ markPrice: string;
150
+ indexPrice: string;
151
+ markIv: string;
152
+ underlyingPrice: string;
153
+ openInterest: string;
154
+ turnover24h: string;
155
+ volume24h: string;
156
+ totalVolume: string;
157
+ totalTurnover: string;
158
+ delta: string;
159
+ gamma: string;
160
+ vega: string;
161
+ theta: string;
162
+ predictedDeliveryPrice: string;
163
+ change24h: string;
164
+ }
165
+ export interface TickerSpotV5 {
166
+ symbol: string;
167
+ bid1Price: string;
168
+ bid1Size: string;
169
+ ask1Price: string;
170
+ ask1Size: string;
171
+ lastPrice: string;
172
+ prevPrice24h: string;
173
+ price24hPcnt: string;
174
+ highPrice24h: string;
175
+ lowPrice24h: string;
176
+ turnover24h: string;
177
+ volume24h: string;
178
+ usdIndexPrice: string;
179
+ }
180
+ export interface FundingRateHistoryResponseV5 {
181
+ symbol: string;
182
+ fundingRate: string;
183
+ fundingRateTimestamp: string;
184
+ }
185
+ export interface PublicTradeV5 {
186
+ execId: string;
187
+ symbol: string;
188
+ price: string;
189
+ size: string;
190
+ side: OrderSideV5;
191
+ time: string;
192
+ isBlockTrade: boolean;
193
+ }
194
+ /**
195
+ *
196
+ * - openInterest string Open interest
197
+ * - timestamp string The timestamp (ms)
198
+ */
199
+ export declare type OpenInterestV5 = [string, string];
200
+ export interface OpenInterestResponseV5 {
201
+ category: 'linear' | 'inverse';
202
+ symbol: string;
203
+ list: OpenInterestV5[];
204
+ nextPageCursor?: string;
205
+ }
206
+ export interface HistoricalVolatilityV5 {
207
+ period: number;
208
+ value: string;
209
+ time: string;
210
+ }
211
+ export interface InsuranceDataV5 {
212
+ coin: string;
213
+ balance: string;
214
+ value: string;
215
+ }
216
+ export interface InsuranceResponseV5 {
217
+ updatedTime: string;
218
+ list: InsuranceDataV5[];
219
+ }
220
+ export interface RiskLimitV5 {
221
+ id: number;
222
+ symbol: string;
223
+ riskLimitValue: string;
224
+ maintenanceMargin: number;
225
+ initialMargin: number;
226
+ section: any;
227
+ isLowestRisk: 0 | 1;
228
+ maxLeverage: string;
229
+ }
230
+ export interface OptionDeliveryPriceV5 {
231
+ symbol: string;
232
+ deliveryPrice: string;
233
+ deliveryTime: string;
234
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-market.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-market.js","sourceRoot":"","sources":["../../../src/types/response/v5-market.ts"],"names":[],"mappings":""}
@@ -0,0 +1,78 @@
1
+ import { CategoryV5, ExecTypeV5, OrderSideV5, OrderTypeV5, PositionIdx, StopOrderTypeV5, TPSLModeV5, TradeModeV5 } from '../v5-shared';
2
+ export interface PositionV5 {
3
+ positionIdx: PositionIdx;
4
+ riskId: number;
5
+ riskLimitValue: string;
6
+ symbol: string;
7
+ side: 'Buy' | 'Sell' | 'None';
8
+ size: string;
9
+ avgPrice: string;
10
+ positionValue: string;
11
+ tradeMode: TradeModeV5;
12
+ autoAddMargin?: number;
13
+ positionStatus: 'Normal' | 'Liq' | 'Adl';
14
+ leverage?: string;
15
+ markPrice: string;
16
+ liqPrice: string;
17
+ bustPrice?: string;
18
+ positionIM?: string;
19
+ positionMM?: string;
20
+ tpslMode?: TPSLModeV5;
21
+ takeProfit?: string;
22
+ stopLoss?: string;
23
+ trailingStop?: string;
24
+ unrealisedPnl: string;
25
+ cumRealisedPnl: string;
26
+ createdTime: string;
27
+ updatedTime: string;
28
+ }
29
+ export interface SetRiskLimitResultV5 {
30
+ category: CategoryV5;
31
+ riskId: number;
32
+ riskLimitValue: string;
33
+ }
34
+ export interface ExecutionV5 {
35
+ symbol: string;
36
+ orderId: string;
37
+ orderLinkId: string;
38
+ side: OrderSideV5;
39
+ orderPrice: string;
40
+ orderQty: string;
41
+ leavesQty: string;
42
+ orderType: OrderTypeV5;
43
+ stopOrderType?: StopOrderTypeV5;
44
+ execFee: string;
45
+ execId: string;
46
+ execPrice: string;
47
+ execQty: string;
48
+ execType: ExecTypeV5;
49
+ execValue: string;
50
+ execTime: string;
51
+ isMaker: boolean;
52
+ feeRate: string;
53
+ tradeIv?: string;
54
+ markIv?: string;
55
+ markPrice: string;
56
+ indexPrice: string;
57
+ underlyingPrice?: string;
58
+ blockTradeId?: string;
59
+ }
60
+ export interface ClosedPnLV5 {
61
+ symbol: string;
62
+ orderId: string;
63
+ side: string;
64
+ qty: string;
65
+ orderPrice: string;
66
+ orderType: OrderTypeV5;
67
+ execType: ExecTypeV5;
68
+ closedSize: string;
69
+ cumEntryValue: string;
70
+ avgEntryPrice: string;
71
+ cumExitValue: string;
72
+ avgExitPrice: string;
73
+ closedPnl: string;
74
+ fillCount: string;
75
+ leverage: string;
76
+ createdTime: string;
77
+ updatedTime: string;
78
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=v5-position.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v5-position.js","sourceRoot":"","sources":["../../../src/types/response/v5-position.ts"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
1
+ import { LTOrderStatusV5, LTOrderTypeV5, LeverageTokenStatusV5 } from '../v5-shared';
2
+ export interface LeverageTokenInfoV5 {
3
+ ltCoin: string;
4
+ ltName: string;
5
+ maxPurchase: string;
6
+ minPurchase: string;
7
+ maxPurchaseDaily: string;
8
+ maxRedeem: string;
9
+ minRedeem: string;
10
+ maxRedeemDaily: string;
11
+ purchaseFeeRate: string;
12
+ redeemFeeRate: string;
13
+ ltStatus: LeverageTokenStatusV5;
14
+ fundFee: string;
15
+ fundFeeTime: string;
16
+ manageFeeRate: string;
17
+ manageFeeTime: string;
18
+ value: string;
19
+ netValue: string;
20
+ total: string;
21
+ }
22
+ export interface LeveragedTokenMarketResultV5 {
23
+ ltCoin: string;
24
+ nav: string;
25
+ navTime: string;
26
+ circulation: string;
27
+ basket: string;
28
+ leverage: string;
29
+ }
30
+ export interface PurchaseSpotLeveragedTokenResultV5 {
31
+ ltCoin: string;
32
+ ltOrderStatus: LTOrderStatusV5;
33
+ execQty: string;
34
+ execAmt: string;
35
+ amount: string;
36
+ purchaseId: string;
37
+ serialNo: string;
38
+ valueCoin: string;
39
+ }
40
+ export interface RedeemSpotLeveragedTokenResultV5 {
41
+ ltCoin: string;
42
+ ltOrderStatus: LTOrderStatusV5;
43
+ quantity: string;
44
+ execQty: string;
45
+ execAmt: string;
46
+ redeemId: string;
47
+ serialNo: string;
48
+ valueCoin: string;
49
+ }
50
+ export interface SpotLeveragedTokenOrderHistoryV5 {
51
+ ltCoin: string;
52
+ orderId: string;
53
+ ltOrderType: LTOrderTypeV5;
54
+ orderTime: number;
55
+ updateTime: number;
56
+ ltOrderStatus: LTOrderStatusV5;
57
+ fee: string;
58
+ amount: string;
59
+ value: string;
60
+ valueCoin: string;
61
+ serialNo: string;
62
+ }