okx-api 0.0.1 → 0.0.2
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 +26 -168
- package/lib/index.d.ts +2 -1
- package/lib/index.js +17 -13
- package/lib/index.js.map +1 -1
- package/lib/rest-client.d.ts +315 -0
- package/lib/rest-client.js +635 -0
- package/lib/rest-client.js.map +1 -0
- package/lib/types/rest/index.d.ts +3 -0
- package/lib/types/rest/index.js +20 -0
- package/lib/types/rest/index.js.map +1 -0
- package/lib/types/rest/request/index.d.ts +4 -0
- package/lib/types/rest/request/index.js +21 -0
- package/lib/types/rest/request/index.js.map +1 -0
- package/lib/types/rest/request/private-account.d.ts +16 -0
- package/lib/types/rest/request/private-account.js +3 -0
- package/lib/types/rest/request/private-account.js.map +1 -0
- package/lib/types/rest/request/private-block-trading.d.ts +60 -0
- package/lib/types/rest/request/private-block-trading.js +3 -0
- package/lib/types/rest/request/private-block-trading.js.map +1 -0
- package/lib/types/rest/request/private-trade.d.ts +111 -0
- package/lib/types/rest/request/private-trade.js +3 -0
- package/lib/types/rest/request/private-trade.js.map +1 -0
- package/lib/types/rest/request/shared.d.ts +7 -0
- package/lib/types/rest/request/shared.js +3 -0
- package/lib/types/rest/request/shared.js.map +1 -0
- package/lib/types/rest/response/index.d.ts +6 -0
- package/lib/types/rest/response/index.js +23 -0
- package/lib/types/rest/response/index.js.map +1 -0
- package/lib/types/rest/response/private-account.d.ts +213 -0
- package/lib/types/rest/response/private-account.js +3 -0
- package/lib/types/rest/response/private-account.js.map +1 -0
- package/lib/types/rest/response/private-block-trading.d.ts +89 -0
- package/lib/types/rest/response/private-block-trading.js +3 -0
- package/lib/types/rest/response/private-block-trading.js.map +1 -0
- package/lib/types/rest/response/private-funding.d.ts +67 -0
- package/lib/types/rest/response/private-funding.js +3 -0
- package/lib/types/rest/response/private-funding.js.map +1 -0
- package/lib/types/rest/response/private-subaccount.d.ts +56 -0
- package/lib/types/rest/response/private-subaccount.js +3 -0
- package/lib/types/rest/response/private-subaccount.js.map +1 -0
- package/lib/types/rest/response/private-trade.d.ts +235 -0
- package/lib/types/rest/response/private-trade.js +3 -0
- package/lib/types/rest/response/private-trade.js.map +1 -0
- package/lib/types/rest/response/public-data.d.ts +70 -0
- package/lib/types/rest/response/public-data.js +3 -0
- package/lib/types/rest/response/public-data.js.map +1 -0
- package/lib/types/rest/shared.d.ts +36 -0
- package/lib/types/rest/shared.js +3 -0
- package/lib/types/rest/shared.js.map +1 -0
- package/lib/util/BaseRestClient.d.ts +35 -0
- package/lib/util/BaseRestClient.js +204 -0
- package/lib/util/BaseRestClient.js.map +1 -0
- package/lib/util/browser-support.d.ts +1 -0
- package/lib/util/browser-support.js +24 -0
- package/lib/util/browser-support.js.map +1 -0
- package/lib/util/node-support.d.ts +1 -0
- package/lib/util/node-support.js +9 -0
- package/lib/util/node-support.js.map +1 -0
- package/lib/util/requestUtils.d.ts +17 -0
- package/lib/util/requestUtils.js +52 -0
- package/lib/util/requestUtils.js.map +1 -0
- package/lib/util/typeGuards.d.ts +2 -0
- package/lib/util/typeGuards.js +14 -0
- package/lib/util/typeGuards.js.map +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./request"), exports);
|
|
18
|
+
__exportStar(require("./response"), exports);
|
|
19
|
+
__exportStar(require("./shared"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/rest/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./shared"), exports);
|
|
18
|
+
__exportStar(require("./private-account"), exports);
|
|
19
|
+
__exportStar(require("./private-trade"), exports);
|
|
20
|
+
__exportStar(require("./private-block-trading"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/rest/request/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,oDAAkC;AAClC,kDAAgC;AAChC,0DAAwC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InstrumentType } from '../shared';
|
|
2
|
+
export interface GetPositionsParams {
|
|
3
|
+
instType?: InstrumentType;
|
|
4
|
+
instId?: string;
|
|
5
|
+
posId?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GetHistoricPositionParams {
|
|
8
|
+
instType?: InstrumentType;
|
|
9
|
+
instId?: string;
|
|
10
|
+
mgnMode?: string;
|
|
11
|
+
type?: string;
|
|
12
|
+
posId?: string;
|
|
13
|
+
after?: string;
|
|
14
|
+
before?: string;
|
|
15
|
+
limit?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-account.js","sourceRoot":"","sources":["../../../../src/types/rest/request/private-account.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { OrderSide, RFQLeg } from '../shared';
|
|
2
|
+
export interface CreateBlockRFQRequest {
|
|
3
|
+
counterparties: string[];
|
|
4
|
+
anonymous?: boolean;
|
|
5
|
+
clRfqId?: string;
|
|
6
|
+
legs: RFQLeg[];
|
|
7
|
+
}
|
|
8
|
+
export interface CancelBlockRFQRequest {
|
|
9
|
+
rfqId?: string;
|
|
10
|
+
clRfqId?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CancelMultipleBlockRFQRequest {
|
|
13
|
+
rfqId?: string[];
|
|
14
|
+
clRfqId?: string[];
|
|
15
|
+
}
|
|
16
|
+
export interface ExecuteBlockQuoteRequest {
|
|
17
|
+
rfqId: string;
|
|
18
|
+
quoteId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface CreateBlockQuoteRequest {
|
|
21
|
+
rfqId: string;
|
|
22
|
+
clQuoteId?: string;
|
|
23
|
+
quoteSide: string;
|
|
24
|
+
anonymous?: boolean;
|
|
25
|
+
expiresIn?: string;
|
|
26
|
+
legs: CreateBlockQuoteLeg[];
|
|
27
|
+
}
|
|
28
|
+
export interface CreateBlockQuoteLeg {
|
|
29
|
+
px: string;
|
|
30
|
+
sz: string;
|
|
31
|
+
instId: string;
|
|
32
|
+
side: OrderSide;
|
|
33
|
+
tgtCcy?: 'base_ccy' | 'quote_ccy';
|
|
34
|
+
}
|
|
35
|
+
export interface CancelBlockQuoteRequest {
|
|
36
|
+
quoteId?: string;
|
|
37
|
+
clQuoteId?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface CancelMultipleBlockQuoteRequest {
|
|
40
|
+
quoteId?: string[];
|
|
41
|
+
clQuoteId?: string[];
|
|
42
|
+
}
|
|
43
|
+
export interface GetBlockRFQSParams {
|
|
44
|
+
rfqId?: string;
|
|
45
|
+
clRfqId?: string;
|
|
46
|
+
state?: string;
|
|
47
|
+
beginId?: string;
|
|
48
|
+
endId?: string;
|
|
49
|
+
limit?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface GetBlockQuoteParams {
|
|
52
|
+
rfqId?: string;
|
|
53
|
+
clRfqId?: string;
|
|
54
|
+
quoteId?: string;
|
|
55
|
+
clQuoteId?: string;
|
|
56
|
+
state?: string;
|
|
57
|
+
beginId?: string;
|
|
58
|
+
endId?: string;
|
|
59
|
+
limit?: string;
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-block-trading.js","sourceRoot":"","sources":["../../../../src/types/rest/request/private-block-trading.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { TradeMode, OrderSide, PositionSide, AlgoOrderType, numberInString, PriceTriggerType, OrderType, MarginMode, InstrumentType, AlgoState } from '../shared';
|
|
2
|
+
export interface AlgoRecentHistoryRequest {
|
|
3
|
+
ordType: AlgoOrderType;
|
|
4
|
+
algoId?: string;
|
|
5
|
+
instType?: string;
|
|
6
|
+
instId?: string;
|
|
7
|
+
after?: string;
|
|
8
|
+
before?: string;
|
|
9
|
+
limit?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AlgoLongHistoryRequest {
|
|
12
|
+
ordType: AlgoOrderType;
|
|
13
|
+
state?: AlgoState;
|
|
14
|
+
algoId?: string;
|
|
15
|
+
instType?: string;
|
|
16
|
+
instId?: string;
|
|
17
|
+
after?: string;
|
|
18
|
+
before?: string;
|
|
19
|
+
limit?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface AlgoOrderRequest {
|
|
22
|
+
instId: string;
|
|
23
|
+
tdMode: TradeMode;
|
|
24
|
+
ccy?: string;
|
|
25
|
+
side: OrderSide;
|
|
26
|
+
posSide?: PositionSide;
|
|
27
|
+
ordType: AlgoOrderType;
|
|
28
|
+
sz: numberInString;
|
|
29
|
+
tag?: string;
|
|
30
|
+
reduceOnly?: boolean;
|
|
31
|
+
tgtCcy?: string;
|
|
32
|
+
tpTriggerPx?: numberInString;
|
|
33
|
+
tpTriggerPxType?: PriceTriggerType;
|
|
34
|
+
tpOrdPx?: numberInString;
|
|
35
|
+
slTriggerPx?: numberInString;
|
|
36
|
+
slTriggerPxType?: PriceTriggerType;
|
|
37
|
+
slOrdPx?: numberInString;
|
|
38
|
+
triggerPx?: numberInString;
|
|
39
|
+
triggerPxType?: PriceTriggerType;
|
|
40
|
+
orderPx?: numberInString;
|
|
41
|
+
callbackRatio?: numberInString;
|
|
42
|
+
callbackSpread?: numberInString;
|
|
43
|
+
activePx?: numberInString;
|
|
44
|
+
pxVar?: numberInString;
|
|
45
|
+
pxSpread?: numberInString;
|
|
46
|
+
szLimit?: numberInString;
|
|
47
|
+
pxLimit?: numberInString;
|
|
48
|
+
timeInterval?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface AmendOrderRequest {
|
|
51
|
+
instId: string;
|
|
52
|
+
cxlOnFail?: boolean;
|
|
53
|
+
ordId?: string;
|
|
54
|
+
clOrdId?: string;
|
|
55
|
+
reqId?: string;
|
|
56
|
+
newSz?: string;
|
|
57
|
+
newPx?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface CancelAlgoOrderRequest {
|
|
60
|
+
algoId: string;
|
|
61
|
+
instId: string;
|
|
62
|
+
}
|
|
63
|
+
export interface ClosePositionRequest {
|
|
64
|
+
instId: string;
|
|
65
|
+
posSide?: PositionSide;
|
|
66
|
+
mgnMode: MarginMode;
|
|
67
|
+
ccy?: string;
|
|
68
|
+
autoCxl?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface FillsHistoryRequest {
|
|
71
|
+
instType?: InstrumentType;
|
|
72
|
+
uly?: string;
|
|
73
|
+
instId?: string;
|
|
74
|
+
ordId?: string;
|
|
75
|
+
after?: string;
|
|
76
|
+
before?: string;
|
|
77
|
+
begin?: string;
|
|
78
|
+
end?: string;
|
|
79
|
+
limit?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface OrderIdRequest {
|
|
82
|
+
instId: string;
|
|
83
|
+
ordId?: string;
|
|
84
|
+
clOrdId?: string;
|
|
85
|
+
}
|
|
86
|
+
export interface OrderHistoryRequest {
|
|
87
|
+
instType: InstrumentType;
|
|
88
|
+
uly?: string;
|
|
89
|
+
instId?: string;
|
|
90
|
+
ordType?: OrderType;
|
|
91
|
+
state?: string;
|
|
92
|
+
category?: string;
|
|
93
|
+
after?: string;
|
|
94
|
+
before?: string;
|
|
95
|
+
limit?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface OrderRequest {
|
|
98
|
+
instId: string;
|
|
99
|
+
tdMode: TradeMode;
|
|
100
|
+
ccy?: string;
|
|
101
|
+
clOrdId?: string;
|
|
102
|
+
tag?: string;
|
|
103
|
+
side: OrderSide;
|
|
104
|
+
posSide?: PositionSide;
|
|
105
|
+
ordType: OrderType;
|
|
106
|
+
sz: numberInString;
|
|
107
|
+
px?: string;
|
|
108
|
+
reduceOnly?: boolean;
|
|
109
|
+
tgtCcy?: string;
|
|
110
|
+
banAmend?: boolean;
|
|
111
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-trade.js","sourceRoot":"","sources":["../../../../src/types/rest/request/private-trade.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/types/rest/request/shared.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./private-account"), exports);
|
|
18
|
+
__exportStar(require("./private-block-trading"), exports);
|
|
19
|
+
__exportStar(require("./private-funding"), exports);
|
|
20
|
+
__exportStar(require("./private-subaccount"), exports);
|
|
21
|
+
__exportStar(require("./private-trade"), exports);
|
|
22
|
+
__exportStar(require("./public-data"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/rest/response/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,0DAAwC;AACxC,oDAAkC;AAClC,uDAAqC;AACrC,kDAAgC;AAChC,gDAA8B"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
export interface AccountBalance {
|
|
2
|
+
adjEq: string;
|
|
3
|
+
details: AccountBalanceDetail[];
|
|
4
|
+
imr: string;
|
|
5
|
+
isoEq: string;
|
|
6
|
+
mgnRatio: string;
|
|
7
|
+
mmr: string;
|
|
8
|
+
notionalUsd: string;
|
|
9
|
+
ordFroz: string;
|
|
10
|
+
totalEq: string;
|
|
11
|
+
uTime: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AccountBalanceDetail {
|
|
14
|
+
availBal: string;
|
|
15
|
+
availEq: string;
|
|
16
|
+
cashBal: string;
|
|
17
|
+
ccy: string;
|
|
18
|
+
crossLiab: string;
|
|
19
|
+
disEq: string;
|
|
20
|
+
eq: string;
|
|
21
|
+
eqUsd: string;
|
|
22
|
+
frozenBal: string;
|
|
23
|
+
interest: string;
|
|
24
|
+
isoEq: string;
|
|
25
|
+
isoLiab: string;
|
|
26
|
+
isoUpl: string;
|
|
27
|
+
liab: string;
|
|
28
|
+
maxLoan: string;
|
|
29
|
+
mgnRatio: string;
|
|
30
|
+
notionalLever: string;
|
|
31
|
+
ordFrozen: string;
|
|
32
|
+
twap: string;
|
|
33
|
+
uTime: string;
|
|
34
|
+
upl: string;
|
|
35
|
+
uplLiab: string;
|
|
36
|
+
stgyEq: string;
|
|
37
|
+
}
|
|
38
|
+
export interface AccountPosition {
|
|
39
|
+
adl: string;
|
|
40
|
+
availPos: string;
|
|
41
|
+
avgPx: string;
|
|
42
|
+
cTime: string;
|
|
43
|
+
ccy: string;
|
|
44
|
+
deltaBS: string;
|
|
45
|
+
deltaPA: string;
|
|
46
|
+
gammaBS: string;
|
|
47
|
+
gammaPA: string;
|
|
48
|
+
imr: string;
|
|
49
|
+
instId: string;
|
|
50
|
+
instType: string;
|
|
51
|
+
interest: string;
|
|
52
|
+
usdPx: string;
|
|
53
|
+
last: string;
|
|
54
|
+
lever: string;
|
|
55
|
+
liab: string;
|
|
56
|
+
liabCcy: string;
|
|
57
|
+
liqPx: string;
|
|
58
|
+
markPx: string;
|
|
59
|
+
margin: string;
|
|
60
|
+
mgnMode: string;
|
|
61
|
+
mgnRatio: string;
|
|
62
|
+
mmr: string;
|
|
63
|
+
notionalUsd: string;
|
|
64
|
+
optVal: string;
|
|
65
|
+
pTime: string;
|
|
66
|
+
pos: string;
|
|
67
|
+
posCcy: string;
|
|
68
|
+
posId: string;
|
|
69
|
+
posSide: string;
|
|
70
|
+
thetaBS: string;
|
|
71
|
+
thetaPA: string;
|
|
72
|
+
tradeId: string;
|
|
73
|
+
uTime: string;
|
|
74
|
+
upl: string;
|
|
75
|
+
uplRatio: string;
|
|
76
|
+
vegaBS: string;
|
|
77
|
+
vegaPA: string;
|
|
78
|
+
}
|
|
79
|
+
export interface HistoricAccountPosition {
|
|
80
|
+
cTime: string;
|
|
81
|
+
ccy: string;
|
|
82
|
+
closeAvgPx: string;
|
|
83
|
+
closeTotalPos: string;
|
|
84
|
+
instId: string;
|
|
85
|
+
instType: string;
|
|
86
|
+
lever: string;
|
|
87
|
+
mgnMode: string;
|
|
88
|
+
openAvgPx: string;
|
|
89
|
+
openMaxPos: string;
|
|
90
|
+
pnl: string;
|
|
91
|
+
pnlRatio: string;
|
|
92
|
+
posId: string;
|
|
93
|
+
posSide: string;
|
|
94
|
+
triggerPx: string;
|
|
95
|
+
type: string;
|
|
96
|
+
uTime: string;
|
|
97
|
+
uly: string;
|
|
98
|
+
}
|
|
99
|
+
export interface AccountBalanceRiskData {
|
|
100
|
+
ccy: string;
|
|
101
|
+
disEq: string;
|
|
102
|
+
eq: string;
|
|
103
|
+
}
|
|
104
|
+
export interface AccountPositionRiskData {
|
|
105
|
+
baseBal: string;
|
|
106
|
+
ccy: string;
|
|
107
|
+
instId: string;
|
|
108
|
+
instType: string;
|
|
109
|
+
mgnMode: string;
|
|
110
|
+
notionalCcy: string;
|
|
111
|
+
notionalUsd: string;
|
|
112
|
+
pos: string;
|
|
113
|
+
posCcy: string;
|
|
114
|
+
posId: string;
|
|
115
|
+
posSide: string;
|
|
116
|
+
quoteBal: string;
|
|
117
|
+
}
|
|
118
|
+
export interface AccountPositionRisk {
|
|
119
|
+
adjEq: string;
|
|
120
|
+
balData: AccountBalanceRiskData[];
|
|
121
|
+
posData: AccountPositionRiskData[];
|
|
122
|
+
ts: string;
|
|
123
|
+
}
|
|
124
|
+
export interface AccountBill {
|
|
125
|
+
bal: string;
|
|
126
|
+
balChg: string;
|
|
127
|
+
billId: string;
|
|
128
|
+
ccy: string;
|
|
129
|
+
execType: string;
|
|
130
|
+
fee: string;
|
|
131
|
+
from: string;
|
|
132
|
+
instId: string;
|
|
133
|
+
instType: string;
|
|
134
|
+
mgnMode: string;
|
|
135
|
+
notes: string;
|
|
136
|
+
ordId: string;
|
|
137
|
+
pnl: string;
|
|
138
|
+
posBal: string;
|
|
139
|
+
posBalChg: string;
|
|
140
|
+
subType: string;
|
|
141
|
+
sz: string;
|
|
142
|
+
to: string;
|
|
143
|
+
ts: string;
|
|
144
|
+
type: string;
|
|
145
|
+
}
|
|
146
|
+
export interface AccountConfiguration {
|
|
147
|
+
acctLv: string;
|
|
148
|
+
autoLoan: boolean;
|
|
149
|
+
ctIsoMode: string;
|
|
150
|
+
greeksType: string;
|
|
151
|
+
level: string;
|
|
152
|
+
levelTmp: string;
|
|
153
|
+
mgnIsoMode: string;
|
|
154
|
+
posMode: string;
|
|
155
|
+
uid: string;
|
|
156
|
+
}
|
|
157
|
+
export interface AccountPositionModeResult {
|
|
158
|
+
posMode: string;
|
|
159
|
+
}
|
|
160
|
+
export interface AccountLeverageResult {
|
|
161
|
+
lever: string;
|
|
162
|
+
mgnMode: string;
|
|
163
|
+
instId: string;
|
|
164
|
+
posSide: string;
|
|
165
|
+
}
|
|
166
|
+
export interface AccountMaxOrderAmount {
|
|
167
|
+
ccy: string;
|
|
168
|
+
instId: string;
|
|
169
|
+
maxBuy: string;
|
|
170
|
+
maxSell: string;
|
|
171
|
+
}
|
|
172
|
+
export interface AccountMaxTradableAmount {
|
|
173
|
+
instId: string;
|
|
174
|
+
availBuy: string;
|
|
175
|
+
availSell: string;
|
|
176
|
+
}
|
|
177
|
+
export interface AccountChangeMarginResult {
|
|
178
|
+
amt: string;
|
|
179
|
+
ccy: string;
|
|
180
|
+
instId: string;
|
|
181
|
+
leverage: string;
|
|
182
|
+
posSide: string;
|
|
183
|
+
type: string;
|
|
184
|
+
}
|
|
185
|
+
export interface AccountLeverage {
|
|
186
|
+
instId: string;
|
|
187
|
+
mgnMode: string;
|
|
188
|
+
posSide: string;
|
|
189
|
+
lever: string;
|
|
190
|
+
}
|
|
191
|
+
export interface AccountMaxLoan {
|
|
192
|
+
instId: string;
|
|
193
|
+
mgnMode: string;
|
|
194
|
+
mgnCcy: string;
|
|
195
|
+
maxLoan: string;
|
|
196
|
+
ccy: string;
|
|
197
|
+
side: string;
|
|
198
|
+
}
|
|
199
|
+
export interface AccountFeeRate {
|
|
200
|
+
category: never;
|
|
201
|
+
delivery: string;
|
|
202
|
+
exercise: string;
|
|
203
|
+
instType: string;
|
|
204
|
+
level: string;
|
|
205
|
+
maker: string;
|
|
206
|
+
makerU: string;
|
|
207
|
+
taker: string;
|
|
208
|
+
takerU: string;
|
|
209
|
+
ts: string;
|
|
210
|
+
}
|
|
211
|
+
export interface AccountIsolatedMode {
|
|
212
|
+
isoMode: 'autonomy' | 'automatic';
|
|
213
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-account.js","sourceRoot":"","sources":["../../../../src/types/rest/response/private-account.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { RFQLeg, RFQQuoteLegExtended } from '../shared';
|
|
2
|
+
export interface BlockCounterParty {
|
|
3
|
+
traderName: string;
|
|
4
|
+
traderCode: string;
|
|
5
|
+
type: never;
|
|
6
|
+
}
|
|
7
|
+
export interface CreateRFQResult {
|
|
8
|
+
cTime: string;
|
|
9
|
+
uTime: string;
|
|
10
|
+
traderCode: string;
|
|
11
|
+
rfqId: string;
|
|
12
|
+
clRfqId: string;
|
|
13
|
+
state: string;
|
|
14
|
+
validUntil: string;
|
|
15
|
+
counterparties: string[];
|
|
16
|
+
legs: Required<RFQLeg>[];
|
|
17
|
+
}
|
|
18
|
+
export interface CancelBlockRFQResult {
|
|
19
|
+
rfqId: string;
|
|
20
|
+
clRfqId: string;
|
|
21
|
+
sCode: string;
|
|
22
|
+
sMsg: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ExecuteBlockQuoteResult {
|
|
25
|
+
blockTdId: string;
|
|
26
|
+
rfqId: string;
|
|
27
|
+
clRfqId: string;
|
|
28
|
+
quoteId: string;
|
|
29
|
+
clQuoteId: string;
|
|
30
|
+
tTraderCode: string;
|
|
31
|
+
mTraderCode: string;
|
|
32
|
+
cTime: string;
|
|
33
|
+
legs: RFQQuoteLegExtended[];
|
|
34
|
+
}
|
|
35
|
+
export interface CreateBlockQuoteResult {
|
|
36
|
+
cTime: string;
|
|
37
|
+
uTime: string;
|
|
38
|
+
quoteId: string;
|
|
39
|
+
clQuoteId: string;
|
|
40
|
+
rfqId: string;
|
|
41
|
+
quoteSide: string;
|
|
42
|
+
state: string;
|
|
43
|
+
validUntil: string;
|
|
44
|
+
legs: CreatedBlockQuoteLeg[];
|
|
45
|
+
}
|
|
46
|
+
export interface CreatedBlockQuoteLeg {
|
|
47
|
+
px: string;
|
|
48
|
+
sz: string;
|
|
49
|
+
instId: string;
|
|
50
|
+
side: string;
|
|
51
|
+
tgtCcy: string;
|
|
52
|
+
}
|
|
53
|
+
export interface CancelBlockQuoteResult {
|
|
54
|
+
rfqId: string;
|
|
55
|
+
clQuoteId: string;
|
|
56
|
+
sCode: string;
|
|
57
|
+
sMsg: string;
|
|
58
|
+
}
|
|
59
|
+
export interface BlockRFQResult {
|
|
60
|
+
rfqId: string;
|
|
61
|
+
clRfqId: string;
|
|
62
|
+
traderCode: string;
|
|
63
|
+
validUntil: string;
|
|
64
|
+
state: string;
|
|
65
|
+
counterparties: string[];
|
|
66
|
+
legs: Required<RFQLeg>[];
|
|
67
|
+
cTime: string;
|
|
68
|
+
uTime: string;
|
|
69
|
+
}
|
|
70
|
+
export interface BlockQuoteLeg {
|
|
71
|
+
px: string;
|
|
72
|
+
sz: string;
|
|
73
|
+
instId: string;
|
|
74
|
+
side: string;
|
|
75
|
+
tgtCcy: string;
|
|
76
|
+
}
|
|
77
|
+
export interface GetBlockQuoteResult {
|
|
78
|
+
validUntil: string;
|
|
79
|
+
uTime: string;
|
|
80
|
+
cTime: string;
|
|
81
|
+
legs: BlockQuoteLeg[];
|
|
82
|
+
quoteId: string;
|
|
83
|
+
rfqId: string;
|
|
84
|
+
quoteSide: string;
|
|
85
|
+
state: string;
|
|
86
|
+
clQuoteId: string;
|
|
87
|
+
clRfqId: string;
|
|
88
|
+
traderCode: string;
|
|
89
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private-block-trading.js","sourceRoot":"","sources":["../../../../src/types/rest/response/private-block-trading.ts"],"names":[],"mappings":""}
|