question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Binance] ExchangeError while checking account status

See original GitHub issue
  • OS: macOS 10.14.3
  • Programming Language version: Node.js
  • CCXT version: 1.18.333
  • Exchange: Binance
  • Method: wapiGetAccountStatus

To check account status I use accountStatus endpoint. And when I specify incorrect apiKey/secret I get Exchange error with message {"msg":"API key does not exist","success":false}

I think AuthenticationError error will be more prefer in that case.

A little example:

const account = new ccxt.binance({apiKey: APIKEY, secret: SECRET});
try {
  const accountStatus = await account.wapiGetAccountStatus();
  // accountStatus.success === true - account available
  // accountStatus.success === false - account banned
} 
catch (error) {
  if (error instanceof ccxt.AuthenticationError) {
    console.error('Authentication failed')
  }
}

I know it’s specific case, but it will help in my app to make error handling more unified

PS. I found cool issue #4071

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
alexeymarunincommented, Mar 19, 2019

@kroitor All work correct, thanks!

0reactions
kroitorcommented, Mar 19, 2019

@alexeymarunin i’ve uploaded a fix to this 30 minutes ago, so it should be recognized as AuthenticationError as of version 1.18.377. Let me know if that doesn’t work for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ACH: Checkout error (Credentials, MFA, or Required Action)
It indicates there was a change in your bank credentials. To solve this, please update your billing information and reconnect your payment ...
Read more >
Receive 404 error when querying account status
Hi, I want to check my account status by running the following Python script: import logging from binance.spot import Spot as Client from...
Read more >
Why My Card Purchase Failed | Binance Support
A:There are several possible reasons: 1. Transaction declined: Your card cannot be used for this type of transaction. Please contact your bank or...
Read more >
Errors with Binance connection - Quantower Help
This error occurs when trying to place the order. Please check your wallet balance and make sure that there is enough coin to...
Read more >
Fix exchange connection errors - 3Commas Help Center
"API keys are no longer valid or incorrect" is the most frequent error when you can't connect the exchange account. It's impossible to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found