nepse-api-helper
Nepse has made it really hard to use their API, this library just makes it easier to do stuff i guess
works as of 2023-06-25
you can install from npm using npm install nepse-api-helper
import { get_access_token, get_valid_token, get_market_status, instantiate_nepse_helper, get_security_detail, get_security_briefs } from "nepse-api-helper";
await instantiate_nepse_helper();
const securityLists = await get_security_briefs();
const securityDetail = await get_security_detail('NIFRA');
const marketStatus = await get_market_status();
this package is my first and was made rapidly so there might be many bad practices, I am happy to receive constructive criticism and pull requests.
SSL issue
You might get SSL issue, in which case, you will need to make your runtime ignore
the SSL error. this can be done in nodejs by exporting this environment variable
export NODE_TLS_REJECT_UNAUTHORIZED='0'
have a look at tests to get basic understanding of how it works