Skip to main content

Kraken WebSockets Client v2 in Python

Sample Kraken WebSockets client in Python. This client was created for demonstration purposes only. It is neither maintained nor supported.

Installation

pip install kraken-wsclient-v2

Sample Usage

import time

from kraken_wsclient_v2 import kraken_wsclient_v2 as client

def my_handler(message):
    # Here you can do stuff with the messages
    print(message)

my_websockets_token = ''

my_client = client.WssClient()
my_client.start()

# Sample public-data subscription:

my_client.subscribe_public(
    # Insert params and req_id as described in the docs
    params = {
        'channel': 'ticker',
        'snapshot': True,
        'symbol': ['BTC/USD', 'XRP/USD'],
    },
    req_id = 1234567890,
    callback = my_handler
)

time.sleep(3)

# Sample private-data subscription:

my_client.subscribe_private(
    # Insert params and req_id as described in the docs
    params = {
        'channel': 'executions',
        'snapshot': True,
        'snapshot_trades': True,
        'order_status': True,
        'ratecounter': True,
        'token': my_websockets_token
    },
    req_id = 1234567891,
    callback = my_handler
)

Compatibility

This code has been tested on Python 3.7.

Contributing

Pull requests are not monitored and likely will be ignored.

Metadata

Release files for kraken-wsclient-v2 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kraken-wsclient-v2 0.0.2
File Size Uploaded Provenance Actions
kraken-wsclient-v2-0.0.2.tar.gz 4.6 kB Without provenance Details for kraken-wsclient-v2-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kraken-wsclient-v2 0.0.2
File Interpreter ABI Platform Actions
kraken_wsclient_v2-0.0.2-py3-none-any.whl Python 3 none any Details for kraken_wsclient_v2-0.0.2-py3-none-any.whl

Total release size: 9.5 kB

Release files / kraken-wsclient-v2-0.0.2.tar.gz

Download URL kraken-wsclient-v2-0.0.2.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
770095818926bc9f0ad28774a73b98b486c31e7a19334070e615866741430491
BLAKE2b-256 checksum
How to use checksums
effca2779625c4107f756cb831a84a9f625b03fdd6b126d751f4d19b69b3c2d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / kraken_wsclient_v2-0.0.2-py3-none-any.whl

Download URL kraken_wsclient_v2-0.0.2-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9e24a8aa793dfb834b9050487324b26a7bde7b4d7e88bcfaee86d3fbc31f081
BLAKE2b-256 checksum
How to use checksums
f90df5797e2e5e7fdb584598dad1523408497573abe4f05d84dcff3d2ac4332d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for kraken-wsclient-v2 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page