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 - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

dist/lib/constants.d.ts

41

package.json
{
"name": "nepse-api-helper",
"version": "1.1.0",
"description": "a wrapper to use nepse api easily since they set up weird restrictions",
"keywords": ["nepse", "api", "nepal stock", "nepal"],
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"repository": "git@github.com:dahsameer/nepse-api-helper.git",
"author": "Sameer Dahal",
"license": "UNLICENSED",
"dependencies": {},
"devDependencies": {
"typescript": "^4.6.3"
},
"scripts": {
"build": "tsc",
"test": "export NODE_TLS_REJECT_UNAUTHORIZED='0' && node --experimental-fetch dist/index.js"
}
}
"name": "nepse-api-helper",
"version": "1.2.0",
"description": "a wrapper to use nepse api easily since they set up weird restrictions",
"keywords": [
"nepse",
"api",
"nepal stock",
"nepal"
],
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"repository": "git@github.com:dahsameer/nepse-api-helper.git",
"author": "Sameer Dahal",
"license": "UNLICENSED",
"devDependencies": {
"typescript": "^5.1.3",
"vitest": "^0.32.2"
},
"scripts": {
"build": "tsc",
"test": "vitest"
}
}
# 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](https://github.com/dahsameer/nepse-api-document)
Nepse has made it really hard to use their API, this library just makes it easier to do stuff i guess
works as of 2022-24-08
works as of 2023-06-25

@@ -11,16 +10,16 @@ you can install from npm using `npm install nepse-api-helper`

```javascript
import { UpdateSecurityBriefs, GetSecurityDetail, GetSecurityBriefs, GetMarketStatus } from "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";
//at first before anything, call UpdateSecurityBriefs. This is required to get a cache of security id and symbol
await UpdateSecurityBriefs();
//at first before anything, call instantiate_nepse_helper(). This is required to get the deobsfucation logic for token.
await instantiate_nepse_helper();
//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 their status.
const securityLists = await get_security_briefs(); //this will return a list of all securities including active and inactive, with their status.
//get the detials of a security
const securityDetail = await GetSecurityDetail('NIFRA');
const securityDetail = await get_security_detail('NIFRA');
//if you want to check if market is open or not, you can use, GetMarketStatus
const marketStatus = await GetMarketStatus();
const marketStatus = await get_market_status();
```

@@ -38,1 +37,3 @@

```
have a look at tests to get basic understanding of how it works

@@ -27,3 +27,3 @@ {

/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
"module": "NodeNext", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */

@@ -30,0 +30,0 @@ // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */

Sorry, the diff of this file is not supported yet

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