Skip to main content

Python SDK for OKX

Project description

Overview

Forked from https://github.com/okxapi/python-okx/ 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://gitea.nicosanchez.com.ar/nicolas/python-okx

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-earn

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_earn-0.3.5.1.tar.gz (23.6 kB view details)

Uploaded Source

File details

Details for the file python_okx_earn-0.3.5.1.tar.gz.

File metadata

  • Download URL: python_okx_earn-0.3.5.1.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for python_okx_earn-0.3.5.1.tar.gz
Algorithm Hash digest
SHA256 abfc579df1dd273d475a44ba92cff6a8ad24a2a348a5c7aef4c5e34997624367
MD5 8d48451052a9ba7336486d084aa08462
BLAKE2b-256 f590b4ba0ff6c100a6b25116f82b4754e3ea0a5402e8b6e92a072e07521d849a

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