Skip to main content

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_sdk 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


Download files

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

Source Distribution

bjarkan_sdk-0.1.11.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

bjarkan_sdk-0.1.11-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

Details for the file bjarkan_sdk-0.1.11.tar.gz.

File metadata

  • Download URL: bjarkan_sdk-0.1.11.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

Hashes for bjarkan_sdk-0.1.11.tar.gz
Algorithm Hash digest
SHA256 21b78fdca54bf10dde0f44f6f637218b1dda9ee6ccc13f53abb1bb8bdaf788f5
MD5 babaceb05caac9ee6dd128047716cf50
BLAKE2b-256 b0c422c4b55e7687d3ef0cd8963b4035c9234d0231806d5920242595a78fe76a

See more details on using hashes here.

File details

Details for the file bjarkan_sdk-0.1.11-py3-none-any.whl.

File metadata

File hashes

Hashes for bjarkan_sdk-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 9a6df5448ea4c5fee74e5cb3b1e9a622e5fe1f2960ffdc68f35e26c023c58b4c
MD5 4ca44113a8b4de977cbae61c1fc137a4
BLAKE2b-256 06e19650dd1a4a3cea92e9d27dd3a719e24afb50f2fe38bf70f8e1df320bd1a0

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