A Python SDK for accessing the Historical Market Data API of Bjarkan
Project description
Bjarkan Market Data SDK
A Python SDK for accessing the Historical Market Data API of Bjarkan.
Installation
You can install the Bjarkan Market Data SDK using pip:
pip install bjarkan-sdk
Usage
Here's a quick example of how to use the SDK:
from bjarkan_client import BjarkanClient
from datetime import datetime
# Initialize the client
client = MarketDataClient("https://api.bjarkan.io")
# Authenticate
client.authenticate("your_username", "your_password")
# Get available tables
tables = client.get_tables()
print("Available tables:", tables)
# Get history for a specific table
history = client.get_history(
table_name="example_table",
start_time=datetime(2024, 10, 5, 15, 30, 00),
end_time=datetime(2024, 10, 5, 15, 40, 00),
exchange='binance',
symbol="BTC/USDT",
sort_descending=False
)
print("Data:", history[:5]) # Print first 5 entries
API Reference
BjarkanClient
__init__(base_url: str)
Initialize the client with the base URL of the Bjarkan Market Data API.
authenticate(username: str, password: str)
Authenticate with the API using your username and password.
get_tables() -> List[Dict[str, any]]
Get a list of available tables and their configurations.
get_history(table_name: str, start_time: datetime, end_time: datetime, exchange: str = None, symbol: str = None, sort_descending: bool = False) -> List[Dict[str, any]]
Retrieve historical data for a specific table.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bjarkan_sdk-0.1.12.tar.gz
.
File metadata
- Download URL: bjarkan_sdk-0.1.12.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec75c0866f7ec3e185f74a0c5de6c7dd9358b5942b081daddac2818647e23ee4 |
|
MD5 | e06cc6d45a36db4d1b365bf2e6e03d5d |
|
BLAKE2b-256 | da8bf4ec723dc75c1892bb38f4f56f4080c8821895a859955ca312cbf87a8e60 |
File details
Details for the file bjarkan_sdk-0.1.12-py3-none-any.whl
.
File metadata
- Download URL: bjarkan_sdk-0.1.12-py3-none-any.whl
- Upload date:
- Size: 1.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 691eb0936c02fbd5cede1c9c2635ae20f281c74b45d97c32e25fd3d8be944cdc |
|
MD5 | e80232a50612fb4b345e6d77d083dd0c |
|
BLAKE2b-256 | 75a795ae123d0ac20c5cab3a979a941cfc17801d0cfc250b84b5b75b6fbb9ce6 |