Skip to content

Commit

Permalink
fix methods for canceling orders
Browse files Browse the repository at this point in the history
  • Loading branch information
dutu committed Sep 3, 2023
1 parent f88ec9b commit 203848c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/poloniex.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ export default class Poloniex {
*/
cancelOrder(requestParameters) {
const path = `/orders/${requestParameters.id}`
return this.#requestAuth('del', path, {}, {}, requestParameters?.getApiCallRateInfo)
return this.#requestAuth('DELETE', path, {}, {}, requestParameters?.getApiCallRateInfo)
}

/**
Expand All @@ -895,7 +895,7 @@ export default class Poloniex {
cancelBatchOrders(requestParameters) {
const path = '/orders/cancelByIds'
const body = Poloniex.#cloneObjectExceptKeys(requestParameters, ['getApiCallRateInfo'])
return this.#requestAuth('del', path, {}, body, requestParameters?.getApiCallRateInfo)
return this.#requestAuth('DELETE', path, {}, body, requestParameters?.getApiCallRateInfo)
}

/**
Expand All @@ -911,7 +911,7 @@ export default class Poloniex {
cancelAllOrders(requestParameters) {
const path = '/orders'
const body = Poloniex.#cloneObjectExceptKeys(requestParameters, ['getApiCallRateInfo'])
return this.#requestAuth('del', path, {}, body, requestParameters?.getApiCallRateInfo)
return this.#requestAuth('DELETE', path, {}, body, requestParameters?.getApiCallRateInfo)
}

/**
Expand Down Expand Up @@ -1022,7 +1022,7 @@ export default class Poloniex {
*/
cancelSmartOrder(requestParameters) {
const path = `/smartorders/${requestParameters.id}`
return this.#requestAuth('del', path, {}, {}, requestParameters?.getApiCallRateInfo)
return this.#requestAuth('DELETE', path, {}, {}, requestParameters?.getApiCallRateInfo)
}

/**
Expand All @@ -1038,7 +1038,7 @@ export default class Poloniex {
cancelBatchSmartOrders(requestParameters) {
const path = '/smartorders/cancelByIds'
const body = Poloniex.#cloneObjectExceptKeys(requestParameters, ['getApiCallRateInfo'])
return this.#requestAuth('del', path, {}, body, requestParameters?.getApiCallRateInfo)
return this.#requestAuth('DELETE', path, {}, body, requestParameters?.getApiCallRateInfo)
}

/**
Expand All @@ -1054,7 +1054,7 @@ export default class Poloniex {
cancelAllSmartOrders(requestParameters) {
const path = '/smartorders'
const body = Poloniex.#cloneObjectExceptKeys(requestParameters, ['getApiCallRateInfo'])
return this.#requestAuth('del', path, {}, body, requestParameters?.getApiCallRateInfo)
return this.#requestAuth('DELETE', path, {}, body, requestParameters?.getApiCallRateInfo)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "poloniex-api-node",
"version": "3.1.2",
"version": "3.1.3",
"description": "Simple node.js wrapper for Poloniex REST and WebSocket API.",
"type": "module",
"main": "./dist/cjs/poloniex.cjs",
Expand Down

0 comments on commit 203848c

Please sign in to comment.