get_tickers
Retrieve real-time trading data for specific cryptocurrency pairs on Bybit, including price, volume, and market movements, to support informed trading decisions.
Instructions
Get ticker information
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"category": "<category>",
"symbol": "<symbol>"
},
"name": "get_tickers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | Category (spot, linear, inverse, etc.) | |
| symbol | Yes | Symbol (e.g., BTCUSDT) |
Implementation Reference
- src/index.ts:757-767 (handler)MCP tool handler for 'get_tickers' in the switch statement of CallToolRequestSchema. Calls BybitService.getTickers and returns JSON stringified result.
case 'get_tickers': { const result = await this.bybitService.getTickers(typedArgs.category, typedArgs.symbol); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } - src/index.ts:122-138 (registration)Tool registration in ListToolsRequestSchema response, including name, description, and input schema requiring category and symbol.
name: 'get_tickers', description: 'Get ticker information', inputSchema: { type: 'object', properties: { category: { type: 'string', description: 'Category (spot, linear, inverse, etc.)', }, symbol: { type: 'string', description: 'Symbol (e.g., BTCUSDT)', }, }, required: ['category', 'symbol'], }, }, - src/bybit-service.ts:137-139 (helper)Core implementation of getTickers in BybitService class. Makes authenticated GET request to Bybit API /v5/market/tickers endpoint.
async getTickers(category: string, symbol: string): Promise<BybitResponse<{ list: TickerData[] }> | { error: string }> { return this.makeBybitRequest('/v5/market/tickers', 'GET', { category, symbol }); } - src/types.ts:17-28 (schema)TypeScript interface defining the structure of ticker data returned from Bybit API.
export interface TickerData { symbol: string; lastPrice: string; prevPrice24h: string; price24hPcnt: string; highPrice24h: string; lowPrice24h: string; volume24h: string; turnover24h: string; fundingRate: string; openInterest: string; }