dhan-oss / DhanHQ-py

The official Python client for communicating with the Dhan API.
MIT License
60 stars 25 forks source link

Missing info in example given #15

Closed sudhakarsi closed 8 months ago

sudhakarsi commented 9 months ago

There are tons of issues with DHAN library. I am picking from example only as of now

Where to find security_id for NSE/BSE/MCX?

Place an order for Equity Cash

dhan.place_order(security_id='1333', #hdfcbank exchange_segment=dhan.NSE, transaction_type=dhan.BUY, quantity=10, order_type=dhan.MARKET, product_type=dhan.INTRA, price=0)

how to get correlation id

Get order by correlation id

dhan.get_order_by_corelationID(corelationID)

dhan.intraday_minute_data(security_id,exchange_segment,instrument_type)

Historical Daily Data

dhan.historical_daily_data(symbol,exchange_segment,instrument_type,expiry_code,from_date,to_date)

How come JulianDate is here and what's its value?

Time Converter

dhan.convert_to_date_time(Julian Date)

dhan-oss commented 9 months ago

Hello @sudhakarsi

Will look into adding more information here. Do note that this is just the hands-on code and not entire documentation for the library. You can refer to API Documentation for all the information.

In case you feel there is some information which needs to be present here, feel free to contribute here, as it is an Open Source project.

sudhakarsi commented 9 months ago

Can you please pinpoint me where in documentation page above information is provided.

dhan-oss commented 9 months ago

Adding below:

Where to find security_id for NSE/BSE/MCX?

Screenshot 2024-02-13 at 5 33 44 PM

You can check the Security ID here: https://images.dhan.co/api-data/api-scrip-master.csv

how to get correlation id

Screenshot 2024-02-13 at 5 38 30 PM

It is a unique identifier provided by you, also referred as 'tag'

How come JulianDate is here and what's its value?

All the date formats in Historical Data API is sent as Julian Date. This is why time converter is provided.