nepse-api-helper
Nepse has made it really hard to use their API, you can read more on how to
this library was implemented in this doc https://github.com/dahsameer/nepse-api-document
i haven't actually tested the library but doing something like following should work.
you can install from npm using npm install nepse-api-helper
import { UpdateSecurityBriefs, GetSecurityDetail, GetSecurityBriefs, GetMarketStatus } from "nepse-api-helper";
await UpdateSecurityBriefs();
const securityLists = await GetSecurityBriefs();
const securityDetail = await GetSecurityDetail('NIFRA');
const marketStatus = await GetMarketStatus();
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'