ccxt 4.5.49 → 4.5.50
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/README.md +5 -4
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +48 -13
- package/dist/cjs/src/bitget.js +1 -0
- package/dist/cjs/src/gate.js +0 -1
- package/dist/cjs/src/hibachi.js +1 -1
- package/dist/cjs/src/lighter.js +306 -141
- package/dist/cjs/src/okx.js +46 -1
- package/dist/cjs/src/pro/hyperliquid.js +361 -1
- package/dist/cjs/src/pro/lighter.js +1 -0
- package/dist/cjs/src/weex.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/myokx.d.ts +34 -0
- package/js/src/abstract/okx.d.ts +34 -0
- package/js/src/abstract/okxus.d.ts +34 -0
- package/js/src/base/Exchange.d.ts +5 -1
- package/js/src/base/Exchange.js +48 -13
- package/js/src/bitget.js +1 -0
- package/js/src/gate.js +0 -1
- package/js/src/hibachi.js +1 -1
- package/js/src/lighter.d.ts +11 -2
- package/js/src/lighter.js +307 -142
- package/js/src/okx.js +46 -1
- package/js/src/pro/hyperliquid.d.ts +48 -1
- package/js/src/pro/hyperliquid.js +362 -2
- package/js/src/pro/lighter.js +1 -0
- package/js/src/weex.js +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ interface okx {
|
|
|
12
12
|
publicGetMarketOptionInstrumentFamilyTrades(params?: {}): Promise<implicitReturnType>;
|
|
13
13
|
publicGetMarketPlatform24Volume(params?: {}): Promise<implicitReturnType>;
|
|
14
14
|
publicGetMarketCallAuctionDetail(params?: {}): Promise<implicitReturnType>;
|
|
15
|
+
publicGetMarketCallAuctionDetails(params?: {}): Promise<implicitReturnType>;
|
|
15
16
|
publicGetMarketBooksSbe(params?: {}): Promise<implicitReturnType>;
|
|
16
17
|
publicGetMarketBlockTickers(params?: {}): Promise<implicitReturnType>;
|
|
17
18
|
publicGetMarketBlockTicker(params?: {}): Promise<implicitReturnType>;
|
|
@@ -51,6 +52,9 @@ interface okx {
|
|
|
51
52
|
publicGetPublicPremiumHistory(params?: {}): Promise<implicitReturnType>;
|
|
52
53
|
publicGetPublicEconomicCalendar(params?: {}): Promise<implicitReturnType>;
|
|
53
54
|
publicGetPublicMarketDataHistory(params?: {}): Promise<implicitReturnType>;
|
|
55
|
+
publicGetPublicEventContractEvents(params?: {}): Promise<implicitReturnType>;
|
|
56
|
+
publicGetPublicEventContractMarkets(params?: {}): Promise<implicitReturnType>;
|
|
57
|
+
publicGetPublicEventContractSeries(params?: {}): Promise<implicitReturnType>;
|
|
54
58
|
publicGetPublicVipInterestRateLoanQuota(params?: {}): Promise<implicitReturnType>;
|
|
55
59
|
publicGetRubikStatTradingDataSupportCoin(params?: {}): Promise<implicitReturnType>;
|
|
56
60
|
publicGetRubikStatContractsOpenInterestHistory(params?: {}): Promise<implicitReturnType>;
|
|
@@ -58,6 +62,7 @@ interface okx {
|
|
|
58
62
|
publicGetRubikStatTakerVolumeContract(params?: {}): Promise<implicitReturnType>;
|
|
59
63
|
publicGetRubikStatMarginLoanRatio(params?: {}): Promise<implicitReturnType>;
|
|
60
64
|
publicGetRubikStatContractsLongShortAccountRatioContractTopTrader(params?: {}): Promise<implicitReturnType>;
|
|
65
|
+
publicGetRubikStatContractsLongShortPositionRatioContractTopTrader(params?: {}): Promise<implicitReturnType>;
|
|
61
66
|
publicGetRubikStatContractsLongShortAccountRatioContract(params?: {}): Promise<implicitReturnType>;
|
|
62
67
|
publicGetRubikStatContractsLongShortAccountRatio(params?: {}): Promise<implicitReturnType>;
|
|
63
68
|
publicGetRubikStatContractsOpenInterestVolume(params?: {}): Promise<implicitReturnType>;
|
|
@@ -95,6 +100,7 @@ interface okx {
|
|
|
95
100
|
publicGetCopytradingPublicCopyTraders(params?: {}): Promise<implicitReturnType>;
|
|
96
101
|
publicGetSupportAnnouncements(params?: {}): Promise<implicitReturnType>;
|
|
97
102
|
publicGetSupportAnnouncementsTypes(params?: {}): Promise<implicitReturnType>;
|
|
103
|
+
publicGetSupportAnnouncementTypes(params?: {}): Promise<implicitReturnType>;
|
|
98
104
|
publicPostTradingBotGridMinInvestment(params?: {}): Promise<implicitReturnType>;
|
|
99
105
|
privateGetRfqCounterparties(params?: {}): Promise<implicitReturnType>;
|
|
100
106
|
privateGetRfqMakerInstrumentSettings(params?: {}): Promise<implicitReturnType>;
|
|
@@ -150,6 +156,7 @@ interface okx {
|
|
|
150
156
|
privateGetAccountBillsArchive(params?: {}): Promise<implicitReturnType>;
|
|
151
157
|
privateGetAccountBillsHistoryArchive(params?: {}): Promise<implicitReturnType>;
|
|
152
158
|
privateGetAccountConfig(params?: {}): Promise<implicitReturnType>;
|
|
159
|
+
privateGetAccountSubtypes(params?: {}): Promise<implicitReturnType>;
|
|
153
160
|
privateGetAccountMaxSize(params?: {}): Promise<implicitReturnType>;
|
|
154
161
|
privateGetAccountMaxAvailSize(params?: {}): Promise<implicitReturnType>;
|
|
155
162
|
privateGetAccountLeverageInfo(params?: {}): Promise<implicitReturnType>;
|
|
@@ -207,6 +214,11 @@ interface okx {
|
|
|
207
214
|
privateGetTradingBotRecurringOrdersAlgoHistory(params?: {}): Promise<implicitReturnType>;
|
|
208
215
|
privateGetTradingBotRecurringOrdersAlgoDetails(params?: {}): Promise<implicitReturnType>;
|
|
209
216
|
privateGetTradingBotRecurringSubOrders(params?: {}): Promise<implicitReturnType>;
|
|
217
|
+
privateGetTradingBotDcaOngoingList(params?: {}): Promise<implicitReturnType>;
|
|
218
|
+
privateGetTradingBotDcaHistoryList(params?: {}): Promise<implicitReturnType>;
|
|
219
|
+
privateGetTradingBotDcaOrders(params?: {}): Promise<implicitReturnType>;
|
|
220
|
+
privateGetTradingBotDcaPositionDetails(params?: {}): Promise<implicitReturnType>;
|
|
221
|
+
privateGetTradingBotDcaCycleList(params?: {}): Promise<implicitReturnType>;
|
|
210
222
|
privateGetFinanceSavingsBalance(params?: {}): Promise<implicitReturnType>;
|
|
211
223
|
privateGetFinanceSavingsLendingHistory(params?: {}): Promise<implicitReturnType>;
|
|
212
224
|
privateGetFinanceStakingDefiOffers(params?: {}): Promise<implicitReturnType>;
|
|
@@ -252,6 +264,9 @@ interface okx {
|
|
|
252
264
|
privateGetBrokerNdRebatePerOrders(params?: {}): Promise<implicitReturnType>;
|
|
253
265
|
privateGetFinanceSfpDcdOrder(params?: {}): Promise<implicitReturnType>;
|
|
254
266
|
privateGetFinanceSfpDcdOrders(params?: {}): Promise<implicitReturnType>;
|
|
267
|
+
privateGetFinanceSfpDcdCurrencyPair(params?: {}): Promise<implicitReturnType>;
|
|
268
|
+
privateGetFinanceSfpDcdOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
269
|
+
privateGetFinanceSfpDcdOrderHistory(params?: {}): Promise<implicitReturnType>;
|
|
255
270
|
privateGetAffiliateInviteeDetail(params?: {}): Promise<implicitReturnType>;
|
|
256
271
|
privateGetUsersPartnerIfRebate(params?: {}): Promise<implicitReturnType>;
|
|
257
272
|
privateGetSupportAnnouncements(params?: {}): Promise<implicitReturnType>;
|
|
@@ -314,6 +329,7 @@ interface okx {
|
|
|
314
329
|
privatePostAccountPositionBuilder(params?: {}): Promise<implicitReturnType>;
|
|
315
330
|
privatePostAccountPositionBuilderGraph(params?: {}): Promise<implicitReturnType>;
|
|
316
331
|
privatePostAccountSetRiskOffsetType(params?: {}): Promise<implicitReturnType>;
|
|
332
|
+
privatePostAccountSetRiskOffsetAmt(params?: {}): Promise<implicitReturnType>;
|
|
317
333
|
privatePostAccountActivateOption(params?: {}): Promise<implicitReturnType>;
|
|
318
334
|
privatePostAccountSetAutoLoan(params?: {}): Promise<implicitReturnType>;
|
|
319
335
|
privatePostAccountAccountLevelSwitchPreset(params?: {}): Promise<implicitReturnType>;
|
|
@@ -338,6 +354,7 @@ interface okx {
|
|
|
338
354
|
privatePostUsersSubaccountDeleteApikey(params?: {}): Promise<implicitReturnType>;
|
|
339
355
|
privatePostUsersSubaccountSetTransferOut(params?: {}): Promise<implicitReturnType>;
|
|
340
356
|
privatePostTradingBotGridOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
357
|
+
privatePostTradingBotGridCopyOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
341
358
|
privatePostTradingBotGridAmendAlgoBasicParam(params?: {}): Promise<implicitReturnType>;
|
|
342
359
|
privatePostTradingBotGridAmendOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
343
360
|
privatePostTradingBotGridStopOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
@@ -361,6 +378,20 @@ interface okx {
|
|
|
361
378
|
privatePostTradingBotRecurringOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
362
379
|
privatePostTradingBotRecurringAmendOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
363
380
|
privatePostTradingBotRecurringStopOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
381
|
+
privatePostTradingBotDcaCreate(params?: {}): Promise<implicitReturnType>;
|
|
382
|
+
privatePostTradingBotDcaAmendOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
383
|
+
privatePostTradingBotDcaStop(params?: {}): Promise<implicitReturnType>;
|
|
384
|
+
privatePostTradingBotDcaOrdersManualBuy(params?: {}): Promise<implicitReturnType>;
|
|
385
|
+
privatePostTradingBotDcaSettingsReinvestment(params?: {}): Promise<implicitReturnType>;
|
|
386
|
+
privatePostTradingBotDcaSettingsTakeProfit(params?: {}): Promise<implicitReturnType>;
|
|
387
|
+
privatePostTradingBotDcaMarginAdd(params?: {}): Promise<implicitReturnType>;
|
|
388
|
+
privatePostTradingBotDcaMarginReduce(params?: {}): Promise<implicitReturnType>;
|
|
389
|
+
privatePostTradingBotRecurringAddInvestment(params?: {}): Promise<implicitReturnType>;
|
|
390
|
+
privatePostTradingBotRecurringAmendPriceRange(params?: {}): Promise<implicitReturnType>;
|
|
391
|
+
privatePostTradingBotRecurringAmendRecurringAmount(params?: {}): Promise<implicitReturnType>;
|
|
392
|
+
privatePostTradingBotRecurringAmendRecurringTime(params?: {}): Promise<implicitReturnType>;
|
|
393
|
+
privatePostTradingBotRecurringPause(params?: {}): Promise<implicitReturnType>;
|
|
394
|
+
privatePostTradingBotRecurringRestart(params?: {}): Promise<implicitReturnType>;
|
|
364
395
|
privatePostFinanceSavingsPurchaseRedempt(params?: {}): Promise<implicitReturnType>;
|
|
365
396
|
privatePostFinanceSavingsSetLendingRate(params?: {}): Promise<implicitReturnType>;
|
|
366
397
|
privatePostFinanceStakingDefiPurchase(params?: {}): Promise<implicitReturnType>;
|
|
@@ -395,6 +426,9 @@ interface okx {
|
|
|
395
426
|
privatePostBrokerNdRebatePerOrders(params?: {}): Promise<implicitReturnType>;
|
|
396
427
|
privatePostFinanceSfpDcdQuote(params?: {}): Promise<implicitReturnType>;
|
|
397
428
|
privatePostFinanceSfpDcdOrder(params?: {}): Promise<implicitReturnType>;
|
|
429
|
+
privatePostFinanceSfpDcdTrade(params?: {}): Promise<implicitReturnType>;
|
|
430
|
+
privatePostFinanceSfpDcdRedeemQuote(params?: {}): Promise<implicitReturnType>;
|
|
431
|
+
privatePostFinanceSfpDcdRedeem(params?: {}): Promise<implicitReturnType>;
|
|
398
432
|
privatePostBrokerNdReportSubaccountIp(params?: {}): Promise<implicitReturnType>;
|
|
399
433
|
privatePostBrokerDmaSubaccountApikey(params?: {}): Promise<implicitReturnType>;
|
|
400
434
|
privatePostBrokerDmaTrades(params?: {}): Promise<implicitReturnType>;
|
package/js/src/abstract/okx.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ interface Exchange {
|
|
|
12
12
|
publicGetMarketOptionInstrumentFamilyTrades(params?: {}): Promise<implicitReturnType>;
|
|
13
13
|
publicGetMarketPlatform24Volume(params?: {}): Promise<implicitReturnType>;
|
|
14
14
|
publicGetMarketCallAuctionDetail(params?: {}): Promise<implicitReturnType>;
|
|
15
|
+
publicGetMarketCallAuctionDetails(params?: {}): Promise<implicitReturnType>;
|
|
15
16
|
publicGetMarketBooksSbe(params?: {}): Promise<implicitReturnType>;
|
|
16
17
|
publicGetMarketBlockTickers(params?: {}): Promise<implicitReturnType>;
|
|
17
18
|
publicGetMarketBlockTicker(params?: {}): Promise<implicitReturnType>;
|
|
@@ -51,6 +52,9 @@ interface Exchange {
|
|
|
51
52
|
publicGetPublicPremiumHistory(params?: {}): Promise<implicitReturnType>;
|
|
52
53
|
publicGetPublicEconomicCalendar(params?: {}): Promise<implicitReturnType>;
|
|
53
54
|
publicGetPublicMarketDataHistory(params?: {}): Promise<implicitReturnType>;
|
|
55
|
+
publicGetPublicEventContractEvents(params?: {}): Promise<implicitReturnType>;
|
|
56
|
+
publicGetPublicEventContractMarkets(params?: {}): Promise<implicitReturnType>;
|
|
57
|
+
publicGetPublicEventContractSeries(params?: {}): Promise<implicitReturnType>;
|
|
54
58
|
publicGetPublicVipInterestRateLoanQuota(params?: {}): Promise<implicitReturnType>;
|
|
55
59
|
publicGetRubikStatTradingDataSupportCoin(params?: {}): Promise<implicitReturnType>;
|
|
56
60
|
publicGetRubikStatContractsOpenInterestHistory(params?: {}): Promise<implicitReturnType>;
|
|
@@ -58,6 +62,7 @@ interface Exchange {
|
|
|
58
62
|
publicGetRubikStatTakerVolumeContract(params?: {}): Promise<implicitReturnType>;
|
|
59
63
|
publicGetRubikStatMarginLoanRatio(params?: {}): Promise<implicitReturnType>;
|
|
60
64
|
publicGetRubikStatContractsLongShortAccountRatioContractTopTrader(params?: {}): Promise<implicitReturnType>;
|
|
65
|
+
publicGetRubikStatContractsLongShortPositionRatioContractTopTrader(params?: {}): Promise<implicitReturnType>;
|
|
61
66
|
publicGetRubikStatContractsLongShortAccountRatioContract(params?: {}): Promise<implicitReturnType>;
|
|
62
67
|
publicGetRubikStatContractsLongShortAccountRatio(params?: {}): Promise<implicitReturnType>;
|
|
63
68
|
publicGetRubikStatContractsOpenInterestVolume(params?: {}): Promise<implicitReturnType>;
|
|
@@ -95,6 +100,7 @@ interface Exchange {
|
|
|
95
100
|
publicGetCopytradingPublicCopyTraders(params?: {}): Promise<implicitReturnType>;
|
|
96
101
|
publicGetSupportAnnouncements(params?: {}): Promise<implicitReturnType>;
|
|
97
102
|
publicGetSupportAnnouncementsTypes(params?: {}): Promise<implicitReturnType>;
|
|
103
|
+
publicGetSupportAnnouncementTypes(params?: {}): Promise<implicitReturnType>;
|
|
98
104
|
publicPostTradingBotGridMinInvestment(params?: {}): Promise<implicitReturnType>;
|
|
99
105
|
privateGetRfqCounterparties(params?: {}): Promise<implicitReturnType>;
|
|
100
106
|
privateGetRfqMakerInstrumentSettings(params?: {}): Promise<implicitReturnType>;
|
|
@@ -150,6 +156,7 @@ interface Exchange {
|
|
|
150
156
|
privateGetAccountBillsArchive(params?: {}): Promise<implicitReturnType>;
|
|
151
157
|
privateGetAccountBillsHistoryArchive(params?: {}): Promise<implicitReturnType>;
|
|
152
158
|
privateGetAccountConfig(params?: {}): Promise<implicitReturnType>;
|
|
159
|
+
privateGetAccountSubtypes(params?: {}): Promise<implicitReturnType>;
|
|
153
160
|
privateGetAccountMaxSize(params?: {}): Promise<implicitReturnType>;
|
|
154
161
|
privateGetAccountMaxAvailSize(params?: {}): Promise<implicitReturnType>;
|
|
155
162
|
privateGetAccountLeverageInfo(params?: {}): Promise<implicitReturnType>;
|
|
@@ -207,6 +214,11 @@ interface Exchange {
|
|
|
207
214
|
privateGetTradingBotRecurringOrdersAlgoHistory(params?: {}): Promise<implicitReturnType>;
|
|
208
215
|
privateGetTradingBotRecurringOrdersAlgoDetails(params?: {}): Promise<implicitReturnType>;
|
|
209
216
|
privateGetTradingBotRecurringSubOrders(params?: {}): Promise<implicitReturnType>;
|
|
217
|
+
privateGetTradingBotDcaOngoingList(params?: {}): Promise<implicitReturnType>;
|
|
218
|
+
privateGetTradingBotDcaHistoryList(params?: {}): Promise<implicitReturnType>;
|
|
219
|
+
privateGetTradingBotDcaOrders(params?: {}): Promise<implicitReturnType>;
|
|
220
|
+
privateGetTradingBotDcaPositionDetails(params?: {}): Promise<implicitReturnType>;
|
|
221
|
+
privateGetTradingBotDcaCycleList(params?: {}): Promise<implicitReturnType>;
|
|
210
222
|
privateGetFinanceSavingsBalance(params?: {}): Promise<implicitReturnType>;
|
|
211
223
|
privateGetFinanceSavingsLendingHistory(params?: {}): Promise<implicitReturnType>;
|
|
212
224
|
privateGetFinanceStakingDefiOffers(params?: {}): Promise<implicitReturnType>;
|
|
@@ -252,6 +264,9 @@ interface Exchange {
|
|
|
252
264
|
privateGetBrokerNdRebatePerOrders(params?: {}): Promise<implicitReturnType>;
|
|
253
265
|
privateGetFinanceSfpDcdOrder(params?: {}): Promise<implicitReturnType>;
|
|
254
266
|
privateGetFinanceSfpDcdOrders(params?: {}): Promise<implicitReturnType>;
|
|
267
|
+
privateGetFinanceSfpDcdCurrencyPair(params?: {}): Promise<implicitReturnType>;
|
|
268
|
+
privateGetFinanceSfpDcdOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
269
|
+
privateGetFinanceSfpDcdOrderHistory(params?: {}): Promise<implicitReturnType>;
|
|
255
270
|
privateGetAffiliateInviteeDetail(params?: {}): Promise<implicitReturnType>;
|
|
256
271
|
privateGetUsersPartnerIfRebate(params?: {}): Promise<implicitReturnType>;
|
|
257
272
|
privateGetSupportAnnouncements(params?: {}): Promise<implicitReturnType>;
|
|
@@ -314,6 +329,7 @@ interface Exchange {
|
|
|
314
329
|
privatePostAccountPositionBuilder(params?: {}): Promise<implicitReturnType>;
|
|
315
330
|
privatePostAccountPositionBuilderGraph(params?: {}): Promise<implicitReturnType>;
|
|
316
331
|
privatePostAccountSetRiskOffsetType(params?: {}): Promise<implicitReturnType>;
|
|
332
|
+
privatePostAccountSetRiskOffsetAmt(params?: {}): Promise<implicitReturnType>;
|
|
317
333
|
privatePostAccountActivateOption(params?: {}): Promise<implicitReturnType>;
|
|
318
334
|
privatePostAccountSetAutoLoan(params?: {}): Promise<implicitReturnType>;
|
|
319
335
|
privatePostAccountAccountLevelSwitchPreset(params?: {}): Promise<implicitReturnType>;
|
|
@@ -338,6 +354,7 @@ interface Exchange {
|
|
|
338
354
|
privatePostUsersSubaccountDeleteApikey(params?: {}): Promise<implicitReturnType>;
|
|
339
355
|
privatePostUsersSubaccountSetTransferOut(params?: {}): Promise<implicitReturnType>;
|
|
340
356
|
privatePostTradingBotGridOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
357
|
+
privatePostTradingBotGridCopyOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
341
358
|
privatePostTradingBotGridAmendAlgoBasicParam(params?: {}): Promise<implicitReturnType>;
|
|
342
359
|
privatePostTradingBotGridAmendOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
343
360
|
privatePostTradingBotGridStopOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
@@ -361,6 +378,20 @@ interface Exchange {
|
|
|
361
378
|
privatePostTradingBotRecurringOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
362
379
|
privatePostTradingBotRecurringAmendOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
363
380
|
privatePostTradingBotRecurringStopOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
381
|
+
privatePostTradingBotDcaCreate(params?: {}): Promise<implicitReturnType>;
|
|
382
|
+
privatePostTradingBotDcaAmendOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
383
|
+
privatePostTradingBotDcaStop(params?: {}): Promise<implicitReturnType>;
|
|
384
|
+
privatePostTradingBotDcaOrdersManualBuy(params?: {}): Promise<implicitReturnType>;
|
|
385
|
+
privatePostTradingBotDcaSettingsReinvestment(params?: {}): Promise<implicitReturnType>;
|
|
386
|
+
privatePostTradingBotDcaSettingsTakeProfit(params?: {}): Promise<implicitReturnType>;
|
|
387
|
+
privatePostTradingBotDcaMarginAdd(params?: {}): Promise<implicitReturnType>;
|
|
388
|
+
privatePostTradingBotDcaMarginReduce(params?: {}): Promise<implicitReturnType>;
|
|
389
|
+
privatePostTradingBotRecurringAddInvestment(params?: {}): Promise<implicitReturnType>;
|
|
390
|
+
privatePostTradingBotRecurringAmendPriceRange(params?: {}): Promise<implicitReturnType>;
|
|
391
|
+
privatePostTradingBotRecurringAmendRecurringAmount(params?: {}): Promise<implicitReturnType>;
|
|
392
|
+
privatePostTradingBotRecurringAmendRecurringTime(params?: {}): Promise<implicitReturnType>;
|
|
393
|
+
privatePostTradingBotRecurringPause(params?: {}): Promise<implicitReturnType>;
|
|
394
|
+
privatePostTradingBotRecurringRestart(params?: {}): Promise<implicitReturnType>;
|
|
364
395
|
privatePostFinanceSavingsPurchaseRedempt(params?: {}): Promise<implicitReturnType>;
|
|
365
396
|
privatePostFinanceSavingsSetLendingRate(params?: {}): Promise<implicitReturnType>;
|
|
366
397
|
privatePostFinanceStakingDefiPurchase(params?: {}): Promise<implicitReturnType>;
|
|
@@ -395,6 +426,9 @@ interface Exchange {
|
|
|
395
426
|
privatePostBrokerNdRebatePerOrders(params?: {}): Promise<implicitReturnType>;
|
|
396
427
|
privatePostFinanceSfpDcdQuote(params?: {}): Promise<implicitReturnType>;
|
|
397
428
|
privatePostFinanceSfpDcdOrder(params?: {}): Promise<implicitReturnType>;
|
|
429
|
+
privatePostFinanceSfpDcdTrade(params?: {}): Promise<implicitReturnType>;
|
|
430
|
+
privatePostFinanceSfpDcdRedeemQuote(params?: {}): Promise<implicitReturnType>;
|
|
431
|
+
privatePostFinanceSfpDcdRedeem(params?: {}): Promise<implicitReturnType>;
|
|
398
432
|
privatePostBrokerNdReportSubaccountIp(params?: {}): Promise<implicitReturnType>;
|
|
399
433
|
privatePostBrokerDmaSubaccountApikey(params?: {}): Promise<implicitReturnType>;
|
|
400
434
|
privatePostBrokerDmaTrades(params?: {}): Promise<implicitReturnType>;
|
|
@@ -12,6 +12,7 @@ interface okx {
|
|
|
12
12
|
publicGetMarketOptionInstrumentFamilyTrades(params?: {}): Promise<implicitReturnType>;
|
|
13
13
|
publicGetMarketPlatform24Volume(params?: {}): Promise<implicitReturnType>;
|
|
14
14
|
publicGetMarketCallAuctionDetail(params?: {}): Promise<implicitReturnType>;
|
|
15
|
+
publicGetMarketCallAuctionDetails(params?: {}): Promise<implicitReturnType>;
|
|
15
16
|
publicGetMarketBooksSbe(params?: {}): Promise<implicitReturnType>;
|
|
16
17
|
publicGetMarketBlockTickers(params?: {}): Promise<implicitReturnType>;
|
|
17
18
|
publicGetMarketBlockTicker(params?: {}): Promise<implicitReturnType>;
|
|
@@ -51,6 +52,9 @@ interface okx {
|
|
|
51
52
|
publicGetPublicPremiumHistory(params?: {}): Promise<implicitReturnType>;
|
|
52
53
|
publicGetPublicEconomicCalendar(params?: {}): Promise<implicitReturnType>;
|
|
53
54
|
publicGetPublicMarketDataHistory(params?: {}): Promise<implicitReturnType>;
|
|
55
|
+
publicGetPublicEventContractEvents(params?: {}): Promise<implicitReturnType>;
|
|
56
|
+
publicGetPublicEventContractMarkets(params?: {}): Promise<implicitReturnType>;
|
|
57
|
+
publicGetPublicEventContractSeries(params?: {}): Promise<implicitReturnType>;
|
|
54
58
|
publicGetPublicVipInterestRateLoanQuota(params?: {}): Promise<implicitReturnType>;
|
|
55
59
|
publicGetRubikStatTradingDataSupportCoin(params?: {}): Promise<implicitReturnType>;
|
|
56
60
|
publicGetRubikStatContractsOpenInterestHistory(params?: {}): Promise<implicitReturnType>;
|
|
@@ -58,6 +62,7 @@ interface okx {
|
|
|
58
62
|
publicGetRubikStatTakerVolumeContract(params?: {}): Promise<implicitReturnType>;
|
|
59
63
|
publicGetRubikStatMarginLoanRatio(params?: {}): Promise<implicitReturnType>;
|
|
60
64
|
publicGetRubikStatContractsLongShortAccountRatioContractTopTrader(params?: {}): Promise<implicitReturnType>;
|
|
65
|
+
publicGetRubikStatContractsLongShortPositionRatioContractTopTrader(params?: {}): Promise<implicitReturnType>;
|
|
61
66
|
publicGetRubikStatContractsLongShortAccountRatioContract(params?: {}): Promise<implicitReturnType>;
|
|
62
67
|
publicGetRubikStatContractsLongShortAccountRatio(params?: {}): Promise<implicitReturnType>;
|
|
63
68
|
publicGetRubikStatContractsOpenInterestVolume(params?: {}): Promise<implicitReturnType>;
|
|
@@ -95,6 +100,7 @@ interface okx {
|
|
|
95
100
|
publicGetCopytradingPublicCopyTraders(params?: {}): Promise<implicitReturnType>;
|
|
96
101
|
publicGetSupportAnnouncements(params?: {}): Promise<implicitReturnType>;
|
|
97
102
|
publicGetSupportAnnouncementsTypes(params?: {}): Promise<implicitReturnType>;
|
|
103
|
+
publicGetSupportAnnouncementTypes(params?: {}): Promise<implicitReturnType>;
|
|
98
104
|
publicPostTradingBotGridMinInvestment(params?: {}): Promise<implicitReturnType>;
|
|
99
105
|
privateGetRfqCounterparties(params?: {}): Promise<implicitReturnType>;
|
|
100
106
|
privateGetRfqMakerInstrumentSettings(params?: {}): Promise<implicitReturnType>;
|
|
@@ -150,6 +156,7 @@ interface okx {
|
|
|
150
156
|
privateGetAccountBillsArchive(params?: {}): Promise<implicitReturnType>;
|
|
151
157
|
privateGetAccountBillsHistoryArchive(params?: {}): Promise<implicitReturnType>;
|
|
152
158
|
privateGetAccountConfig(params?: {}): Promise<implicitReturnType>;
|
|
159
|
+
privateGetAccountSubtypes(params?: {}): Promise<implicitReturnType>;
|
|
153
160
|
privateGetAccountMaxSize(params?: {}): Promise<implicitReturnType>;
|
|
154
161
|
privateGetAccountMaxAvailSize(params?: {}): Promise<implicitReturnType>;
|
|
155
162
|
privateGetAccountLeverageInfo(params?: {}): Promise<implicitReturnType>;
|
|
@@ -207,6 +214,11 @@ interface okx {
|
|
|
207
214
|
privateGetTradingBotRecurringOrdersAlgoHistory(params?: {}): Promise<implicitReturnType>;
|
|
208
215
|
privateGetTradingBotRecurringOrdersAlgoDetails(params?: {}): Promise<implicitReturnType>;
|
|
209
216
|
privateGetTradingBotRecurringSubOrders(params?: {}): Promise<implicitReturnType>;
|
|
217
|
+
privateGetTradingBotDcaOngoingList(params?: {}): Promise<implicitReturnType>;
|
|
218
|
+
privateGetTradingBotDcaHistoryList(params?: {}): Promise<implicitReturnType>;
|
|
219
|
+
privateGetTradingBotDcaOrders(params?: {}): Promise<implicitReturnType>;
|
|
220
|
+
privateGetTradingBotDcaPositionDetails(params?: {}): Promise<implicitReturnType>;
|
|
221
|
+
privateGetTradingBotDcaCycleList(params?: {}): Promise<implicitReturnType>;
|
|
210
222
|
privateGetFinanceSavingsBalance(params?: {}): Promise<implicitReturnType>;
|
|
211
223
|
privateGetFinanceSavingsLendingHistory(params?: {}): Promise<implicitReturnType>;
|
|
212
224
|
privateGetFinanceStakingDefiOffers(params?: {}): Promise<implicitReturnType>;
|
|
@@ -252,6 +264,9 @@ interface okx {
|
|
|
252
264
|
privateGetBrokerNdRebatePerOrders(params?: {}): Promise<implicitReturnType>;
|
|
253
265
|
privateGetFinanceSfpDcdOrder(params?: {}): Promise<implicitReturnType>;
|
|
254
266
|
privateGetFinanceSfpDcdOrders(params?: {}): Promise<implicitReturnType>;
|
|
267
|
+
privateGetFinanceSfpDcdCurrencyPair(params?: {}): Promise<implicitReturnType>;
|
|
268
|
+
privateGetFinanceSfpDcdOrderStatus(params?: {}): Promise<implicitReturnType>;
|
|
269
|
+
privateGetFinanceSfpDcdOrderHistory(params?: {}): Promise<implicitReturnType>;
|
|
255
270
|
privateGetAffiliateInviteeDetail(params?: {}): Promise<implicitReturnType>;
|
|
256
271
|
privateGetUsersPartnerIfRebate(params?: {}): Promise<implicitReturnType>;
|
|
257
272
|
privateGetSupportAnnouncements(params?: {}): Promise<implicitReturnType>;
|
|
@@ -314,6 +329,7 @@ interface okx {
|
|
|
314
329
|
privatePostAccountPositionBuilder(params?: {}): Promise<implicitReturnType>;
|
|
315
330
|
privatePostAccountPositionBuilderGraph(params?: {}): Promise<implicitReturnType>;
|
|
316
331
|
privatePostAccountSetRiskOffsetType(params?: {}): Promise<implicitReturnType>;
|
|
332
|
+
privatePostAccountSetRiskOffsetAmt(params?: {}): Promise<implicitReturnType>;
|
|
317
333
|
privatePostAccountActivateOption(params?: {}): Promise<implicitReturnType>;
|
|
318
334
|
privatePostAccountSetAutoLoan(params?: {}): Promise<implicitReturnType>;
|
|
319
335
|
privatePostAccountAccountLevelSwitchPreset(params?: {}): Promise<implicitReturnType>;
|
|
@@ -338,6 +354,7 @@ interface okx {
|
|
|
338
354
|
privatePostUsersSubaccountDeleteApikey(params?: {}): Promise<implicitReturnType>;
|
|
339
355
|
privatePostUsersSubaccountSetTransferOut(params?: {}): Promise<implicitReturnType>;
|
|
340
356
|
privatePostTradingBotGridOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
357
|
+
privatePostTradingBotGridCopyOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
341
358
|
privatePostTradingBotGridAmendAlgoBasicParam(params?: {}): Promise<implicitReturnType>;
|
|
342
359
|
privatePostTradingBotGridAmendOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
343
360
|
privatePostTradingBotGridStopOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
@@ -361,6 +378,20 @@ interface okx {
|
|
|
361
378
|
privatePostTradingBotRecurringOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
362
379
|
privatePostTradingBotRecurringAmendOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
363
380
|
privatePostTradingBotRecurringStopOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
381
|
+
privatePostTradingBotDcaCreate(params?: {}): Promise<implicitReturnType>;
|
|
382
|
+
privatePostTradingBotDcaAmendOrderAlgo(params?: {}): Promise<implicitReturnType>;
|
|
383
|
+
privatePostTradingBotDcaStop(params?: {}): Promise<implicitReturnType>;
|
|
384
|
+
privatePostTradingBotDcaOrdersManualBuy(params?: {}): Promise<implicitReturnType>;
|
|
385
|
+
privatePostTradingBotDcaSettingsReinvestment(params?: {}): Promise<implicitReturnType>;
|
|
386
|
+
privatePostTradingBotDcaSettingsTakeProfit(params?: {}): Promise<implicitReturnType>;
|
|
387
|
+
privatePostTradingBotDcaMarginAdd(params?: {}): Promise<implicitReturnType>;
|
|
388
|
+
privatePostTradingBotDcaMarginReduce(params?: {}): Promise<implicitReturnType>;
|
|
389
|
+
privatePostTradingBotRecurringAddInvestment(params?: {}): Promise<implicitReturnType>;
|
|
390
|
+
privatePostTradingBotRecurringAmendPriceRange(params?: {}): Promise<implicitReturnType>;
|
|
391
|
+
privatePostTradingBotRecurringAmendRecurringAmount(params?: {}): Promise<implicitReturnType>;
|
|
392
|
+
privatePostTradingBotRecurringAmendRecurringTime(params?: {}): Promise<implicitReturnType>;
|
|
393
|
+
privatePostTradingBotRecurringPause(params?: {}): Promise<implicitReturnType>;
|
|
394
|
+
privatePostTradingBotRecurringRestart(params?: {}): Promise<implicitReturnType>;
|
|
364
395
|
privatePostFinanceSavingsPurchaseRedempt(params?: {}): Promise<implicitReturnType>;
|
|
365
396
|
privatePostFinanceSavingsSetLendingRate(params?: {}): Promise<implicitReturnType>;
|
|
366
397
|
privatePostFinanceStakingDefiPurchase(params?: {}): Promise<implicitReturnType>;
|
|
@@ -395,6 +426,9 @@ interface okx {
|
|
|
395
426
|
privatePostBrokerNdRebatePerOrders(params?: {}): Promise<implicitReturnType>;
|
|
396
427
|
privatePostFinanceSfpDcdQuote(params?: {}): Promise<implicitReturnType>;
|
|
397
428
|
privatePostFinanceSfpDcdOrder(params?: {}): Promise<implicitReturnType>;
|
|
429
|
+
privatePostFinanceSfpDcdTrade(params?: {}): Promise<implicitReturnType>;
|
|
430
|
+
privatePostFinanceSfpDcdRedeemQuote(params?: {}): Promise<implicitReturnType>;
|
|
431
|
+
privatePostFinanceSfpDcdRedeem(params?: {}): Promise<implicitReturnType>;
|
|
398
432
|
privatePostBrokerNdReportSubaccountIp(params?: {}): Promise<implicitReturnType>;
|
|
399
433
|
privatePostBrokerDmaSubaccountApikey(params?: {}): Promise<implicitReturnType>;
|
|
400
434
|
privatePostBrokerDmaTrades(params?: {}): Promise<implicitReturnType>;
|
|
@@ -414,7 +414,8 @@ export default class Exchange {
|
|
|
414
414
|
binaryLength(binary: Uint8Array): number;
|
|
415
415
|
lockId(): any;
|
|
416
416
|
unlockId(): any;
|
|
417
|
-
loadLighterLibrary(libraryPath: any, chainId: any, privateKey: any, apiKeyIndex: any, accountIndex: any): Promise<{}>;
|
|
417
|
+
loadLighterLibrary(libraryPath: any, chainId: any, privateKey: any, apiKeyIndex: any, accountIndex: any, createClient?: boolean): Promise<{}>;
|
|
418
|
+
lighterCreateClient(signer: any, chainId: any, privateKey: any, apiKeyIndex: any, accountIndex: any): any;
|
|
418
419
|
lighterSignCreateGroupedOrders(signer: any, request: any): any[];
|
|
419
420
|
lighterSignCreateOrder(signer: any, request: any): any[];
|
|
420
421
|
checkLighterSignedError(result: any): void;
|
|
@@ -427,6 +428,9 @@ export default class Exchange {
|
|
|
427
428
|
lighterSignUpdateLeverage(signer: any, request: any): any[];
|
|
428
429
|
lighterCreateAuthToken(signer: any, request: any): string;
|
|
429
430
|
lighterSignUpdateMargin(signer: any, request: any): any[];
|
|
431
|
+
lighterSignApproveIntegrator(signer: any, request: any): any[];
|
|
432
|
+
lighterGenerateApiKey(signer: any): any[];
|
|
433
|
+
lighterSignChangePubkey(signer: any, request: any): any[];
|
|
430
434
|
describe(): any;
|
|
431
435
|
safeBoolN(dictionaryOrList: any, keys: IndexType[], defaultValue?: boolean): boolean | undefined;
|
|
432
436
|
safeBool2(dictionary: any, key1: IndexType, key2: IndexType, defaultValue?: boolean): boolean | undefined;
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -1599,7 +1599,7 @@ export default class Exchange {
|
|
|
1599
1599
|
unlockId() {
|
|
1600
1600
|
return undefined; // c# stub
|
|
1601
1601
|
}
|
|
1602
|
-
async loadLighterLibrary(libraryPath, chainId, privateKey, apiKeyIndex, accountIndex) {
|
|
1602
|
+
async loadLighterLibrary(libraryPath, chainId, privateKey, apiKeyIndex, accountIndex, createClient = false) {
|
|
1603
1603
|
// wasmExecPathExample: '/opt/homebrew/opt/go/libexec/lib/wasm/wasm_exec.js';
|
|
1604
1604
|
// libraryPath eg: '/Users/cjg/Git/lighter-go/lighter.wasm';
|
|
1605
1605
|
if (libraryPath === undefined || libraryPath === '') {
|
|
@@ -1619,11 +1619,16 @@ export default class Exchange {
|
|
|
1619
1619
|
const bytes = new Uint8Array(readFile(libraryPath, null)); // it should point to lighter.wasm
|
|
1620
1620
|
const { instance } = await WebAssembly.instantiate(bytes, go.importObject);
|
|
1621
1621
|
go.run(instance);
|
|
1622
|
-
|
|
1622
|
+
if (createClient) {
|
|
1623
|
+
this.lighterCreateClient(undefined, chainId, privateKey, apiKeyIndex, accountIndex);
|
|
1624
|
+
}
|
|
1625
|
+
return {}; // empty object we will read it from globalThis
|
|
1626
|
+
}
|
|
1627
|
+
lighterCreateClient(signer, chainId, privateKey, apiKeyIndex, accountIndex) {
|
|
1623
1628
|
const url = this.implodeHostname(this.urls['api']['public']);
|
|
1624
1629
|
const res = globalThis.CreateClient(url, privateKey, chainId, apiKeyIndex, accountIndex);
|
|
1625
1630
|
this.checkLighterSignedError(res);
|
|
1626
|
-
return
|
|
1631
|
+
return signer;
|
|
1627
1632
|
}
|
|
1628
1633
|
// eslint-disable-next-line no-unused-vars
|
|
1629
1634
|
lighterSignCreateGroupedOrders(signer, request) {
|
|
@@ -1644,13 +1649,15 @@ export default class Exchange {
|
|
|
1644
1649
|
'OrderExpiry': order['order_expiry'],
|
|
1645
1650
|
});
|
|
1646
1651
|
}
|
|
1647
|
-
const res = globalThis.SignCreateGroupedOrders(request['grouping_type'], ordersArr, orders.length,
|
|
1652
|
+
const res = globalThis.SignCreateGroupedOrders(request['grouping_type'], ordersArr, orders.length, 0, // skip nonce
|
|
1653
|
+
request['nonce'], request['api_key_index'], request['account_index']);
|
|
1648
1654
|
this.checkLighterSignedError(res);
|
|
1649
1655
|
return [res.txType, res.txInfo];
|
|
1650
1656
|
}
|
|
1651
1657
|
// eslint-disable-next-line no-unused-vars
|
|
1652
1658
|
lighterSignCreateOrder(signer, request) {
|
|
1653
|
-
const res = (globalThis.SignCreateOrder(parseInt(request['market_index']), request['client_order_index'], request['base_amount'], request['avg_execution_price'], request['is_ask'], request['order_type'], request['time_in_force'], request['reduce_only'], request['trigger_price'], request['order_expiry'], request['
|
|
1659
|
+
const res = (globalThis.SignCreateOrder(parseInt(request['market_index']), request['client_order_index'], request['base_amount'], request['avg_execution_price'], request['is_ask'], request['order_type'], request['time_in_force'], request['reduce_only'], request['trigger_price'], request['order_expiry'], request['integrator_account_index'], request['integrator_taker_fee'], request['integrator_maker_fee'], 0, // skip nonce
|
|
1660
|
+
request['nonce'], request['api_key_index'], request['account_index']));
|
|
1654
1661
|
this.checkLighterSignedError(res);
|
|
1655
1662
|
return [res.txType, res.txInfo];
|
|
1656
1663
|
}
|
|
@@ -1660,38 +1667,45 @@ export default class Exchange {
|
|
|
1660
1667
|
}
|
|
1661
1668
|
}
|
|
1662
1669
|
lighterSignCancelOrder(signer, request) {
|
|
1663
|
-
const res = (globalThis.SignCancelOrder(request['market_index'], request['order_index'],
|
|
1670
|
+
const res = (globalThis.SignCancelOrder(request['market_index'], request['order_index'], 0, // skip nonce
|
|
1671
|
+
request['nonce'], request['api_key_index'], request['account_index']));
|
|
1664
1672
|
this.checkLighterSignedError(res);
|
|
1665
1673
|
return [res.txType, res.txInfo];
|
|
1666
1674
|
}
|
|
1667
1675
|
lighterSignWithdraw(signer, request) {
|
|
1668
|
-
const res = (globalThis.SignWithdraw(request['asset_index'], request['route_type'], request['amount'],
|
|
1676
|
+
const res = (globalThis.SignWithdraw(request['asset_index'], request['route_type'], request['amount'], 0, // skip nonce
|
|
1677
|
+
request['nonce'], request['api_key_index'], request['account_index']));
|
|
1669
1678
|
this.checkLighterSignedError(res);
|
|
1670
1679
|
return [res.txType, res.txInfo];
|
|
1671
1680
|
}
|
|
1672
1681
|
// eslint-disable-next-line no-unused-vars
|
|
1673
1682
|
lighterSignCreateSubAccount(signer, request) {
|
|
1674
|
-
const res = (globalThis.SignCreateSubAccount(
|
|
1683
|
+
const res = (globalThis.SignCreateSubAccount(0, // skip nonce
|
|
1684
|
+
request['nonce'], request['api_key_index'], request['account_index']));
|
|
1675
1685
|
this.checkLighterSignedError(res);
|
|
1676
1686
|
return [res.txType, res.txInfo];
|
|
1677
1687
|
}
|
|
1678
1688
|
lighterSignCancelAllOrders(signer, request) {
|
|
1679
|
-
const res = (globalThis.SignCancelAllOrders(request['time_in_force'], request['time'],
|
|
1689
|
+
const res = (globalThis.SignCancelAllOrders(request['time_in_force'], request['time'], 0, // skip nonce
|
|
1690
|
+
request['nonce'], request['api_key_index'], request['account_index']));
|
|
1680
1691
|
this.checkLighterSignedError(res);
|
|
1681
1692
|
return [res.txType, res.txInfo];
|
|
1682
1693
|
}
|
|
1683
1694
|
lighterSignModifyOrder(signer, request) {
|
|
1684
|
-
const res = (globalThis.SignModifyOrder(request['market_index'], request['index'], request['base_amount'], request['price'], request['trigger_price'], request['
|
|
1695
|
+
const res = (globalThis.SignModifyOrder(request['market_index'], request['index'], request['base_amount'], request['price'], request['trigger_price'], request['integrator_account_index'], request['integrator_taker_fee'], request['integrator_maker_fee'], 0, // skip nonce
|
|
1696
|
+
request['nonce'], request['api_key_index'], request['account_index']));
|
|
1685
1697
|
this.checkLighterSignedError(res);
|
|
1686
1698
|
return [res.txType, res.txInfo];
|
|
1687
1699
|
}
|
|
1688
1700
|
lighterSignTransfer(signer, request) {
|
|
1689
|
-
const res = globalThis.SignTransfer(request['to_account_index'], request['asset_index'], request['from_route_type'], request['to_route_type'], request['amount'], request['usdc_fee'], request['memo'],
|
|
1701
|
+
const res = globalThis.SignTransfer(request['to_account_index'], request['asset_index'], request['from_route_type'], request['to_route_type'], request['amount'], request['usdc_fee'], request['memo'], 0, // skip nonce
|
|
1702
|
+
request['nonce'], request['api_key_index'], request['account_index']);
|
|
1690
1703
|
this.checkLighterSignedError(res);
|
|
1691
1704
|
return [res.txType, res.txInfo];
|
|
1692
1705
|
}
|
|
1693
1706
|
lighterSignUpdateLeverage(signer, request) {
|
|
1694
|
-
const res = (globalThis.SignUpdateLeverage(request['market_index'], request['initial_margin_fraction'], request['margin_mode'],
|
|
1707
|
+
const res = (globalThis.SignUpdateLeverage(request['market_index'], request['initial_margin_fraction'], request['margin_mode'], 0, // skip nonce
|
|
1708
|
+
request['nonce'], request['api_key_index'], request['account_index']));
|
|
1695
1709
|
this.checkLighterSignedError(res);
|
|
1696
1710
|
return [res.txType, res.txInfo];
|
|
1697
1711
|
}
|
|
@@ -1701,10 +1715,31 @@ export default class Exchange {
|
|
|
1701
1715
|
return res.authToken;
|
|
1702
1716
|
}
|
|
1703
1717
|
lighterSignUpdateMargin(signer, request) {
|
|
1704
|
-
const res = globalThis.SignUpdateMargin(request['market_index'], request['usdc_amount'], request['direction'],
|
|
1718
|
+
const res = globalThis.SignUpdateMargin(request['market_index'], request['usdc_amount'], request['direction'], 0, // skip nonce
|
|
1719
|
+
request['nonce'], request['api_key_index'], request['account_index']);
|
|
1705
1720
|
this.checkLighterSignedError(res);
|
|
1706
1721
|
return [res.txType, res.txInfo];
|
|
1707
1722
|
}
|
|
1723
|
+
// eslint-disable-next-line no-unused-vars
|
|
1724
|
+
lighterSignApproveIntegrator(signer, request) {
|
|
1725
|
+
const res = globalThis.SignApproveIntegrator(request['integrator_account_index'], request['integrator_taker_fee'], request['integrator_maker_fee'], request['integrator_taker_fee'], request['integrator_maker_fee'], request['approval_expiry'], 0, // skip nonce
|
|
1726
|
+
request['nonce'], request['api_key_index'], request['account_index']);
|
|
1727
|
+
this.checkLighterSignedError(res);
|
|
1728
|
+
return [res.txType, res.txInfo, res.messageToSign];
|
|
1729
|
+
}
|
|
1730
|
+
// eslint-disable-next-line no-unused-vars
|
|
1731
|
+
lighterGenerateApiKey(signer) {
|
|
1732
|
+
const res = globalThis.GenerateAPIKey();
|
|
1733
|
+
this.checkLighterSignedError(res);
|
|
1734
|
+
return [res.privateKey, res.publicKey];
|
|
1735
|
+
}
|
|
1736
|
+
// eslint-disable-next-line no-unused-vars
|
|
1737
|
+
lighterSignChangePubkey(signer, request) {
|
|
1738
|
+
const res = globalThis.SignChangePubKey(Buffer.from(request['pubkey']).toString(), 0, // skip nonce
|
|
1739
|
+
request['nonce'], request['api_key_index'], request['account_index']);
|
|
1740
|
+
this.checkLighterSignedError(res);
|
|
1741
|
+
return [res.txType, res.txInfo, res.messageToSign];
|
|
1742
|
+
}
|
|
1708
1743
|
/* eslint-enable */
|
|
1709
1744
|
// ------------------------------------------------------------------------
|
|
1710
1745
|
// ########################################################################
|
package/js/src/bitget.js
CHANGED
package/js/src/gate.js
CHANGED
package/js/src/hibachi.js
CHANGED
|
@@ -1739,7 +1739,7 @@ export default class hibachi extends Exchange {
|
|
|
1739
1739
|
// "status": "pending",
|
|
1740
1740
|
// "timestampSec": 1752692872,
|
|
1741
1741
|
// "token": "USDT",
|
|
1742
|
-
// "transactionHash": "
|
|
1742
|
+
// "transactionHash": "0x408e48881e0ba77d8638e3fe57bc06bdec513ddaa8b672e0aefa7e22e2f18b4e",
|
|
1743
1743
|
// "transactionType": "deposit"
|
|
1744
1744
|
// },
|
|
1745
1745
|
// {
|
package/js/src/lighter.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ import type { Dict, FundingRate, FundingRates, Int, int, Market, OHLCV, OrderBoo
|
|
|
6
6
|
*/
|
|
7
7
|
export default class lighter extends Exchange {
|
|
8
8
|
describe(): any;
|
|
9
|
-
loadAccount(chainId: any, privateKey: any, apiKeyIndex:
|
|
9
|
+
loadAccount(chainId: any, privateKey: any, apiKeyIndex: string, accountIndex: string, params?: {}): Promise<any>;
|
|
10
|
+
initAuthObject(strAccountIndex: string, strApiKeyIndex: string): void;
|
|
11
|
+
getLighterPrivateKey(strAccountIndex: string, strApiKeyIndex: string): any;
|
|
10
12
|
/**
|
|
11
13
|
* @method
|
|
12
14
|
* @name lighter#preLoadLighterLibrary
|
|
@@ -15,10 +17,17 @@ export default class lighter extends Exchange {
|
|
|
15
17
|
* @returns {boolean} true if the signer was loaded, false otherwise
|
|
16
18
|
*/
|
|
17
19
|
preLoadLighterLibrary(params?: {}): Promise<boolean>;
|
|
18
|
-
|
|
20
|
+
handleApiKeyIndex(params: object, methodName1: string, optionName1: string, optionName2: string, defaultValue?: any): any[];
|
|
21
|
+
handleAccountIndex(params: object, methodName1: string, optionName1: string, optionName2: string, defaultValue?: any): Promise<any[]>;
|
|
19
22
|
createSubAccount(name: string, params?: {}): Promise<any>;
|
|
20
23
|
createAuth(params?: {}): string;
|
|
21
24
|
pow(n: string, m: string): string;
|
|
25
|
+
hashMessage(message: string): string;
|
|
26
|
+
signHash(hash: any, privateKey: any): string;
|
|
27
|
+
signL1AndPrepareTxInfo(txInfo: any, message: any, privateKey: any): string;
|
|
28
|
+
handleBuilderFeeApproval(accountIndex: number, apiKeyIndex: number): Promise<boolean>;
|
|
29
|
+
approveBuilderFee(builder: number, takerFeeRate: number, makerFeeRate: number, accountIndex: number, apiKeyIndex: number, params?: object): Promise<any>;
|
|
30
|
+
changeApiKey(params?: object): Promise<any>;
|
|
22
31
|
setSandboxMode(enable: boolean): void;
|
|
23
32
|
createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any[];
|
|
24
33
|
fetchNonce(accountIndex: any, apiKeyIndex: any, params?: {}): Promise<number>;
|