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.
Metadata
Release files for stockgeist-client-python 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stockgeist-client-python-0.1.1.tar.gz | 11.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stockgeist_client_python-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.9 kB
Release files / stockgeist-client-python-0.1.1.tar.gz
| Download URL | stockgeist-client-python-0.1.1.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fefa3149389667c802f30d0c1b173cde70edc46a8708bc64ced5095e50e50f04
|
|
BLAKE2b-256 checksum How to use checksums |
ac019af35e183b77e8cbdf240251f106d0f3adbd3d34513845a6362a64d1be6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / stockgeist_client_python-0.1.1-py3-none-any.whl
| Download URL | stockgeist_client_python-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5db474180b290d955b60fa8de790f735c3293221e20b45f7a884da893a6d2e5b
|
|
BLAKE2b-256 checksum How to use checksums |
f83687cee2b78755cd62b1c4f1ce20aad913707955686dd0c042bdc32b5c0aca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|