# getNarrativePerformance

**Identifier:** `defillama_getNarrativePerformance`

**Provider:** [DefiLlama](https://kirha.com/providers/defillama.md)

Get historical performance chart of DeFi narratives/categories over a specified time period, with individual coins weighted by market cap.

## Run it with the CLI

```bash
kirha tools run defillama_getNarrativePerformance \
  --input '{}'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "defillama_getNarrativePerformance",
  "input": {}
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "period": {
      "default": "7d",
      "enum": [
        "7d",
        "30d"
      ],
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "endDate": {
      "type": "string"
    },
    "narrativePerformance": {
      "additionalProperties": {
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "description": "Time series of performance percentage per narrative, keyed by DefiLlama narrative name (e.g. 'AI', 'DeFi', 'RWA', 'Meme', 'Solana')",
      "propertyNames": {
        "type": "string"
      },
      "type": "object"
    },
    "period": {
      "type": "string"
    },
    "startDate": {
      "type": "string"
    },
    "timeSeriesLength": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "narrativePerformance",
    "period",
    "startDate",
    "endDate",
    "timeSeriesLength"
  ],
  "type": "object"
}
```

-----

[All DefiLlama tools](https://kirha.com/providers/defillama.md) · [< Back to tools list](https://kirha.com/tools.md)