# Route

```
constructor(pairs: Pair[], input: Token)
```

The Route entity represents one or more ordered WhiteSwap pairs with a fully specified path from input token to output token.

## Example <a href="#example" id="example"></a>

```
import { ChainId, Token, TokenAmount, Pair, Route } from '@whiteswap/sdk'

const HOT = new Token(ChainId.MAINNET, '0xc0FFee0000000000000000000000000000000000', 18, 'HOT', 'Caffeine')
const NOT = new Token(ChainId.MAINNET, '0xDeCAf00000000000000000000000000000000000', 18, 'NOT', 'Caffeine')
const HOT_NOT = new Pair(new TokenAmount(HOT, '2000000000000000000'), new TokenAmount(NOT, '1000000000000000000'))

const route = new Route([HOT_NOT], NOT)
```

## Properties <a href="#properties" id="properties"></a>

### pairs <a href="#pairs" id="pairs"></a>

```
pairs: Pair[]
```

The ordered pairs that the route is comprised of.

### path <a href="#path" id="path"></a>

```
path: Token[]
```

The full path from input token to output token.

### input <a href="#input" id="input"></a>

```
input: string
```

The input token.

### output <a href="#output" id="output"></a>

```
output: string
```

The output token.

### midPrice <a href="#midprice" id="midprice"></a>

```
midPrice: Price
```

Returns the current mid price along the route.
