Socket
Socket
Sign inDemoInstall

worldtradingdata

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

worldtradingdata

Node.js wrapper for World Trading Data API


Version published
Maintainers
1
0

Weekly downloads

Readme

Source

worldtradingdata

Node.js wrapper for World Trading Data API

Installation

npm i worldtradingdata

Usage

import { WorldTradingDataWrapper } from "worldtradingdata";

var token = "<yourToken>";

var wtd = new WorldTradingDataWrapper(token);

wtd.realTime(["AAPL"]).then(
  (realTimeResponse): void => {
    console.log(realTimeResponse.data[0]);
  }
);

Class Methods

constructor

A wrapper for the World Trading Data API

Parameters

  • token API token

realTime

Returns the nearest trading data for stocks and indexes worldwide.

Parameters

  • symbols Array with stocks you wish to return.
  • sortOrder Change the sort order of values. Options: 'asc', 'desc'.
  • sortBy Sort by a particular data attribute or by the order you entered the list. Options: symbol, name, list_order
  • output Change output to CSV. Options: 'csv', 'json'.

mutualFundRealTime

The endpoint allows up to 500 mutual funds to be returned with each request in exceptional timing.

Parameters

  • symbols Array with stocks you wish to return.
  • sortOrder Change the sort order of values. Options: 'asc', 'desc'.
  • sortBy Sort by a particular data attribute or by the order you entered the list. Options: symbol, name, list_order
  • output Change output to CSV. Options: 'csv', 'json'.

intradayMarketData

Return a stream of the latest data for stocks and indexes worldwide.

Parameters

  • symbol Value of the stock, index or mutual fund you wish to return data for. Only one symbol per request.
  • interval Number of minutes between the data. Options: 1, 2, 5, 60.
  • range The number of days data is returned for. Options: 1-30.
  • sort Change the sort order of values. Options: 'asc', 'desc'.
  • output Change output to CSV. Options: 'csv', 'json'.
  • formatted Alter JSON data format. Does not affect CSV. Options: true, false.

fullHistory

Return the end of day history for every day the stock, index or mutual fund has been traded.

Parameters

  • symbol Value of the stock, index or mutual fund you wish to return data for.
  • date_from
  • date_to
  • sort Change the sort order of values. Options: 'asc', 'desc'.
  • output Change output to CSV. Options: 'csv', 'json'.
  • formatted Alter JSON data format. Does not affect CSV. Options: true, false.
  • interval Number of minutes between the data. Options: 1, 2, 5, 60.
  • range The number of days data is returned for. Options: 1-30.

multiSingleDayHistory

Returns data for multiple stock, index or mutual funds for a single specific day.

Parameters

  • symbols Comma seperated values of the tickers you wish to return.
  • date The date you wish to retrieve data for.
  • sort Change the sort order of values. Options: 'asc', 'desc'.
  • output Change output to CSV. Options: 'csv', 'json'.
  • formatted Alter JSON data format. Does not affect CSV. Options: true, false.

forex

Returns all the conversion rates for the base currency in exceptional timing.

Parameters

  • base Value of the currency you wish to return data for.

forexHistory

Returns the end of day conversion rate for each day of data.

Parameters

  • base Base of the currency you wish to return data for.
  • convertTo Value of the currency you wish to return conversion data to.
  • sort Change the sort order of values. Options: 'asc', 'desc'.
  • output Change output to CSV. Options: 'csv', 'json'.
  • formatted Alter JSON data format. Does not affect CSV. Options: true, false.

forexSingleDay

eturn the all the conversion rates for the base currency for a specific date in exceptional timing.

Parameters

  • base Value of the currency you wish to return data for.
  • date Date you wish to return the conversion data for.
  • output Change output to CSV. Options: 'csv', 'json'.
  • formatted Alter JSON data format. Does not affect CSV. Options: true, false.

stockSearch

Search and filter the entire stock and index database to build your own search functionality for your applications.

Parameters

  • searchTerm Search term you wish to find stocks for. Example: AAPL
  • searchBy Search by only symbol or name, or both. Options: symbol, name, symbol, name.
  • stockExchange Filter by a array of stock exchanges.
  • currency Filter by a array of currencies.
  • limit Limit the number of results returned. Options: 1-500
  • page Value of the page you wish to see values for.
  • sortBy Sort by a specific column. Options: symbol, name, currency, stock_exchange_long, stock_exchange_short, market_cap, volume, change_pct.
  • sortOrder Change the sort order of values. Options: 'asc', 'desc'.
  • output Change output to CSV. Options: 'csv', 'json'.

Keywords

FAQs

Last updated on 21 Jul 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc