I developed a trading bot while ago and it was perfectly fine. Recently, it started throwing errors and it’s always about ECONNREFUSED. As far I can see it only happened during volatile moments in the market. So far I saw this error when placing orders and trying access my position. I would like to know if there is something I can do to prevent getting this error, or is there a recent change that I missed. Thanks in advance
thank you for the feedback, do you mind sharing more information, e.g.
- which endpoint did you try to call
- any library is used?
- is this on spot or futures?
It’s not one specific endpoint. So far I have seen this happening when I call /fapi/v2/positionRisk and
/fapi/v1/order. I am only using axios library to make http calls and that is the only library being used in my application. As endpoints suggests (also the tag) I am using futures api.
from the error, it seems that the client has difficult to establish a connection to the server, If it only happened during volatile market, it’s recommend to take care of the exception and try again if it’s need.