get_funding_rate_history
Retrieve historical funding rates for perpetual instruments to analyze market trends and funding costs over time.
Instructions
Get historical funding rates for a perpetual instrument
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instrument_name | Yes | Perp instrument name, e.g. ETH-PERP | |
| start_timestamp | No | Start timestamp in seconds (default 0, max 30 days ago) | |
| end_timestamp | No | End timestamp in seconds (default now) | |
| period | No | Period in seconds |
Implementation Reference
- src/client.ts:133-135 (handler)The implementation of the get_funding_rate_history tool, which makes a POST request to the Derive API.
getFundingRateHistory(params: GetFundingRateHistoryParams): Promise<unknown> { return this.post('public/get_funding_rate_history', params); } - src/index.ts:71-73 (registration)Registration and routing of the get_funding_rate_history tool call in the main MCP server request handler.
case 'get_funding_rate_history': result = await client.getFundingRateHistory(a as unknown as GetFundingRateHistoryParams); break; - src/types.ts:46-48 (schema)Type definition for the parameters of the get_funding_rate_history tool.
export interface GetFundingRateHistoryParams { instrument_name: string; start_timestamp?: number;