Name | python-okx JSON |
Version |
0.3.5
JSON |
| download |
home_page | https://okx.com/docs-v5/ |
Summary | Python SDK for OKX |
upload_time | 2024-12-26 03:34:00 |
maintainer | None |
docs_url | None |
author | okxv5api |
requires_python | None |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
### Overview
This is an unofficial Python wrapper for the [OKX exchange v5 API](https://www.okx.com/okx-api)
If you came here looking to purchase cryptocurrencies from the OKX exchange, please go [here](https://www.okx.com/).
#### Source code
https://github.com/okxapi/python-okx
#### OKX API Telegram
https://t.me/OKXAPI
#### API trading tutorials
- Spot trading: https://www.okx.com/help/how-can-i-do-spot-trading-with-the-jupyter-notebook
- Derivative trading: https://www.okx.com/help/how-can-i-do-derivatives-trading-with-the-jupyter-notebook
Make sure you update often and check the [Changelog](https://www.okx.com/docs-v5/log_en/) 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
- Register for an account: https://www.okx.com/account/register
- Apply for an API key: https://www.okx.com/account/users/myApi
#### Step 2: install python-okx
```python
pip install python-okx
```
#### Step 3: Run examples
- Fill in API credentials in the corresponding examples
```python
api_key = ""
secret_key = ""
passphrase = ""
```
- RestAPI
- For spot trading: run example/get_started_en.ipynb
- For derivative trading: run example/trade_derivatives_en.ipynb
- Tweak the value of the parameter `flag` (live trading: 0, demo trading: 1
) to switch between live and demo trading environment
- WebSocketAPI
- Run test/WsPrivateTest.py for private websocket channels
- Run test/WsPublicTest.py for public websocket channels
- Use different URLs for different environment
- Live trading URLs: https://www.okx.com/docs-v5/en/#overview-production-trading-services
- Demo trading URLs: https://www.okx.com/docs-v5/en/#overview-demo-trading-services
Note
- To learn more about OKX API, visit official [OKX API documentation](https://www.okx.com/docs-v5/en/)
- If you face any questions when using `WebSocketAPI`,you can consult the following links
- `asyncio`、`websockets` document/`github`:
```python
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`:
```python
https://github.com/Rapptz/discord.py/issues/1996
https://github.com/aaugustin/websockets/issues/587
```
Raw data
{
"_id": null,
"home_page": "https://okx.com/docs-v5/",
"name": "python-okx",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "okxv5api",
"author_email": "api@okg.com",
"download_url": "https://files.pythonhosted.org/packages/4c/24/73929988bfaeffa9883379cbad402ef3fcc4829cf93d3746f70c99ac42e1/python_okx-0.3.5.tar.gz",
"platform": null,
"description": "### Overview\nThis is an unofficial Python wrapper for the [OKX exchange v5 API](https://www.okx.com/okx-api)\n\nIf you came here looking to purchase cryptocurrencies from the OKX exchange, please go [here](https://www.okx.com/).\n\n#### Source code\nhttps://github.com/okxapi/python-okx\n#### OKX API Telegram\nhttps://t.me/OKXAPI\n#### API trading tutorials\n- Spot trading: https://www.okx.com/help/how-can-i-do-spot-trading-with-the-jupyter-notebook\n- Derivative trading: https://www.okx.com/help/how-can-i-do-derivatives-trading-with-the-jupyter-notebook\n\nMake sure you update often and check the [Changelog](https://www.okx.com/docs-v5/log_en/) for new features and bug fixes.\n\n### Features\n- Implementation of all Rest API endpoints.\n- Private and Public Websocket implementation\n- Testnet support \n- Websocket handling with reconnection and multiplexed connections\n\n### Quick start\n#### Prerequisites\n\n`python version\uff1a>=3.9`\n\n`WebSocketAPI\uff1a websockets package advise version 6.0`\n\n#### Step 1: register an account on OKX and apply for an API key\n- Register for an account: https://www.okx.com/account/register\n- Apply for an API key: https://www.okx.com/account/users/myApi\n\n#### Step 2: install python-okx\n\n```python\npip install python-okx\n```\n\n#### Step 3: Run examples\n\n- Fill in API credentials in the corresponding examples\n```python \napi_key = \"\"\nsecret_key = \"\"\npassphrase = \"\"\n```\n- RestAPI\n - For spot trading: run example/get_started_en.ipynb\n - For derivative trading: run example/trade_derivatives_en.ipynb\n - Tweak the value of the parameter `flag` (live trading: 0, demo trading: 1\n) to switch between live and demo trading environment\n- WebSocketAPI\n - Run test/WsPrivateTest.py for private websocket channels\n - Run test/WsPublicTest.py for public websocket channels\n - Use different URLs for different environment\n - Live trading URLs: https://www.okx.com/docs-v5/en/#overview-production-trading-services\n - Demo trading URLs: https://www.okx.com/docs-v5/en/#overview-demo-trading-services\n\nNote \n\n- To learn more about OKX API, visit official [OKX API documentation](https://www.okx.com/docs-v5/en/)\n\n- If you face any questions when using `WebSocketAPI`,you can consult the following links\n\n - `asyncio`\u3001`websockets` document/`github`\uff1a\n\n ```python \n https://docs.python.org/3/library/asyncio-dev.html\n https://websockets.readthedocs.io/en/stable/intro.html\n https://github.com/aaugustin/websockets\n ```\n\n - About `code=1006`\uff1a\n\n ```python \n https://github.com/Rapptz/discord.py/issues/1996\n https://github.com/aaugustin/websockets/issues/587\n ```\n",
"bugtrack_url": null,
"license": null,
"summary": "Python SDK for OKX",
"version": "0.3.5",
"project_urls": {
"Homepage": "https://okx.com/docs-v5/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d29b5d1da0aca759e78ab3a15de08e8b3ff03d5e4f586d905f0b739b5013e1ea",
"md5": "01ea1a0f69a33bdf32e05245cde2a26e",
"sha256": "22177b6c49bea8f8b6cd0127402835911de18370519cc06cdaf1132e5d7c8a2d"
},
"downloads": -1,
"filename": "python_okx-0.3.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "01ea1a0f69a33bdf32e05245cde2a26e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 32647,
"upload_time": "2024-12-26T03:33:58",
"upload_time_iso_8601": "2024-12-26T03:33:58.680623Z",
"url": "https://files.pythonhosted.org/packages/d2/9b/5d1da0aca759e78ab3a15de08e8b3ff03d5e4f586d905f0b739b5013e1ea/python_okx-0.3.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4c2473929988bfaeffa9883379cbad402ef3fcc4829cf93d3746f70c99ac42e1",
"md5": "b99e0aebf06a322854fa8c8567852093",
"sha256": "4fe7862a4ba07ef9d44e11d539a4998fac71fcce640f732ef9803873bb50d9a8"
},
"downloads": -1,
"filename": "python_okx-0.3.5.tar.gz",
"has_sig": false,
"md5_digest": "b99e0aebf06a322854fa8c8567852093",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 23873,
"upload_time": "2024-12-26T03:34:00",
"upload_time_iso_8601": "2024-12-26T03:34:00.056051Z",
"url": "https://files.pythonhosted.org/packages/4c/24/73929988bfaeffa9883379cbad402ef3fcc4829cf93d3746f70c99ac42e1/python_okx-0.3.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-26 03:34:00",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "python-okx"
}