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.
Files changed (95) hide show
  1. package/README.md +2 -0
  2. package/dist/cjs/index.d.ts +6 -0
  3. package/dist/cjs/index.js +6 -0
  4. package/dist/cjs/index.js.map +1 -1
  5. package/dist/cjs/rest-client.d.ts +87 -33
  6. package/dist/cjs/rest-client.js +111 -4
  7. package/dist/cjs/rest-client.js.map +1 -1
  8. package/dist/cjs/types/rest/client.d.ts +1 -0
  9. package/dist/cjs/types/rest/request/account.d.ts +13 -1
  10. package/dist/cjs/types/rest/request/affiliate.d.ts +52 -0
  11. package/dist/cjs/types/rest/request/affiliate.js +3 -0
  12. package/dist/cjs/types/rest/request/affiliate.js.map +1 -0
  13. package/dist/cjs/types/rest/request/dual-investment.d.ts +35 -0
  14. package/dist/cjs/types/rest/request/dual-investment.js +3 -0
  15. package/dist/cjs/types/rest/request/dual-investment.js.map +1 -0
  16. package/dist/cjs/types/rest/request/funding.d.ts +8 -0
  17. package/dist/cjs/types/rest/request/public.d.ts +45 -0
  18. package/dist/cjs/types/rest/request/stable-rewards.d.ts +27 -0
  19. package/dist/cjs/types/rest/request/stable-rewards.js +3 -0
  20. package/dist/cjs/types/rest/request/stable-rewards.js.map +1 -0
  21. package/dist/cjs/types/rest/request/trade.d.ts +70 -49
  22. package/dist/cjs/types/rest/response/private-account.d.ts +34 -4
  23. package/dist/cjs/types/rest/response/private-affiliate.d.ts +106 -0
  24. package/dist/cjs/types/rest/response/private-affiliate.js +3 -0
  25. package/dist/cjs/types/rest/response/private-affiliate.js.map +1 -0
  26. package/dist/cjs/types/rest/response/private-dual-investment.d.ts +87 -0
  27. package/dist/cjs/types/rest/response/private-dual-investment.js +3 -0
  28. package/dist/cjs/types/rest/response/private-dual-investment.js.map +1 -0
  29. package/dist/cjs/types/rest/response/private-flexible-loan.d.ts +22 -0
  30. package/dist/cjs/types/rest/response/private-stable-rewards.d.ts +57 -0
  31. package/dist/cjs/types/rest/response/private-stable-rewards.js +3 -0
  32. package/dist/cjs/types/rest/response/private-stable-rewards.js.map +1 -0
  33. package/dist/cjs/types/rest/response/private-trade.d.ts +30 -6
  34. package/dist/cjs/types/rest/response/public-data.d.ts +138 -3
  35. package/dist/cjs/types/rest/shared.d.ts +1 -1
  36. package/dist/cjs/types/shared.d.ts +3 -2
  37. package/dist/cjs/types/websockets/ws-api-request.d.ts +19 -2
  38. package/dist/cjs/types/websockets/ws-api-response.d.ts +11 -0
  39. package/dist/cjs/types/websockets/ws-events.d.ts +1 -0
  40. package/dist/cjs/types/websockets/ws-general.d.ts +1 -0
  41. package/dist/cjs/types/websockets/ws-request.d.ts +11 -4
  42. package/dist/cjs/util/requestUtils.js +3 -0
  43. package/dist/cjs/util/requestUtils.js.map +1 -1
  44. package/dist/cjs/util/websocket-util.js +17 -1
  45. package/dist/cjs/util/websocket-util.js.map +1 -1
  46. package/dist/cjs/websocket-client.js +2 -1
  47. package/dist/cjs/websocket-client.js.map +1 -1
  48. package/dist/mjs/index.d.ts +6 -0
  49. package/dist/mjs/index.js +6 -0
  50. package/dist/mjs/index.js.map +1 -1
  51. package/dist/mjs/rest-client.d.ts +87 -33
  52. package/dist/mjs/rest-client.js +111 -4
  53. package/dist/mjs/rest-client.js.map +1 -1
  54. package/dist/mjs/types/rest/client.d.ts +1 -0
  55. package/dist/mjs/types/rest/request/account.d.ts +13 -1
  56. package/dist/mjs/types/rest/request/affiliate.d.ts +52 -0
  57. package/dist/mjs/types/rest/request/affiliate.js +2 -0
  58. package/dist/mjs/types/rest/request/affiliate.js.map +1 -0
  59. package/dist/mjs/types/rest/request/dual-investment.d.ts +35 -0
  60. package/dist/mjs/types/rest/request/dual-investment.js +2 -0
  61. package/dist/mjs/types/rest/request/dual-investment.js.map +1 -0
  62. package/dist/mjs/types/rest/request/funding.d.ts +8 -0
  63. package/dist/mjs/types/rest/request/public.d.ts +45 -0
  64. package/dist/mjs/types/rest/request/stable-rewards.d.ts +27 -0
  65. package/dist/mjs/types/rest/request/stable-rewards.js +2 -0
  66. package/dist/mjs/types/rest/request/stable-rewards.js.map +1 -0
  67. package/dist/mjs/types/rest/request/trade.d.ts +70 -49
  68. package/dist/mjs/types/rest/response/private-account.d.ts +34 -4
  69. package/dist/mjs/types/rest/response/private-affiliate.d.ts +106 -0
  70. package/dist/mjs/types/rest/response/private-affiliate.js +2 -0
  71. package/dist/mjs/types/rest/response/private-affiliate.js.map +1 -0
  72. package/dist/mjs/types/rest/response/private-dual-investment.d.ts +87 -0
  73. package/dist/mjs/types/rest/response/private-dual-investment.js +2 -0
  74. package/dist/mjs/types/rest/response/private-dual-investment.js.map +1 -0
  75. package/dist/mjs/types/rest/response/private-flexible-loan.d.ts +22 -0
  76. package/dist/mjs/types/rest/response/private-stable-rewards.d.ts +57 -0
  77. package/dist/mjs/types/rest/response/private-stable-rewards.js +2 -0
  78. package/dist/mjs/types/rest/response/private-stable-rewards.js.map +1 -0
  79. package/dist/mjs/types/rest/response/private-trade.d.ts +30 -6
  80. package/dist/mjs/types/rest/response/public-data.d.ts +138 -3
  81. package/dist/mjs/types/rest/shared.d.ts +1 -1
  82. package/dist/mjs/types/shared.d.ts +3 -2
  83. package/dist/mjs/types/websockets/ws-api-request.d.ts +19 -2
  84. package/dist/mjs/types/websockets/ws-api-response.d.ts +11 -0
  85. package/dist/mjs/types/websockets/ws-events.d.ts +1 -0
  86. package/dist/mjs/types/websockets/ws-general.d.ts +1 -0
  87. package/dist/mjs/types/websockets/ws-request.d.ts +11 -4
  88. package/dist/mjs/util/requestUtils.js +3 -0
  89. package/dist/mjs/util/requestUtils.js.map +1 -1
  90. package/dist/mjs/util/websocket-util.js +17 -1
  91. package/dist/mjs/util/websocket-util.js.map +1 -1
  92. package/dist/mjs/websocket-client.js +2 -1
  93. package/dist/mjs/websocket-client.js.map +1 -1
  94. package/llms.txt +7922 -6666
  95. package/package.json +3 -5
