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

Uploaded Python 3

File details

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

File metadata

  • Download URL: okx_exchange-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 0491b395eea54e563821c87dc9758075cb0b0f42db666f0369c8bae535cb1288
MD5 5f78d357684abb434dbf6c3c13f25c33
BLAKE2b-256 4af27369673f3f0030b261494e8e61f5a1a922c126622a6200529a342a8ba59b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: okx_exchange-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 58f1152acfc5ea6fda07fae28c60899a3e2e5c710afb9e5d4853ad752171634e
MD5 a8c2fa07cd4ce963625a12d3ebc6ddad
BLAKE2b-256 6d6653fb0b3a3091ee4cdb3a903fd3f40da08cbfc25987cfe6731120eb964bb1

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