For Node.js
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install equibles_stocks --save
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
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.
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
}
}
]
}
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: 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);
});
All URIs are relative to https://api.equibles.com
Class | Method | HTTP request | Description |
---|---|---|---|
EquiblesStocks.ExchangesApi | currencies | GET /stocks/exchanges/currencies | Get the list of all the currencies supported by this API. |
EquiblesStocks.ExchangesApi | list | GET /stocks/exchanges/list | Get the list of all the exchanges supported by this API. |
EquiblesStocks.ExchangesApi | stocks | GET /stocks/exchanges/stocks | Get all the stocks for a given exchange. |
EquiblesStocks.FundamentalsApi | dividends | GET /stocks/fundamentals/dividends | Get the dividends for a given stock. |
EquiblesStocks.FundamentalsApi | financialReports | GET /stocks/fundamentals/financialreports | Get the financial statements for a given stock. |
EquiblesStocks.MetricsApi | priceToEarnings | GET /stocks/metrics/pricetoearnings | Get the price to earnings ratio over time for this stock. |
EquiblesStocks.NewsApi | list | GET /stocks/news/list | Get the latest news for this stock. |
EquiblesStocks.NewsApi | publishers | GET /stocks/news/publishers | Get all the available news publishers. |
EquiblesStocks.PerformanceApi | list | GET /stocks/performance/list | Lists the performance for a given stock. |
EquiblesStocks.PricesApi | endOfDay | GET /stocks/prices/endofday | Lists the end of day prices for a given stock. |
EquiblesStocks.PricesApi | intraday | GET /stocks/prices/intraday | Lists the intraday prices for a given stock with one minute precision. |
EquiblesStocks.SectorsApi | list | GET /stocks/sectors/list | Lists all the sectors. |
EquiblesStocks.SectorsApi | searchStocks | GET /stocks/sectors/searchstocks | Lists and the stock in a given sector/industry. |
EquiblesStocks.StocksApi | list | GET /stocks/list | Get a list of all the available stocks. |
EquiblesStocks.StocksApi | officers | GET /stocks/officers | Get the officers of the company. |
EquiblesStocks.StocksApi | profile | GET /stocks/profile | The profile of this stock. |
EquiblesStocks.StocksApi | screener | POST /stocks/screener | Get a list of stocks constraint to several criteria. |
EquiblesStocks.StocksApi | search | GET /stocks/search | Search among all the available stocks. |
EquiblesStocks.StocksApi | splits | GET /stocks/splits | Get all the splits for a given stock. |
EquiblesStocks.TransactionsApi | insiders | GET /stocks/transactions/insiders | Lists the insider transactions for a given stock. |
EquiblesStocks.TransactionsApi | institutional | GET /stocks/transactions/institutional | Lists the institutional transactions for a given stock. |
- EquiblesStocks.AssetType
- EquiblesStocks.BalanceSheet
- EquiblesStocks.CashFlowStatement
- EquiblesStocks.CurrenciesResponse
- EquiblesStocks.Currency
- EquiblesStocks.Dividend
- EquiblesStocks.DividendsResponse
- EquiblesStocks.Exchange
- EquiblesStocks.ExchangesResponse
- EquiblesStocks.FinancialAssetsResponse
- EquiblesStocks.FinancialReport
- EquiblesStocks.FiscalPeriod
- EquiblesStocks.FundamentalsResponse
- EquiblesStocks.Image
- EquiblesStocks.IncomeStatement
- EquiblesStocks.Industry
- EquiblesStocks.MetricNullablePointsResponse
- EquiblesStocks.News
- EquiblesStocks.NewsResponse
- EquiblesStocks.NullablePoint
- EquiblesStocks.Officer
- EquiblesStocks.OfficersResponse
- EquiblesStocks.Performance
- EquiblesStocks.PerformanceResponse
- EquiblesStocks.Price
- EquiblesStocks.PricesResponse
- EquiblesStocks.Publisher
- EquiblesStocks.PublishersResponse
- EquiblesStocks.Recommendation
- EquiblesStocks.ResponseStatus
- EquiblesStocks.ScreenerRequest
- EquiblesStocks.Sector
- EquiblesStocks.SectorsResponse
- EquiblesStocks.SplitsResponse
- EquiblesStocks.StockProfile
- EquiblesStocks.StockProfileResponse
- EquiblesStocks.StockProfilesResponse
- EquiblesStocks.StockSplit
- EquiblesStocks.Transaction
- EquiblesStocks.TransactionType
- EquiblesStocks.TransactionsResponse
- Type: API key
- API key parameter name: ApiKey
- Location: URL query string