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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_okx-0.3.5.tar.gz
  • Upload date:
  • Size: 23.9 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.5.tar.gz
Algorithm Hash digest
SHA256 4fe7862a4ba07ef9d44e11d539a4998fac71fcce640f732ef9803873bb50d9a8
MD5 b99e0aebf06a322854fa8c8567852093
BLAKE2b-256 4c2473929988bfaeffa9883379cbad402ef3fcc4829cf93d3746f70c99ac42e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_okx-0.3.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 22177b6c49bea8f8b6cd0127402835911de18370519cc06cdaf1132e5d7c8a2d
MD5 01ea1a0f69a33bdf32e05245cde2a26e
BLAKE2b-256 d29b5d1da0aca759e78ab3a15de08e8b3ff03d5e4f586d905f0b739b5013e1ea

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 Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page