@evedex/exchange-api 1.0.32

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 (44) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/authRestGateway.d.ts +63 -0
  3. package/dist/cjs/authRestGateway.js +96 -0
  4. package/dist/cjs/exchangeRestGateway.d.ts +91 -0
  5. package/dist/cjs/exchangeRestGateway.js +202 -0
  6. package/dist/cjs/exchangeWsGateway.d.ts +142 -0
  7. package/dist/cjs/exchangeWsGateway.js +146 -0
  8. package/dist/cjs/index.d.ts +4 -0
  9. package/dist/cjs/index.js +43 -0
  10. package/dist/cjs/package.json +3 -0
  11. package/dist/cjs/utils/exchange.d.ts +59 -0
  12. package/dist/cjs/utils/exchange.js +82 -0
  13. package/dist/cjs/utils/http.d.ts +26 -0
  14. package/dist/cjs/utils/http.js +28 -0
  15. package/dist/cjs/utils/index.d.ts +5 -0
  16. package/dist/cjs/utils/index.js +21 -0
  17. package/dist/cjs/utils/signal.d.ts +9 -0
  18. package/dist/cjs/utils/signal.js +24 -0
  19. package/dist/cjs/utils/types.d.ts +306 -0
  20. package/dist/cjs/utils/types.js +37 -0
  21. package/dist/cjs/utils/ws.d.ts +15 -0
  22. package/dist/cjs/utils/ws.js +2 -0
  23. package/dist/mjs/authRestGateway.d.ts +63 -0
  24. package/dist/mjs/authRestGateway.js +93 -0
  25. package/dist/mjs/exchangeRestGateway.d.ts +91 -0
  26. package/dist/mjs/exchangeRestGateway.js +205 -0
  27. package/dist/mjs/exchangeWsGateway.d.ts +142 -0
  28. package/dist/mjs/exchangeWsGateway.js +144 -0
  29. package/dist/mjs/index.d.ts +4 -0
  30. package/dist/mjs/index.js +4 -0
  31. package/dist/mjs/package.json +3 -0
  32. package/dist/mjs/utils/exchange.d.ts +59 -0
  33. package/dist/mjs/utils/exchange.js +81 -0
  34. package/dist/mjs/utils/http.d.ts +26 -0
  35. package/dist/mjs/utils/http.js +24 -0
  36. package/dist/mjs/utils/index.d.ts +5 -0
  37. package/dist/mjs/utils/index.js +5 -0
  38. package/dist/mjs/utils/signal.d.ts +9 -0
  39. package/dist/mjs/utils/signal.js +20 -0
  40. package/dist/mjs/utils/types.d.ts +306 -0
  41. package/dist/mjs/utils/types.js +34 -0
  42. package/dist/mjs/utils/ws.d.ts +15 -0
  43. package/dist/mjs/utils/ws.js +1 -0
  44. package/package.json +72 -0
