Skip to main content

A Python client for interacting with the Yototec Market API

Project description

Yototec Market Python Client

A lightweight Python client to interact with the Yototec Market REST API.

This library provides convenience methods for:

  • Retrieving a time series of aggregated price data for a ticker between a date range.
  • Retrieving the latest available aggregated price data for a ticker.

Table of Contents

Features

  • Historical Data
    • Fetch a time series of aggregated prices for a given ticker in a specified frequency (minute/hour/day), within a date range.
  • Latest Data
    • Fetch the latest available aggregated price data for a given ticker.

Requirements

  • Python 3.8+ (recommend)
  • requests library

Installation

Since this is a standalone Python file, you can simply:

  1. Clone or download this repository.
  2. Ensure you have requests installed:
    pip install requests
    
  3. Place client.py in your project, or install it as a local module.

Usage

Initializing the Client

from yototec.client import Client

# If you have an API key:
api_key = "YOUR_YOTOTEC_API_KEY"

# Initialize the client with the default Yototec Market API URL
client = Client(api_key=api_key)

# Or override the base URL if needed:
# client = Client(base_url="https://some-other-domain.com", api_key=api_key)

Examples

This is an example of how you might use this client:

from yototec.client import Client

def main():
    # Replace with your real API key
    api_key = "YOUR_YOTOTEC_API_KEY"
    client = Client(api_key=api_key)

    # Example: Fetch hourly data for a ticker from 2025-01-01 to 2025-01-05
    sdate = "2025-01-01T00:00:00"
    edate = "2025-01-05T00:00:00"
    data = client.get_data(tic="BTCUSD", sdate=sdate, edate=edate, freq="hour")

    if data:
        print("Historical Data:", data)
    else:
        print("No data or an error occurred")

if __name__ == "__main__":
    main()

Supports

Contributions, bug reports, and feature requests are welcome! Feel free to email us at info@yototec.com

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

yototec-0.1.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yototec-0.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file yototec-0.1.1.tar.gz.

File metadata

  • Download URL: yototec-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for yototec-0.1.1.tar.gz
Algorithm Hash digest
SHA256 425c4878c3f3960c460c14bc57aa5a6776645173b9f7121d30320a440a33a35c
MD5 9deebebe4e073fc6b9c9e0806365677c
BLAKE2b-256 5fabfcc1c71de960853de87ecb6eed52bcf40b0ebc15cfc1a3a1b293a28bebb6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yototec-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for yototec-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1dd9cc76482d886b64b70bc25a1220848723a9180033e54bd281e13c848096e9
MD5 6ec7332b71a203f539689a99372b32c1
BLAKE2b-256 443e9112d58b341258297848953607cee284a7124d33ff81e90953e89db3a09f

See more details on using hashes here.

Supported by

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