I’m using some methods from Futures API like .market().tickerSymbol(parameters), .account().positionInformation(parameters). Everything seems to be perfect until they do not exceed 24 hours of functionality. If I use them for more than 24h the following exception is thrown: [ResponseHandler] OKHTTP Error: interrupted.
The endpoints you’re referring to are REST API endpoints which usually wouldn’t be constantly connected for a period of 24hrs, so when you say 24 hours of functionality what exactly do you mean by that? Consistently calling the endpoints in a loop for a period of 24 hours? Perhaps you’re getting rate limited or losing network connection? A websocket stream subscription is only valid for 24 hours for example.
Calling the endpoints in a loop is not a good idea.
A potential solution would be to use websocket stream subscription. But make sure you re-create that connection before it expires.