Skip to main content
Glama
ethancod1ng

Bybit MCP Server

by ethancod1ng

get_24hr_ticker

Retrieve 24-hour trading statistics for Bybit cryptocurrency symbols to analyze market performance and price movements.

Instructions

Get 24-hour trading statistics for symbols

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolNo

Implementation Reference

  • The core handler function for the get_24hr_ticker tool. It uses the Bybit RestClientV5 to fetch 24-hour ticker statistics for the given symbol (optional).
    async get24hrTicker(symbol?: string) {
      try {
        const response = await this.client.getTickers({
          category: 'spot',
          symbol: symbol
        });
        return response;
      } catch (error) {
        throw new Error(`Failed to get 24hr ticker: ${error instanceof Error ? error.message : JSON.stringify(error)}`);
      }
    }
  • Zod schema defining the input parameters for the get_24hr_ticker tool: optional symbol.
    export const TickerSchema = z.object({
      symbol: z.string().optional().describe('Trading symbol (if not provided, returns all symbols)')
    });
  • src/tools.ts:42-50 (registration)
    MCP Tool registration object for get_24hr_ticker, including name, description, and input schema reference.
    {
      name: 'get_24hr_ticker',
      description: 'Get 24-hour trading statistics for symbols',
      inputSchema: {
        type: 'object',
        properties: TickerSchema.shape,
        required: []
      }
    },
  • src/server.ts:77-79 (registration)
    Switch case in handleToolCall that registers and dispatches the get_24hr_ticker tool call to the client handler.
    case 'get_24hr_ticker':
      result = await this.client.get24hrTicker(args.symbol as string);
      break;
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 what the tool does but doesn't cover aspects like rate limits, authentication needs, error handling, or the format of returned statistics, which are critical for safe and effective use.

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

Conciseness5/5

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

The description is a single, efficient sentence with no wasted words, clearly front-loading the core purpose. It's appropriately sized for the tool's complexity, making it easy to parse quickly.

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 the lack of annotations and output schema, the description is incomplete. It doesn't explain what statistics are returned, how data is structured, or any prerequisites, leaving gaps for a tool that interacts with trading data and has siblings with overlapping functions.

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 0%, so the description must compensate. It mentions 'symbols' but doesn't explain the parameter's semantics beyond the schema's hint. The description adds minimal value, as it doesn't detail symbol formats or the effect of omitting the parameter, leading to a baseline score.

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 action ('Get') and resource ('24-hour trading statistics for symbols'), making the purpose understandable. However, it doesn't differentiate from siblings like get_price or get_klines, which also retrieve trading data, so it misses full distinction.

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 such as get_price for current prices or get_klines for historical data. The description lacks context on specific use cases or exclusions, leaving the agent to infer usage.

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/ethancod1ng/bybit-mcp-server'

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