Skip to main content
Glama
solangii

Upbit MCP Server

get_deposits_withdrawals

Retrieve deposit and withdrawal transaction history from your Upbit account. Filter by currency, transaction type, or transaction ID to track your cryptocurrency movements.

Instructions

업비트 계정의 입출금 내역을 조회합니다.

Args:
    currency (str, optional): 통화 코드 (예: BTC)
    txid (str, optional): 거래 ID
    transaction_type (str): 거래 유형 - deposit(입금) 또는 withdraw(출금)
    page (int): 페이지 번호
    limit (int): 페이지당 결과 개수 (최대 100)
    
Returns:
    list[dict]: 입출금 내역

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
currencyNo
txidNo
transaction_typeNodeposit
pageNo
limitNo

Implementation Reference

  • The async handler function that implements the get_deposits_withdrawals tool logic. It queries the Upbit API for deposit or withdrawal history based on parameters like currency, txid, transaction_type, page, and limit.
    async def get_deposits_withdrawals(
        currency: Optional[str] = None,
        txid: Optional[str] = None,
        transaction_type: Literal["deposit", "withdraw"] = "deposit",
        page: int = 1,
        limit: int = 100,
        ctx: Context = None
    ) -> list[dict]:
        """
        업비트 계정의 입출금 내역을 조회합니다.
        
        Args:
            currency (str, optional): 통화 코드 (예: BTC)
            txid (str, optional): 거래 ID
            transaction_type (str): 거래 유형 - deposit(입금) 또는 withdraw(출금)
            page (int): 페이지 번호
            limit (int): 페이지당 결과 개수 (최대 100)
            
        Returns:
            list[dict]: 입출금 내역
        """
        if not UPBIT_ACCESS_KEY:
            if ctx:
                ctx.error("API 키가 설정되지 않았습니다. .env 파일에 UPBIT_ACCESS_KEY와 UPBIT_SECRET_KEY를 설정해주세요.")
            return [{"error": "API 키가 설정되지 않았습니다."}]
        
        url = f"{API_BASE}/{transaction_type}s"
        query_params = {
            'page': str(page),
            'limit': str(limit)
        }
        
        if currency:
            query_params['currency'] = currency
        
        if txid:
            query_params['txid'] = txid
        
        headers = {
            "Authorization": f"Bearer {generate_upbit_token(query_params)}"
        }
        
        if ctx:
            ctx.info(f"{transaction_type} 내역 조회 중")
        async with httpx.AsyncClient() as client:
            try:
                res = await client.get(url, params=query_params, headers=headers)
                if res.status_code != 200:
                    if ctx:
                        ctx.error(f"업비트 API 오류: {res.status_code} - {res.text}")
                    return [{"error": f"업비트 API 오류: {res.status_code}"}]
                return res.json()
            except Exception as e:
                if ctx:
                    ctx.error(f"API 호출 중 오류 발생: {str(e)}")
                return [{"error": f"API 호출 중 오류 발생: {str(e)}"}]
  • main.py:51-51 (registration)
    The registration of the get_deposits_withdrawals tool using FastMCP's mcp.tool() decorator.
    mcp.tool()(get_deposits_withdrawals)
  • main.py:15-15 (registration)
    The import statement bringing in the get_deposits_withdrawals handler from tools/get_deposits_withdrawals.py.
    from tools.get_deposits_withdrawals import get_deposits_withdrawals
  • Type hints and docstring defining the input schema for the tool parameters: currency, txid, transaction_type, page, limit.
        currency: Optional[str] = None,
        txid: Optional[str] = None,
        transaction_type: Literal["deposit", "withdraw"] = "deposit",
        page: int = 1,
        limit: int = 100,
        ctx: Context = None
    ) -> list[dict]:
        """
        업비트 계정의 입출금 내역을 조회합니다.
        
        Args:
            currency (str, optional): 통화 코드 (예: BTC)
            txid (str, optional): 거래 ID
            transaction_type (str): 거래 유형 - deposit(입금) 또는 withdraw(출금)
            page (int): 페이지 번호
            limit (int): 페이지당 결과 개수 (최대 100)
            
        Returns:
            list[dict]: 입출금 내역
        """
Behavior2/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 states this is a retrieval operation ('조회합니다'), implying it's read-only, but doesn't confirm safety aspects like non-destructiveness. It mentions pagination (page/limit) but doesn't describe rate limits, authentication needs, error conditions, or what happens if parameters are invalid. For a financial data tool with zero annotation coverage, this leaves significant behavioral gaps.

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 well-structured and appropriately sized. It starts with a clear purpose statement, followed by an 'Args' section with bullet-like parameter explanations, and ends with a 'Returns' section. Every sentence adds value—no fluff or repetition. However, the mix of Korean and English might slightly hinder readability for non-Korean agents, but the structure is efficient.

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

Completeness3/5

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

Given the tool's moderate complexity (5 parameters, financial data retrieval) and no annotations or output schema, the description is partially complete. It covers parameters well but lacks behavioral context (e.g., safety, errors, auth). The return value is vaguely described as 'list[dict]: 입출금 내역' without detailing structure or fields. For a tool with no structured output schema, more return value specifics would improve completeness.

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 description adds substantial meaning beyond the input schema, which has 0% schema description coverage. It explains all 5 parameters in Korean with examples (e.g., '통화 코드 (예: BTC)') and clarifies transaction_type options (deposit/withdraw). It also specifies the limit constraint ('최대 100'/maximum 100). This effectively compensates for the schema's lack of descriptions, though it doesn't detail default behaviors for optional parameters beyond what the schema shows.

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: '업비트 계정의 입출금 내역을 조회합니다' (Retrieve deposit/withdrawal history for Upbit account). It specifies the verb (조회/retrieve) and resource (입출금 내역/deposit-withdrawal history), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like get_accounts or get_orders, which might also retrieve financial data.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like get_accounts (which might show balances) or get_orders (which might show trade history), nor does it specify prerequisites (e.g., authentication requirements) or contextual constraints. The usage is implied by the purpose statement but lacks explicit when/when-not instructions.

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/solangii/upbit-mcp-server'

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