_This does not lock a rate for a transfer. You can lock a rate with the getTransferQuote mutation._

### Parameters   [Skip link to Parameters](https://docs.routefusion.com/reference/get-mid-market-rate#parameters)

| Parameter              | Type      | Required |
| --------------------- | --------- | -------- |
| source_currency       | ISO4217! | true     |
| destination_currency  | ISO4217! | true     |

query

string

Defaults to {}

# ``200      200

object

data

object

getMidMarketRate

object

getMidMarketRate object

# ``400      400

var axios = require('axios');

var data = JSON.stringify({

query: `query getMidMarketRate (

$source_currency: ISO4217!

$destination_currency: ISO4217!

) {

getMidMarketRate (

source_currency: $source_currency

destination_currency: $destination_currency

) {

rate

inverted_rate

source_currency

destination_currency

}

}`,

variables: {"source_currency":"USD","destination_currency":"MXN"}

});

var config = {

method: 'post',

url: 'https://external.routefusion.com/graphql',

headers: {

'Authorization': 'Bearer <your token>',

'Content-Type': 'application/json'

},

data : data

};

axios(config)
.then(function (response) {

console.log(JSON.stringify(response.data));

})
.catch(function (error) {

console.log(error);

});

```

```

{

"data": {

"getMidMarketRate": {

"rate": "20.345898",

"inverted_rate": "0.049150",

"source_currency": "USD",

"destination_currency": "MXN"

}

}

}

```
