questrade icon indicating copy to clipboard operation
questrade copied to clipboard

Practice accounts return 'Bad Request'

Open bswerd opened this issue 5 years ago • 1 comments

Hello, I'm getting a 'Bad Request' when using a test account. Here's my code:

var Questrade = require('questrade');


var options = {
    test: true,
    seedToken: <token_from_practice_acct>
}

var qt = new Questrade(options);

// Wait to login
qt.on('ready', function () {

    qt.getBalances(function (err, balances) {
        console.log(balances);
        console.log(err);
    })

});

qt.on('error', function(err) {
    console.log(err);
});

Here's what that returns:

{ message: 'failed_to_refresh_key',
  details: 
   { message: 'login_failed',
     token: <token_from_practice_acct>,
     details: 'Bad Request' } }

When I use an API Token from a production account and set test : false, it works fine.

Given my experience with Questrade, I wouldn't be surprised if this was an API issue... I had this exact issue when using the API directly without your wrapper. Have you gotten test accounts to work recently? Any help is appreciated.

Thanks!

bswerd avatar Jul 10 '19 03:07 bswerd

I think this is a Questrade issue. I've been trying to get a practice account working, and have no success. POST and GET both give the "HTTP/1.1 400 Bad Request" response.

nerdralph avatar Aug 14 '19 20:08 nerdralph