Connecting Websockets
Follow the below steps to establish a connection with websocket.
Using Python SDK
If you are using our Python SDK, you can use the built-in pocketfulSocket class.
First import the pocketfulwebsocket library:
Then create an instance:
Then call the method run_socket to establish a connection:
Using Standard WebSockets
Since our system uses standard WebSocket protocol, you can use any WebSocket client library in your preferred language (e.g., ws for Node.js, gorilla/websocket for Go).
Base WebSocket URL: wss://algo.pocketful.in/api/v1/ws (Note: Ensure you include your access token in the connection handshake or subsequent authentication message).
After completing the connection, you can subscribe to market data or order updates.