npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ordernet-api

v1.2.5

Published

Query https://spark{nesua,meitav,psagot}.ordernet.co.il/api

Downloads

21

Readme

OrdernetAPI

A simple tool for querying https://spark{nesua,meitav,psagot}.ordernet.co.il/api.
Right now only returns total balance for each account.

npm version

CLI

npm install -g ordernet-api

Options

$ ordernet-api -h
Options:
  -u, --user, --username  Username for login into Spark.     [string] [required]
  -p, --pass, --password  Password for login into Spark.     [string] [required]
  -b, --broker            Broker name.
                      [string] [required] [choices: "nesua", "meitav", "psagot"]
  -a, --account-key       Print balance only for these account keys. This is
                          usually much faster. An account key has the form
                          "ACC_XXX-YYYYYY". You can find it out using the
                          --verbose flag.                                [array]
  -v, --verbose           Print log messages                           [boolean]
  -h, --help              Show help                                    [boolean]
  -V, --version           Show version number                          [boolean]

Examples:
  cli.js -u 1234 -p abcd -b nesua           Print the balance for each account
                                            associated with this Spark user.
  cli.js -u 1234 -p abcd -a ACC_000-111111  Print the balance only for the
  -b nesua                                  account key ACC_000-111111.
  cli.js -u 1234 -p abcd -a ACC_000-111111  Print the balance only for the
  -a ACC_000-222222 -b nesua                account keys ACC_000-111111 and
                                            ACC_000-222222.

For more info visit https://github.com/assafmo/OrdernetAPI

Library API

npm install ordernet-api

or

yarn add ordernet-api

Constants

Functions

Typedefs

config : Config

The internal config object.

Kind: global constant

authenticate(username, password, broker) ⇒ Void

Authenticate against the Spark system of the broker. This function must be called first as it initializes the apiUrl and authorization fields in the internal config. That way we won't need to authenticate again for each API call. Uses /api/Auth/Authenticate.

Kind: global function

| Param | Type | Description | | -------- | ------------------- | ---------------------------------------------------------------------------------------------------------------- | | username | string | The Spark username | | password | string | The Spark password | | broker | string | Used to get the API URL like this: https://spark${broker}.ordernet.co.il/api. E.g. nesua, meitav, psagot |

getAccounts() ⇒ Array.<Account>

Get all the accounts listed under this Spark user. Uses /api/DataProvider/GetStaticData.

Kind: global function
Returns: Array.<Account> - - All accounts listed under this Spark user

getAccountBalance(account) ⇒ number

Get total balance of an account. Uses /api/Account/GetAccountSecurities.

Kind: global function
Returns: number - - Total balance of the account

| Param | Type | Description | | ------- | -------------------------------- | -------------------------- | | account | Account | Account to get balance for |

accountKeyToNumber(key) ⇒ string

Convert account key to account number.

Kind: global function
Returns: string - - The account number

| Param | Type | Description | | ----- | ------------------- | ------------------------------------------------ | | key | string | The account key for API usage (ACC_XXX-YYYYYY) |

Config : Object

Kind: global typedef
Properties

| Name | Type | Description | | ------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | apiUrl | string | The API URL to send requests to. Probably one of https://sparknesua.ordernet.co.il/api, https://sparkmeitav.ordernet.co.il/api or https://sparkpsagot.ordernet.co.il/api. | | authorization | string | The bearer token to pass for authentication in each API call |

Account : Object

Kind: global typedef
Properties

| Name | Type | Description | | ------ | ------------------- | ------------------------------------------------ | | key | string | The account key for API usage (ACC_XXX-YYYYYY) | | name | string | The name listed on the account | | number | number | The account number (YYYYYY) |

Refs

  • https://github.com/danielbraun/ordernet-scraper