Hello everyone,
I made a program to automate my trading strategy with Binance API in Python.
It worked fine for about 2 weeks. But now I sometimes have an error like this one :
APIError(code=0): Invalid JSON error message from Binance: <!DOCTYPE html>
<!-- saved from url=(0032)https://www.binance.com/en/error -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="format-detection" content="telephone=no,email=no,address=no">
<title>Binance</title>
<link rel="Shortcut Icon" href="https://www.binance.com/en/favicon.ico">
<style>
body {
margin: 0
}
.img {
width: 611px;
margin: 68px auto 0
}
.info {
width: 370px;
margin: 0 auto;
text-align: center;
font-family: Arial;
}
.info h3 {
margin: 0;
font-size: 25px;
color: #333;
font-weight: normal;
}
.info p {
font-size: 14px;
font-family: Arial;
color: #333;
line-height: 18px;
margin: 0
}
.info button {
margin-top: 20px;
width: 231px;
height: 34px;
background: #FFFFFF;
border: 1px solid #F0B90B;
box-sizing: border-box;
border-radius: 3px;
font-size: 14px;
line-height: 16px;
color: #F0B90B;
}
</style>
</head>
<body>
<div class="img"><img alt="" src="/errorPages/404.jpg"></div>
<div class="info">
<h3>åºéå¦ï¼æ¨è®¿é®çç½é¡µä¸åå¨ã</h3>
<p>Sorry! The page youâre looking for cannot be found.</p>
<a href="https://www.binance.com">
<button>Return to Binance home page</button>
</a>
</div>
</body>
</html>
I already tried to search something similar on the web but no success.
This error occurs randomly when the method Client.futures_account_balance()
is called.
Most of the time it works but sometimes I get this.
Does someone know what it could be?
Thank you for your help