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

Uploaded Python 3

File details

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

File metadata

  • Download URL: okx_exchange-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 77bc8685cc6544b443894f5ff79affed9c6961e3579f6b277b10bb6c69f8778e
MD5 f40871d5ce1f2fe7ff696000fe77057e
BLAKE2b-256 23cdd77524bc5b56a363c736d15b1d2362ee759f90c3fdb708cb56aa4c7c5db0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: okx_exchange-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 711a25254935bc84dfb7fb33b530e9ae7d4a57fe413f8a60140b69550abd7d45
MD5 875b680c088f38c5be84606297e77b7d
BLAKE2b-256 1af5bc5a4aeae485184f7599e5999c6dfa43ffc011a90041715e1e1ab6d8d8d3

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