Node.js wrapper for World Trading Data API
npm i worldtradingdata
import { WorldTradingDataWrapper } from "worldtradingdata";
var token = "<yourToken>";
var wtd = new WorldTradingDataWrapper(token);
wtd.realTime(["AAPL"]).then(
(realTimeResponse): void => {
console.log(realTimeResponse.data[0]);
}
);
- constructor
- realTime
- mutualFundRealTime
- intradayMarketData
- fullHistory
- multiSingleDayHistory
- forex
- forexHistory
- forexSingleDay
- stockSearch
A wrapper for the World Trading Data API
token
API token
Returns the nearest trading data for stocks and indexes worldwide.
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_orderoutput
Change output to CSV. Options: 'csv', 'json'.
The endpoint allows up to 500 mutual funds to be returned with each request in exceptional timing.
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_orderoutput
Change output to CSV. Options: 'csv', 'json'.
Return a stream of the latest data for stocks and indexes worldwide.
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.
Return the end of day history for every day the stock, index or mutual fund has been traded.
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.
Returns data for multiple stock, index or mutual funds for a single specific day.
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.
Returns all the conversion rates for the base currency in exceptional timing.
base
Value of the currency you wish to return data for.
Returns the end of day conversion rate for each day of data.
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.
eturn the all the conversion rates for the base currency for a specific date in exceptional timing.
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.
Search and filter the entire stock and index database to build your own search functionality for your applications.
searchTerm
Search term you wish to find stocks for. Example: AAPLsearchBy
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-500page
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'.