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.4.tar.gz (536.2 kB view details)

Uploaded Source

Built Distribution

hashkey-0.0.4-py3-none-any.whl (1.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hashkey-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 abdf4a7660af1b23e17d2ed02351068d042470f261cf3be54a705538539b66a0
MD5 d332ae316df7f91a1c5f89dcde4d1263
BLAKE2b-256 b28293a922967160524d0d518864dfa1368c61dd624cb708b175b6dffb95cc9a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hashkey-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 1.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 112d76b6938686d842866e4797cf5e731f7ffbf6a9e1de6af4286d54c0f0ff42
MD5 ee434ca17091aaa21b9433260f304108
BLAKE2b-256 c7a0bbf6ba59f4c91dbb1ac9b9639aa2644359057a426eef1f7aabbdde5eb60d

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