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

Uploaded Python 3

File details

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

File metadata

  • Download URL: okx_exchange-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 f7a69656ab0da1da612cbdc114c53b1528678dd5de4231615dcf35bb75a30489
MD5 605bd81e3f3ee44ed2e5e55430014a44
BLAKE2b-256 a4ab64ba2be0e542b935dacc77a8fc58e1657b6dd5c7e8f60b3e067933026020

See more details on using hashes here.

File details

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

File metadata

  • Download URL: okx_exchange-0.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 24741ad00ed3cc8fa4c5d717fecee7d115b7ac0f879a7e8bc98105e2086521a8
MD5 c3cc1587a9ed9a5bff828321eb950609
BLAKE2b-256 67ec8eb53ce7727453cc137cfc3b661dc25bd5ef1c21632437a4f6af8215a408

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