# OKX MCP for AI Agents AI Agent Connect

> OKX MCP. Trade crypto and manage your OKX account via your agent. Check balances, track positions, and execute orders directly from your AI client. Connect to your preferred setup to handle spot, margin, and futures trading using natural language. It's the fastest way to manage your exchange account without leaving your workspace.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_Ax5Q8n9mhVZ6QfccMtE4K3uI7ivl5xyIu9yZEAtC/ai-agent-connect
- **Tags:** cryptocurrency-trading, portfolio-management, market-data, asset-tracking, margin-trading, api-trading

## Description

You're managing a crypto portfolio and tired of having twenty tabs open to keep track of your margin positions and spot balances. This OKX MCP lets you handle your entire trading workflow through a single conversation with your agent. You can check how much capital you have left, see what's currently running in your futures account, and execute trades without ever touching the exchange website. Whether you're looking for specific instruments or need to pull the plug on a pending order, the agent does the heavy lifting. It's part of the Vinkius catalog, meaning you can plug it into your existing setup and treat your exchange account like a part of your native workspace. It turns a complex, multi-click trading process into a simple back-and-forth. By connecting your account, you remove the friction of navigating through multiple pages to find specific data points. You can quickly pivot between checking your spot balances and managing your futures positions without losing your place. This turns your agent into a dedicated trading terminal that understands your intent. Instead of navigating complex menus or worrying about making a manual entry error during a volatile market move, you just tell your agent what to do.

## Tools

### get_balance
See how much of each currency you have in your trading account. This gives you a quick snapshot of your available capital.

### cancel_order
Stop a pending order from executing on the exchange. You can use this to clear your order book instantly if market conditions change.

### get_instruments
See a list of all the trading pairs and types available on your account. Use this to find the correct ID for the asset you want to trade.

### get_positions
View all your current active trades and their current status. It helps you monitor your exposure across different instruments.

### amend_order
Update the details of an order that hasn't been filled yet. This is useful when you need to change the price or size of a pending trade.

### place_order
Open a new trade by specifying the amount, price type, and side. This lets you execute market or limit orders through your agent.

## Prompt Examples

**Prompt:** 
```
What's my balance?
```

**Response:** 
```
I've checked your OKX account. Here is your current balance:

| Asset | Balance |
| :--- | :--- |
| **USDT** | 1,250.50 |
| **BTC** | 0.045 |

Would you like to see the balance for any other specific coins?
```

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

**Response:** 
```
You currently have **one** active futures position:

* **Instrument:** BTC-USDT-SWAP (Long)
* **Size:** 0.1 BTC
* **Entry Price:** 65,000
* **Unrealized PnL:** +$120.00
```

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

**Response:** 
```
Done. I've placed a **market buy** order for **0.01 BTC** on the **BTC-USDT** spot market.

* **Order ID:** 192837465
* **Status:** Filled
* **Trade Mode:** Cash
```

## Capabilities

### Place new trades
Execute market or limit orders using natural language.

### Check real-time balances
See your current asset holdings across different currencies.

### Monitor active positions
Track your current exposure in spot and futures markets.

### Cancel pending orders
Stop orders from executing when market conditions change.

### Update existing orders
Amend the price or size of orders that are still pending.

### Browse trading pairs
View all available instruments and trade types on the exchange.

## Use Cases

### Panic Selling
A trader sees a market crash and tells the agent to cancel all pending limit orders using cancel_order.

### Quick Entry
A developer wants to buy 0.1 BTC on a spot market and uses place_order while staying in their code editor.

### Portfolio Review
A portfolio manager asks for a summary of all active futures positions to check their current risk exposure.

### Balance Check
A user wants to see how much USDT they have available for the next trade without opening the OKX app.

## Benefits

- Stop tab-switching by checking your balances and positions directly in your AI client using get_balance and get_positions.
- Execute trades faster during high volatility by using place_order to hit your targets instantly.
- Manage your risk more precisely by quickly updating or stopping trades with amend_order and cancel_order.
- Get a clear view of what's tradable across spot and futures markets with get_instruments.
- Keep your trading workflow in one place by connecting your OKX account to your primary work environment.

## How It Works

The bottom line is you get a hands-free way to manage your OKX account using just natural language.

1. Subscribe to the OKX MCP on Vinkius.
2. Enter your OKX API Key, Secret Key, and Passphrase.
3. Start trading and monitoring your portfolio from Claude, Cursor, or any MCP-compatible client.

## Frequently Asked Questions

**How do I connect my OKX account to this Connector?**
You'll need to provide your OKX API Key, Secret Key, and Passphrase in the setup. This allows your agent to securely perform actions on your behalf.

**Can I trade futures using the OKX MCP?**
Yes, this Connector supports futures trading. You can check your active positions and place orders across different instrument types.

**Is it safe to use my API keys with this?**
Yes, the Connector uses your API credentials to communicate directly with OKX. Your keys are handled securely within your local environment.

**How do I cancel a pending order?**
Just tell your agent to cancel a specific order. It will find the pending order and stop it from executing on the exchange.

**Does the OKX MCP work with Cursor?**
Yes, it works with Cursor and any other MCP-compatible client like Claude or Windsurf.

**Can I see my balance for specific coins?**
Yes, you can ask your agent for your balance and specify the currency, or ask for a full summary of your account holdings.

**Can I check my current balance for specific coins like BTC or USDT?**
Yes! Use the `get_balance` tool and provide a comma-separated list of currencies in the `ccy` parameter. The agent will return the available and frozen balances for those specific assets.

**How do I see my open positions for futures or swap markets?**
You can use the `get_positions` tool. You can filter by `instType` (e.g., 'FUTURES' or 'SWAP') or provide a specific `instId` like 'BTC-USDT-SWAP' to see your entry price, size, and PnL.

**Is it possible to cancel an order if I change my mind?**
Absolutely. Use the `cancel_order` tool by providing the `instId` and the `ordId` of the pending order. The agent will confirm if the cancellation was successful.