Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

okx-perp-reliable

CI PyPI Python License

Reliable asyncio SDK for OKX USDT-margined perpetual swap REST order placement.

Status Beta

Why This Exists

place_order() can become ambiguous when OKX accepts an order but the client times out before receiving the response. This SDK uses idempotent clOrdId values and bounded query-by-clOrdId reconciliation so callers receive one of three explicit outcomes: CONFIRMED, FAILED, or UNKNOWN. See docs/why.md for the full rationale.

Install

pip install okx-perp-reliable

Minimal Example

from decimal import Decimal
from okx_perp_reliable import OrderSide, OrderType, ReliablePerpClient
async def main() -> None:
    client = ReliablePerpClient(api_key="...", api_secret="...", passphrase="...", demo=True)
    result = await client.place_order(inst_id="BTC-USDT-SWAP", side=OrderSide.BUY, order_type=OrderType.MARKET, size=Decimal("0.01"), pos_side="long")

Mock Infrastructure

The deterministic in-process OKX mock used by integration tests is documented in tests/mock/README.md. It is test infrastructure, not part of the published SDK package.

License And Author

MIT License. Maintained by Alan.

中文说明见 README.zh-CN.md.

Metadata

Release files for okx-perp-reliable 0.1.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for okx-perp-reliable 0.1.0a2
File Size Uploaded Provenance Actions
okx_perp_reliable-0.1.0a2.tar.gz 12.3 kB With provenance Details for okx_perp_reliable-0.1.0a2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for okx-perp-reliable 0.1.0a2
File Interpreter ABI Platform Actions
okx_perp_reliable-0.1.0a2-py3-none-any.whl Python 3 none any Details for okx_perp_reliable-0.1.0a2-py3-none-any.whl

Total release size: 28.5 kB

Release files / okx_perp_reliable-0.1.0a2.tar.gz

Download URL okx_perp_reliable-0.1.0a2.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ba09042855738dd9f755bd41abbada29b88558cd2cff801aeb19c0c3776e84e0
BLAKE2b-256 checksum
How to use checksums
c153ae0f2b5cdc6f4833e5ea12cedfde28393baa19b329ee1d42abc694e957b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log

Release files / okx_perp_reliable-0.1.0a2-py3-none-any.whl

Download URL okx_perp_reliable-0.1.0a2-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
789efb67592b38c77a3e5914655df7e8c7b78bb06eb24db0317f0484731d6171
BLAKE2b-256 checksum
How to use checksums
a29fa787bf0a7b070d5338d6803191ec4262dcbc37788f5f8bf34fb00dccc3e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log

Security for okx-perp-reliable 0.1.0a2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for okx_perp_reliable-0.1.0a2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page