Skip to main content

hashkey crypto exchange api client

Project description

hashkey-python

Python SDK (sync and async) for Hashkey with Rest and WS capabilities.

You can check Hashkey's docs here: Docs

You can check the SDK docs here: SDK

This package derives from CCXT and allows you to call pretty much every endpoint by either using the unified CCXT API or calling the endpoints directly

Installation

pip install hashkey

Usage

Sync

from hashkey import HashkeySync

def main():
    instance = HashkeySync({})
    ob =  instance.fetch_order_book("BTC/USDC")
    print(ob)
    #
    # balance = instance.fetch_balance()
    # order = instance.create_order("BTC/USDC", "limit", "buy", 1, 100000)

Async

import asyncio
from hashkey import HashkeyAsync

async def main():
    instance = HashkeyAsync({})
    ob =  await instance.fetch_order_book("BTC/USDC")
    print(ob)
    #
    # balance = await instance.fetch_balance()
    # order = await instance.create_order("BTC/USDC", "limit", "buy", 1, 100000)

asyncio.run(main())

Websockets

from hashkey import HashkeyWs

async def main():
    instance = HashkeyWs({})
    while True:
        ob = await instance.watch_order_book("BTC/USDC")
        print(ob)
        # orders = await instance.watch_orders("BTC/USDC")

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

hashkey-0.0.2.tar.gz (536.2 kB view details)

Uploaded Source

Built Distribution

hashkey-0.0.2-py3-none-any.whl (659.4 kB view details)

Uploaded Python 3

File details

Details for the file hashkey-0.0.2.tar.gz.

File metadata

  • Download URL: hashkey-0.0.2.tar.gz
  • Upload date:
  • Size: 536.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for hashkey-0.0.2.tar.gz
Algorithm Hash digest
SHA256 57daff9abc523afe4923d6e4dfc4fe21d995fb10213a292f561e7a1c23f636f4
MD5 cdfb8f2933529987bec46a7539a43eba
BLAKE2b-256 0e67979483f2f6ea571036ab28f4b7ee7c1db94604c3b736ccee6998b7d9d733

See more details on using hashes here.

File details

Details for the file hashkey-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: hashkey-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 659.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for hashkey-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec9bfa2bdf73e53a6125e0b0b0ab036e6080e4492cff319c203d6572380dd3fa
MD5 6eafa68e8e14f9460acbe9083d1da1d8
BLAKE2b-256 a000d5599cd6497e839c90f0c18c8afd97e2d80b1918b6a0a32351300519053d

See more details on using hashes here.

Supported by

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