Skip to main content
Glama

Margin borrow rates per venue: the cost of leverage, hourly

get_borrow_rates
Read-only

Compare annualized borrow rates across venues and assets, inspect hourly series, and calculate basis-trade carry (funding minus borrow) to assess financing costs and stablecoin rate spikes.

Instructions

Call this when the user asks what it costs to borrow USDT, USDC, BTC, ETH or a major alt on an exchange, which venue has the cheapest borrow, whether stablecoin borrow cost is spiking, or what the carry of a basis trade is on a venue (funding minus borrow). Returns the latest annualised rate per venue and asset, 30 days of hourly series for the stablecoins and majors, and the carry table. Recorded hourly by ByKaranteli (Binance and OKX today). The series hold the last 24 hours unless hours (up to 720) or asset is passed.

Input Schema

NameRequiredDescriptionDefault
assetNoOptional. One asset, e.g. USDT: its rates, carry and full 30-day series.
hoursNoOptional. Hours of hourly series to return (default 24, or the full 720 with asset).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed2 schema fields changedv0.36.0
    • addedInput schema / properties / asset
      Added value: +{
      +  "description": "Optional. One asset, e.g. USDT: its rates, carry and full 30-day series.",
      +  "pattern": "^[A-Z0-9]{2,12}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / hours
      Added value: +{
      +  "description": "Optional. Hours of hourly series to return (default 24, or the full 720 with asset).",
      +  "maximum": 720,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  3. Addedv0.27.2

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so safety is covered. The description adds genuinely new behavioral context: data is recorded hourly, the source is ByKaranteli (Binance and OKX only), and the series hold just the last 24 hours unless hours/asset is passed — an important truncation behavior an agent would otherwise miss.

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?

Usage triggers are front-loaded, followed by return contents and then retention caveats — a logical order with no filler. It is dense with comma-separated clauses, but every sentence carries information an agent needs.

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

Completeness5/5

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

There is no output schema, so the description carries the burden of describing return values, and it does: latest annualised rate per venue and asset, 30 days of hourly series for stablecoins and majors, and the carry table. Combined with the venue coverage and retention limits, an agent has enough to call this correctly without further clarification.

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 100%, so both parameters are already documented including the 720 maximum and the default-24 behavior. The description's line about series retention restates the schema's 'default 24, or the full 720 with asset' rather than adding new syntax or format detail, so the baseline of 3 applies.

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?

States a specific resource (annualised margin borrow rates per venue and asset) with concrete output components: latest rate, 30-day hourly series, and the carry table. It is clearly distinguishable from siblings like get_funding_arbitrage or get_funding_heatmap because it names borrow cost and carry (funding minus borrow) as the subject.

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?

Opens with an explicit trigger list ('Call this when the user asks what it costs to borrow USDT, USDC...', 'which venue has the cheapest borrow', 'whether stablecoin borrow cost is spiking', 'what the carry of a basis trade is'). That is strong positive guidance, but it names no alternative tool and no when-not-to-use condition, so it falls short of the 5 bar.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.