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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file okx_exchange-0.0.7.tar.gz.
File metadata
- Download URL: okx_exchange-0.0.7.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b7182b49cadfadc0c9254f2c8c4f29601b829beb3d17724288304b7ceb40a5b
|
|
| MD5 |
d3e51bde7416e0a3e1398be359140222
|
|
| BLAKE2b-256 |
b82f1b876f93780bd345c62a66eb6afdc04387ede0a0738ad772a38ece9f10ad
|
File details
Details for the file okx_exchange-0.0.7-py3-none-any.whl.
File metadata
- Download URL: okx_exchange-0.0.7-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8030eac3ae1b5db422fe22fa273f0f369f5df9c979804e3ad8c26687cf36d820
|
|
| MD5 |
55c95747892cdad15e1e9b87461052d2
|
|
| BLAKE2b-256 |
4abf94be1821ff6c78c43ae814bcd488d09d9af51864c521c9c779e8ae9f30c3
|