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(BTC/USDC, "limit", "buy", 1, 100000)

Sync

from okx_exchange import OkxSync

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

Websockets

from okx_exchange import OkxWs

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

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.6.tar.gz (621.6 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.6-py3-none-any.whl (748.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: okx_exchange-0.0.6.tar.gz
  • Upload date:
  • Size: 621.6 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.6.tar.gz
Algorithm Hash digest
SHA256 c3829c897d9f04cc78c50b8bb6ed77cf588b494c4d8b590e47820d326cc27e80
MD5 e90e5f4e89e4460b5b750621f4c6f032
BLAKE2b-256 c6cae021eb5ab6bdf79ced1cddde539f69e1fdb13dac3e10c282991ddf033044

See more details on using hashes here.

File details

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

File metadata

  • Download URL: okx_exchange-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 74e373fbebe4b92be3ab9a8f09dee6c16b3a24478404d7675d1cbd7ceebe6a31
MD5 050700b5a97817d2bdaf7e987a0ac90f
BLAKE2b-256 456e77aa84bb3fef4668d1bdde399a708acb3a5b3e0fa9a241a8cc7173b07256

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