Skip to main content

Python SDK Extension for the OKX API v5

Project description

Python-okx-ext

Download Stats

⚠ Project Continuation Notice

The original project appears to be no longer actively maintained.

To keep it up to date, I will continue its development and strive to support all API endpoints.

Contributions, bug reports, and feature requests are welcome! Please feel free to submit a pull request or open an issue.


Overview

This is an unofficial Python wrapper for the OKX exchange v5 API

If you came here looking to purchase cryptocurrencies from the OKX exchange, please go here.

Source code

https://github.com/parker1019/python-okx-ext

API trading tutorials

Make sure you update often and check the Changelog for new features and bug fixes.

Features

  • Implementation of all Rest API endpoints.
  • Private and Public Websocket implementation
  • Testnet support
  • Websocket handling with reconnection and multiplexed connections

Quick start

Prerequisites

python version:>=3.9

WebSocketAPI: websockets package advise version 6.0

Step 1: register an account on OKX and apply for an API key

Step 2: install python-okx-ext

pip install python-okx-ext

Step 3: Run examples

  • Fill in API credentials in the corresponding examples
api_key = ""
secret_key = ""
passphrase = ""

Note

  • To learn more about OKX API, visit official OKX API documentation

  • If you face any questions when using WebSocketAPI,you can consult the following links

    • asynciowebsockets document/github

      https://docs.python.org/3/library/asyncio-dev.html
      https://websockets.readthedocs.io/en/stable/intro.html
      https://github.com/aaugustin/websockets
      
    • About code=1006

      https://github.com/Rapptz/discord.py/issues/1996
      https://github.com/aaugustin/websockets/issues/587
      

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_okx_ext-0.1.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_okx_ext-0.1.0-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file python_okx_ext-0.1.0.tar.gz.

File metadata

  • Download URL: python_okx_ext-0.1.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for python_okx_ext-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5f7854e97241c9ffa688a12975d0530359f24437321e3d94a3864922dcbdf774
MD5 faae450a04943b89d9c2ee724aa086e0
BLAKE2b-256 0700dc5ed46b18064d757c312b2f8d453ad3fedd615d4917424092d65dc2b674

See more details on using hashes here.

File details

Details for the file python_okx_ext-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: python_okx_ext-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 34.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for python_okx_ext-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba92aadf395e1ca7f0d8a784160079976b431c9495e6aebc023edd002070f588
MD5 265a3fb53d4eb4ad3d7ac494d5e6dbad
BLAKE2b-256 343a616a63d645a081e902e4480782f7280bfc10c6a21219c39276389f3f573e

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