@riocrypto/common-server 1.0.1139 → 1.0.1140
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.
|
@@ -146,6 +146,22 @@ class BitsoClient {
|
|
|
146
146
|
return data.payload[0];
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
+
cancelOrder(oid) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
const requestConfig = {
|
|
152
|
+
method: "DELETE",
|
|
153
|
+
url: `${this.baseUrl}/api/v3/orders/${oid}`,
|
|
154
|
+
headers: {
|
|
155
|
+
"Content-Type": "application/json",
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
const signedRequestConfig = this.signRequest(requestConfig);
|
|
159
|
+
const { data } = yield (0, axios_1.default)(signedRequestConfig);
|
|
160
|
+
if (!data.success) {
|
|
161
|
+
throw new Error("Error deleting Bitso order");
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
149
165
|
getOrderBook(crypto) {
|
|
150
166
|
return __awaiter(this, void 0, void 0, function* () {
|
|
151
167
|
const requestConfig = {
|