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.1.4.tar.gz (20.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-0.1.4-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file python-okx-0.1.4.tar.gz.

File metadata

  • Download URL: python-okx-0.1.4.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.5

File hashes

Hashes for python-okx-0.1.4.tar.gz
Algorithm Hash digest
SHA256 71f8c976993d34f47eaaa5b88bcc6df5f74e1aa8b6d0910bf35bc867f0ceff46
MD5 e9899300cedbbea1ac300c69d240a113
BLAKE2b-256 ad13e7f63e2bf2fae93dc93744e8c8dc57a11b068934d8ea1a15cc0341fa5473

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_okx-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.5

File hashes

Hashes for python_okx-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9c066db426eaa73d7903f33fcaab51d7ae30e39d75d6b2e25577d74991b27717
MD5 c03b3bfac4676b2cd455abdc84fcb771
BLAKE2b-256 3de9f89cc068c9a8322da63a5a8a6fb91c6c7f514ef8abf11d4980c9fffd9b21

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