@riocrypto/common-server 1.0.2795 → 1.0.2798
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.
|
@@ -157,6 +157,7 @@ declare class BinanceClient {
|
|
|
157
157
|
quantity?: number;
|
|
158
158
|
quoteOrderQty?: number;
|
|
159
159
|
price?: string | number;
|
|
160
|
+
newClientOrderId?: string;
|
|
160
161
|
}): Promise<BinanceOrderResponse>;
|
|
161
162
|
getOrder(symbol: string, orderId: number): Promise<BinanceOrderResponse>;
|
|
162
163
|
cancelOrder(symbol: string, orderId: number): Promise<any>;
|
|
@@ -226,8 +227,8 @@ declare class BinanceClient {
|
|
|
226
227
|
withdrawMXN(amount: number, clabe: string): Promise<string>;
|
|
227
228
|
getWithdrawalHistoryByOrderId(withdrawalId: string): Promise<BinanceWithdrawHistoryItem[]>;
|
|
228
229
|
getDepositByTxHash(hash: string): Promise<BinanceDepositHistoryItem | undefined>;
|
|
229
|
-
createMarketOrder(symbol: string, amount: number, side: "BUY" | "SELL"): Promise<BinanceOrderResponse>;
|
|
230
|
-
createLimitOrder(symbol: string, side: "BUY" | "SELL", quantity: number, price: string | number, timeInForce?: string): Promise<BinanceOrderResponse>;
|
|
230
|
+
createMarketOrder(symbol: string, amount: number, side: "BUY" | "SELL", newClientOrderId?: string): Promise<BinanceOrderResponse>;
|
|
231
|
+
createLimitOrder(symbol: string, side: "BUY" | "SELL", quantity: number, price: string | number, timeInForce?: string, newClientOrderId?: string): Promise<BinanceOrderResponse>;
|
|
231
232
|
getLatestTradedPrice(symbol: string): Promise<number>;
|
|
232
233
|
getLowestAsk(symbol: string, limit?: number): Promise<number>;
|
|
233
234
|
getHighestBid(symbol: string, limit?: number): Promise<number>;
|
|
@@ -325,7 +325,7 @@ class BinanceClient {
|
|
|
325
325
|
return response.find((deposit) => deposit.txId === hash);
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
|
-
createMarketOrder(symbol, amount, side) {
|
|
328
|
+
createMarketOrder(symbol, amount, side, newClientOrderId) {
|
|
329
329
|
return __awaiter(this, void 0, void 0, function* () {
|
|
330
330
|
return this.newOrder({
|
|
331
331
|
symbol,
|
|
@@ -333,10 +333,11 @@ class BinanceClient {
|
|
|
333
333
|
type: "MARKET",
|
|
334
334
|
quantity: side === "SELL" ? amount : undefined,
|
|
335
335
|
quoteOrderQty: side === "BUY" ? amount : undefined,
|
|
336
|
+
newClientOrderId,
|
|
336
337
|
});
|
|
337
338
|
});
|
|
338
339
|
}
|
|
339
|
-
createLimitOrder(symbol, side, quantity, price, timeInForce = "GTC") {
|
|
340
|
+
createLimitOrder(symbol, side, quantity, price, timeInForce = "GTC", newClientOrderId) {
|
|
340
341
|
return __awaiter(this, void 0, void 0, function* () {
|
|
341
342
|
return this.newOrder({
|
|
342
343
|
symbol,
|
|
@@ -345,6 +346,7 @@ class BinanceClient {
|
|
|
345
346
|
timeInForce,
|
|
346
347
|
quantity,
|
|
347
348
|
price,
|
|
349
|
+
newClientOrderId,
|
|
348
350
|
});
|
|
349
351
|
});
|
|
350
352
|
}
|