Search code examples
kdb

API request in Q


I get this error:

'conn. OS reports: The requested protocol has not been configured into the system, or no implementation for it exists.

when I try to execute the following in a q session:

.Q.hg`$":https://poloniex.com/public?command=returnChartData&currencyPair=BTC_XMR&start=1514764800&end=1603916435&period=300&resolution=auto"

I'm unsure how to proceed?

Any insights are as always very appreciated.

The curl equivalent works fine.


Solution

  • For this situation two options come to mind:

    1. You can try setting up client certificates from here https://code.kx.com/q/kb/ssl/#tls-client-mode

    2. You can try setting the variable SSL_VERIFY_SERVER to NO before launching your q session by doing export SSL_VERIFY_SERVER=NO. To view your current TLS settings which contains this, use -26!() in your q process to display the settings.

    It's probably better to do 1) and set up the certificates if possible. This just means that you check the SSL certificate for HTTPS connections and ensures you are sending the request to your intended location.

    The above link goes into more detail about SSL/TSL knowledge which might prove useful for you.