Skip to main content
Glama

OKX MCP Server

by esshka

OKX MCP サーバー

OKX 取引所からリアルタイムの暗号通貨価格データを提供するモデル コンテキスト プロトコル サーバー。

特徴

このMCPサーバーはOKX APIに接続し、シンプルなツールインターフェースを通じて暗号通貨の価格情報を提供します。包括的なエラー処理、リクエストログ、OKX API経由のレート制限機能も備えています。

ツール

get_candlesticks

OKX 上の任意の銘柄の履歴ローソク足 (OHLCV) データを取得します。

  • 入力:
    • instrument : 文字列(必須) - 銘柄ID(例:"BTC-USDT")
    • bar : 文字列(オプション) - 時間間隔(例:"1m"、"5m"、"1H"、"1D")、デフォルトは"1m"
    • limit : 数値(オプション) - 返されるローソク足の数(最大100)、デフォルトは100
  • 出力: JSON オブジェクトの配列。各オブジェクトには次のものが含まれます。
    • timestamp : ローソク足のISOタイムスタンプ
    • open :始値
    • high :最高価格
    • low :最低価格
    • close :終値
    • volume :取引量
    • volumeCurrency : 通貨換算での取引量

使用例:

[ { "timestamp": "2025-03-07T17:00:00.000Z", "open": "87242.8", "high": "87580.2", "low": "86548.0", "close": "87191.8", "volume": "455.72150427", "volumeCurrency": "39661166.242091111" } ]
get_price

OKX のあらゆる銘柄の最新価格と 24 時間市場データを取得します。

  • 入力:
    • instrument : 文字列(必須) - 銘柄ID(例:"BTC-USDT")
  • 出力: 次の内容を含む JSON オブジェクト:
    • instrument : 要求された楽器ID
    • lastPrice : 最新の取引価格
    • bid : 現在の最高入札価格
    • ask : 現在の最良売値
    • high24h : 24時間最高価格
    • low24h : 24時間最安値
    • volume24h : 24時間取引量
    • timestamp : データのISOタイムスタンプ

使用例:

{ "instrument": "BTC-USDT", "lastPrice": "65432.1", "bid": "65432.0", "ask": "65432.2", "high24h": "66000.0", "low24h": "64000.0", "volume24h": "1234.56", "timestamp": "2024-03-07T17:22:28.000Z" }

発達

依存関係をインストールします:

npm install

サーバーを構築します。

npm run build

自動リビルドを使用した開発の場合:

npm run watch

インストール

Claude Desktop または VSCode で使用するには、MCP 設定にサーバー構成を追加します。

macOS (VSCode):

~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

macOS (Claude デスクトップ):

~/Library/Application Support/Claude/claude_desktop_config.json

Windows (VSCode):

%APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows (Claude デスクトップ):

%APPDATA%/Claude/claude_desktop_config.json

構成:

{ "mcpServers": { "okx": { "command": "node", "args": ["/path/to/okx-mcp-server/build/index.js"], "disabled": false, "autoApprove": [] } } }

エラー処理

サーバーは包括的なエラー処理を実装します。

  • ネットワークエラーはキャプチャされ、コンテキストとともに返されます
  • 無効な機器IDは適切なエラーメッセージを返します
  • APIレート制限はaxiosタイムアウト設定を通じて尊重されます
  • すべてのエラーはデバッグのために記録されます

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

モデル コンテキスト プロトコル インターフェイスを介して OKX 取引所からリアルタイムの暗号通貨価格データを提供し、あらゆる取引商品の過去のローソク足データと現在の市場価格にアクセスできるようにします。

  1. 特徴
    1. ツール
  2. 発達
    1. インストール
      1. エラー処理

    Related MCP Servers

    • A
      security
      A
      license
      A
      quality
      A Model Context Protocol server that provides read-only access to Bybit's cryptocurrency exchange API, allowing users to query real-time cryptocurrency data using natural language.
      Last updated -
      9
      14
      9
      TypeScript
      MIT License
    • A
      security
      F
      license
      A
      quality
      A Model Context Protocol server that provides access to CoinMarketCap's cryptocurrency data, enabling AI applications to retrieve cryptocurrency listings, quotes, and detailed information.
      Last updated -
      3
      10
      Python
      • Linux
      • Apple
    • -
      security
      F
      license
      -
      quality
      A cryptocurrency price query service based on Model Context Protocol that provides tools for retrieving virtual currency prices, market trends, detailed information, and K-line data.
      Last updated -
      2
      Python
    • -
      security
      -
      license
      -
      quality
      A server that provides real-time cryptocurrency data through the Model Context Protocol, allowing access to detailed exchange information and current cryptocurrency rates from the CoinCap API.
      Last updated -
      1
      TypeScript
      MIT License

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/esshka/okx-mcp'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server