Equibles Stocks API for Python

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/equibles/stocks-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/equibles/stocks-python.git)

Then import the package:

import equibles_stocks 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import equibles_stocks

Getting Started

Please follow the installation procedure and then run the following:


currencies: %s\n” % e) # Configure API key authorization: Bearer configuration = equibles_stocks.Configuration() configuration.api_key[‘Authorization’] = ‘YOUR_API_KEY’ # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix[‘Authorization’] = ‘Bearer’ # Configure API key authorization: Query String configuration = equibles_stocks.Configuration() configuration.api_key[‘ApiKey’] = ‘YOUR_API_KEY’ # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix[‘ApiKey’] = ‘Bearer’ # create an instance of the API class api_instance = equibles_stocks.ExchangesApi(equibles_stocks.ApiClient(configuration)) try: # Get the list of all the exchanges supported by this API. api_response = api_instance.list() pprint(api_response) except ApiException as e: print(“Exception when calling ExchangesApi->list: %s\n” % e) # Configure API key authorization: Bearer configuration = equibles_stocks.Configuration() configuration.api_key[‘Authorization’] = ‘YOUR_API_KEY’ # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix[‘Authorization’] = ‘Bearer’ # Configure API key authorization: Query String configuration = equibles_stocks.Configuration() configuration.api_key[‘ApiKey’] = ‘YOUR_API_KEY’ # Uncomment below to setup prefix (e.g. Bearer) for API key, if needed # configuration.api_key_prefix[‘ApiKey’] = ‘Bearer’ # create an instance of the API class api_instance = equibles_stocks.ExchangesApi(equibles_stocks.ApiClient(configuration)) operating_mic = ‘operating_mic_example’ # str | The operating MIC of the exchange to search. try: # Get all the stocks for a given exchange. api_response = api_instance.stocks(operating_mic) pprint(api_response) except ApiException as e: print(“Exception when calling ExchangesApi->stocks: %s\n” % e)”>

from __future__ import print_function
import time
import equibles_stocks
from equibles_stocks.rest import ApiException
from pprint import pprint

# Configure API key authorization: Bearer
configuration = equibles_stocks.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure API key authorization: Query String
configuration = equibles_stocks.Configuration()
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# create an instance of the API class
api_instance = equibles_stocks.ExchangesApi(equibles_stocks.ApiClient(configuration))

try:
    # Get the list of all the currencies supported by this API.
    api_response = api_instance.currencies()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExchangesApi->currencies: %s\n" % e)

# Configure API key authorization: Bearer
configuration = equibles_stocks.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure API key authorization: Query String
configuration = equibles_stocks.Configuration()
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# create an instance of the API class
api_instance = equibles_stocks.ExchangesApi(equibles_stocks.ApiClient(configuration))

try:
    # Get the list of all the exchanges supported by this API.
    api_response = api_instance.list()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExchangesApi->list: %s\n" % e)

# Configure API key authorization: Bearer
configuration = equibles_stocks.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure API key authorization: Query String
configuration = equibles_stocks.Configuration()
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# create an instance of the API class
api_instance = equibles_stocks.ExchangesApi(equibles_stocks.ApiClient(configuration))
operating_mic = 'operating_mic_example' # str | The operating MIC of the exchange to search.

try:
    # Get all the stocks for a given exchange.
    api_response = api_instance.stocks(operating_mic)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExchangesApi->stocks: %s\n" % e)

Documentation for API Endpoints

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

Class Method HTTP request Description
ExchangesApi currencies GET /stocks/exchanges/currencies Get the list of all the currencies supported by this API.
ExchangesApi list GET /stocks/exchanges/list Get the list of all the exchanges supported by this API.
ExchangesApi stocks GET /stocks/exchanges/stocks Get all the stocks for a given exchange.
FundamentalsApi dividends GET /stocks/fundamentals/dividends Get the dividends for a given stock.
FundamentalsApi financial_reports GET /stocks/fundamentals/financialreports Get the financial statements for a given stock.
MetricsApi price_to_earnings GET /stocks/metrics/pricetoearnings Get the price to earnings ratio over time for this stock.
NewsApi list GET /stocks/news/list Get the latest news for this stock.
NewsApi publishers GET /stocks/news/publishers Get all the available news publishers.
PerformanceApi list GET /stocks/performance/list Lists the performance for a given stock.
PricesApi end_of_day GET /stocks/prices/endofday Lists the end of day prices for a given stock.
SectorsApi list GET /stocks/sectors/list Lists all the sectors.
SectorsApi search_stocks GET /stocks/sectors/searchstocks Lists and the stock in a given sector/industry.
StocksApi list GET /stocks/list Get a list of all the available stocks.
StocksApi officers GET /stocks/officers Get the officers of the company.
StocksApi profile GET /stocks/profile The profile of this stock.
StocksApi search GET /stocks/search Search among all the available stocks.
StocksApi splits GET /stocks/splits Get all the splits for a given stock.
TransactionsApi insiders GET /stocks/transactions/insiders Lists the insider transactions for a given stock.
TransactionsApi institutional GET /stocks/transactions/institutional Lists 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

Author

[email protected]

GitHub

View Github