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

Uploaded Source

Built Distribution

python_okx-0.3.3-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_okx-0.3.3.tar.gz
  • Upload date:
  • Size: 23.8 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.3.tar.gz
Algorithm Hash digest
SHA256 b31143cdee1268aa2f350de5895255048996755dd02ca7ff9d1be14180fe545c
MD5 57a1abc64600e8df5f86ed0f65809f6b
BLAKE2b-256 df03b4212d7c24352ac983cd698001832e6feeb5adf1c58009536c7ce88cdb17

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_okx-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 32.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7e4d04fac6792bc93cfa02dfa1a20c3f79445be28adb173bd7bdd58637770fb7
MD5 5408f7717b72bebde8ba04157c14a441
BLAKE2b-256 343cf09b247b62c85a3da0491e2c2276df210ef07ab3a23800c453879bb7ffd5

See more details on using hashes here.

Supported by

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