Skip to main content

Python SDK for OKX

Project description

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/okxapi/python-okx

OKX API Telegram

https://t.me/OKXAPI

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

pip install python-okx

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-0.3.9.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

python_okx-0.3.9-py3-none-any.whl (33.0 kB view details)

Uploaded Python 3

File details

Details for the file python_okx-0.3.9.tar.gz.

File metadata

  • Download URL: python_okx-0.3.9.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for python_okx-0.3.9.tar.gz
Algorithm Hash digest
SHA256 3ac4adb3430f9c7b9a73fe76b04b4680f64f05182340b67355b0adbd7a6bdbd2
MD5 b1cacdbdaa718573ec3dd747730d6a9b
BLAKE2b-256 d62c77f702e6c27c77731af03327dafb5fe0579b450968ed9b3fb0c5e284e4a4

See more details on using hashes here.

File details

Details for the file python_okx-0.3.9-py3-none-any.whl.

File metadata

  • Download URL: python_okx-0.3.9-py3-none-any.whl
  • Upload date:
  • Size: 33.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for python_okx-0.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 be1bc76cd3d156332e01d2a3e716f233e6b3f9c97ada46122871345ec82493ac
MD5 4889d380b56a2972d5deb3c24274c49a
BLAKE2b-256 e80a47ba03e167932bc25e6be2332b4117c66d7650174cb9178570d3632a076c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page