# Models

## The Token object

```json
{"openapi":"3.0.0","info":{"title":"LFJ Router API","version":"1.0.0"},"components":{"schemas":{"Token":{"type":"object","properties":{"address":{"type":"string","description":"Token address"},"symbol":{"type":"string","description":"Token symbol"}}}}}}
```

## The TokenOut object

```json
{"openapi":"3.0.0","info":{"title":"LFJ Router API","version":"1.0.0"},"components":{"schemas":{"TokenOut":{"type":"object","properties":{"address":{"type":"string","description":"Token address"},"symbol":{"type":"string","description":"Token symbol"},"swaps":{"type":"array","items":{"type":"object"}}}}}}}
```

## The Swap object

```json
{"openapi":"3.0.0","info":{"title":"LFJ Router API","version":"1.0.0"},"components":{"schemas":{"Swap":{"type":"object","properties":{"pair":{"type":"string","description":"Pair address"},"tokenIn":{"$ref":"#/components/schemas/Token","type":"object","description":"Input token"},"tokenOut":{"$ref":"#/components/schemas/TokenOut","type":"object","description":"Output token with swaps"},"amountBp":{"type":"integer","description":"Percentage of input token used for this swap in basis points"}}},"Token":{"type":"object","properties":{"address":{"type":"string","description":"Token address"},"symbol":{"type":"string","description":"Token symbol"}}},"TokenOut":{"type":"object","properties":{"address":{"type":"string","description":"Token address"},"symbol":{"type":"string","description":"Token symbol"},"swaps":{"type":"array","items":{"type":"object"}}}}}}}
```

## The TokenWithSwaps object

```json
{"openapi":"3.0.0","info":{"title":"LFJ Router API","version":"1.0.0"},"components":{"schemas":{"TokenWithSwaps":{"allOf":[{"$ref":"#/components/schemas/Token"},{"type":"object","properties":{"swaps":{"type":"array","items":{"$ref":"#/components/schemas/Swap"}}}}]},"Token":{"type":"object","properties":{"address":{"type":"string","description":"Token address"},"symbol":{"type":"string","description":"Token symbol"}}},"Swap":{"type":"object","properties":{"pair":{"type":"string","description":"Pair address"},"tokenIn":{"$ref":"#/components/schemas/Token","type":"object","description":"Input token"},"tokenOut":{"$ref":"#/components/schemas/TokenOut","type":"object","description":"Output token with swaps"},"amountBp":{"type":"integer","description":"Percentage of input token used for this swap in basis points"}}},"TokenOut":{"type":"object","properties":{"address":{"type":"string","description":"Token address"},"symbol":{"type":"string","description":"Token symbol"},"swaps":{"type":"array","items":{"type":"object"}}}}}}}
```

## The QuoteResponse object

```json
{"openapi":"3.0.0","info":{"title":"LFJ Router API","version":"1.0.0"},"components":{"schemas":{"QuoteResponse":{"type":"object","properties":{"tokenIn":{"$ref":"#/components/schemas/TokenWithSwaps"},"tokenOut":{"$ref":"#/components/schemas/Token"},"amountIn":{"type":"string","description":"Input token amount"},"amountOut":{"type":"string","description":"Output token amount"},"aggregator":{"type":"string","description":"Aggregator identifier"}}},"TokenWithSwaps":{"allOf":[{"$ref":"#/components/schemas/Token"},{"type":"object","properties":{"swaps":{"type":"array","items":{"$ref":"#/components/schemas/Swap"}}}}]},"Token":{"type":"object","properties":{"address":{"type":"string","description":"Token address"},"symbol":{"type":"string","description":"Token symbol"}}},"Swap":{"type":"object","properties":{"pair":{"type":"string","description":"Pair address"},"tokenIn":{"$ref":"#/components/schemas/Token","type":"object","description":"Input token"},"tokenOut":{"$ref":"#/components/schemas/TokenOut","type":"object","description":"Output token with swaps"},"amountBp":{"type":"integer","description":"Percentage of input token used for this swap in basis points"}}},"TokenOut":{"type":"object","properties":{"address":{"type":"string","description":"Token address"},"symbol":{"type":"string","description":"Token symbol"},"swaps":{"type":"array","items":{"type":"object"}}}}}}}
```

## The SwapResponse object

```json
{"openapi":"3.0.0","info":{"title":"LFJ Router API","version":"1.0.0"},"components":{"schemas":{"SwapResponse":{"type":"object","properties":{"from":{"type":"string","description":"Transaction from address"},"to":{"type":"string","description":"Transaction to address"},"data":{"type":"string","description":"Transaction data"},"value":{"type":"string","description":"Transaction value"},"gas":{"type":"string","description":"Gas limit"},"gasPrice":{"type":"string","description":"Gas price"}}}}}}
```

## The Error object

```json
{"openapi":"3.0.0","info":{"title":"LFJ Router API","version":"1.0.0"},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}}}
```
