From aedfb0b32febb2a6b1c4a401e7702dbe212bc567 Mon Sep 17 00:00:00 2001 From: tiagosiebler Date: Thu, 22 May 2025 11:48:13 +0100 Subject: [PATCH] chore(): update example --- examples/ws-api-client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/ws-api-client.ts b/examples/ws-api-client.ts index 217e2d1..fa6e7e5 100644 --- a/examples/ws-api-client.ts +++ b/examples/ws-api-client.ts @@ -61,7 +61,9 @@ async function main() { // https://github.com/tiagosiebler/awesome-crypto-examples/wiki/Timestamp-for-this-request-is-outside-of-the-recvWindow // wsClient.setTimeOffsetMs(-5000); - await wsClient.getWSClient().connectWSAPI(); + // Optional: prepare the WebSocket API connection in advance. + // This happens automatically but you can do this early before making any API calls, to prevent delays from a cold start. + // await wsClient.getWSClient().connectWSAPI(); try { const response = await wsClient.submitNewOrder({