Skip to main content
Glama
aahl

AkTools MCP Server

by aahl

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

okx_taker_volume

Retrieve taker buy and sell volumes for OKX cryptocurrencies. Specify symbol, period, and product type to analyze market sentiment.

Instructions

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

Input Schema

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

Implementation Reference

  • The actual handler function for the 'okx_taker_volume' tool. It makes an HTTP GET request to OKX API '/api/v5/rubik/stat/taker-volume' with parameters symbol, period, and instType, then parses the response into a DataFrame with columns '时间', '卖出量', '买入量' and returns it as CSV.
    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()
  • The @mcp.tool decorator that registers 'okx_taker_volume' as an MCP tool with title '获取加密货币主动买卖情况' and description '获取OKX加密货币主动买入和卖出的交易量'.
    @mcp.tool(
        title="获取加密货币主动买卖情况",
        description="获取OKX加密货币主动买入和卖出的交易量",
  • The input parameter definitions for the tool, including symbol (default 'BTC'), period (default '1h', supports 5m/1H/1D), and instType (default 'SPOT', supports SPOT/CONTRACTS).
    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:衍生品"),
Behavior2/5

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

Annotations are absent, so the description must carry the full burden. It only states what the tool does without revealing rate limits, data freshness, or the meaning of 'active' volume. This is insufficient for an unannotated tool.

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

Conciseness3/5

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

The description is a single sentence, which is concise, but it lacks structure or front-loading of key details. It is adequate but not exemplary.

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?

Given three parameters with schema descriptions but no output schema, the description is too brief. It does not explain the return format, data constraints, or how the data is calculated, leaving gaps for an agent.

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 description coverage is 100%, so each parameter has a description in the schema. The tool description adds no additional information beyond the schema, meeting the baseline.

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 that it retrieves active buy and sell volumes for OKX cryptocurrencies, specifying the action and resource. However, it does not differentiate it from sibling tools like okx_loan_ratios or okx_prices.

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. There is no mention of context, prerequisites, or exclusion criteria.

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

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