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.0.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.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yototec-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 e5d0e28ee2cc7f447d84bf4cce04ffdb2150b11946f71e9d792bd5e4f16028fb
MD5 cf28b2f343cca0d100dc6cff35d7ef75
BLAKE2b-256 4f9f2bd1c34d0f409a92232a7e29ec70750359965da4b34085a0416cd1075dbc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yototec-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7869fbd44dfcf108c8066fe207be026c9fcd525d52d745ee573613da1ae7b372
MD5 c2a9b4e944ba64485f78709a55ce4773
BLAKE2b-256 019e37ba2d583b84eb9f95dfae17ad162b7e7f54898f05f82861cc18dbaebf6b

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