1.0.0 • Published 2 years ago

equibles_stocks v1.0.0

Weekly downloads
-
License
Unlicense
Repository
-
Last release
2 years ago

Equibles Stocks - JavaScript client

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install equibles_stocks --save

git

If the library is hosted at a git repository, e.g. https://github.com/equibles/stocks-javascript then install it via:

    npm install equibles/stocks-javascript --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var EquiblesStocks = require('equibles_stocks');
var defaultClient = EquiblesStocks.ApiClient.instance;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

// Configure API key authorization: Query String
var Query String = defaultClient.authentications['Query String'];
Query String.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Query String.apiKeyPrefix['ApiKey'] = "Token"

var api = new EquiblesStocks.ExchangesApi()
api.currencies().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://api.equibles.com

ClassMethodHTTP requestDescription
EquiblesStocks.ExchangesApicurrenciesGET /stocks/exchanges/currenciesGet the list of all the currencies supported by this API.
EquiblesStocks.ExchangesApilistGET /stocks/exchanges/listGet the list of all the exchanges supported by this API.
EquiblesStocks.ExchangesApistocksGET /stocks/exchanges/stocksGet all the stocks for a given exchange.
EquiblesStocks.FundamentalsApidividendsGET /stocks/fundamentals/dividendsGet the dividends for a given stock.
EquiblesStocks.FundamentalsApifinancialReportsGET /stocks/fundamentals/financialreportsGet the financial statements for a given stock.
EquiblesStocks.MetricsApipriceToEarningsGET /stocks/metrics/pricetoearningsGet the price to earnings ratio over time for this stock.
EquiblesStocks.NewsApilistGET /stocks/news/listGet the latest news for this stock.
EquiblesStocks.NewsApipublishersGET /stocks/news/publishersGet all the available news publishers.
EquiblesStocks.PerformanceApilistGET /stocks/performance/listLists the performance for a given stock.
EquiblesStocks.PricesApiendOfDayGET /stocks/prices/endofdayLists the end of day prices for a given stock.
EquiblesStocks.SectorsApilistGET /stocks/sectors/listLists all the sectors.
EquiblesStocks.SectorsApisearchStocksGET /stocks/sectors/searchstocksLists and the stock in a given sector/industry.
EquiblesStocks.StocksApilistGET /stocks/listGet a list of all the available stocks.
EquiblesStocks.StocksApiofficersGET /stocks/officersGet the officers of the company.
EquiblesStocks.StocksApiprofileGET /stocks/profileThe profile of this stock.
EquiblesStocks.StocksApisearchGET /stocks/searchSearch among all the available stocks.
EquiblesStocks.StocksApisplitsGET /stocks/splitsGet all the splits for a given stock.
EquiblesStocks.TransactionsApiinsidersGET /stocks/transactions/insidersLists the insider transactions for a given stock.
EquiblesStocks.TransactionsApiinstitutionalGET /stocks/transactions/institutionalLists the institutional transactions for a given stock.

Documentation for Models

Documentation for Authorization

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Query String

  • Type: API key
  • API key parameter name: ApiKey
  • Location: URL query string