[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:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kroitor All work correct, thanks!
@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.