In my code I added ‘User-Agent: rest-client’ header and it worked. I’m exploring this library too to fasten development but seems like something wrong.
Hi Dharmender, wlecome to delta exchange. You are not hitting the appropriate endpoint. please use https://api.india.delta.exchange/v2/ endpoint for trading on delta India. Let me know if you face any further issues.
1). @ayush.aggrwl I’m hitting the same base URL that you mentioned but still facing same issue. I have attached screenshot of this. This is of .Net so please have a look into highlighted part:
I think this error is coming for all the APIs endpoints. However I tried few. I directly tried CCXT for APIs and was getting same error there as not sure if anything need to setup there as well. I just installed and tried.
Hope this will help!
2). I was exploring Web Socket doc for candlesticks history and live candle data. I need bit help to understand what and how should I use in case if I want to get say hundred candles of history including current candle, say for resolution of ‘5m’ in one go (if it is API hit) or through Web Socket channel. I think this is very normal use case.
3). Consider a use case where user need to get multiple resolution data through web socket then do our current setup allow to get candles of multiple resolution in one subscription. Also, what if user want to get data of multiple symbol in one subscription. I’m thinking of pretty much flexible way to get multiple resolution data of multiple symbols. Indian market brokers provides those.
I hope these two use case makes sense to you. Please let me know if we don’t have current setup like this or I’m going out of standards or something.
Some libraries don’t handle missing User-Agent headers by default. Adding the header resolves the issue, so it’s recommended to include it for all requests.
Use REST APIs for historical candlesticks and WebSocket APIs for live candlesticks. According to the API documentation, you can subscribe to multiple channels with different resolutions and symbol lists.
Yes, multiple resolutions can be applied in a single subscription.
This is the complete message that I receive…
“Request blocked. We can’t connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.”
When I access the same URL with the timestamps in the browser, I do get the candle data. So why is it not working when accessing from code? I am using cURL with PHP.
You need to pass the “user-agent” header in the request.
As you are using php to query data, you will need to ensure that you are adding the user-agent header in the request.
Even after adding the user-agent header, if you get the same error, then please share the x-amz-id that appears on the screen with the 403 forbidden error.
I was also getting the same 403 error. request blocked.
By adding the user agent. i got that error resolved. now i am getting the response as
“error”:“unauthorized”,“success”:false
where could i be wrong. i have mentioned proper api key and secret at the required places.