$npx skillfedfor your agent

python-okx

Python SDK for OKX

With conditionsPyPI InternetReleased Jul 2026115.6K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — python_okx-0.4.3-py3-none-any.whl
v0.4.3 · released 2026-07-07 · Python >=3.7 · 5 runtime deps: httpx, requests, websockets, certifi, loguru

Yes, if you trade on OKX and need programmatic access. The package is actively maintained, has low install friction, carries no known security vulnerabilities, and is licensed permissively. Verify that its API endpoint coverage matches your trading needs and that WebSocket reconnection behavior suits your use case before deploying to production.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires OKX API credentials (API key, secret, passphrase) obtained from your OKX account; Python >=3.7
  • Low install friction with a pure-Python wheel distribution.
  • Active maintenance status with a recent release (38 days ago).

License · maintenance · safety

permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

last release 2026-07-07 (38 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 115,564 downloads/mo, #12,243 on PyPI

Verify before relying

pip install python-okx

from okx import Account

account = Account.AccountAPI(
    api_key="your-api-key",
    api_secret_key="your-api-secret",
    passphrase="your-passphrase",
    flag="1"
)
  • Whether WebSocket reconnection and multiplexing are production-ready or still experimental
  • Performance characteristics under high-frequency trading or large order volumes
  • Completeness of API endpoint coverage relative to the latest OKX v5 API specification
Same gist for agents: .md · .json

What it is and what it does

python-okx is an unofficial Python client library for trading on the OKX cryptocurrency exchange. It wraps OKX's v5 REST API and WebSocket endpoints, allowing you to execute spot and derivatives trades, query account balances, retrieve market data, and manage orders programmatically. The library handles both public (market data) and private (authenticated trading) operations, with support for live trading and testnet/demo environments.

The package provides a straightforward object-oriented interface—you instantiate API classes like Account or Trade with your credentials, then call methods to interact with the exchange. It includes WebSocket support with automatic reconnection and connection multiplexing for real-time data streams. Dependencies are lightweight and standard (httpx, requests, websockets, certifi, loguru), making it straightforward to integrate into trading bots, portfolio dashboards, or research scripts.

Use it for

  • Build automated spot trading bots that execute buy/sell orders based on market conditions or signals
  • Retrieve real-time market data and order book snapshots via WebSocket for technical analysis
  • Manage derivatives positions (futures, perpetuals) programmatically with leverage and risk controls
  • Monitor account balances, positions, and trading history for portfolio tracking dashboards
  • Test trading strategies on OKX testnet before deploying to live trading with flag parameter

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you trade on OKX and need programmatic access.

The package is actively maintained, has low install friction, carries no known security vulnerabilities, and is licensed permissively. Verify that its API endpoint coverage matches your trading needs and that WebSocket reconnection behavior suits your use case before deploying to production.

Install

python-okx on PyPI

Before you install

Low install friction with a pure-Python wheel distribution. Active maintenance status with a recent release (38 days ago). Depends on common libraries: httpx, requests, websockets, certifi, and loguru.

Requires OKX API credentials (API key, secret, passphrase) obtained from your OKX account; Python >=3.7

License in practice

MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install python-okx

from okx import Account

account = Account.AccountAPI(
    api_key="your-api-key",
    api_secret_key="your-api-secret",
    passphrase="your-passphrase",
    flag="1"
)

Verify before relying

  • Whether WebSocket reconnection and multiplexing are production-ready or still experimental
  • Performance characteristics under high-frequency trading or large order volumes
  • Completeness of API endpoint coverage relative to the latest OKX v5 API specification

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
httpxrequestswebsocketscertifiloguru
MaintenanceActively maintained 38 days since the last release
First released
Downloads115,564 / month, #12,243 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: python_okx-0.4.3-py3-none-any.whl

Tags

Capabilities
okx exchange api wrappercryptocurrency trading sdkokx rest websocket clientspot and derivatives tradingokx market data api
Topics
trading-apicryptocurrencywebsocket

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “okx exchange api wrapper”

  • python-okxUnofficial Python wrapper for the OKX exchange v5 API, providing REST…
  • aioopenexchangeratesAsync client library for fetching currency exchange rates from the…
  • krakenexProvides a minimal Python interface to the Kraken.com cryptocurrency…

Give your agent the search over MCP, or paste the wish link into any chat.

More Internet packages

botocore Worth it
PyPI · Internet · released Aug 2026

Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.

Install it if you need programmatic access to AWS services.

permissive licensepure Python · 3.10+
1.5Bdownloads / mo
aiobotocore Worth it
PyPI · Internet · released Aug 2026

Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.

Install it if you need to call AWS services from async Python code; it is the standard way to do so.

Apache-2.0pure Python · 3.10+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
filelock Worth it
PyPI · Libraries · released Aug 2026

Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.

MITpure Python · 3.10+
717.1Mdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
googleapis-common-protos Worth it
PyPI · Internet · released Aug 2026

Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.

Apache-2.0pure Python · 3.10+
513.7Mdownloads / mo

See also python-binance · python-kraken-sdk · binance-connector · ccxt · hyperliquid-python-sdk · coinbase-advanced-py · pybit · tradingview-ta · tardis-client · kiteconnect