@@ -1,4 +1,5 @@
1
1
  import { AccountLevel, MarginMode, PositionSide, WithdrawState } from '../shared.js';
2
+ import type { InstrumentUpcomingParamChange } from './public-data.js';
2
3
  export interface AccountBalanceDetail {
3
4
  availBal: string;
4
5
  availEq: string;
@@ -164,9 +165,25 @@ export interface AccountBill {
164
165
  earnAmt?: string;
165
166
  earnApr?: string;
166
167
  }
168
+ export interface BillSubTypeDetail {
169
+ subType: string;
170
+ subTypeDesc: string;
171
+ }
172
+ /**
173
+ * @see GET /api/v5/account/subtypes
174
+ */
175
+ export interface AccountBillTypeDefinition {
176
+ type: string;
177
+ typeDesc: string;
178
+ subTypeDetails: BillSubTypeDetail[];
179
+ }
180
+ /**
181
+ * Apply (POST) may return { result, ts }; get link (GET) may return { fileHref, state, ts }.
182
+ */
167
183
  export interface AccountHistoryBill {
168
- fileHref: string;
169
- result: string;
184
+ fileHref?: string;
185
+ result?: string;
186
+ state?: 'finished' | 'ongoing' | 'failed' | string;
170
187
  ts: string;
171
188
  }
172
189
  export interface AccountConfiguration {
@@ -261,6 +278,7 @@ export interface AccountFeeRate {
261
278
  makerU: string;
262
279
  taker: string;
263
280
  takerU: string;
281
+ settle?: string;
264
282
  ts: string;
265
283
  ruleType: string;
266
284
  feeGroup?: FeeGroup[];
@@ -341,6 +359,14 @@ export interface AccountInstrument {
341
359
  instFamily: string;
342
360
  instId: string;
343
361
  instType: string;
362
+ seriesId?: string;
363
+ uly?: string;
364
+ /**
365
+ * FUTURES label (deprecated: prefer `expTime`; may include this_five_years, next_five_years, ...).
366
+ */
367
+ alias?: string;
368
+ /** Deprecated; see `instCategory` on public `Instrument` where used. */
369
+ category?: string;
344
370
  lever: string;
345
371
  listTime: string;
346
372
  contTdSwTime: string;
@@ -360,7 +386,7 @@ export interface AccountInstrument {
360
386
  quoteCcy: string;
361
387
  tradeQuoteCcyList: string[];
362
388
  settleCcy: string;
363
- /** Instrument status: live, suspend, rebase (SWAP only), preopen, test */
389
+ /** Instrument status: live, suspend, rebase (SWAP only), post_only (SWAP only), preopen, test */
364
390
  state: string;
365
391
  stk: string;
366
392
  tickSz: string;
@@ -369,7 +395,10 @@ export interface AccountInstrument {
369
395
  auctionEndTime: string;
370
396
  futureSettlement: boolean;
371
397
  instIdCode: number;
372
- /** Category of instrument's base currency. "1" = Crypto, "3" = Stocks */
398
+ /**
399
+ * Asset category of the instrument's base asset (see public `Instrument.instCategory` for values).
400
+ * 1: Crypto, 3: Stocks, 4: Commodities, 5: Forex, 6: Bonds, "": not available
401
+ */
373
402
  instCategory?: string;
374
403
  posLmtAmt: string;
375
404
  posLmtPct: string;
@@ -381,6 +410,7 @@ export interface AccountInstrument {
381
410
  groupId?: string;
382
411
  /** ELP maker permission. "0" = not enabled, "1" = enabled but no permission, "2" = enabled with permission */
383
412
  elp?: string;
413
+ upcChg?: InstrumentUpcomingParamChange[];
384
414
  }
385
415
  export interface QuickMarginBorrowRepayResult {
386
416
  instId: string;
@@ -0,0 +1,106 @@
1
+ import type { AffiliateCommissionCategory } from '../request/affiliate.js';
2
+ export interface AffiliatePerformanceSummaryDetail {
3
+ commissionCategory: AffiliateCommissionCategory;
4
+ firstTraderCnt: string;
5
+ traderCnt: string;
6
+ vol: string;
7
+ commission: string;
8
+ }
9
+ export interface AffiliatePerformanceSummary {
10
+ uTime: string;
11
+ inviteeCnt: string;
12
+ depAmt: string;
13
+ details: AffiliatePerformanceSummaryDetail[];
14
+ }
15
+ export interface InviteeDetail {
16
+ inviteeLevel: string;
17
+ joinTime: string;
18
+ inviteeRebateRate: string;
19
+ totalCommission: string;
20
+ firstTradeTime: string;
21
+ level: string;
22
+ depAmt: string;
23
+ wdAmt: string;
24
+ volMonth: string;
25
+ totalVol: string;
26
+ accFee: string;
27
+ kycTime: string;
28
+ region: string;
29
+ affiliateCode: string;
30
+ }
31
+ export type AffiliateInviteeListKycStatus = 'unverified' | 'verified';
32
+ export interface AffiliateInviteeListItem {
33
+ uid: string;
34
+ country: string;
35
+ joinTime: string;
36
+ firstTradeTime: string;
37
+ channelName: string;
38
+ rebateRate: string;
39
+ feeTierRank: string;
40
+ kycStatus: AffiliateInviteeListKycStatus;
41
+ kycTime: string;
42
+ depAmt: string;
43
+ totalVol: string;
44
+ totalFee: string;
45
+ totalCommission: string;
46
+ isCompliant: boolean;
47
+ }
48
+ export type AffiliateLinkListLinkType = 'standard' | 'co_inviter';
49
+ export type AffiliateLinkListLinkStatus = 'normal' | 'abnormal';
50
+ export interface AffiliateLinkListItem {
51
+ channelId: string;
52
+ channelName: string;
53
+ joinLink: string;
54
+ linkType: AffiliateLinkListLinkType;
55
+ inviterCommissionRate: string;
56
+ coInviterCommissionRate: string;
57
+ inviteeDiscountRate: string;
58
+ inviteeCnt: string;
59
+ traderCnt: string;
60
+ totalCommission: string;
61
+ commission24h: string;
62
+ cTime: string;
63
+ isDefault: boolean;
64
+ linkStatus: AffiliateLinkListLinkStatus;
65
+ }
66
+ export type AffiliateChannelAssessmentStatus = 'valid' | 'not_reach_trade' | 'not_reach_invite' | 'not_reach_both';
67
+ export type AffiliateInviterChannelStatus = 'valid' | 'identity_invalid' | 'level_downgraded';
68
+ export type AffiliateCoInviterChannelStatus = 'valid' | 'identity_invalid' | 'not_reach_assessment' | 'identity_invalid_and_not_reach_assessment';
69
+ export interface AffiliateCoInviterLinkListItem {
70
+ channelId: string;
71
+ channelName: string;
72
+ joinLink: string;
73
+ inviterCommissionRate: string;
74
+ coInviterCommissionRate: string;
75
+ inviteeDiscountRate: string;
76
+ parUserName: string;
77
+ coUserName: string;
78
+ isCompliant: boolean;
79
+ note?: string;
80
+ isDefault: boolean;
81
+ totalCommission: string;
82
+ commission24h: string;
83
+ inviteeCnt: string;
84
+ traderCnt: string;
85
+ clickCnt: string;
86
+ totalFee: string;
87
+ cTime: string;
88
+ channelAssessmentStatus: AffiliateChannelAssessmentStatus;
89
+ inviterChannelStatus: AffiliateInviterChannelStatus;
90
+ coInviterChannelStatus: AffiliateCoInviterChannelStatus;
91
+ linkStatus: AffiliateLinkListLinkStatus;
92
+ }
93
+ export interface AffiliateSubAffiliateListItem {
94
+ subAffiliateUid: string;
95
+ country: string;
96
+ joinTime: string;
97
+ subAffiliateLevel: string;
98
+ commissionRate: string;
99
+ isCompliant: boolean;
100
+ inviteeCnt: string;
101
+ traderCnt: string;
102
+ depAmt: string;
103
+ totalVol: string;
104
+ totalFee: string;
105
+ totalCommission: string;
106
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=private-affiliate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-affiliate.js","sourceRoot":"","sources":["../../../../../src/types/rest/response/private-affiliate.ts"],"names":[],"mappings":""}
@@ -0,0 +1,87 @@
1
+ export interface DcdCurrencyPair {
2
+ baseCcy: string;
3
+ quoteCcy: string;
4
+ optType: 'C' | 'P';
5
+ uly: string;
6
+ }
7
+ export interface DcdProduct {
8
+ absYield: string;
9
+ annualizedYield: string;
10
+ baseCcy: string;
11
+ quoteCcy: string;
12
+ expTime: string;
13
+ interestAccrualTime: string;
14
+ listTime: string;
15
+ maxSize: string;
16
+ minSize: string;
17
+ notionalCcy: string;
18
+ optType: 'C' | 'P';
19
+ productId: string;
20
+ quoteTime: string;
21
+ redeemEndTime: string;
22
+ redeemStartTime: string;
23
+ stepSz: string;
24
+ tradeEndTime: string;
25
+ strike: string;
26
+ uly: string;
27
+ }
28
+ export interface DcdQuote {
29
+ absYield: string;
30
+ annualizedYield: string;
31
+ interestAccrualTime: string;
32
+ notionalSz: string;
33
+ notionalCcy: string;
34
+ productId: string;
35
+ quoteId: string;
36
+ validUntil: string;
37
+ idxPx: string;
38
+ }
39
+ export type DcdTradeOrderState = 'initial' | 'pending_book' | 'live' | 'rejected';
40
+ export interface DcdTradeResult {
41
+ quoteId: string;
42
+ ordId: string;
43
+ state: DcdTradeOrderState;
44
+ }
45
+ export interface DcdRedeemQuote {
46
+ ordId: string;
47
+ quoteId: string;
48
+ redeemCcy: string;
49
+ redeemSz: string;
50
+ termRate: string;
51
+ validUntil: string;
52
+ }
53
+ export type DcdRedeemConfirmState = 'pending_redeem_booking' | 'pending_redeem' | 'redeeming' | 'redeemed';
54
+ export interface DcdRedeemResult {
55
+ ordId: string;
56
+ state: DcdRedeemConfirmState;
57
+ }
58
+ export type DcdOrderStatusState = 'initial' | 'live' | 'pending_settle' | 'settled' | 'pending_redeem' | 'redeemed' | 'rejected';
59
+ export interface DcdOrderStatus {
60
+ ordId: string;
61
+ state: DcdOrderStatusState;
62
+ }
63
+ export interface DcdOrderHistoryItem {
64
+ ordId: string;
65
+ quoteId: string;
66
+ state: DcdOrderStatusState;
67
+ productId: string;
68
+ baseCcy: string;
69
+ quoteCcy: string;
70
+ uly: string;
71
+ strike: string;
72
+ notionalSz: string;
73
+ notionalCcy: string;
74
+ absYield: string;
75
+ annualizedYield: string;
76
+ yieldSz: string;
77
+ yieldCcy: string;
78
+ settleSz: string;
79
+ settleCcy: string;
80
+ settlePx: string;
81
+ settleTime: string;
82
+ expTime: string;
83
+ redeemStartTime: string;
84
+ redeemEndTime: string;
85
+ cTime: string;
86
+ uTime: string;
87
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=private-dual-investment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-dual-investment.js","sourceRoot":"","sources":["../../../../../src/types/rest/response/private-dual-investment.ts"],"names":[],"mappings":""}
@@ -10,9 +10,16 @@ export interface SupplementaryCollateral {
10
10
  ccy: string;
11
11
  amt: string;
12
12
  }
13
+ export interface GetFlexibleLoanCollateralAssetsRequest {
14
+ ccy?: string;
15
+ /** When the account has multiple active flexible-loan positions. */
16
+ ordId?: string;
17
+ }
13
18
  export interface MaxLoanRequest {
14
19
  borrowCcy: string;
15
20
  supCollateral?: SupplementaryCollateral[];
21
+ /** When multiple active loans exist. */
22
+ ordId?: string;
16
23
  }
17
24
  export interface MaxLoanResponse {
18
25
  borrowCcy: string;
@@ -24,6 +31,8 @@ export interface AdjustCollateralRequest {
24
31
  type: 'add' | 'reduce';
25
32
  collateralCcy: string;
26
33
  collateralAmt: string;
34
+ /** When multiple active loans exist. */
35
+ ordId?: string;
27
36
  }
28
37
  export interface LoanCurrencyData {
29
38
  ccy: string;
@@ -33,9 +42,18 @@ export interface RiskWarningData {
33
42
  instId: string;
34
43
  liqPx: string;
35
44
  }
45
+ export interface GetLoanInfoRequest {
46
+ /** When the account has multiple active flexible loans . */
47
+ ordId?: string;
48
+ }
36
49
  export interface LoanInfo {
50
+ /**
51
+ * Active loan / position id when the account can hold multiple loan orders.
52
+ */
53
+ ordId?: string;
37
54
  loanNotionalUsd: string;
38
55
  loanData: LoanCurrencyData[];
56
+ /** Adjusted collateral value in USD. */
39
57
  collateralNotionalUsd: string;
40
58
  collateralData: LoanCurrencyData[];
41
59
  riskWarningData: RiskWarningData;
@@ -45,6 +63,8 @@ export interface LoanInfo {
45
63
  }
46
64
  export interface LoanHistoryRequest {
47
65
  type?: 'borrowed' | 'repaid' | 'collateral_locked' | 'collateral_released' | 'forced_repayment_buy' | 'forced_repayment_sell' | 'forced_liquidation' | 'partial_liquidation';
66
+ /** When multiple active loans exist. */
67
+ ordId?: string;
48
68
  after?: string;
49
69
  before?: string;
50
70
  limit?: string;
@@ -58,6 +78,8 @@ export interface LoanHistoryItem {
58
78
  }
59
79
  export interface AccruedInterestRequest {
60
80
  ccy?: string;
81
+ /** When multiple active loans exist. */
82
+ ordId?: string;
61
83
  after?: string;
62
84
  before?: string;
63
85
  limit?: string;
@@ -0,0 +1,57 @@
1
+ export interface StableRewardsProductInfoDetail {
2
+ ccy: string;
3
+ settleCcy: string;
4
+ subFeeRate: string;
5
+ redemptFeeRate: string;
6
+ minSubAmt: string;
7
+ minRedeemAmt: string;
8
+ remainingSubQuota: string;
9
+ remainingRedemptQuota: string;
10
+ canRedeem: boolean;
11
+ }
12
+ export interface StableRewardsProductInfo {
13
+ details: StableRewardsProductInfoDetail[];
14
+ ts: string;
15
+ }
16
+ export interface StableRewardsQuote {
17
+ quoteId: string;
18
+ quoteAmt: string;
19
+ quoteCcy: string;
20
+ exchRate: string;
21
+ feeRate: string;
22
+ quoteTime: string;
23
+ ttlMs: string;
24
+ }
25
+ export interface StableRewardsTradeResult {
26
+ quoteId: string;
27
+ ordId: string;
28
+ }
29
+ export type StableRewardsBalanceState = 'earning' | 'pending';
30
+ export interface StableRewardsBalanceDetail {
31
+ ccy: string;
32
+ amt: string;
33
+ totalEarnAccrual: string;
34
+ state: StableRewardsBalanceState;
35
+ }
36
+ export interface StableRewardsBalance {
37
+ details: StableRewardsBalanceDetail[];
38
+ ts: string;
39
+ }
40
+ export interface StableRewardsApyHistoryItem {
41
+ rate: string;
42
+ ts: string;
43
+ }
44
+ export type StableRewardsSubscribeRedeemType = 'subscribe' | 'redeem';
45
+ export type StableRewardsSubscribeRedeemStatus = 'pending' | 'success' | 'failed';
46
+ export interface StableRewardsSubscribeRedeemHistoryItem {
47
+ type: StableRewardsSubscribeRedeemType;
48
+ status: StableRewardsSubscribeRedeemStatus;
49
+ ccy: string;
50
+ settleCcy: string;
51
+ ccyAmt: string;
52
+ settleCcyAmt: string;
53
+ fee: string;
54
+ quoteId: string;
55
+ ordId: string;
56
+ ts: string;
57
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=private-stable-rewards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-stable-rewards.js","sourceRoot":"","sources":["../../../../../src/types/rest/response/private-stable-rewards.ts"],"names":[],"mappings":""}
@@ -1,4 +1,24 @@
1
1
  import { AlgoOrderState, AlgoOrderType, AlgoPositionSide, numberInString, OrderState, OrderType, PositionSide } from '../shared.js';
2
+ /**
3
+ * Nested rows in `attachAlgoOrds` on orders / history (incl. trailing stop fields)
4
+ */
5
+ export interface AttachAlgoOrderDetail {
6
+ attachAlgoClOrdId?: string;
7
+ tpTriggerPx?: string;
8
+ tpTriggerRatio?: string;
9
+ tpOrdPx?: string;
10
+ tpOrdKind?: string;
11
+ slTriggerPx?: string;
12
+ slTriggerRatio?: string;
13
+ slOrdPx?: string;
14
+ tpTriggerPxType?: string;
15
+ slTriggerPxType?: string;
16
+ sz?: string;
17
+ amendPxOnTriggerType?: string;
18
+ callbackRatio?: string;
19
+ callbackSpread?: string;
20
+ activePx?: string;
21
+ }
2
22
  export interface OrderResult {
3
23
  clOrdId: string;
4
24
  ordId: string;
@@ -52,12 +72,14 @@ export interface OrderDetails {
52
72
  slTriggerPx: string;
53
73
  slTriggerPxType: string;
54
74
  slOrdPx: string;
75
+ attachAlgoOrds?: AttachAlgoOrderDetail[];
55
76
  feeCcy: string;
56
77
  fee: string;
57
78
  rebateCcy: string;
58
79
  rebate: string;
59
80
  tgtCcy: string;
60
81
  category: string;
82
+ outcome?: string;
61
83
  uTime: string;
62
84
  cTime: string;
63
85
  }
@@ -91,7 +113,6 @@ export interface OrderListItem {
91
113
  slOrdPx: string;
92
114
  slTriggerPx: string;
93
115
  slTriggerPxType: string;
94
- attachAlgoOrds: any[];
95
116
  state: OrderState;
96
117
  stpId: string;
97
118
  stpMode: string;
@@ -109,6 +130,8 @@ export interface OrderListItem {
109
130
  algoClOrdId: string;
110
131
  algoId: string;
111
132
  uTime: string;
133
+ attachAlgoOrds?: AttachAlgoOrderDetail[];
134
+ outcome?: string;
112
135
  }
113
136
  export interface HistoricOrder {
114
137
  instType: string;
@@ -141,7 +164,7 @@ export interface HistoricOrder {
141
164
  slTriggerPx: string;
142
165
  slTriggerPxType: string;
143
166
  slOrdPx: string;
144
- attachAlgoOrds: any[];
167
+ attachAlgoOrds?: AttachAlgoOrderDetail[];
145
168
  stpId: string;
146
169
  stpMode: string;
147
170
  feeCcy: string;
@@ -157,6 +180,7 @@ export interface HistoricOrder {
157
180
  cancelSourceReason: string;
158
181
  algoClOrdId: string;
159
182
  algoId: string;
183
+ outcome?: string;
160
184
  uTime: string;
161
185
  cTime: string;
162
186
  }
@@ -194,7 +218,7 @@ export interface AlgoOrderDetailsResult {
194
218
  ccy: string;
195
219
  clOrdId: string;
196
220
  algoId: string;
197
- attachAlgoOrds: any[];
221
+ attachAlgoOrds?: AttachAlgoOrderDetail[];
198
222
  sz: string;
199
223
  closeFraction: string;
200
224
  ordType: AlgoOrderType;
@@ -246,7 +270,7 @@ export interface AlgoOrderListItem {
246
270
  actualSide: string;
247
271
  actualSz: string;
248
272
  algoId: string;
249
- attachAlgoOrds: any[];
273
+ attachAlgoOrds?: AttachAlgoOrderDetail[];
250
274
  cTime: string;
251
275
  callbackRatio: string;
252
276
  callbackSpread: string;
@@ -257,7 +281,7 @@ export interface AlgoOrderListItem {
257
281
  lever: string;
258
282
  moveTriggerPx: string;
259
283
  ordId: string;
260
- ordIdList: any[];
284
+ ordIdList: string[];
261
285
  ordPx: string;
262
286
  ordType: AlgoOrderType;
263
287
  posSide: AlgoPositionSide;
@@ -301,7 +325,7 @@ export interface HistoricAlgoOrder {
301
325
  actualSz: string;
302
326
  algoClOrdId: string;
303
327
  algoId: string;
304
- attachAlgoOrds: any[];
328
+ attachAlgoOrds?: AttachAlgoOrderDetail[];
305
329
  cTime: string;
306
330
  callbackRatio: string;
307
331
  callbackSpread: string;