Skip to main content

okx exchange api client

Project description

okx-python

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

You can check Okx'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 okx-exchange

Usage

Async

from okx_exchange import OkxAsync

async def main():
    instance = OkxAsync({})
    order = await instance.create_order(__EXAMPLE_SYMBOL__, "limit", "buy", 1, 100000)

Sync

from okx_exchange import OkxSync

def main():
    instance = OkxSync({})
    order =  instance.create_order(__EXAMPLE_SYMBOL__, "limit", "buy", 1, 100000)

Websockets

from okx_exchange import OkxWs

async def main():
    instance = OkxWs({})
    while True:
        orders = await instance.watch_orders(__EXAMPLE_SYMBOL__)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

okx_exchange-0.0.2.tar.gz (621.7 kB view details)

Uploaded Source

Built Distribution

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

okx_exchange-0.0.2-py3-none-any.whl (748.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for okx_exchange-0.0.2.tar.gz
Algorithm Hash digest
SHA256 76624ebe2a20fd47a00c13ae9113f0f791e240265d18c11b50728417302cda0d
MD5 4a845569298b8cd8e8f81447f3e1a16b
BLAKE2b-256 7e59a635229e82056d454952ead840a15bab02e0f0a8bc9e4e5b8449fb6e0449

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for okx_exchange-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 33e40e9cfb7b8f167d1f6085c6c1338a2bbfa8ddaa5e95b2aaa67f51092cabd3
MD5 464900530d5995e8f9fba5d0e5a8a0c6
BLAKE2b-256 981efa55f500429c4742f7fdf7464afc92a7bda3511c6b94e3c9083ba70e10ac

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