# getAssetPerps

**Identifier:** `defillama_getAssetPerps`

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

Get Funding rates and Open Interest of perps across exchanges, including both Decentralized and Centralized for a given base asset.

## Run it with the CLI

```bash
kirha tools run defillama_getAssetPerps \
  --input '{
    "baseAssetSymbol": "<baseAssetSymbol>"
  }'
```

`--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_getAssetPerps",
  "input": {
    "baseAssetSymbol": "<baseAssetSymbol>"
  }
}'
```

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": {
    "baseAssetSymbol": {
      "description": "Use SearchCoin of Coingecko to find the symbol.",
      "type": "string"
    }
  },
  "required": [
    "baseAssetSymbol"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "baseAssetSymbol": {
      "type": "string"
    },
    "context": {
      "type": "string"
    },
    "perps": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "baseAsset": {
            "type": "string"
          },
          "fundingRate": {
            "type": "number"
          },
          "fundingRate30dAverage": {
            "type": "number"
          },
          "fundingRate30dSum": {
            "type": "number"
          },
          "fundingRate7dAverage": {
            "type": "number"
          },
          "fundingRate7dSum": {
            "type": "number"
          },
          "fundingRatePrevious": {
            "type": "number"
          },
          "fundingTimePrevious": {
            "type": "number"
          },
          "indexPrice": {
            "type": "number"
          },
          "market": {
            "type": "string"
          },
          "marketplace": {
            "type": "string"
          },
          "openInterest": {
            "type": "number"
          },
          "timestamp": {
            "type": "string"
          }
        },
        "required": [
          "timestamp",
          "marketplace",
          "market",
          "baseAsset",
          "fundingRate",
          "openInterest",
          "indexPrice"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "totalPerps": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "perps",
    "baseAssetSymbol",
    "totalPerps"
  ],
  "type": "object"
}
```

-----

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