Skip to main content

StockGeist's REST API Python client.

Project description

example workflow codecov

stockgeist-client-python

Python client for fetching data from StockGeist's REST API.

The full documentation of the REST API can be found at https://docs.stockgeist.ai.

Installation

You can install the package directly from this repository for getting the version with the latest bug fixes and features

pip install git+https://github.com/stockgeist/stockgeist-client-python.git

or you can install the stable version from PyPI

pip install stockgeist-client-python

Getting started

Basic usage is very straightforward. First you have to create an account with StockGeist and obtain your token for connecting to the REST API. Then simply create an instance of StockGeistClient and pass your StockGeist REST API token to it:

import stockgeist

client = stockgeist.StockGeistClient(token="example-token")

Now through the client object you get the access to all methods for fetching data from the REST API. Let's say that you want to find out how many messages have been posted on social media in the last hour about the Apple stock (NASDAQ:AAPL). All you have to do is to run the following code snippet:

aapl_response = client.get_message_metrics(symbol="AAPL", timeframe="1h")
print(aapl_response.as_dict)

Resulting output:

{'timestamp': ['2021-06-11 13:20:00+00:00'], 'total_count': [13.0]}

The aapl_response is an object encapsulating the data fetched from the API together with some useful methods to easily explore the data, e.g., plot the time series.

For now, the best source of information about the functionality of stockgeist-client-python are the docstrings inside the source files.

You can also find a sample Jupyter notebook demonstrating the possibilities of stockgeist-client-python in the samples directory of this project.

Licence

This package is provided as open source under the terms of the MIT Licence.

Contributing

Feel free to contact us at stockgeist@neurotechnology.com or simply create an issue if you would like to see additional features implemented in this package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stockgeist-client-python-0.1.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

stockgeist_client_python-0.1.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file stockgeist-client-python-0.1.1.tar.gz.

File metadata

  • Download URL: stockgeist-client-python-0.1.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for stockgeist-client-python-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fefa3149389667c802f30d0c1b173cde70edc46a8708bc64ced5095e50e50f04
MD5 4194595d2213e484bd09c207a5da8836
BLAKE2b-256 ac019af35e183b77e8cbdf240251f106d0f3adbd3d34513845a6362a64d1be6e

See more details on using hashes here.

File details

Details for the file stockgeist_client_python-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: stockgeist_client_python-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for stockgeist_client_python-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5db474180b290d955b60fa8de790f735c3293221e20b45f7a884da893a6d2e5b
MD5 1643cb7667f9ac2994d65e8c68d15add
BLAKE2b-256 f83687cee2b78755cd62b1c4f1ce20aad913707955686dd0c042bdc32b5c0aca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page