# Signal Matrix

### Signal Matrix <a href="#signal-matrix" id="signal-matrix"></a>

<mark style="color:green;">`GET`</mark> `/signal-matrix`

The Signal Matrix API provides trading signals and their associated statistics for specific cryptocurrency tokens. This documentation outlines the usage, request format, and response structure of the API.

Example on DeFi Lens: <https://defilens.ai/tokens/bitcoin/signals>

### **Headers**

<table><thead><tr><th>Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x-partner-key</code></td><td>string</td><td><p>Your API Key </p><p>Ex: <code>xxxx</code></p></td></tr></tbody></table>

### **Body**

| Name       | Type   | Description                                   |
| ---------- | ------ | --------------------------------------------- |
| `token_id` | string | <p>Token name<br>Ex: <code>bitcoin</code></p> |

Possible enum values for `token_id` include the following tokens:

{% code overflow="wrap" %}

```
["bitcoin", "ethereum", "binancecoin", "solana", "dogecoin", "chainlink", "ripple", "polkadot", "shiba-inu", "cosmos", "near", "axie-infinity", "avalanche-2", "algorand", "injective-protocol", "oraichain-token"]
```

{% endcode %}

### Example request

{% code overflow="wrap" %}

```
curl "https://api.defilens.ai/strategies/signal-matrix?token_id=bitcoin" \
  -H "x-partner-key: xxx"
```

{% endcode %}

### **Response**

{% tabs %}
{% tab title="200" %}

```json

    "data": [
        {
            "signal_id": "VSA",
            "1d": {
                "total_count": 30,
                "win_count": 15,
                "action_side": "neutral"
            },
            "1h": {
                "total_count": 30,
                "win_count": 18,
                "action_side": "neutral"
            },
            "15m": {
                "total_count": 30,
                "win_count": 16,
                "action_side": "sell"
            },
            "5m": {
                "total_count": 30,
                "win_count": 13,
                "action_side": "neutral"
            }
        },
        {
            "signal_id": "RSI 7",
            "1d": {
                "total_count": 30,
                "win_count": 19,
                "action_side": "sell"
            },
            "1h": {
                "total_count": 30,
                "win_count": 18,
                "action_side": "neutral"
            },
            "15m": {
                "total_count": 30,
                "win_count": 14,
                "action_side": "sell"
            },
            "5m": {
                "total_count": 30,
                "win_count": 14,
                "action_side": "sell"
            }
        },
        {
            "signal_id": "Bollinger Bands and RSI",
            "1d": {
                "total_count": 30,
                "win_count": 16,
                "action_side": "buy"
            },
            "1h": {
                "total_count": 30,
                "win_count": 12,
                "action_side": "buy"
            },
            "15m": {
                "total_count": 30,
                "win_count": 15,
                "action_side": "buy"
            },
            "5m": {
                "total_count": 30,
                "win_count": 16,
                "action_side": "sell"
            }
        }
    ],
    "summary": {
        "1d": {
            "action_side": "buy",
            "win_rate": 40.0
        },
        "1h": {
            "action_side": "sell",
            "win_rate": 56.67
        },
        "15m": {
            "action_side": "buy",
            "win_rate": 43.33
        },
        "5m": {
            "action_side": "sell",
            "win_rate": 66.67
        }
    }
}
```

{% endtab %}
{% endtabs %}

### Data return

<table><thead><tr><th width="278">Name</th><th width="86">Type</th><th>Description</th></tr></thead><tbody><tr><td><pre><code>signal_id
</code></pre></td><td>string</td><td>Type of technical  indicator.</td></tr><tr><td><pre><code>"1d", "1h", "15m", "5m"
</code></pre></td><td>object</td><td>Chart interval</td></tr><tr><td><pre><code>total_count
</code></pre></td><td>integer</td><td>The total number of orders that have been placed based on historical data</td></tr><tr><td><pre><code>win_count
</code></pre></td><td>integer</td><td>The total number of win orders based on backtesting data</td></tr><tr><td><pre><code>action_side
</code></pre></td><td>string</td><td>The specific action taken during the backtesting process at a given point in time<br>Ex: <code>buy</code>, <code>sell</code>, <code>neutral</code></td></tr><tr><td><pre><code>win_rate
</code></pre></td><td>float</td><td>The percentage calculated based on action_side, win_count, and the corresponding weight</td></tr></tbody></table>
