Skip to main content
Glama
al-one

MCP Server for stock and crypto

获取加密货币主动买卖情况

okx_taker_volume

Fetch OKX cryptocurrency taker buy and sell volume. Supports spot and derivatives markets with configurable symbol and time period.

Instructions

获取OKX加密货币主动买入和卖出的交易量

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolNo币种,格式: BTC 或 ETHBTC
periodNo时间粒度,仅支持: [5m/1H/1D] 注意大小写,仅分钟为小写m1h
instTypeNo产品类型 SPOT:现货 CONTRACTS:衍生品SPOT

Implementation Reference

  • Tool registration via @mcp.tool decorator with title '获取加密货币主动买卖情况' and description about OKX cryptocurrency taker volume
    @mcp.tool(
        title="获取加密货币主动买卖情况",
        description="获取OKX加密货币主动买入和卖出的交易量",
    )
  • Handler function that calls OKX API /api/v5/rubik/stat/taker-volume with symbol, period, and instType params, returns CSV-formatted taker volume data
    def okx_taker_volume(
        symbol: str = Field("BTC", description="币种,格式: BTC 或 ETH"),
        period: str = Field("1h", description="时间粒度,仅支持: [5m/1H/1D] 注意大小写,仅分钟为小写m"),
        instType: str = Field("SPOT", description="产品类型 SPOT:现货 CONTRACTS:衍生品"),
    ):
        res = requests.get(
            f"{OKX_BASE_URL}/api/v5/rubik/stat/taker-volume",
            params={
                "ccy": symbol,
                "period": period,
                "instType": instType,
            },
            timeout=20,
        )
        data = res.json() or {}
        dfs = pd.DataFrame(data.get("data", []))
        if dfs.empty:
            return pd.DataFrame()
        dfs.columns = ["时间", "卖出量", "买入量"]
        dfs["时间"] = pd.to_datetime(dfs["时间"], errors="coerce", unit="ms")
        dfs["卖出量"] = pd.to_numeric(dfs["卖出量"], errors="coerce")
        dfs["买入量"] = pd.to_numeric(dfs["买入量"], errors="coerce")
        return dfs.to_csv(index=False, float_format="%.2f").strip()
  • Input parameters: symbol (default BTC), period (default 1h, supports 5m/1H/1D), instType (default SPOT, supports SPOT/CONTRACTS)
    symbol: str = Field("BTC", description="币种,格式: BTC 或 ETH"),
    period: str = Field("1h", description="时间粒度,仅支持: [5m/1H/1D] 注意大小写,仅分钟为小写m"),
    instType: str = Field("SPOT", description="产品类型 SPOT:现货 CONTRACTS:衍生品"),
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only states the basic function. It does not disclose behavioral traits like whether it's read-only, required permissions, rate limits, data format, or potential side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence with no redundant information. It is appropriately sized but could include more relevant details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is minimal and does not explain the output format, data interpretation, or behavior across different parameter values (e.g., period, instType). No output schema is provided, leaving gaps for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with parameter descriptions. The tool description adds no additional parameter context beyond 'get active buy and sell volume'. Baseline 3 is appropriate as schema already provides meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool fetches OKX cryptocurrency active buy and sell volume, which is a specific verb+resource. It distinguishes from sibling tools like okx_prices or okx_loan_ratios, though it could be more precise about the scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description lacks context for selection among sibling tools such as okx_prices or okx_loan_ratios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/al-one/mcp-aktools'

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