Shows average rate for token pair.
## Request Structure
`JSON object:`
```JSON
{
"method": "srv_xchange",
"subcommand": ["token_pair","rate","average"],
"arguments": {
"net": "network_name",
"token_from": "token_ticker",
"token_to": "token_ticker",
"time_from": "From time",
"time_to": "To time"
},
"id": "1"
}
```
`Parameters:`
**`net (network_name)`** - name of the Cellframe Network. The list of networks can be found in the `<Config_dir> \ etc \ network` folder or received using - [[Node Command - NET LIST]]
**`token_from`** - ticker of token is being sold
**`token_to`** - ticker of token is being bought
**`time_from`** - filtration by time since specified value `optional`
**`time_to`** - filtration by time until specified value `optional`
### Curl Example
`Request:`
```actionscript
curl --unix-socket /opt/cellframe-node/var/run/node_cli -X POST http://localhost/connect -d '{
"method": "srv_xchange",
"subcommand": ["token_pair","rate","average"],
"arguments": {
"net": "Backbone",
"token_from": "KEL",
"token_to": "CELL"
},
"id": "1"
}'
```
`Response:`
```json
{
"type": 2,
"result": [
{
"Average rate": "3.097633756598240336",
"Last rate": "50.0",
"Last rate time": "Mon, 28 Oct 2024 13:09:51 +0700"
}
],
"id": 1
}
```