# OKX MCP

> OKX MCP connects your AI agent directly to the OKX exchange, letting you monitor crypto markets and manage trades using natural conversation. Check asset balances, track complex positions across futures and margin accounts, and place immediate market orders—all without leaving your chat window.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** cryptocurrency-trading, portfolio-management, market-data, asset-tracking, margin-trading, api-trading

## Description

This connection lets you treat your cryptocurrency portfolio like a spreadsheet, but talk to it instead of clicking through tabs. You can use the MCP to monitor markets and manage your holdings directly from any compatible AI client. Need to know what assets you have available right now? Ask for your current balances. Want to place a trade? Simply tell your agent the action: buy 0.05 BTC on the spot market, or amend an existing limit order. You can also look up every instrument type available for trading—spot, margin, futures, and more. Whether you're a seasoned trader needing quick risk assessments or just checking your funds before making a deposit, this MCP provides real-time data access and execution capabilities right where you work. Accessing these powerful tools through the Vinkius catalog means you connect once from any of your preferred AI clients and instantly gain control over complex financial workflows.

## Tools

### amend_order
Changes the details of an existing trade order that is still pending or incomplete.

### get_balance
Retrieves your current available asset balances in your OKX trading account, optionally filtered by currency.

### cancel_order
Immediately cancels a trade order that has not been filled or executed yet.

### get_instruments
Lists all available trading pairs and instrument types (like spot, futures, etc.) for your account.

### place_order
Initiates a new trade order, specifying the asset, market type, side, and size.

### get_positions
Retrieves detailed information about all your currently active open positions on the exchange.

## Prompt Examples

**Prompt:** 
```
Show me my current USDT and BTC balance on OKX.
```

**Response:** 
```
I've retrieved your balances. You currently have 1,250.50 USDT available and 0.045 BTC. Would you like to see balances for any other assets?
```

**Prompt:** 
```
List all my active futures positions.
```

**Response:** 
```
You have one active position: BTC-USDT-SWAP (Long) with a size of 0.1 BTC at an entry price of 65,000. Your current unrealized PnL is +$120.00.
```

**Prompt:** 
```
Place a market buy order for 0.01 BTC on the BTC-USDT spot market.
```

**Response:** 
```
Market buy order for 0.01 BTC on BTC-USDT has been placed successfully. Order ID: 192837465. Trade mode: cash.
```

## Capabilities

### Check current asset balances
Retrieve real-time liquid asset balances, allowing you to filter results by specific currencies.

### List available trading instruments
Fetch a list of all crypto pairs and instrument types currently supported for trading on the exchange.

### View active account positions
Track your current open trade positions, including details about margin or futures contracts.

### Place new trades instantly
Execute market or limit buy/sell orders using specific instrument IDs and desired sizes.

### Modify incomplete orders
Change the parameters, like the size or price, of a trade order that hasn't executed yet.

### Cancel pending trades
Immediately cancel any open or unexecuted trade orders using their unique ID.

## Use Cases

### Checking funds before a large trade
A user needs to know if they have enough liquid capital before executing a multi-asset strategy. They prompt their agent: 'Show me my current USDT and BTC balance.' The agent uses get_balance, giving the user immediate confirmation without logging into any separate banking or exchange dashboard.

### Reacting to market moves
A trader sees a price spike and needs to move fast. They tell their agent: 'Place a limit sell order for 0.1 ETH at $3,500.' The agent uses place_order with the correct parameters, executing the trade instantly.

### Auditing open risk
A portfolio manager needs to audit all active risks across different contracts. They ask: 'List all my active futures positions.' The agent runs get_positions and provides a consolidated report of sizes, entry prices, and unrealized PnL.

### Correcting an error
A user accidentally placed an order with the wrong size. They prompt: 'Cancel my recent trade on BTC-USDT.' The agent uses cancel_order, preventing a costly mistake before the market moves again.

## Benefits

- Eliminate platform hopping. Instead of jumping between OKX’s web portal, mobile app, and spreadsheet to check balances, you simply ask your agent for your current funds using the get_balance tool.
- Manage complex trades without writing code. You can tell the AI to place a market buy order or amend an existing limit order—it handles the specific parameters of the place_order tool instantly.
- Instantly assess risk exposure. Get a clear overview of all open positions using get_positions, which is better than manually compiling data from separate futures and margin tabs.
- Control your orders in real time. If you need to pull back or change an order before it fills, the cancel_order and amend_order tools let you do that with one simple command.
- Broad market visibility. Use get_instruments to see every available crypto pair for spot, futures, or options trading without manually browsing the exchange’s listing pages.

## How It Works

The bottom line is that your AI client acts as the middleman, translating natural language commands into secure API calls to OKX.

1. Subscribe to the OKX MCP and provide your exchange API Key, Secret Key, and Passphrase.
2. Select this MCP within your AI client's connection menu. Your agent establishes a secure link with OKX.
3. Tell your agent what you need—for example, 'What are my balances?' or 'Place a market buy order for 0.01 ETH.' The agent runs the required tool and gives you the result.

## Frequently Asked Questions

**How do I check my OKX crypto balances using the OKX MCP?**
You use the get_balance tool. Just ask your agent for 'my current asset balances' or specify a currency like, 'What is my ETH balance?' The system will return your real-time liquid funds.

**Can I manage futures trades with OKX MCP?**
Yes. You can use get_positions to view all active contracts and place orders for margin or cross modes using the place_order tool, making it suitable for advanced traders.

**What if I need to change an order before it fills?**
You use amend_order. You simply tell your agent which incomplete order you want to change and what new parameters (like a different size or price) you want to set.

**Does OKX MCP help me know what trades I can make?**
Yes, first run get_instruments. This tool lists all available trading pairs and instrument types that are currently supported on the exchange for your account.

**Is OKX MCP only for US-based accounts?**
No. The connection works by integrating with your specific, authenticated OKX API keys, meaning it manages your personal portfolio regardless of your geographic location or account type.