Browser and node.js javascript SDK for MetaApi, a professional cloud forex trading API for MetaTrader platform which supports both MetaTrader MetaTrader 5 and MetaTrader 4. Free usage tier available.
I am getting the following error when trying to open a trade using connection.createMarketOrder():
TimeoutError: MetaApi websocket client request ... of type trade timed out. Please make sure your account is connected to broker before retrying your request.
Even though I am getting the "trade timed out" error / exception, the trade is executed.
I initialize the connection once and keep the connection stored as a global variable for easy access across my classes.
Is there a function to check wether the connection is alive or not? I couldn't find one in the docs.
I am using the RPC API and I am also getting a lot of these errors that seem to resolve themselves but they are polluting my logs:
Failed to subscribe TimeoutError: MetaApi websocket client request ... of type subscribe timed out.
Should I be using the streaming API instead and is there a way to disable the MetaApi logs?
Hi,
I am getting the following error when trying to open a trade using connection.createMarketOrder():
TimeoutError: MetaApi websocket client request ... of type trade timed out. Please make sure your account is connected to broker before retrying your request.
Even though I am getting the "trade timed out" error / exception, the trade is executed. I initialize the connection once and keep the connection stored as a global variable for easy access across my classes. Is there a function to check wether the connection is alive or not? I couldn't find one in the docs.
I am using the RPC API and I am also getting a lot of these errors that seem to resolve themselves but they are polluting my logs:
Failed to subscribe TimeoutError: MetaApi websocket client request ... of type subscribe timed out.
Should I be using the streaming API instead and is there a way to disable the MetaApi logs?