@@ -0,0 +1,306 @@
1
+ import { utils as cryptoUtils } from "@evedex/exchange-crypto";
2
+ import { MatcherState, OrderGroup, OrderStatus, OrderType, TpSlStatus } from "./exchange";
3
+ export interface PaginatedQuery {
4
+ limit?: number;
5
+ offset?: number;
6
+ }
7
+ export type ListOf<T> = {
8
+ list: T[];
9
+ count: number;
10
+ };
11
+ export interface JWT {
12
+ accessToken: string;
13
+ }
14
+ export interface RefreshedJWT extends JWT {
15
+ refreshToken: string;
16
+ }
17
+ export interface ApiKey {
18
+ apiKey: string;
19
+ }
20
+ export interface User {
21
+ id: string;
22
+ authId: string;
23
+ exchangeId: number;
24
+ name: string;
25
+ email: string;
26
+ wallet: string;
27
+ social: Array<{
28
+ type: string;
29
+ value: string;
30
+ }>;
31
+ avatar: string;
32
+ level: number;
33
+ locale: string;
34
+ dateTimeFormat: string;
35
+ favoriteInstruments: string[];
36
+ marginCall: boolean;
37
+ createdAt: string;
38
+ updatedAt: string;
39
+ }
40
+ export interface DxFeedAuthToken {
41
+ token: string;
42
+ expireAt: number;
43
+ }
44
+ export interface WalletBalance {
45
+ currency: string;
46
+ balance: number;
47
+ balanceUSD: number;
48
+ }
49
+ export type WalletBalanceList = WalletBalance[];
50
+ export interface Funding {
51
+ coin: string;
52
+ quantity: number;
53
+ updatedAt: string;
54
+ }
55
+ export type FundingList = Funding[];
56
+ export interface FundingBalance {
57
+ currency: string;
58
+ balance: number;
59
+ }
60
+ export interface AvailableBalancePosition {
61
+ instrument: string;
62
+ side: cryptoUtils.Side;
63
+ volume: string;
64
+ initialMargin: string;
65
+ }
66
+ export interface AvailableBalanceOpenOrder {
67
+ instrument: string;
68
+ side: cryptoUtils.Side;
69
+ unFilledVolume: string;
70
+ unFilledInitialMargin: string;
71
+ }
72
+ export type UnfilledOrdersVolume = Record<string, number>;
73
+ export interface AvailableBalance {
74
+ currency: string;
75
+ funding: FundingBalance;
76
+ position: AvailableBalancePosition[];
77
+ openOrder: AvailableBalanceOpenOrder[];
78
+ availableBalance: number;
79
+ updatedAt: string;
80
+ openOrders: UnfilledOrdersVolume;
81
+ positions: Record<string, number>;
82
+ }
83
+ export interface Position {
84
+ id: string;
85
+ user: string;
86
+ instrument: string;
87
+ side: cryptoUtils.Side;
88
+ quantity: number;
89
+ avgPrice: number;
90
+ fundingRate: number;
91
+ leverage: number;
92
+ maintenanceMargin: number;
93
+ createdAt: string;
94
+ updatedAt: string;
95
+ }
96
+ export interface PositionMetrics extends Position {
97
+ unRealizedPnL: number;
98
+ adlLevel: number;
99
+ }
100
+ export type PositionList = {
101
+ list: PositionMetrics[];
102
+ };
103
+ export interface OrderFee {
104
+ coin: string;
105
+ quantity: number;
106
+ }
107
+ export interface Order {
108
+ id: string;
109
+ user: string;
110
+ instrument: string;
111
+ side: cryptoUtils.Side;
112
+ type: OrderType;
113
+ quantity: number;
114
+ limitPrice: number;
115
+ stopPrice: number | null;
116
+ status: OrderStatus;
117
+ rejectedReason?: string;
118
+ unFilledQuantity: number;
119
+ filledAvgPrice: number;
120
+ realizedPnL: number;
121
+ fee: OrderFee[];
122
+ createdAt: string;
123
+ updatedAt: string;
124
+ triggeredAt: string | null;
125
+ group: OrderGroup;
126
+ }
127
+ export type OrderList = ListOf<Order>;
128
+ export type OpenedOrder = Pick<Order, "id" | "user" | "instrument" | "side" | "type" | "status" | "quantity" | "limitPrice" | "unFilledQuantity" | "fee" | "updatedAt">;
129
+ export type OpenedOrdersList = OpenedOrder[];
130
+ export declare enum OrderFillFeeType {
131
+ Liquidation = "liquidation",
132
+ Adl = "adl",
133
+ Order = "order"
134
+ }
135
+ export interface OrderFillFee {
136
+ id: string;
137
+ user: string;
138
+ order: string;
139
+ fill: string;
140
+ coin: string;
141
+ quantity: string;
142
+ createdAt: Date;
143
+ type: OrderFillFeeType;
144
+ }
145
+ export interface TpSl {
146
+ id: string;
147
+ instrument: string;
148
+ type: cryptoUtils.TpSlType;
149
+ side: cryptoUtils.Side;
150
+ quantity: string;
151
+ price: string;
152
+ status: TpSlStatus;
153
+ triggerOrder: string | null;
154
+ triggeredQuantity: string;
155
+ cancelledReason: string;
156
+ createdAt: Date;
157
+ updatedAt: Date;
158
+ }
159
+ export type TpSlList = ListOf<TpSl>;
160
+ export declare enum TransferType {
161
+ Deposit = "deposit",
162
+ Withdraw = "withdraw",
163
+ TransferPFuturesToBalance = "transfer-pfutures-balance",
164
+ TransferBalanceToPFutures = "transfer-balance-pfutures",
165
+ PaymasterFee = "paymaster-fee",
166
+ PaymasterRefund = "paymaster-refund"
167
+ }
168
+ export declare enum TransferStatus {
169
+ Pending = "pending",
170
+ Done = "done",
171
+ Error = "error"
172
+ }
173
+ export interface Transfer {
174
+ id: string;
175
+ user: string;
176
+ type: TransferType;
177
+ coin: string;
178
+ amount: number;
179
+ fee: number;
180
+ status: TransferStatus;
181
+ createdAt: string;
182
+ updatedAt: string;
183
+ }
184
+ export interface Coin {
185
+ id: string;
186
+ name: string;
187
+ symbol: string;
188
+ image: string;
189
+ precision: number;
190
+ showPrecision: number;
191
+ price: number;
192
+ }
193
+ export type CoinList = {
194
+ list: Coin[];
195
+ };
196
+ export interface LeverageLimit {
197
+ [maxLeverage: number]: number;
198
+ }
199
+ export interface MaintenanceMarginParam {
200
+ percent: number;
201
+ deviance: number;
202
+ }
203
+ export interface MaintenanceMarginMap {
204
+ [rate: string]: MaintenanceMarginParam;
205
+ }
206
+ export declare enum InstrumentVisibility {
207
+ All = "all",
208
+ Restricted = "restricted",
209
+ None = "none"
210
+ }
211
+ export declare enum InstrumentTrading {
212
+ All = "all",
213
+ Restricted = "restricted",
214
+ None = "none",
215
+ OnlyClose = "onlyClose"
216
+ }
217
+ export interface Instrument {
218
+ id: string;
219
+ name: string;
220
+ from: Omit<Coin, "price">;
221
+ to: Omit<Coin, "price">;
222
+ maxLeverage: number;
223
+ leverageLimit: LeverageLimit;
224
+ maintenanceMargin: MaintenanceMarginMap;
225
+ lotSize: number;
226
+ quantityIncrement: number;
227
+ multiplier: number;
228
+ visibility: InstrumentVisibility;
229
+ trading: InstrumentTrading;
230
+ updatedAt: Date;
231
+ }
232
+ export type InstrumentList = Instrument[];
233
+ export interface InstrumentMetrics extends Instrument {
234
+ isPopular: boolean;
235
+ minPrice: number;
236
+ maxPrice: number;
237
+ minQuantity: number;
238
+ maxQuantity: number;
239
+ maxSlippage: number;
240
+ fundingRate: number;
241
+ fundingRateCreatedAt: Date;
242
+ slippageLimit: number;
243
+ fatFingerPriceProtection: number;
244
+ lastPrice: number;
245
+ markPrice: number;
246
+ openInterest: number;
247
+ low: number;
248
+ high: number;
249
+ closePrice: number;
250
+ volume: number;
251
+ volumeBase: number;
252
+ updatedAt: Date;
253
+ }
254
+ export interface InstrumentUpdateEvent {
255
+ id: string;
256
+ name: string;
257
+ displayName: string;
258
+ lastPrice: number;
259
+ high: number;
260
+ low: number;
261
+ volume: number;
262
+ volumeBase: number;
263
+ closePrice: number;
264
+ markPrice: number;
265
+ openInterest: number;
266
+ minPrice: number;
267
+ maxPrice: number;
268
+ fatFingerPriceProtection: number;
269
+ slippageLimit: number;
270
+ updatedAt: Date;
271
+ }
272
+ export type InstrumentMetricsList = InstrumentMetrics[];
273
+ export interface MarketInfo {
274
+ state: MatcherState;
275
+ fees: {
276
+ maker: number;
277
+ taker: number;
278
+ };
279
+ updatedAt: string;
280
+ }
281
+ export interface MarketDepthLevel {
282
+ price: number;
283
+ quantity: number;
284
+ }
285
+ export interface MarketDepth {
286
+ t: number;
287
+ asks: MarketDepthLevel[];
288
+ bids: MarketDepthLevel[];
289
+ }
290
+ export interface Trade {
291
+ orderId: string;
292
+ user: string;
293
+ instrument: string;
294
+ side: cryptoUtils.Side;
295
+ fillQuantity: number;
296
+ fillPrice: number;
297
+ status: OrderStatus.PartiallyFilled | OrderStatus.Filled;
298
+ createdAt: string;
299
+ }
300
+ export interface RecentTrade {
301
+ instrument: string;
302
+ side: cryptoUtils.Side;
303
+ fillQuantity: number;
304
+ fillPrice: number;
305
+ createdAt: string;
306
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InstrumentTrading = exports.InstrumentVisibility = exports.TransferStatus = exports.TransferType = exports.OrderFillFeeType = void 0;
4
+ var OrderFillFeeType;
5
+ (function (OrderFillFeeType) {
6
+ OrderFillFeeType["Liquidation"] = "liquidation";
7
+ OrderFillFeeType["Adl"] = "adl";
8
+ OrderFillFeeType["Order"] = "order";
9
+ })(OrderFillFeeType || (exports.OrderFillFeeType = OrderFillFeeType = {}));
10
+ var TransferType;
11
+ (function (TransferType) {
12
+ TransferType["Deposit"] = "deposit";
13
+ TransferType["Withdraw"] = "withdraw";
14
+ TransferType["TransferPFuturesToBalance"] = "transfer-pfutures-balance";
15
+ TransferType["TransferBalanceToPFutures"] = "transfer-balance-pfutures";
16
+ TransferType["PaymasterFee"] = "paymaster-fee";
17
+ TransferType["PaymasterRefund"] = "paymaster-refund";
18
+ })(TransferType || (exports.TransferType = TransferType = {}));
19
+ var TransferStatus;
20
+ (function (TransferStatus) {
21
+ TransferStatus["Pending"] = "pending";
22
+ TransferStatus["Done"] = "done";
23
+ TransferStatus["Error"] = "error";
24
+ })(TransferStatus || (exports.TransferStatus = TransferStatus = {}));
25
+ var InstrumentVisibility;
26
+ (function (InstrumentVisibility) {
27
+ InstrumentVisibility["All"] = "all";
28
+ InstrumentVisibility["Restricted"] = "restricted";
29
+ InstrumentVisibility["None"] = "none";
30
+ })(InstrumentVisibility || (exports.InstrumentVisibility = InstrumentVisibility = {}));
31
+ var InstrumentTrading;
32
+ (function (InstrumentTrading) {
33
+ InstrumentTrading["All"] = "all";
34
+ InstrumentTrading["Restricted"] = "restricted";
35
+ InstrumentTrading["None"] = "none";
36
+ InstrumentTrading["OnlyClose"] = "onlyClose";
37
+ })(InstrumentTrading || (exports.InstrumentTrading = InstrumentTrading = {}));
@@ -0,0 +1,15 @@
1
+ export type Callback<P> = (payload: P) => any;
2
+ export interface CentrifugeSubscription {
3
+ onPublication(callback: Callback<any>): void;
4
+ subscribe(): void;
5
+ unsubscribe(): void;
6
+ }
7
+ export interface AssignChannelOptions {
8
+ recoverable: boolean;
9
+ }
10
+ export interface CentrifugeClient {
11
+ onConnected(callback: Callback<any>): void;
12
+ onDisconnected(callback: Callback<any>): void;
13
+ connect(): void;
14
+ assignChannel(name: string, options?: AssignChannelOptions): CentrifugeSubscription;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,63 @@
1
+ import { ApiKey, HttpClient, JWT, RefreshedJWT } from "./utils";
2
+ export interface SignInSiweQuery {
3
+ address: string;
4
+ message: string;
5
+ signature: string;
6
+ nonce?: string;
7
+ }
8
+ export interface Nonce {
9
+ nonce: string;
10
+ }
11
+ export declare enum Role {
12
+ Admin = "admin",
13
+ Manager = "manager",
14
+ Partner = "partner",
15
+ User = "user",
16
+ AcademyCurator = "academy-curator",
17
+ AcademyModerator = "academy-moderator"
18
+ }
19
+ export interface Me {
20
+ id: string;
21
+ role: Role;
22
+ smartAccountAddress: string;
23
+ }
24
+ export interface User extends Me {
25
+ wallet: string;
26
+ smartAccountDeployed: boolean;
27
+ createdAt: string;
28
+ updatedAt: string;
29
+ }
30
+ export declare enum Service {
31
+ Exchange = "exchange",
32
+ Affiliate = "affiliate",
33
+ Academy = "academy"
34
+ }
35
+ export interface UserService {
36
+ user: string;
37
+ service: Service;
38
+ createdAt: string;
39
+ }
40
+ export type UserServiceList = UserService[];
41
+ export interface Session {
42
+ user: User;
43
+ token: RefreshedJWT;
44
+ }
45
+ export interface AuthRestGatewayOptions {
46
+ authURI: string;
47
+ httpClient: HttpClient;
48
+ }
49
+ export declare class AuthRestGateway {
50
+ readonly options: AuthRestGatewayOptions;
51
+ constructor(options: AuthRestGatewayOptions);
52
+ protected url(path: string, search?: string): string;
53
+ protected authGet<T>(path: string, search?: string): Promise<T>;
54
+ protected get<T>(path: string, search?: string): Promise<T>;
55
+ protected post<T>(path: string, body: any): Promise<T>;
56
+ setSession(session: JWT | RefreshedJWT | ApiKey): void;
57
+ getSession(): JWT | RefreshedJWT | ApiKey | undefined;
58
+ me(): Promise<Me>;
59
+ myServices(): Promise<UserServiceList>;
60
+ signInSiwe(query: SignInSiweQuery): Promise<Session>;
61
+ getNonce(): Promise<Nonce>;
62
+ refresh({ refreshToken }: RefreshedJWT): Promise<Session>;
63
+ }
@@ -0,0 +1,93 @@
1
+ export var Role;
2
+ (function (Role) {
3
+ Role["Admin"] = "admin";
4
+ Role["Manager"] = "manager";
5
+ Role["Partner"] = "partner";
6
+ Role["User"] = "user";
7
+ Role["AcademyCurator"] = "academy-curator";
8
+ Role["AcademyModerator"] = "academy-moderator";
9
+ })(Role || (Role = {}));
10
+ export var Service;
11
+ (function (Service) {
12
+ Service["Exchange"] = "exchange";
13
+ Service["Affiliate"] = "affiliate";
14
+ Service["Academy"] = "academy";
15
+ })(Service || (Service = {}));
16
+ export class AuthRestGateway {
17
+ options;
18
+ constructor(options) {
19
+ this.options = options;
20
+ }
21
+ url(path, search) {
22
+ const url = new URL(this.options.authURI);
23
+ url.pathname = path;
24
+ if (search) {
25
+ url.search = search;
26
+ }
27
+ return url.toString();
28
+ }
29
+ authGet(path, search) {
30
+ return this.options.httpClient
31
+ .authRequest({
32
+ method: "GET",
33
+ url: this.url(path, search),
34
+ headers: { Accept: "application/json" },
35
+ })
36
+ .then((res) => res.data);
37
+ }
38
+ get(path, search) {
39
+ return this.options.httpClient
40
+ .request({
41
+ method: "GET",
42
+ url: this.url(path, search),
43
+ headers: { Accept: "application/json" },
44
+ })
45
+ .then((res) => res.data);
46
+ }
47
+ post(path, body) {
48
+ return this.options.httpClient
49
+ .request({
50
+ method: "POST",
51
+ url: this.url(path),
52
+ headers: {
53
+ Accept: "application/json",
54
+ "Content-Type": "application/json",
55
+ },
56
+ body: JSON.stringify(body),
57
+ })
58
+ .then((res) => res.data);
59
+ }
60
+ setSession(session) {
61
+ this.options.httpClient.setSession(session);
62
+ }
63
+ getSession() {
64
+ return this.options.httpClient.getSession();
65
+ }
66
+ // Getters
67
+ me() {
68
+ return this.authGet("/auth/user/me");
69
+ }
70
+ myServices() {
71
+ return this.authGet("/auth/user/me/service");
72
+ }
73
+ // Actions
74
+ signInSiwe(query) {
75
+ return this.post("/auth/sign-in/siwe", query);
76
+ }
77
+ getNonce() {
78
+ return this.get("/auth/nonce");
79
+ }
80
+ refresh({ refreshToken }) {
81
+ return this.options.httpClient
82
+ .request({
83
+ method: "POST",
84
+ url: this.url("/auth/refresh"),
85
+ headers: {
86
+ Accept: "application/json",
87
+ "Content-Type": "application/json",
88
+ Authorization: `Bearer ${refreshToken}`,
89
+ },
90
+ })
91
+ .then((res) => res.data);
92
+ }
93
+ }
@@ -0,0 +1,91 @@
1
+ import * as crypto from "@evedex/exchange-crypto";
2
+ import { SignedTpSl } from "@evedex/exchange-crypto";
3
+ import { AvailableBalance, CoinList, DxFeedAuthToken, FundingList, HttpClient, InstrumentList, InstrumentMetricsList, MarketDepth, MarketInfo, Order, OrderBookRoundPrices, OrderGroup, OrderList, OrderStatus, OrderType, PaginatedQuery, Position, PositionList, TpSl, TpSlList, TpSlStatus, Trade, Transfer, User, WalletBalanceList, type OpenedOrdersList, type RecentTrade } from "./utils";
4
+ export declare enum InstrumentListQueryField {
5
+ Metrics = "metrics"
6
+ }
7
+ export interface MarketDepthQuery {
8
+ instrument: string;
9
+ maxLevel: number;
10
+ roundPrice: OrderBookRoundPrices;
11
+ }
12
+ export interface TradesQuery {
13
+ instrument: string;
14
+ }
15
+ export interface OrderListQuery extends PaginatedQuery {
16
+ instrument?: string;
17
+ status?: OrderStatus[] | OrderStatus;
18
+ group?: OrderGroup[] | OrderGroup;
19
+ type?: OrderType[] | OrderType;
20
+ side?: crypto.utils.Side;
21
+ version?: string | number;
22
+ }
23
+ export interface TpSlListQuery extends PaginatedQuery {
24
+ instrument?: string | string[];
25
+ status?: TpSlStatus | TpSlStatus[];
26
+ type?: crypto.utils.TpSlType;
27
+ }
28
+ export interface PositionUpdateQuery {
29
+ instrument: string;
30
+ leverage: number;
31
+ }
32
+ export interface OrderCancelQuery {
33
+ orderId: string;
34
+ }
35
+ export interface OrderMassCancelQuery {
36
+ instrument?: string;
37
+ }
38
+ export interface OrderMassCancelByIdQuery {
39
+ orderIds: string[];
40
+ }
41
+ export interface TpSlUpdateQuery extends SignedTpSl {
42
+ id: string;
43
+ }
44
+ export interface TpSlCancelQuery {
45
+ instrument: string;
46
+ id: string;
47
+ }
48
+ export interface ExchangeRestGatewayOptions {
49
+ exchangeURI: string;
50
+ httpClient: HttpClient;
51
+ }
52
+ export declare class ExchangeRestGateway {
53
+ readonly options: ExchangeRestGatewayOptions;
54
+ constructor(options: ExchangeRestGatewayOptions);
55
+ protected url(path: string, search?: string): string;
56
+ protected get<T>(path: string, search?: string): Promise<T>;
57
+ protected authGet<T>(path: string, search?: string): Promise<T>;
58
+ protected authPost<T>(path: string, body: any): Promise<T>;
59
+ protected authPut<T>(path: string, body: any): Promise<T>;
60
+ protected authDelete<T>(path: string): Promise<T>;
61
+ getMarketInfo(): Promise<MarketInfo>;
62
+ getMarketDepth(init: MarketDepthQuery): Promise<MarketDepth>;
63
+ getTrades(init: TradesQuery): Promise<Trade[]>;
64
+ getRecentTrades(init: TradesQuery): Promise<RecentTrade[]>;
65
+ me(): Promise<User>;
66
+ getDxFeedAuthToken(): Promise<DxFeedAuthToken>;
67
+ getWalletBalances(): Promise<WalletBalanceList>;
68
+ getFunding(): Promise<FundingList>;
69
+ getAvailableBalance(): Promise<AvailableBalance>;
70
+ getPositions(): Promise<PositionList>;
71
+ getOrders(query: OrderListQuery): Promise<OrderList>;
72
+ getOpenedOrders(): Promise<OpenedOrdersList>;
73
+ getTpSl(query: TpSlListQuery): Promise<TpSlList>;
74
+ getCoins(): Promise<CoinList>;
75
+ getInstruments(): Promise<InstrumentList>;
76
+ getInstrumentsMetrics(): Promise<InstrumentMetricsList>;
77
+ withdraw(query: crypto.SignedTradingBalanceWithdraw): Promise<Transfer>;
78
+ updatePosition(query: PositionUpdateQuery): Promise<Position>;
79
+ closePosition(query: crypto.SignedPositionCloseOrder): Promise<Order>;
80
+ createLimitOrder(query: crypto.SignedLimitOrder): Promise<Order>;
81
+ replaceLimitOrder(query: crypto.SignedReplaceLimitOrder): Promise<{}>;
82
+ createMarketOrder(query: crypto.SignedMarketOrder): Promise<Order>;
83
+ createStopLimitOrder(query: crypto.SignedStopLimitOrder): Promise<Order>;
84
+ replaceStopLimitOrder(init: crypto.SignedReplaceStopLimitOrder): Promise<{}>;
85
+ cancelOrder(query: OrderCancelQuery): Promise<{}>;
86
+ massCancelUserOrders(query: OrderMassCancelQuery): Promise<{}>;
87
+ massCancelUserOrdersById(query: OrderMassCancelByIdQuery): Promise<{}>;
88
+ createTpSl(tpsl: crypto.SignedTpSl): Promise<TpSl>;
89
+ updateTpSl(query: TpSlUpdateQuery): Promise<TpSl>;
90
+ cancelTpSl(query: TpSlCancelQuery): Promise<TpSl>;
91
+ }