okx-api 3.1.3 → 3.1.5
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 +2 -0
- package/dist/cjs/index.d.ts +6 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/rest-client.d.ts +87 -33
- package/dist/cjs/rest-client.js +111 -4
- package/dist/cjs/rest-client.js.map +1 -1
- package/dist/cjs/types/rest/client.d.ts +1 -0
- package/dist/cjs/types/rest/request/account.d.ts +13 -1
- package/dist/cjs/types/rest/request/affiliate.d.ts +52 -0
- package/dist/cjs/types/rest/request/affiliate.js +3 -0
- package/dist/cjs/types/rest/request/affiliate.js.map +1 -0
- package/dist/cjs/types/rest/request/dual-investment.d.ts +35 -0
- package/dist/cjs/types/rest/request/dual-investment.js +3 -0
- package/dist/cjs/types/rest/request/dual-investment.js.map +1 -0
- package/dist/cjs/types/rest/request/funding.d.ts +8 -0
- package/dist/cjs/types/rest/request/public.d.ts +45 -0
- package/dist/cjs/types/rest/request/stable-rewards.d.ts +27 -0
- package/dist/cjs/types/rest/request/stable-rewards.js +3 -0
- package/dist/cjs/types/rest/request/stable-rewards.js.map +1 -0
- package/dist/cjs/types/rest/request/trade.d.ts +70 -49
- package/dist/cjs/types/rest/response/private-account.d.ts +34 -4
- package/dist/cjs/types/rest/response/private-affiliate.d.ts +106 -0
- package/dist/cjs/types/rest/response/private-affiliate.js +3 -0
- package/dist/cjs/types/rest/response/private-affiliate.js.map +1 -0
- package/dist/cjs/types/rest/response/private-dual-investment.d.ts +87 -0
- package/dist/cjs/types/rest/response/private-dual-investment.js +3 -0
- package/dist/cjs/types/rest/response/private-dual-investment.js.map +1 -0
- package/dist/cjs/types/rest/response/private-flexible-loan.d.ts +22 -0
- package/dist/cjs/types/rest/response/private-stable-rewards.d.ts +57 -0
- package/dist/cjs/types/rest/response/private-stable-rewards.js +3 -0
- package/dist/cjs/types/rest/response/private-stable-rewards.js.map +1 -0
- package/dist/cjs/types/rest/response/private-trade.d.ts +30 -6
- package/dist/cjs/types/rest/response/public-data.d.ts +138 -3
- package/dist/cjs/types/rest/shared.d.ts +1 -1
- package/dist/cjs/types/shared.d.ts +3 -2
- package/dist/cjs/types/websockets/ws-api-request.d.ts +19 -2
- package/dist/cjs/types/websockets/ws-api-response.d.ts +11 -0
- package/dist/cjs/types/websockets/ws-events.d.ts +1 -0
- package/dist/cjs/types/websockets/ws-general.d.ts +1 -0
- package/dist/cjs/types/websockets/ws-request.d.ts +11 -4
- package/dist/cjs/util/requestUtils.js +3 -0
- package/dist/cjs/util/requestUtils.js.map +1 -1
- package/dist/cjs/util/websocket-util.js +17 -1
- package/dist/cjs/util/websocket-util.js.map +1 -1
- package/dist/cjs/websocket-client.js +2 -1
- package/dist/cjs/websocket-client.js.map +1 -1
- package/dist/mjs/index.d.ts +6 -0
- package/dist/mjs/index.js +6 -0
- package/dist/mjs/index.js.map +1 -1
- package/dist/mjs/rest-client.d.ts +87 -33
- package/dist/mjs/rest-client.js +111 -4
- package/dist/mjs/rest-client.js.map +1 -1
- package/dist/mjs/types/rest/client.d.ts +1 -0
- package/dist/mjs/types/rest/request/account.d.ts +13 -1
- package/dist/mjs/types/rest/request/affiliate.d.ts +52 -0
- package/dist/mjs/types/rest/request/affiliate.js +2 -0
- package/dist/mjs/types/rest/request/affiliate.js.map +1 -0
- package/dist/mjs/types/rest/request/dual-investment.d.ts +35 -0
- package/dist/mjs/types/rest/request/dual-investment.js +2 -0
- package/dist/mjs/types/rest/request/dual-investment.js.map +1 -0
- package/dist/mjs/types/rest/request/funding.d.ts +8 -0
- package/dist/mjs/types/rest/request/public.d.ts +45 -0
- package/dist/mjs/types/rest/request/stable-rewards.d.ts +27 -0
- package/dist/mjs/types/rest/request/stable-rewards.js +2 -0
- package/dist/mjs/types/rest/request/stable-rewards.js.map +1 -0
- package/dist/mjs/types/rest/request/trade.d.ts +70 -49
- package/dist/mjs/types/rest/response/private-account.d.ts +34 -4
- package/dist/mjs/types/rest/response/private-affiliate.d.ts +106 -0
- package/dist/mjs/types/rest/response/private-affiliate.js +2 -0
- package/dist/mjs/types/rest/response/private-affiliate.js.map +1 -0
- package/dist/mjs/types/rest/response/private-dual-investment.d.ts +87 -0
- package/dist/mjs/types/rest/response/private-dual-investment.js +2 -0
- package/dist/mjs/types/rest/response/private-dual-investment.js.map +1 -0
- package/dist/mjs/types/rest/response/private-flexible-loan.d.ts +22 -0
- package/dist/mjs/types/rest/response/private-stable-rewards.d.ts +57 -0
- package/dist/mjs/types/rest/response/private-stable-rewards.js +2 -0
- package/dist/mjs/types/rest/response/private-stable-rewards.js.map +1 -0
- package/dist/mjs/types/rest/response/private-trade.d.ts +30 -6
- package/dist/mjs/types/rest/response/public-data.d.ts +138 -3
- package/dist/mjs/types/rest/shared.d.ts +1 -1
- package/dist/mjs/types/shared.d.ts +3 -2
- package/dist/mjs/types/websockets/ws-api-request.d.ts +19 -2
- package/dist/mjs/types/websockets/ws-api-response.d.ts +11 -0
- package/dist/mjs/types/websockets/ws-events.d.ts +1 -0
- package/dist/mjs/types/websockets/ws-general.d.ts +1 -0
- package/dist/mjs/types/websockets/ws-request.d.ts +11 -4
- package/dist/mjs/util/requestUtils.js +3 -0
- package/dist/mjs/util/requestUtils.js.map +1 -1
- package/dist/mjs/util/websocket-util.js +17 -1
- package/dist/mjs/util/websocket-util.js.map +1 -1
- package/dist/mjs/websocket-client.js +2 -1
- package/dist/mjs/websocket-client.js.map +1 -1
- package/llms.txt +7922 -6666
- package/package.json +3 -5
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Node.js & Typescript OKX (OKEX) API & WebSocket SDK
|
|
2
2
|
|
|
3
3
|
[](https://github.com/tiagosiebler/okx-api/actions/workflows/e2etest.yml)
|
|
4
|
+
[](https://deepwiki.com/tiagosiebler/okx-api)
|
|
4
5
|
[][1]
|
|
5
6
|
[][1]
|
|
6
7
|
[][1]
|
|
@@ -43,6 +44,7 @@ Complete, updated & performant Node.js SDK for the OKX(OKEX) APIs and WebSockets
|
|
|
43
44
|
- End to end types.
|
|
44
45
|
- See [examples/ws-api-client.ts](./examples/ws-api-client.ts) for a demonstration.
|
|
45
46
|
- Browser support (via webpack bundle - see "Browser Usage" below).
|
|
47
|
+
- QuickStart Guide: https://siebly.io/sdk/okx/javascript
|
|
46
48
|
|
|
47
49
|
## Table of Contents
|
|
48
50
|
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -3,9 +3,11 @@ export * from './rest-client.js';
|
|
|
3
3
|
export * from './types/rest/client.js';
|
|
4
4
|
export * from './types/rest/shared.js';
|
|
5
5
|
export * from './types/rest/request/account.js';
|
|
6
|
+
export * from './types/rest/request/affiliate.js';
|
|
6
7
|
export * from './types/rest/request/block-trading.js';
|
|
7
8
|
export * from './types/rest/request/convert.js';
|
|
8
9
|
export * from './types/rest/request/copy-trading.js';
|
|
10
|
+
export * from './types/rest/request/dual-investment.js';
|
|
9
11
|
export * from './types/rest/request/funding.js';
|
|
10
12
|
export * from './types/rest/request/grid-trading.js';
|
|
11
13
|
export * from './types/rest/request/public.js';
|
|
@@ -14,16 +16,20 @@ export * from './types/rest/request/shared.js';
|
|
|
14
16
|
export * from './types/rest/request/signal-bot.js';
|
|
15
17
|
export * from './types/rest/request/simple-earn.js';
|
|
16
18
|
export * from './types/rest/request/spread-trading.js';
|
|
19
|
+
export * from './types/rest/request/stable-rewards.js';
|
|
17
20
|
export * from './types/rest/request/subaccount.js';
|
|
18
21
|
export * from './types/rest/request/trade.js';
|
|
19
22
|
export * from './types/rest/response/private-account.js';
|
|
23
|
+
export * from './types/rest/response/private-affiliate.js';
|
|
20
24
|
export * from './types/rest/response/private-block-trading.js';
|
|
21
25
|
export * from './types/rest/response/private-copy-trading.js';
|
|
26
|
+
export * from './types/rest/response/private-dual-investment.js';
|
|
22
27
|
export * from './types/rest/response/private-flexible-loan.js';
|
|
23
28
|
export * from './types/rest/response/private-funding.js';
|
|
24
29
|
export * from './types/rest/response/private-recurring-buy.js';
|
|
25
30
|
export * from './types/rest/response/private-signal-bot.js';
|
|
26
31
|
export * from './types/rest/response/private-spread-trading.js';
|
|
32
|
+
export * from './types/rest/response/private-stable-rewards.js';
|
|
27
33
|
export * from './types/rest/response/private-subaccount.js';
|
|
28
34
|
export * from './types/rest/response/private-trade.js';
|
|
29
35
|
export * from './types/rest/response/public-data.js';
|
package/dist/cjs/index.js
CHANGED
|
@@ -21,9 +21,11 @@ __exportStar(require("./types/rest/client.js"), exports);
|
|
|
21
21
|
__exportStar(require("./types/rest/shared.js"), exports);
|
|
22
22
|
// REST/request
|
|
23
23
|
__exportStar(require("./types/rest/request/account.js"), exports);
|
|
24
|
+
__exportStar(require("./types/rest/request/affiliate.js"), exports);
|
|
24
25
|
__exportStar(require("./types/rest/request/block-trading.js"), exports);
|
|
25
26
|
__exportStar(require("./types/rest/request/convert.js"), exports);
|
|
26
27
|
__exportStar(require("./types/rest/request/copy-trading.js"), exports);
|
|
28
|
+
__exportStar(require("./types/rest/request/dual-investment.js"), exports);
|
|
27
29
|
__exportStar(require("./types/rest/request/funding.js"), exports);
|
|
28
30
|
__exportStar(require("./types/rest/request/grid-trading.js"), exports);
|
|
29
31
|
__exportStar(require("./types/rest/request/public.js"), exports);
|
|
@@ -32,17 +34,21 @@ __exportStar(require("./types/rest/request/shared.js"), exports);
|
|
|
32
34
|
__exportStar(require("./types/rest/request/signal-bot.js"), exports);
|
|
33
35
|
__exportStar(require("./types/rest/request/simple-earn.js"), exports);
|
|
34
36
|
__exportStar(require("./types/rest/request/spread-trading.js"), exports);
|
|
37
|
+
__exportStar(require("./types/rest/request/stable-rewards.js"), exports);
|
|
35
38
|
__exportStar(require("./types/rest/request/subaccount.js"), exports);
|
|
36
39
|
__exportStar(require("./types/rest/request/trade.js"), exports);
|
|
37
40
|
// REST/response
|
|
38
41
|
__exportStar(require("./types/rest/response/private-account.js"), exports);
|
|
42
|
+
__exportStar(require("./types/rest/response/private-affiliate.js"), exports);
|
|
39
43
|
__exportStar(require("./types/rest/response/private-block-trading.js"), exports);
|
|
40
44
|
__exportStar(require("./types/rest/response/private-copy-trading.js"), exports);
|
|
45
|
+
__exportStar(require("./types/rest/response/private-dual-investment.js"), exports);
|
|
41
46
|
__exportStar(require("./types/rest/response/private-flexible-loan.js"), exports);
|
|
42
47
|
__exportStar(require("./types/rest/response/private-funding.js"), exports);
|
|
43
48
|
__exportStar(require("./types/rest/response/private-recurring-buy.js"), exports);
|
|
44
49
|
__exportStar(require("./types/rest/response/private-signal-bot.js"), exports);
|
|
45
50
|
__exportStar(require("./types/rest/response/private-spread-trading.js"), exports);
|
|
51
|
+
__exportStar(require("./types/rest/response/private-stable-rewards.js"), exports);
|
|
46
52
|
__exportStar(require("./types/rest/response/private-subaccount.js"), exports);
|
|
47
53
|
__exportStar(require("./types/rest/response/private-trade.js"), exports);
|
|
48
54
|
__exportStar(require("./types/rest/response/public-data.js"), exports);
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,mDAAiC;AACjC,uBAAuB;AACvB,yDAAuC;AACvC,yDAAuC;AACvC,eAAe;AACf,kEAAgD;AAChD,wEAAsD;AACtD,kEAAgD;AAChD,uEAAqD;AACrD,kEAAgD;AAChD,uEAAqD;AACrD,iEAA+C;AAC/C,wEAAsD;AACtD,iEAA+C;AAC/C,qEAAmD;AACnD,sEAAoD;AACpD,yEAAuD;AACvD,qEAAmD;AACnD,gEAA8C;AAC9C,gBAAgB;AAChB,2EAAyD;AACzD,iFAA+D;AAC/D,gFAA8D;AAC9D,iFAA+D;AAC/D,2EAAyD;AACzD,iFAA+D;AAC/D,8EAA4D;AAC5D,kFAAgE;AAChE,8EAA4D;AAC5D,yEAAuD;AACvD,uEAAqD;AACrD,EAAE;AACF,oDAAkC;AAClC,+DAA6C;AAC7C,uEAAqD;AACrD,wEAAsD;AACtD,kEAAgD;AAChD,mEAAiD;AACjD,mEAAiD;AACjD,mDAAiC;AACjC,uDAAqC;AACrC,2DAAyC;AACzC,oDAAkC;AAClC,4DAA0C;AAC1C,wDAAsC;AACtC,+DAA6C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,mDAAiC;AACjC,uBAAuB;AACvB,yDAAuC;AACvC,yDAAuC;AACvC,eAAe;AACf,kEAAgD;AAChD,oEAAkD;AAClD,wEAAsD;AACtD,kEAAgD;AAChD,uEAAqD;AACrD,0EAAwD;AACxD,kEAAgD;AAChD,uEAAqD;AACrD,iEAA+C;AAC/C,wEAAsD;AACtD,iEAA+C;AAC/C,qEAAmD;AACnD,sEAAoD;AACpD,yEAAuD;AACvD,yEAAuD;AACvD,qEAAmD;AACnD,gEAA8C;AAC9C,gBAAgB;AAChB,2EAAyD;AACzD,6EAA2D;AAC3D,iFAA+D;AAC/D,gFAA8D;AAC9D,mFAAiE;AACjE,iFAA+D;AAC/D,2EAAyD;AACzD,iFAA+D;AAC/D,8EAA4D;AAC5D,kFAAgE;AAChE,kFAAgE;AAChE,8EAA4D;AAC5D,yEAAuD;AACvD,uEAAqD;AACrD,EAAE;AACF,oDAAkC;AAClC,+DAA6C;AAC7C,uEAAqD;AACrD,wEAAsD;AACtD,kEAAgD;AAChD,mEAAiD;AACjD,mEAAiD;AACjD,mDAAiC;AACjC,uDAAqC;AACrC,2DAAyC;AACzC,oDAAkC;AAClC,4DAA0C;AAC1C,wDAAsC;AACtC,+DAA6C"}
|
|
@@ -1,29 +1,35 @@
|
|
|
1
1
|
import { ASSET_BILL_TYPE } from './constants/funding.js';
|
|
2
|
-
import { ChangePositionMarginRequest, GetBorrowRepayHistoryRequest, GetFixedLoanBorrowingOrdersListRequest, GetFixedLoanBorrowQuoteRequest, GetHistoricPositionParams, GetInstrumentsRequest, GetPositionsParams, GetQuickMarginBorrowRepayHistoryRequest, GetVIPInterestRequest, GetVIPLoanOrderDetailRequest, GetVIPLoanOrderListRequest, PositionBuilderRequest, PrecheckSetDeltaNeutralRequest, QuickMarginBorrowRepayRequest, SetFeeTypeRequest, SetLeverageRequest, SetMMPConfigRequest, SetSettleCurrencyRequest, SetTradingConfigRequest, SubmitFixedLoanBorrowingOrderRequest, UpdateFixedLoanBorrowingOrderRequest, WithdrawalHistoryRequest } from './types/rest/request/account.js';
|
|
2
|
+
import { BillsHistoryArchiveRequest, ChangePositionMarginRequest, GetAccountBillSubtypesRequest, GetBorrowRepayHistoryRequest, GetFixedLoanBorrowingOrdersListRequest, GetFixedLoanBorrowQuoteRequest, GetHistoricPositionParams, GetInstrumentsRequest, GetPositionsParams, GetQuickMarginBorrowRepayHistoryRequest, GetVIPInterestRequest, GetVIPLoanOrderDetailRequest, GetVIPLoanOrderListRequest, PositionBuilderRequest, PrecheckSetDeltaNeutralRequest, QuickMarginBorrowRepayRequest, SetFeeTypeRequest, SetLeverageRequest, SetMMPConfigRequest, SetSettleCurrencyRequest, SetTradingConfigRequest, SubmitFixedLoanBorrowingOrderRequest, UpdateFixedLoanBorrowingOrderRequest, WithdrawalHistoryRequest } from './types/rest/request/account.js';
|
|
3
|
+
import { GetAffiliateCoInviterLinkListRequest, GetAffiliateInviteeListRequest, GetAffiliateLinkListRequest, GetAffiliatePerformanceSummaryRequest, GetAffiliateSubAffiliateListRequest, GetInviteeDetailRequest } from './types/rest/request/affiliate.js';
|
|
3
4
|
import { CancelBlockQuoteRequest, CancelBlockRFQRequest, CancelMultipleBlockQuoteRequest, CancelMultipleBlockRFQRequest, CreateBlockQuoteRequest, CreateBlockRFQRequest, ExecuteBlockQuoteRequest, GetBlockQuoteParams, GetBlockRFQSParams, SetMmpConfigRequest, SetQuoteProductsRequest } from './types/rest/request/block-trading.js';
|
|
4
5
|
import { ConvertQuoteEstimateRequest, ConvertTradeRequest } from './types/rest/request/convert.js';
|
|
5
6
|
import { CloseSubpositionRequest, CopySettingsRequest, GetCopyTradersRequest, GetCTBatchLeverageInfoRequest, GetCTHistoryLeadTradersRequest, GetCTProfitDetailsRequest, GetCurrentSubpositionsRequest, GetLeadTraderPositionsRequest, GetLeadTraderRanksRequest, GetLeadTraderStatsRequest, GetPrivateLeadTraderRanksRequest, GetSubpositionsHistoryRequest, PlaceCTAlgoOrderRequest, SetCTBatchLeverageRequest } from './types/rest/request/copy-trading.js';
|
|
6
|
-
import {
|
|
7
|
+
import { GetDcdOrderHistoryRequest, GetDcdOrderStatusRequest, GetDcdProductsRequest, RequestDcdQuoteRequest, RequestDcdRedeemQuoteRequest, SubmitDcdRedeemRequest, SubmitDcdTradeRequest } from './types/rest/request/dual-investment.js';
|
|
8
|
+
import { FundingRateRequest, FundsTransferRequest, GetDepositHistoryRequest, GetDepositWithdrawStatusRequest, GetFundingRateRequest, WithdrawRequest } from './types/rest/request/funding.js';
|
|
7
9
|
import { CloseContractGridPositionRequest, GetGridAlgoOrdersRequest, GetRSIBackTestingRequest, GridAlgoOrderRequest, GridAlgoOrderType, MaxGridQuantityRequest, StopGridAlgoOrderRequest } from './types/rest/request/grid-trading.js';
|
|
8
|
-
import { CandleRequest, EconomicCalendarRequest, GetContractOpenInterestHistoryRequest, GetContractTakerVolumeRequest, GetOptionTradesRequest, GetPremiumHistoryRequest, GetTopTradersContractLongShortRatioRequest, UnitConvertRequest } from './types/rest/request/public.js';
|
|
10
|
+
import { CandleRequest, EconomicCalendarRequest, GetContractOpenInterestHistoryRequest, GetContractTakerVolumeRequest, GetEventContractEventsRequest, GetEventContractMarketsRequest, GetEventContractSeriesRequest, GetHistoricalMarketDataRequest, GetOptionTradesRequest, GetPremiumHistoryRequest, GetTopTradersContractLongShortRatioRequest, UnitConvertRequest } from './types/rest/request/public.js';
|
|
9
11
|
import { AmendRecurringBuyOrderRequest, GetRecurringBuyOrderListRequest, PlaceRecurringBuyOrderRequest } from './types/rest/request/recurring-buy.js';
|
|
10
12
|
import { PaginatedSymbolRequest } from './types/rest/request/shared.js';
|
|
11
13
|
import { AdjustMarginBalanceRequest, AmendTPSLRequest, CancelSubOrderRequest, CreateSignalBotRequest, CreateSignalRequest, GetSignalBotEventHistoryRequest, GetSignalBotPositionHistoryRequest, GetSignalBotRequest, GetSignalBotSubOrdersRequest, GetSignalsRequest, PlaceSubOrderRequest, SetSignalInstrumentsRequest } from './types/rest/request/signal-bot.js';
|
|
12
14
|
import { GetLendingOrderListRequest, GetLendingSubOrderListRequest, LendingOrder } from './types/rest/request/simple-earn.js';
|
|
13
15
|
import { GetActiveSpreadOrdersRequest, GetSpreadCandlesRequest, GetSpreadOrderHistoryArchiveRequest, GetSpreadOrderHistoryRequest, GetSpreadsRequest, GetSpreadTradesRequest, PlaceSpreadOrderRequest, UpdateSpreadOrderRequest } from './types/rest/request/spread-trading.js';
|
|
16
|
+
import { GetStableRewardsApyHistoryRequest, GetStableRewardsBalanceRequest, GetStableRewardsProductInfoRequest, GetStableRewardsSubscribeRedeemHistoryRequest, RequestStableRewardsQuoteRequest, SubmitStableRewardsTradeRequest } from './types/rest/request/stable-rewards.js';
|
|
14
17
|
import { GetManagedSubAccountTransferHistoryRequest, GetSubAccountMaxWithdrawalsRequest, SetSubAccountLoanAllocationRequest, SubAccountTransferRequest } from './types/rest/request/subaccount.js';
|
|
15
18
|
import { AlgoLongHistoryRequest, AlgoOrderDetailsRequest, AlgoOrderRequest, AlgoRecentHistoryRequest, AmendAlgoOrderRequest, AmendOrderRequest, CancelAlgoOrderRequest, ClosePositionRequest, FillsHistoryRequest, OrderHistoryRequest, OrderIdRequest, OrderPrecheckRequest, OrderRequest } from './types/rest/request/trade.js';
|
|
16
|
-
import { AccountBalance, AccountBill, AccountChangeMarginResult, AccountConfiguration, AccountFeeRate, AccountHistoryBill, AccountInstrument, AccountIsolatedMode, AccountLeverage, AccountLeverageResult, AccountMaxLoan, AccountMaxOrderAmount, AccountMaxTradableAmount, AccountModeResult, AccountPosition, AccountPositionModeResult, AccountPositionRisk, AccountRiskState, AdjustLeverageInfo, AutoLoanResult, BorrowRepayHistoryItem, FixedLoanBorrowingLimit, FixedLoanBorrowQuote, Greeks, HistoricAccountPosition, InterestAccrued, InterestRate, MaxWithdrawal, MMPConfig, PrecheckSetDeltaNeutralResult, QuickMarginBorrowRepayRecord, QuickMarginBorrowRepayResult, SetFeeTypeResult, SetMMPConfigResult, SetSettleCurrencyResult, SetTradingConfigResult, VIPInterest, VIPLoanOrder, VIPLoanOrderDetail } from './types/rest/response/private-account.js';
|
|
19
|
+
import { AccountBalance, AccountBill, AccountBillTypeDefinition, AccountChangeMarginResult, AccountConfiguration, AccountFeeRate, AccountHistoryBill, AccountInstrument, AccountIsolatedMode, AccountLeverage, AccountLeverageResult, AccountMaxLoan, AccountMaxOrderAmount, AccountMaxTradableAmount, AccountModeResult, AccountPosition, AccountPositionModeResult, AccountPositionRisk, AccountRiskState, AdjustLeverageInfo, AutoLoanResult, BorrowRepayHistoryItem, FixedLoanBorrowingLimit, FixedLoanBorrowQuote, Greeks, HistoricAccountPosition, InterestAccrued, InterestRate, MaxWithdrawal, MMPConfig, PrecheckSetDeltaNeutralResult, QuickMarginBorrowRepayRecord, QuickMarginBorrowRepayResult, SetFeeTypeResult, SetMMPConfigResult, SetSettleCurrencyResult, SetTradingConfigResult, VIPInterest, VIPLoanOrder, VIPLoanOrderDetail } from './types/rest/response/private-account.js';
|
|
20
|
+
import { AffiliateCoInviterLinkListItem, AffiliateInviteeListItem, AffiliateLinkListItem, AffiliatePerformanceSummary, AffiliateSubAffiliateListItem, InviteeDetail } from './types/rest/response/private-affiliate.js';
|
|
17
21
|
import { BlockCounterParty, BlockMakerInstrumentSettings, BlockMMPConfig, BlockRFQResult, BlockTradeResult, CancelBlockQuoteResult, CancelBlockRFQResult, CreateBlockQuoteResult, CreateRFQResult, ExecuteBlockQuoteResult, GetBlockQuoteResult, PublicBlockTrade, SetMmpConfigResult } from './types/rest/response/private-block-trading.js';
|
|
18
22
|
import { CurrentSubposition, GetAccountConfigurationResult, GetCopySettingsResult, GetCopyTradersResult, GetCopyTradingConfigResult, GetCTBatchLeverageInfoResult, GetCTHistoryLeadTradersResult, GetCTMyLeadTradersResult, GetCTProfitDetailsResult, GetCTTotalProfitResult, GetCTUnrealizedProfitResult, GetLeadTraderRanksResult, GetPrivateLeadTraderRanksResult, LeadTraderCurrentPosition, LeadTraderPnl, LeadTraderPositionHistory, LeadTraderPreference, LeadTraderStats, PlaceCTAlgoOrderResult, SetCTBatchLeverageResult, SubpositionsHistory } from './types/rest/response/private-copy-trading.js';
|
|
19
|
-
import {
|
|
23
|
+
import { DcdCurrencyPair, DcdOrderHistoryItem, DcdOrderStatus, DcdProduct, DcdQuote, DcdRedeemQuote, DcdRedeemResult, DcdTradeResult } from './types/rest/response/private-dual-investment.js';
|
|
24
|
+
import { AccruedInterestItem, AccruedInterestRequest, AdjustCollateralRequest, CollateralAssetsResponse, GetFlexibleLoanCollateralAssetsRequest, GetLoanInfoRequest, LoanHistoryItem, LoanHistoryRequest, LoanInfo, MaxLoanRequest, MaxLoanResponse } from './types/rest/response/private-flexible-loan.js';
|
|
20
25
|
import { AccountAssetValuation, AssetBillDetails, DepositHistory, FundingBalance, FundingCurrency, FundTransferResult, FundTransferState, NonTradableAsset, WithdrawResponse } from './types/rest/response/private-funding.js';
|
|
21
26
|
import { RecurringBuyOrder, RecurringBuyOrderResult, RecurringBuySubOrder } from './types/rest/response/private-recurring-buy.js';
|
|
22
27
|
import { CancelSignalBotsResult, CreateSignalBotResult, CreateSignalResult, GetSignalsResult } from './types/rest/response/private-signal-bot.js';
|
|
23
28
|
import { CancelSpreadOrderResponse, PlaceSpreadOrderResponse, PublicSpreadTrade, SpreadCandle, SpreadDetails, SpreadOrder, SpreadOrderBook, SpreadTicker, SpreadTrade, UpdateSpreadOrderResponse } from './types/rest/response/private-spread-trading.js';
|
|
29
|
+
import { StableRewardsApyHistoryItem, StableRewardsBalance, StableRewardsProductInfo, StableRewardsQuote, StableRewardsSubscribeRedeemHistoryItem, StableRewardsTradeResult } from './types/rest/response/private-stable-rewards.js';
|
|
24
30
|
import { ManagedSubAccountTransfer, SubAccount, SubAccountAPIReset, SubAccountBalances, SubAccountMaxWithdrawal, SubAccountTransferResult } from './types/rest/response/private-subaccount.js';
|
|
25
31
|
import { AlgoOrderDetailsResult, AlgoOrderListItem, AlgoOrderResult, AmendAlgoOrderResult, AmendedOrder, CancelAllAfterResponse, CancelledOrderResult, ClosedPositions, HistoricAlgoOrder, HistoricOrder, OrderDetails, OrderFill, OrderListItem, OrderResult } from './types/rest/response/private-trade.js';
|
|
26
|
-
import { Announcement, Candle, CandleNoVolume, EconomicCalendarData, IndexTicker, Instrument, InterestRateAndLoanQuota, OptionTrade, OptionTrades, OrderBook, PublicBorrowHistoryRecord, SystemTime, Ticker, Trade, UnitConvertData } from './types/rest/response/public-data.js';
|
|
32
|
+
import { Announcement, Candle, CandleNoVolume, EconomicCalendarData, EstimatedDeliveryExercisePrice, EthStakingProductInfo, EventContractEvent, EventContractMarket, EventContractSeries, FundingRateHistory, IndexTicker, Instrument, InterestRateAndLoanQuota, MarketDataHistoryResult, OptionTrade, OptionTrades, OrderBook, PublicBorrowHistoryRecord, PublicFundingRate, SolStakingProductInfo, SystemTime, Ticker, Trade, UnitConvertData } from './types/rest/response/public-data.js';
|
|
27
33
|
import { AccountLevel, APIResponse, ContractGridDirection, GridAlgoSubOrderType, InstrumentType, MarginMode, numberInString, Pagination, PositionSide, PosMode, TimestampObject } from './types/rest/shared.js';
|
|
28
34
|
import BaseRestClient from './util/BaseRestClient.js';
|
|
29
35
|
export declare class RestClient extends BaseRestClient {
|
|
@@ -64,26 +70,24 @@ export declare class RestClient extends BaseRestClient {
|
|
|
64
70
|
getBills(params?: any): Promise<AccountBill[]>;
|
|
65
71
|
/** Last 3 months */
|
|
66
72
|
getBillsArchive(params?: any): Promise<AccountBill[]>;
|
|
73
|
+
/**
|
|
74
|
+
* Bill type ids and subTypes (unified account bill CSV columns reference `type` / `subType`).
|
|
75
|
+
* @see GET /api/v5/account/subtypes
|
|
76
|
+
*/
|
|
77
|
+
getAccountBillSubtypes(params?: GetAccountBillSubtypesRequest): Promise<AccountBillTypeDefinition[]>;
|
|
67
78
|
/**
|
|
68
79
|
* Apply for bill data since 1 February, 2021 except for the current quarter.
|
|
69
|
-
* Check the
|
|
70
|
-
* During peak demand, data generation may take longer. If the file link is still unavailable after 48 hours, reach out to customer support for assistance.
|
|
80
|
+
* Check the "Get bills details (since 2021)" endpoint in about 2 hours for the download link; in peak load it may take longer, and if still missing after 3 hours contact support.
|
|
71
81
|
* It is only applicable to the data from the unified account.
|
|
72
82
|
*
|
|
73
83
|
* This endpoint submits a request for bill data. You can then use getRequestedBillsHistoryLink to get the link to the bill data.
|
|
74
84
|
* It may take some time to generate the data.
|
|
75
85
|
*/
|
|
76
|
-
requestBillsHistoryDownloadLink(params:
|
|
77
|
-
year: string;
|
|
78
|
-
quarter: 'Q1' | 'Q2' | 'Q3' | 'Q4';
|
|
79
|
-
}): Promise<AccountHistoryBill[]>;
|
|
86
|
+
requestBillsHistoryDownloadLink(params: BillsHistoryArchiveRequest): Promise<AccountHistoryBill[]>;
|
|
80
87
|
/**
|
|
81
88
|
* This endpoint returns the link to the bill data which you can request using requestBillsHistoryDownloadLink.
|
|
82
89
|
*/
|
|
83
|
-
getRequestedBillsHistoryLink(params:
|
|
84
|
-
year: string;
|
|
85
|
-
quarter: 'Q1' | 'Q2' | 'Q3' | 'Q4';
|
|
86
|
-
}): Promise<AccountHistoryBill[]>;
|
|
90
|
+
getRequestedBillsHistoryLink(params: BillsHistoryArchiveRequest): Promise<AccountHistoryBill[]>;
|
|
87
91
|
getAccountConfiguration(): Promise<AccountConfiguration[]>;
|
|
88
92
|
setPositionMode(params: {
|
|
89
93
|
posMode: PosMode;
|
|
@@ -99,6 +103,8 @@ export declare class RestClient extends BaseRestClient {
|
|
|
99
103
|
px?: string;
|
|
100
104
|
leverage?: string;
|
|
101
105
|
unSpotOffset?: boolean;
|
|
106
|
+
/** EVENTS: `yes` / `no` (required for max size when applicable). */
|
|
107
|
+
outcome?: string;
|
|
102
108
|
}): Promise<AccountMaxOrderAmount[]>;
|
|
103
109
|
getMaxAvailableTradableAmount(params: {
|
|
104
110
|
instId: string;
|
|
@@ -776,21 +782,38 @@ export declare class RestClient extends BaseRestClient {
|
|
|
776
782
|
* Public data - rest endpoints
|
|
777
783
|
*
|
|
778
784
|
*/
|
|
779
|
-
getInstruments(params:
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
+
getInstruments(params: GetInstrumentsRequest): Promise<Instrument[]>;
|
|
786
|
+
/**
|
|
787
|
+
* Prediction / event contract series. Auth required (read).
|
|
788
|
+
* @see GET /api/v5/public/event-contract/series
|
|
789
|
+
*/
|
|
790
|
+
getEventContractSeries(params?: GetEventContractSeriesRequest): Promise<EventContractSeries[]>;
|
|
791
|
+
/**
|
|
792
|
+
* Events for a series. Auth required (read).
|
|
793
|
+
* @see GET /api/v5/public/event-contract/events
|
|
794
|
+
*/
|
|
795
|
+
getEventContractEvents(params: GetEventContractEventsRequest): Promise<EventContractEvent[]>;
|
|
796
|
+
/**
|
|
797
|
+
* Markets for events. Auth required (read).
|
|
798
|
+
* @see GET /api/v5/public/event-contract/markets
|
|
799
|
+
*/
|
|
800
|
+
getEventContractMarkets(params: GetEventContractMarketsRequest): Promise<EventContractMarket[]>;
|
|
785
801
|
getDeliveryExerciseHistory(params: any): Promise<any[]>;
|
|
786
802
|
getOpenInterest(params: any): Promise<any[]>;
|
|
787
|
-
getFundingRate(params:
|
|
788
|
-
getFundingRateHistory(params: FundingRateRequest): Promise<
|
|
803
|
+
getFundingRate(params: GetFundingRateRequest): Promise<PublicFundingRate[]>;
|
|
804
|
+
getFundingRateHistory(params: FundingRateRequest): Promise<FundingRateHistory[]>;
|
|
789
805
|
getMinMaxLimitPrice(params: any): Promise<any[]>;
|
|
790
806
|
getOptionMarketData(params: any): Promise<any[]>;
|
|
791
|
-
|
|
807
|
+
/**
|
|
808
|
+
* Estimated delivery or exercise price (FUTURES / OPTION / EVENTS; REST returns one row with `settlePx`).
|
|
809
|
+
* The value is only meaningful shortly before delivery/exercise. The window used for the index mean is 30 minutes (since 2026-03-18; 200ms sampling).
|
|
810
|
+
*/
|
|
811
|
+
getEstimatedDeliveryExercisePrice(params: {
|
|
812
|
+
instId: string;
|
|
813
|
+
}): Promise<EstimatedDeliveryExercisePrice[]>;
|
|
792
814
|
getDiscountRateAndInterestFreeQuota(params: any): Promise<any[]>;
|
|
793
815
|
getSystemTime(params: any): Promise<SystemTime[]>;
|
|
816
|
+
getHistoricalMarketData(params: GetHistoricalMarketDataRequest): Promise<MarketDataHistoryResult[]>;
|
|
794
817
|
getMarkPrice(params: any): Promise<any[]>;
|
|
795
818
|
getPositionTiers(params: any): Promise<any[]>;
|
|
796
819
|
getInterestRateAndLoanQuota(): Promise<InterestRateAndLoanQuota[]>;
|
|
@@ -908,6 +931,8 @@ export declare class RestClient extends BaseRestClient {
|
|
|
908
931
|
ccy?: string;
|
|
909
932
|
type?: `${ASSET_BILL_TYPE}`;
|
|
910
933
|
clientId?: string;
|
|
934
|
+
/** Third-party custody type. Defaults to 1 (Copper) if not specified. */
|
|
935
|
+
thirdPartyType?: '1' | '2' | '5' | '6';
|
|
911
936
|
after?: numberInString;
|
|
912
937
|
before?: numberInString;
|
|
913
938
|
limit?: numberInString;
|
|
@@ -1064,7 +1089,8 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1064
1089
|
* Financial product - ETH staking endpoints
|
|
1065
1090
|
*
|
|
1066
1091
|
*/
|
|
1067
|
-
getETHStakingProductInfo(): Promise<
|
|
1092
|
+
getETHStakingProductInfo(): Promise<EthStakingProductInfo[]>;
|
|
1093
|
+
getSOLStakingProductInfo(): Promise<SolStakingProductInfo>;
|
|
1068
1094
|
purchaseETHStaking(params: {
|
|
1069
1095
|
amt: string;
|
|
1070
1096
|
}): Promise<any[]>;
|
|
@@ -1139,22 +1165,50 @@ export declare class RestClient extends BaseRestClient {
|
|
|
1139
1165
|
getBorrowableCurrencies(): Promise<{
|
|
1140
1166
|
borrowCcy: string;
|
|
1141
1167
|
}[]>;
|
|
1142
|
-
getCollateralAssets(params?:
|
|
1143
|
-
ccy?: string;
|
|
1144
|
-
}): Promise<CollateralAssetsResponse[]>;
|
|
1168
|
+
getCollateralAssets(params?: GetFlexibleLoanCollateralAssetsRequest): Promise<CollateralAssetsResponse[]>;
|
|
1145
1169
|
getMaxLoanAmount(params: MaxLoanRequest): Promise<MaxLoanResponse[]>;
|
|
1146
1170
|
adjustCollateral(params: AdjustCollateralRequest): Promise<[]>;
|
|
1147
|
-
getLoanInfo(): Promise<LoanInfo[]>;
|
|
1171
|
+
getLoanInfo(params?: GetLoanInfoRequest): Promise<LoanInfo[]>;
|
|
1148
1172
|
getLoanHistory(params?: LoanHistoryRequest): Promise<LoanHistoryItem[]>;
|
|
1149
1173
|
getAccruedInterest(params?: AccruedInterestRequest): Promise<AccruedInterestItem[]>;
|
|
1174
|
+
/**
|
|
1175
|
+
*
|
|
1176
|
+
* Financial product — dual investment (DCD) endpoints
|
|
1177
|
+
* @see https://www.okx.com/docs-v5/en/ (2026-03-13 release)
|
|
1178
|
+
*
|
|
1179
|
+
*/
|
|
1180
|
+
getDcdCurrencyPairs(): Promise<DcdCurrencyPair[]>;
|
|
1181
|
+
getDcdProducts(params: GetDcdProductsRequest): Promise<DcdProduct[]>;
|
|
1182
|
+
requestDcdQuote(params: RequestDcdQuoteRequest): Promise<DcdQuote[]>;
|
|
1183
|
+
submitDcdTrade(params: SubmitDcdTradeRequest): Promise<DcdTradeResult[]>;
|
|
1184
|
+
requestDcdRedeemQuote(params: RequestDcdRedeemQuoteRequest): Promise<DcdRedeemQuote[]>;
|
|
1185
|
+
submitDcdRedeem(params: SubmitDcdRedeemRequest): Promise<DcdRedeemResult[]>;
|
|
1186
|
+
getDcdOrderStatus(params: GetDcdOrderStatusRequest): Promise<DcdOrderStatus[]>;
|
|
1187
|
+
getDcdOrderHistory(params?: GetDcdOrderHistoryRequest): Promise<DcdOrderHistoryItem[]>;
|
|
1188
|
+
/**
|
|
1189
|
+
*
|
|
1190
|
+
* Financial product — stable rewards endpoints
|
|
1191
|
+
* @see https://www.okx.com/docs-v5/en/ (2026-04-24 release)
|
|
1192
|
+
*
|
|
1193
|
+
*/
|
|
1194
|
+
getStableRewardsProductInfo(params: GetStableRewardsProductInfoRequest): Promise<StableRewardsProductInfo[]>;
|
|
1195
|
+
requestStableRewardsQuote(params: RequestStableRewardsQuoteRequest): Promise<StableRewardsQuote[]>;
|
|
1196
|
+
submitStableRewardsTrade(params: SubmitStableRewardsTradeRequest): Promise<StableRewardsTradeResult[]>;
|
|
1197
|
+
getStableRewardsBalance(params?: GetStableRewardsBalanceRequest): Promise<StableRewardsBalance[]>;
|
|
1198
|
+
getStableRewardsApyHistory(params: GetStableRewardsApyHistoryRequest): Promise<StableRewardsApyHistoryItem[]>;
|
|
1199
|
+
getStableRewardsSubscribeRedeemHistory(params: GetStableRewardsSubscribeRedeemHistoryRequest): Promise<StableRewardsSubscribeRedeemHistoryItem[]>;
|
|
1150
1200
|
/**
|
|
1151
1201
|
*
|
|
1152
1202
|
* Affiliate endpoints
|
|
1203
|
+
* @see https://www.okx.com/docs-v5/en/ (2026-05-08 release)
|
|
1153
1204
|
*
|
|
1154
1205
|
*/
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1206
|
+
getAffiliatePerformanceSummary(params?: GetAffiliatePerformanceSummaryRequest): Promise<AffiliatePerformanceSummary[]>;
|
|
1207
|
+
getInviteeDetail(params: GetInviteeDetailRequest): Promise<InviteeDetail[]>;
|
|
1208
|
+
getAffiliateInviteeList(params?: GetAffiliateInviteeListRequest): Promise<AffiliateInviteeListItem[]>;
|
|
1209
|
+
getAffiliateLinkList(params?: GetAffiliateLinkListRequest): Promise<AffiliateLinkListItem[]>;
|
|
1210
|
+
getAffiliateCoInviterLinkList(params?: GetAffiliateCoInviterLinkListRequest): Promise<AffiliateCoInviterLinkListItem[]>;
|
|
1211
|
+
getAffiliateSubAffiliateList(params?: GetAffiliateSubAffiliateListRequest): Promise<AffiliateSubAffiliateListItem[]>;
|
|
1158
1212
|
getAffiliateRebateInfo(params: {
|
|
1159
1213
|
apiKey: string;
|
|
1160
1214
|
}): Promise<any[]>;
|
package/dist/cjs/rest-client.js
CHANGED
|
@@ -97,10 +97,16 @@ class RestClient extends BaseRestClient_js_1.default {
|
|
|
97
97
|
getBillsArchive(params) {
|
|
98
98
|
return this.getPrivate('/api/v5/account/bills-archive', params);
|
|
99
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Bill type ids and subTypes (unified account bill CSV columns reference `type` / `subType`).
|
|
102
|
+
* @see GET /api/v5/account/subtypes
|
|
103
|
+
*/
|
|
104
|
+
getAccountBillSubtypes(params) {
|
|
105
|
+
return this.getPrivate('/api/v5/account/subtypes', params);
|
|
106
|
+
}
|
|
100
107
|
/**
|
|
101
108
|
* Apply for bill data since 1 February, 2021 except for the current quarter.
|
|
102
|
-
* Check the
|
|
103
|
-
* During peak demand, data generation may take longer. If the file link is still unavailable after 48 hours, reach out to customer support for assistance.
|
|
109
|
+
* Check the "Get bills details (since 2021)" endpoint in about 2 hours for the download link; in peak load it may take longer, and if still missing after 3 hours contact support.
|
|
104
110
|
* It is only applicable to the data from the unified account.
|
|
105
111
|
*
|
|
106
112
|
* This endpoint submits a request for bill data. You can then use getRequestedBillsHistoryLink to get the link to the bill data.
|
|
@@ -864,6 +870,27 @@ class RestClient extends BaseRestClient_js_1.default {
|
|
|
864
870
|
getInstruments(params) {
|
|
865
871
|
return this.get('/api/v5/public/instruments', params);
|
|
866
872
|
}
|
|
873
|
+
/**
|
|
874
|
+
* Prediction / event contract series. Auth required (read).
|
|
875
|
+
* @see GET /api/v5/public/event-contract/series
|
|
876
|
+
*/
|
|
877
|
+
getEventContractSeries(params) {
|
|
878
|
+
return this.getPrivate('/api/v5/public/event-contract/series', params);
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* Events for a series. Auth required (read).
|
|
882
|
+
* @see GET /api/v5/public/event-contract/events
|
|
883
|
+
*/
|
|
884
|
+
getEventContractEvents(params) {
|
|
885
|
+
return this.getPrivate('/api/v5/public/event-contract/events', params);
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Markets for events. Auth required (read).
|
|
889
|
+
* @see GET /api/v5/public/event-contract/markets
|
|
890
|
+
*/
|
|
891
|
+
getEventContractMarkets(params) {
|
|
892
|
+
return this.getPrivate('/api/v5/public/event-contract/markets', params);
|
|
893
|
+
}
|
|
867
894
|
getDeliveryExerciseHistory(params) {
|
|
868
895
|
return this.get('/api/v5/public/delivery-exercise-history', params);
|
|
869
896
|
}
|
|
@@ -882,6 +909,10 @@ class RestClient extends BaseRestClient_js_1.default {
|
|
|
882
909
|
getOptionMarketData(params) {
|
|
883
910
|
return this.get('/api/v5/public/opt-summary', params);
|
|
884
911
|
}
|
|
912
|
+
/**
|
|
913
|
+
* Estimated delivery or exercise price (FUTURES / OPTION / EVENTS; REST returns one row with `settlePx`).
|
|
914
|
+
* The value is only meaningful shortly before delivery/exercise. The window used for the index mean is 30 minutes (since 2026-03-18; 200ms sampling).
|
|
915
|
+
*/
|
|
885
916
|
getEstimatedDeliveryExercisePrice(params) {
|
|
886
917
|
return this.get('/api/v5/public/estimated-price', params);
|
|
887
918
|
}
|
|
@@ -891,6 +922,9 @@ class RestClient extends BaseRestClient_js_1.default {
|
|
|
891
922
|
getSystemTime(params) {
|
|
892
923
|
return this.get('/api/v5/public/time', params);
|
|
893
924
|
}
|
|
925
|
+
getHistoricalMarketData(params) {
|
|
926
|
+
return this.get('/api/v5/public/market-data-history', params);
|
|
927
|
+
}
|
|
894
928
|
getMarkPrice(params) {
|
|
895
929
|
return this.get('/api/v5/public/mark-price', params);
|
|
896
930
|
}
|
|
@@ -1166,6 +1200,9 @@ class RestClient extends BaseRestClient_js_1.default {
|
|
|
1166
1200
|
getETHStakingProductInfo() {
|
|
1167
1201
|
return this.get('/api/v5/finance/staking-defi/eth/product-info');
|
|
1168
1202
|
}
|
|
1203
|
+
getSOLStakingProductInfo() {
|
|
1204
|
+
return this.get('/api/v5/finance/staking-defi/sol/product-info');
|
|
1205
|
+
}
|
|
1169
1206
|
purchaseETHStaking(params) {
|
|
1170
1207
|
return this.postPrivate('/api/v5/finance/staking-defi/eth/purchase', params);
|
|
1171
1208
|
}
|
|
@@ -1250,8 +1287,8 @@ class RestClient extends BaseRestClient_js_1.default {
|
|
|
1250
1287
|
adjustCollateral(params) {
|
|
1251
1288
|
return this.postPrivate('/api/v5/finance/flexible-loan/adjust-collateral', params);
|
|
1252
1289
|
}
|
|
1253
|
-
getLoanInfo() {
|
|
1254
|
-
return this.getPrivate('/api/v5/finance/flexible-loan/loan-info');
|
|
1290
|
+
getLoanInfo(params) {
|
|
1291
|
+
return this.getPrivate('/api/v5/finance/flexible-loan/loan-info', params);
|
|
1255
1292
|
}
|
|
1256
1293
|
getLoanHistory(params) {
|
|
1257
1294
|
return this.getPrivate('/api/v5/finance/flexible-loan/loan-history', params);
|
|
@@ -1259,14 +1296,84 @@ class RestClient extends BaseRestClient_js_1.default {
|
|
|
1259
1296
|
getAccruedInterest(params) {
|
|
1260
1297
|
return this.getPrivate('/api/v5/finance/flexible-loan/interest-accrued', params);
|
|
1261
1298
|
}
|
|
1299
|
+
/**
|
|
1300
|
+
*
|
|
1301
|
+
* Financial product — dual investment (DCD) endpoints
|
|
1302
|
+
* @see https://www.okx.com/docs-v5/en/ (2026-03-13 release)
|
|
1303
|
+
*
|
|
1304
|
+
*/
|
|
1305
|
+
getDcdCurrencyPairs() {
|
|
1306
|
+
return this.getPrivate('/api/v5/finance/sfp/dcd/currency-pair');
|
|
1307
|
+
}
|
|
1308
|
+
getDcdProducts(params) {
|
|
1309
|
+
return this.getPrivate('/api/v5/finance/sfp/dcd/products', params);
|
|
1310
|
+
}
|
|
1311
|
+
requestDcdQuote(params) {
|
|
1312
|
+
return this.postPrivate('/api/v5/finance/sfp/dcd/quote', params);
|
|
1313
|
+
}
|
|
1314
|
+
submitDcdTrade(params) {
|
|
1315
|
+
return this.postPrivate('/api/v5/finance/sfp/dcd/trade', params);
|
|
1316
|
+
}
|
|
1317
|
+
requestDcdRedeemQuote(params) {
|
|
1318
|
+
return this.postPrivate('/api/v5/finance/sfp/dcd/redeem-quote', params);
|
|
1319
|
+
}
|
|
1320
|
+
submitDcdRedeem(params) {
|
|
1321
|
+
return this.postPrivate('/api/v5/finance/sfp/dcd/redeem', params);
|
|
1322
|
+
}
|
|
1323
|
+
getDcdOrderStatus(params) {
|
|
1324
|
+
return this.getPrivate('/api/v5/finance/sfp/dcd/order-status', params);
|
|
1325
|
+
}
|
|
1326
|
+
getDcdOrderHistory(params) {
|
|
1327
|
+
return this.getPrivate('/api/v5/finance/sfp/dcd/order-history', params);
|
|
1328
|
+
}
|
|
1329
|
+
/**
|
|
1330
|
+
*
|
|
1331
|
+
* Financial product — stable rewards endpoints
|
|
1332
|
+
* @see https://www.okx.com/docs-v5/en/ (2026-04-24 release)
|
|
1333
|
+
*
|
|
1334
|
+
*/
|
|
1335
|
+
getStableRewardsProductInfo(params) {
|
|
1336
|
+
return this.getPrivate('/api/v5/finance/stable-rewards/product-info', params);
|
|
1337
|
+
}
|
|
1338
|
+
requestStableRewardsQuote(params) {
|
|
1339
|
+
return this.postPrivate('/api/v5/finance/stable-rewards/quote', params);
|
|
1340
|
+
}
|
|
1341
|
+
submitStableRewardsTrade(params) {
|
|
1342
|
+
return this.postPrivate('/api/v5/finance/stable-rewards/trade', params);
|
|
1343
|
+
}
|
|
1344
|
+
getStableRewardsBalance(params) {
|
|
1345
|
+
return this.getPrivate('/api/v5/finance/stable-rewards/balance', params);
|
|
1346
|
+
}
|
|
1347
|
+
getStableRewardsApyHistory(params) {
|
|
1348
|
+
return this.get('/api/v5/finance/stable-rewards/apy-history', params);
|
|
1349
|
+
}
|
|
1350
|
+
getStableRewardsSubscribeRedeemHistory(params) {
|
|
1351
|
+
return this.getPrivate('/api/v5/finance/stable-rewards/subscribe-redeem-history', params);
|
|
1352
|
+
}
|
|
1262
1353
|
/**
|
|
1263
1354
|
*
|
|
1264
1355
|
* Affiliate endpoints
|
|
1356
|
+
* @see https://www.okx.com/docs-v5/en/ (2026-05-08 release)
|
|
1265
1357
|
*
|
|
1266
1358
|
*/
|
|
1359
|
+
getAffiliatePerformanceSummary(params) {
|
|
1360
|
+
return this.getPrivate('/api/v5/affiliate/performance/summary', params);
|
|
1361
|
+
}
|
|
1267
1362
|
getInviteeDetail(params) {
|
|
1268
1363
|
return this.getPrivate('/api/v5/affiliate/invitee/detail', params);
|
|
1269
1364
|
}
|
|
1365
|
+
getAffiliateInviteeList(params) {
|
|
1366
|
+
return this.getPrivate('/api/v5/affiliate/invitee/list', params);
|
|
1367
|
+
}
|
|
1368
|
+
getAffiliateLinkList(params) {
|
|
1369
|
+
return this.getPrivate('/api/v5/affiliate/link/list', params);
|
|
1370
|
+
}
|
|
1371
|
+
getAffiliateCoInviterLinkList(params) {
|
|
1372
|
+
return this.getPrivate('/api/v5/affiliate/co-inviter/list', params);
|
|
1373
|
+
}
|
|
1374
|
+
getAffiliateSubAffiliateList(params) {
|
|
1375
|
+
return this.getPrivate('/api/v5/affiliate/sub-affiliate/list', params);
|
|
1376
|
+
}
|
|
1270
1377
|
getAffiliateRebateInfo(params) {
|
|
1271
1378
|
return this.getPrivate('/api/v5/users/partner/if-rebate', params);
|
|
1272
1379
|
}
|