beldur/kraken-go-api-client

Could not execute request #5! (Response Content-Type is 'text/html', but should be 'application/json'.)

Closed this issue · 6 comments

I am getting this result intermittently some times 6 times in a row with samples every 5 minutes:

Result: map[XXBTZEUR:map[h:[3200.00000 3228.90000] b:[3184.60000 1 1.000] c:[3188.50000 0.04743778] v:[106.82930320 6371.08316388] p:[3191.29123 3169.57439] t:[593 16441] a:[3188.20000 1 1.000] l:[3181.20000 3109.50000] o:3196.50000]]
2019/01/18 09:16:18 Could not execute request #5! (Response Content-Type is 'text/html', but should be 'application/json'.)

it will later work as many as 6 times before another failure.
I noticed it from a package that uses your client https://github.com/interstellar/kelp that is a trading bot for stellar.org trading platform. I put in a bug report there at kelp but was told it was not there code by the developers. I isolated the results coming from your code. I went and ran your main test and see the same results above.

I compiled your simple main test with go version go1.11.4 linux/amd64 running on Linux Mint

Sorry I'm not much of a go programmer so not sure I can be of much help to you. We are still making use of your client even in it's present state with just more samples and allowing up to 6 failures before we delete all offers.

I"ve collected a bit more information with an added print statement added in your code at the time of error I see this in returned body:
Added print for test sacarlson body= (

<title>api.kraken.com | 520: Web server is returning an unknown error</title> <style type="text/css">body{margin:0;padding:0}</style>

Error 520 Ray ID: 49b89e16ee8549d3 • 2019-01-19 10:28:58 UTC

Web server is returning an unknown error

You

Browser

Working
Bangkok

Cloudflare

Working
api.kraken.com

Host

Error

What happened?

There is an unknown connection issue between Cloudflare and the origin web server. As a result, the web page can not be displayed.

What can I do?

If you are a visitor of this website:

Please try again in a few minutes.

If you are the owner of this website:

There is an issue between Cloudflare's cache and your origin web server. Cloudflare monitors for these errors and automatically investigates the cause. To help support the investigation, you can pull the corresponding error log from your web server and submit it our support team. Please include the Ray ID (which is at the bottom of this error page). Additional troubleshooting resources.

Cloudflare Ray ID: 49b89e16ee8549d3 Your IP: 223.204.248.153 Performance & security by Cloudflare

) 2019/01/19 17:28:59 Could not execute request #5! (Response Content-Type is 'text/html', but should be 'application/json'.) ***************************

So from this should we assume it's not your code causing the problem but some flaw on the kraken server side?

So from this should we assume it's not your code causing the problem but some flaw on the kraken server side?

Yes :(

Hi, yes this seems to be an issue on kraken's side.

Just curious, was there any resolution on this? I'm still seeing this error on my end.

@sowmitranalla From my experience, this is caused by intermittent issues (5xx errors) on Kraken's side

Thanks for the feedback, we've seen random errors as well. 🤷🏾‍♂️