sometimes historical API is returning html garbage like below

AQD468
Unknown Content-Type (text/html; charset=UTF-8) with response: (b'<!DOCTYPE html>Just a moment...*{box-sizing:border-box;margin:0;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%;color:#313131;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}body{display:flex;flex-direction
  • rakeshr
    Can you paste the complete API request log/parameter here?
    BTW, it doesn't look like you are using an official Python client.
  • AQD468
    of course i am using the official client but with my wrapper code. i will try and get the log for you.
  • Matti
    This looks like Cloudflare is blocking your request and rendering a challenge dialog.
  • pannet1
    @Matti How to make this go away.
  • sujith
    @pannet1 @AQD468,
    Are you sure, you are using the Kite Connect endpoints? Can you enable debug logs and send the complete stacktrace?
  • pannet1
    @sujith,
    yes, using the official python client and just certain convenient function wrapper around that. never coded any url on our own.

    ps: noted that subsequent calls are passing incorrect (nested dictionary) as params. fixed it. will let you know with debug logs if the issue repeats.

    thanks @rakeshr @Matti
Sign In or Register to comment.