Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

getClosedPnl

Retrieve historical closed position PnL records including entry/exit prices, fees, leverage, and realized PnL. Supports up to 730 days of data with pagination.

Instructions

Query closed PnL records for the current user. Results include entry/exit prices, fees, leverage, and realized PnL for each closed position.

Agent hint: Use this to retrieve historical closed position PnL. Supports up to 730 days of data. Max 7-day range per query. Results are sorted newest first. Use cursor for pagination. Each record includes entry/exit prices, PnL, fees, and leverage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYes
symbolNo
startTimeNo
endTimeNo
limitNo
cursorNo
Behavior5/5

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

With no annotations, description fully covers behavior: read-only, pagination, date limits, sorting. Clearly states it returns historical data for the current user, no destructive actions.

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?

Two concise paragraphs: first states purpose and output fields, second provides agent hint with usage details. Front-loaded and no fluff.

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

Completeness4/5

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

Explains output fields, pagination, date range, sorting, and user scope. Missing details on category enum and symbol, but overall covers essential aspects for a 6-parameter tool with no output schema.

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 coverage is 0%, so description must compensate. It mentions cursor for pagination and date range constraints, adding meaning beyond schema, but does not fully explain parameters like symbol, limit, or category enum. Partial added value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it queries closed PnL records for the current user, listing key fields. The verb 'Query' with 'closed PnL' distinguishes it from siblings like getOrderHistory or getTradeHistory, which focus on different data.

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

Usage Guidelines4/5

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

Provides explicit agent hint to use for historical closed PnL, and specifies constraints: up to 730 days, max 7-day range, sorted newest first, cursor pagination. Lacks alternatives but the guidelines are clear.

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/bybit-exchange/trading-mcp'

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