Testing Quotes API

Hi hardik, LTP fetch from newly introduced quotes api is not working for indices, working for stocks and fno . can you please extend it to indices as well

Also Please roll out v2 python library

Hello @optionstrader

If you look at the documentation and the ENUM values, for Index, you need to use IDX_I as the exchange segment. Do try with this.

On the python library, yes, we will take it up.

1 Like

@optionstrader @Hardik

I didn’t quite understand what data need to pass for Index.

For Bank securityId: 25

Can you please give some example how to pass it?

Thanks!

Same code for IDX_I pass bn sec id

@optionstrader sorry to bother you again. I tried it again but still getting 400:

1 Like

Replace NSE_EQ with IDX_I

Hi @Dharmender

To get index data change the instrument to IDX_I. Here is the list of all attributes.

@Naman @optionstrader

I tried it. I am still facing the same problem. Is this API available to a pre-release group?

Hi @Dharmender

Your request structure is fine. Can you verify the header please.

@Naman

Here is the header part:

I have changed the ClientId to take screenshot otherwise I tried with a valid one.

Does request data need to be sent in the header?

Hi @Dharmender

Just put access-token & client-id. The client id is wrong. Check your client on dhan frontend under profile section. Also make sure you are using valid access token.

@Naman

UserId and AccessToken is correct. I’m using them since long. I just changed before taking screenshot for security reasons otherwise using them. I’m not getting authorization error here instead getting 400.

As you suggested now, I provided acces-token and userId but still getting the same error.

Postman struct is wring it seems

1 Like

Thanks! There was something wrong with Postman. It is working now after closing all tabs.

2 Likes