OKX MCP Server
Project description
🆗 OKX MCP Server
📲 Install
Method 1: uvx
{
"mcpServers": {
"mcp-okx": {
"command": "uvx",
"args": ["mcp-okx"],
"env": {
"OKX_API_KEY": "your-okx-api-key",
"OKX_API_SECRET": "api-secret-key",
"OKX_PASSPHRASE": "api-passphrase",
"OKX_TRADE_FLAG": "1", # 0: Production trading, 1: Demo trading
"OKX_BASE_URL": "https://www.okx.com"
}
}
}
}
Method 2: Docker
mkdir /opt/mcp-okx
cd /opt/mcp-okx
wget https://raw.githubusercontent.com/aahl/mcp-okx/refs/heads/main/docker-compose.yml
docker-compose up -d
{
"mcpServers": {
"mcp-okx": {
"url": "http://0.0.0.0:8811/mcp" # Streamable HTTP
}
}
}
⚙️ Environment variables
OKX_API_KEY: API key of your OKX account. Please refer to my api page regarding API Key creation.OKX_API_SECRET: API secret key of your OKX account.OKX_PASSPHRASE: API passphrase of your OKX account.OKX_TRADE_FLAG: 0: Production trading, 1: Demo tradingOKX_BASE_URL: Base URL of OKX. Default:https://www.okx.com
🛠️ Available Tools
Account Tools
account_config- Get account configurationaccount_balance- Get account balanceaccount_positions- Get account positionsaccount_position_risk- Get account position risk
Trading Tools
place_order- Place a new ordercancel_order- Cancel an incomplete orderget_trade_order- Get order detailsget_order_list- Get incomplete order listget_orders_history- Get Order Historyclose_positions- Liquidate all positions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mcp_okx-0.1.0a1.tar.gz
(91.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
mcp_okx-0.1.0a1-py3-none-any.whl
(15.1 kB
view details)
File details
Details for the file mcp_okx-0.1.0a1.tar.gz.
File metadata
- Download URL: mcp_okx-0.1.0a1.tar.gz
- Upload date:
- Size: 91.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b50469ce004b2e318d438259fe90989c93dedd90ff71441f237f81c6bbc38073
|
|
| MD5 |
7b0b2b42a037232258095c8045eb7472
|
|
| BLAKE2b-256 |
8bf5da823d9c61cbadb61dfc5c7689a16a0477004bcbb1c559c9e0af0d4d5671
|
File details
Details for the file mcp_okx-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: mcp_okx-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9f79c820dc53ca292feda17b36f9e6e17b2ae12c86e53aa69de2e262efd0687
|
|
| MD5 |
a2070394854535b823926782f67e5294
|
|
| BLAKE2b-256 |
1e0f5fb9d39b8a187036483d3fb0d9a04a3fad3bc972e1972e5571baf52cc12b
|