# Get Slippage

Estimates output tokens and slippage for a TAO-to-Alpha or Alpha-to-TAO swap in a subnet pool.

_Source: https://beta.taostats.io/docs/api-reference/delegation/get-slippage_

_Last reviewed: 2026-09-18_

```http
GET https://api.taostats.io/api/dtao/slippage/v1
```

Requires an API key in the `Authorization` header.

Estimates output tokens and slippage for a TAO-to-Alpha or Alpha-to-TAO swap in a subnet pool. Supply the subnet, input amount and direction; the response compares estimated output with output at the quoted pool price.

## Try it

Try this request in the browser on the HTML version of this page, or use the code samples below.

### Examples

Estimate the slippage on staking 100 TAO into subnet 19 (TAO to alpha)

```text
https://api.taostats.io/api/dtao/slippage/v1?netuid=19&input_tokens=100000000000&direction=tao_to_alpha
```

### Code samples

**cURL**

```bash
curl -H "Authorization: <YOUR_API_KEY>" \
  "https://api.taostats.io/api/dtao/slippage/v1?netuid=19&input_tokens=100000000000&direction=tao_to_alpha"
```

**JavaScript**

```js
const response = await fetch('https://api.taostats.io/api/dtao/slippage/v1?netuid=19&input_tokens=100000000000&direction=tao_to_alpha', {
  headers: {
    Authorization: '<YOUR_API_KEY>',
  },
});
const data = await response.json();
```

**Python**

```python
import requests

response = requests.get(
    "https://api.taostats.io/api/dtao/slippage/v1?netuid=19&input_tokens=100000000000&direction=tao_to_alpha",
    headers={"Authorization": "<YOUR_API_KEY>"},
)
data = response.json()
```

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `netuid` | query | `integer (int32)` | Yes | Subnet Id |
| `input_tokens` | query | `string` | Yes | as Rao or nanoAlpha (billionths of tao/alpha) |
| `direction` | query | `string` | Yes | tao to alpha or alpha to tao One of `tao_to_alpha`, `alpha_to_tao`. |

## Responses

### `200` — Dtao slippage retrieved successfully

| Field | Type | Required |
| --- | --- | --- |
| `data` | `array` | Yes |
| `data[].alpha_price` | `string` | Yes |
| `data[].block_number` | `integer (int32)` | Yes |
| `data[].diff` | `string` | Yes |
| `data[].expected_output_tokens` | `string` | Yes |
| `data[].netuid` | `integer (int32)` | Yes |
| `data[].output_tokens` | `string` | Yes |
| `data[].slippage` | `string` | Yes |
| `data[].timestamp` | `string (date-time)` | Yes |
| `pagination` | `object` | Yes |
| `pagination.current_page` | `integer (int32)` | Yes |
| `pagination.next_page` | `integer (int32), nullable` |  |
| `pagination.per_page` | `integer (int32)` | Yes |
| `pagination.prev_page` | `integer (int32), nullable` |  |
| `pagination.total_items` | `integer (int32)` | Yes |
| `pagination.total_pages` | `integer (int32)` | Yes |

**Example response**

```json
{
  "data": [
    {
      "alpha_price": "0.0512855519",
      "block_number": 5012782,
      "diff": "6193918",
      "expected_output_tokens": "19498668995",
      "netuid": 19,
      "output_tokens": "19492475077",
      "slippage": "0.0317658298",
      "timestamp": "2025-02-26T17:50:00Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "next_page": null,
    "per_page": 1,
    "prev_page": null,
    "total_items": 1,
    "total_pages": 1
  }
}
```

**Response details**

```text
    {
      "netuid": 19,
      "block_number": 5453605,
      "timestamp": "2025-04-28T23:14:36Z",
      "alpha_price": "0.0695548637", price in tao
      "output_tokens": "14376501457", output tokens received as rao
      "expected_output_tokens": "14377139805", tokens expected as rao
      "diff": "638347", Difference in roa
      "slippage": "0.0044400105" slippage as value
    }
```

### Other responses

| Status | Meaning |
| --- | --- |
| `400` | Bad request |
| `404` | Dtao slippage not found |
| `500` | Internal server error |

Every request needs an `Authorization` header holding your API key — see [Getting started with the Taostats API](https://beta.taostats.io/docs/start-here/getting-started-with-taostats-api).
