ccxt icon indicating copy to clipboard operation
ccxt copied to clipboard

feat(ace): cancelOrder - returns unified response

Open samgermain opened this issue 1 year ago • 1 comments

Getting the error below with any order that I try to create

ExchangeNotAvailable ace POST https://ace.io/polarisex/open/v2/order/order 400 Bad Request {"timestamp":"2024-06-19 13:53:03","status":400,"error":"Bad Request","path":"/polarisex/open/v2/order/order"}
---------------------------------------------------
[ExchangeNotAvailable] ace POST https://ace.io/polarisex/open/v2/order/order 400 Bad Request {"timestamp":"2024-06-19 13:53:03","status":400,"error":"Bad Request","path":"/polarisex/open/v2/order/order"}

    at                            …/order/order 400 Bad Request {"timestamp":"2024-06-19 13:53                                                                                  
    at handleHttpStatusCode       ts/src/base/Exchange.ts:1402                                  throw new ErrorClass (this.id + ' ' + method + ' ' + url + ' ' + codeAsString +…
    at <anonymous>                ts/src/base/Exchange.ts:1294                                  this.handleHttpStatusCode (response.status, response.statusText, url, method, r…
    at processTicksAndRejections  node:internal/process/task_queues:95                                                                                                          
    at fetch2                     ts/src/base/Exchange.ts:4217                                  return await this.fetch (request['url'], request['method'], request['headers'],…
    at request                    ts/src/base/Exchange.ts:4221                                  return await this.fetch2 (path, api, method, params, headers, body, config);    
    at createOrder                ts/src/ace.ts:641                                             const response = await this.privatePostV2OrderOrder (this.extend (request, para…
    at run                        examples/ts/cli.ts:338                                        const result = await exchange[methodName] (... args)                            

ace POST https://ace.io/polarisex/open/v2/order/order 400 Bad Request {"timestamp":"2024-06-19 13:53:03","status":400,"error":"Bad Request","path":"/polarisex/open/v2/order/order"}

samgermain avatar May 29 '24 22:05 samgermain

@samgermain try this:

const sortedData = this.keysort (data);
auth += Object.values (sortedData). join('');

sc0Vu avatar May 30 '24 09:05 sc0Vu

@samgermain try this:

const sortedData = this.keysort (data);
auth += Object.values (sortedData). join('');

When you first posted this, it looked like this fixed the problem, so I submitted it in another PR, it looks like I'm now receiving the same issue again though

% ace createOrder BTC/USDT limit buy 0.0003 52000
2024-07-10T07:45:07.514Z
Node.js: v18.12.0
CCXT v4.3.59
ace.createOrder (BTC/USDT, limit, buy, 0.0003, 52000)
ExchangeNotAvailable ace POST https://ace.io/polarisex/open/v2/order/order 400 Bad Request {"timestamp":"2024-07-10 15:45:08","status":400,"error":"Bad Request","path":"/polarisex/open/v2/order/order"}
---------------------------------------------------
[ExchangeNotAvailable] ace POST https://ace.io/polarisex/open/v2/order/order 400 Bad Request {"timestamp":"2024-07-10 15:45:08","status":400,"error":"Bad Request","path":"/polarisex/open/v2/order/order"}

    at                            …/order/order 400 Bad Request {"timestamp":"2024-07-10 15:45                                                                                  
    at handleHttpStatusCode       ts/src/base/Exchange.ts:1404                                  throw new ErrorClass (this.id + ' ' + method + ' ' + url + ' ' + codeAsString +…
    at <anonymous>                ts/src/base/Exchange.ts:1296                                  this.handleHttpStatusCode (response.status, response.statusText, url, method, r…
    at processTicksAndRejections  node:internal/process/task_queues:95                                                                                                          
    at fetch2                     ts/src/base/Exchange.ts:4225                                  return await this.fetch (request['url'], request['method'], request['headers'],…
    at request                    ts/src/base/Exchange.ts:4245                                  return await this.fetch2 (path, api, method, params, headers, body, config);    
    at createOrder                ts/src/ace.ts:641                                             const response = await this.privatePostV2OrderOrder (this.extend (request, para…
    at run                        examples/ts/cli.ts:338                                        const result = await exchange[methodName] (... args)                            

ace POST https://ace.io/polarisex/open/v2/order/order 400 Bad Request {"timestamp":"2024-07-10 15:45:08","status":400,"error":"Bad Request","path":"/polarisex/open/v2/order/order"}

samgermain avatar Jul 10 '24 07:07 samgermain