Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nepse-api-helper

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nepse-api-helper

a wrapper to use nepse api easily since they set up weird restrictions

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

nepse-api-helper

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";

//at first before anything, call UpdateSecurityBriefs. This is required to get a cache of security id and symbol
await UpdateSecurityBriefs();

//now you can use the functions that you need. for example

const securityLists = await GetSecurityBriefs(); //this will return a list of all securities including active and inactive, with thier status.

//get the detials of a security
const securityDetail = await GetSecurityDetail('NIFRA');

//if you want to check if market is open or not, you can use, GetMarketStatus
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'

FAQs

Package last updated on 17 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc