Closed daddywookie closed 3 years ago
The message
{\"code\":-2010,\"msg\":\"Account has insufficient balance for requested action.\"}"
is an original message from Binance API, therefore we should not change it. They might inform this message or a different one, and it would be quite a mistake to assume that the error always comes from the balance having not enough funds. In the future, I or someone might map our own responses accordingly to Binance's status code tho something like
const mapCodeToResponse = {
-2010: "Tried to buy but there was not enough funds available",
-2011: "Another response to another error"
...
}
But for now, the original message would be enough
OK, I'll throw this in the "nice to have" pile for later
Receiving the following warning is very scary
Error in executing buying volatiles function: "Error in executing buy function: {\"code\":-2010,\"msg\":\"Account has insufficient balance for requested action.\"}"
Maybe this can be caught and replaced with something friendlier?
Tried to buy but there was not enough funds available