I have few questions when it comes to connection to an API. is it possible to connect to public api for market data (binance or so on) using kdb q? how can i do it
can I acheive this using .Q.hg or other methodslike web socket
You can use this library by Jonathon McMurrray. Just load the ws-client_0.2.2.q file into a q session. This example below shows how to request Top of book messages for BTCUSDT
https://github.com/jonathonmcmurray/ws.q
Note, that because you need a secure connection (for wss), you need to have set the following environmental variables first. Including creation of your SSL certs.