Instruments
For any trading application to operate effectively across various exchanges and segments, it requires a comprehensive catalog of trading instruments. The instruments API offers a consolidated CSV file containing tens of thousands of different instruments available for trading, streamlining the process of integrating and managing these assets within the application.
Retrieving the full instrument list¶
In contrast to other API calls that provide JSON responses, the instrument list API delivers a compressed CSV file containing a comprehensive list of instruments across all exchanges.
This CSV dump, generated daily, can be directly imported into a database. However, it's important to note that the "last_price" information in this dump is not real-time.
Warning
This instrument API returns large amounts of data. It's best to request it once a day (ideally at around 08:30 AM) and store in a database at your end.
Sample code¶
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://easeapi.venturasecurities.com/instrument/v1/instruments',
headers: {
'x-app-key': '8ab5rt7yp2lm9qw4s1ex'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Sample instrument csv¶
exchange_token,trading_symbol,name,last_price,expiry,strike,tick_size,lot_size,instrument,segment,exchange
1406,HINDPETRO,HINDUSTAN PETROLEUM CORP,492.05,,0,0.05,1,EQ,NSE,NSE
500104,HINDPETRO,HINDUSTAN PETROLEUM CORP,492.05,,0,0.05,1,EQ,BSE,BSE
38445,HINDPETRO24APR220CE,HINDPETRO,12.60,25/04/2024,220,5,2700,CE,NFO-OPT,NFO
38451,HINDPETRO24APR220PE,HINDPETRO,13.50,25/04/2024,220,5,2700,PE,NFO-OPT,NFO
51011,HINDPETRO24MAYFUT,HINDPETRO,496.15,30/05/2024,0,5,2700,FUT,NFO-FUT,NFO