Skip to main content
Glama

get_currency_pairs

Retrieve supported currency pair details on Zaif exchange, including minimum order quantities, price steps, and precision, to validate trading parameters, calculate valid orders, and understand pair-specific rules.

Instructions

    対応している通貨ペア情報を取得します。

    取引可能な通貨ペアの詳細な制約情報を提供し、以下の用途で使用します:
    - 注文前に最小数量・価格制約を確認したい場合
    - 有効な注文パラメータを計算したい場合
    - 通貨ペアの取引ルールを理解したい場合

    使用例:
    - ビットコインの最小注文数量を確認したい場合
    - 価格の刻み幅に合わせて注文価格を調整したい場合
    - 通貨ペアごとの制約の違いを比較したい場合

    Returns:
        list[CurrencyPair]: 通貨ペア情報のリスト
            - currency_pair: 通貨ペア識別子(例: 'btc_jpy')
            - min_quantity: 最小注文数量
            - quantity_step: 注文数量の刻み幅
            - min_price: 最小注文価格
            - price_step: 注文価格の刻み幅
            - price_precision: 価格表示の小数点桁数
            - display_name: 表示用名称(例: 'ビットコイン/円')

    Raises:
        ValueError: APIエラーが発生した場合
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for get_currency_pairs: fetches all currency pairs from Zaif API and filters to supported pairs (btc_jpy, eth_jpy, xym_jpy).
    @mcp.tool()
    def get_currency_pairs() -> list[CurrencyPair]:
        """
        対応している通貨ペア情報を取得します。
    
        取引可能な通貨ペアの詳細な制約情報を提供し、以下の用途で使用します:
        - 注文前に最小数量・価格制約を確認したい場合
        - 有効な注文パラメータを計算したい場合
        - 通貨ペアの取引ルールを理解したい場合
    
        使用例:
        - ビットコインの最小注文数量を確認したい場合
        - 価格の刻み幅に合わせて注文価格を調整したい場合
        - 通貨ペアごとの制約の違いを比較したい場合
    
        Returns:
            list[CurrencyPair]: 通貨ペア情報のリスト
                - currency_pair: 通貨ペア識別子(例: 'btc_jpy')
                - min_quantity: 最小注文数量
                - quantity_step: 注文数量の刻み幅
                - min_price: 最小注文価格
                - price_step: 注文価格の刻み幅
                - price_precision: 価格表示の小数点桁数
                - display_name: 表示用名称(例: 'ビットコイン/円')
    
        Raises:
            ValueError: APIエラーが発生した場合
        """
        all_pairs = api.market.get_currency_pairs("all")
        # 対応している通貨ペアのみをフィルタリング
        supported_pairs = [
            p for p in all_pairs if p.currency_pair in ["btc_jpy", "eth_jpy", "xym_jpy"]
        ]
        return supported_pairs
  • Registration of market tools including get_currency_pairs via register_market_tools call in the main server setup.
    from zaifer_mcp.tools.market import register_market_tools
    from zaifer_mcp.tools.account import register_account_tools
    from zaifer_mcp.tools.trade import register_trade_tools
    from zaifer_mcp.tools.chart import register_chart_tools
    
    register_market_tools(mcp, zaif_api)
  • Underlying MarketApi method that retrieves currency pair constraints from the Zaif API, called by the tool handler.
    def get_currency_pairs(self, currency_pair: str = "all") -> List[CurrencyPair]:
        """
        通貨ペア情報を取得
    
        Args:
            currency_pair: 通貨ペア、または'all'
    
        Returns:
            通貨ペア情報のリスト
        """
        if currency_pair == "all":
            url = f"{self.base_url}/1/currency_pairs/all"
        else:
            url = f"{self.base_url}/1/currency_pairs/{currency_pair}"
        data = self.http.get(url)
    
        return [CurrencyPair.from_dict(item) for item in data]
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by specifying the return format (list of CurrencyPair objects with detailed fields), mentioning potential errors (ValueError for API errors), and describing the type of information provided (constraints, trading rules). It doesn't mention rate limits, authentication requirements, or pagination behavior, but provides substantial behavioral context.

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 well-structured with clear sections (purpose, use cases, examples, returns, raises), but it's somewhat verbose. The Japanese text could be more concise while maintaining clarity. Each sentence adds value, but there's some redundancy between the use cases and examples sections.

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

Completeness5/5

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

Given the tool's complexity (read-only data retrieval with detailed output), the description is complete. It explains what the tool does, when to use it, what it returns (with detailed field descriptions), and potential errors. With an output schema available, the description appropriately focuses on semantics rather than repeating structured return format details.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the baseline would be 4. The description appropriately doesn't discuss parameters since none exist, and instead focuses on the tool's purpose and output. This is efficient and correct for a parameterless tool.

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's purpose: '対応している通貨ペア情報を取得します' (get supported currency pair information). It specifies the resource (currency pairs) and the action (get information). However, it doesn't explicitly differentiate from sibling tools like get_ticker or get_market_depth, which also provide market-related data.

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

Usage Guidelines5/5

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

The description provides excellent usage guidelines with three specific use cases: checking constraints before orders, calculating valid order parameters, and understanding trading rules. It also includes concrete examples like checking Bitcoin minimum order quantity and adjusting prices to tick sizes. This gives clear context for when to use this tool.

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

Related 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/curio184/zaifer-mcp'

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