# swap_simSwapAlphaForTao - JSON-RPC Method

## Description

Bittensor swap helpers for TAO/ALPHA (price/simulation). Useful for quoting or UX previews; may be disabled on some nodes.

Simulates a swap from ALPHA to TAO. May return null if disabled.

## Code Examples

## Request Parameters

- `netuid` (`number, required`): Numeric subnet identifier.
- `alphaAmount` (`u64, required`): Raw ALPHA amount to simulate, expressed in the smallest on-chain unit.
- `at` (`string, optional`): Optional block hash to query historical liquidity.

## Request Example

```json
{
  "jsonrpc": "2.0",
  "method": "swap_simSwapAlphaForTao",
  "params": [
    1,
    1000000000,
    null
  ],
  "id": 1
}
```

## Response Fields

- `result` (`DATA, required`): SCALE-encoded simulation output for the ALPHA-to-TAO quote.

## Successful Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    7,
    122,
    166,
    0
  ]
}
```

## Error Responses

### Invalid Params

- Code: `-32602`

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32602,
    "message": "Invalid params",
    "data": "invalid type: string \"1000000000\", expected u64 at line 1 column 12"
  }
}
```
