Skip to main content
Glama
Nayshins

Cryptocurrency Market Data MCP Server

by Nayshins

get-volume-history

Retrieve historical trading volume data for cryptocurrency pairs to analyze market activity and liquidity trends over time.

Instructions

Get trading volume history over time

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesTrading pair symbol (e.g., BTC/USDT, ETH/USDT)
daysNoNumber of days of volume history (default: 7, max: 30)
exchangeNoExchange to use (supported: binance, coinbase, kraken, kucoin, hyperliquid, huobi, bitfinex, bybit, okx, mexc)binance

Implementation Reference

  • Handler implementation for the 'get-volume-history' tool. Fetches daily OHLCV data, extracts and formats volume history over the specified number of days.
    elif name == "get-volume-history": symbol = arguments.get("symbol", "").upper() days = min(int(arguments.get("days", 7)), 30) # Get daily volume data since = int((datetime.now() - timedelta(days=days)).timestamp() * 1000) ohlcv = await exchange.fetch_ohlcv(symbol, "1d", since=since) volume_data = [] for candle in ohlcv: timestamp, _, _, _, _, volume = candle dt = datetime.fromtimestamp(timestamp/1000).strftime('%Y-%m-%d') volume_data.append(f"{dt}: {volume:,.2f}") return [ types.TextContent( type="text", text=f"Daily trading volume history for {symbol} on {exchange_id.upper()}:\n\n" + "\n".join(volume_data) ) ]
  • src/server.py:200-220 (registration)
    Registration of the 'get-volume-history' tool in the @server.list_tools() handler, including description and input schema.
    types.Tool( name="get-volume-history", description="Get trading volume history over time", inputSchema={ "type": "object", "properties": { "symbol": { "type": "string", "description": "Trading pair symbol (e.g., BTC/USDT, ETH/USDT)", }, "days": { "type": "number", "description": "Number of days of volume history (default: 7, max: 30)", "default": 7, "maximum": 30 }, "exchange": get_exchange_schema() }, "required": ["symbol"], }, ),
  • Input schema definition for the 'get-volume-history' tool, specifying required 'symbol' and optional 'days' and 'exchange' parameters.
    inputSchema={ "type": "object", "properties": { "symbol": { "type": "string", "description": "Trading pair symbol (e.g., BTC/USDT, ETH/USDT)", }, "days": { "type": "number", "description": "Number of days of volume history (default: 7, max: 30)", "default": 7, "maximum": 30 }, "exchange": get_exchange_schema() }, "required": ["symbol"], },

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/Nayshins/mcp-server-ccxt'

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