# inquireQuote

> The MPP app uses the inquireQuote API to query the exchange rate between a pair of currencies.

The Mobile Payment Provider (MPP) app uses the **inquireQuote** API to query the exchange rate between a pair of currencies. However, the exchange rate returned by Alipay+ is only for reference.

## Method signature

```java
public class AlipayPlusClient {

    public void inquireQuote(InquireQuoteParams param, Callback<InquireQuoteResult> callback);

}
```

## Request parameters

| **Item** | **Type** | **Description** | **Required** |
| --- | --- | --- | --- |
| params | [InquireQuoteParams](android_appendix#aR9h3) | Parameters that are required for the exchange rate inquiry. | M |
| callback | Callback | The callback to be invoked after the process of exchange rate inquiry ends. See [Callback](#sNdeC) for details. | M |

#### Callback

| **Item** | **Type** | **Description** | **Required** |
| --- | --- | --- | --- |
| result | [InquireQuoteResult](android_appendix#xCYCX) | The exchange rate inquiry result that is required if the inquiry is successful. | O |
| errorCode | String | The error code that is required if the inquiry fails. | O |
| errorMessage | String | The error message that is required if the inquiry fails. | O |

## Response parameters

N/A

## Sample

```java
InquireQuoteParams params = new InquireQuoteParams();
params.buyCurrency = "THB";
params.sellCurrency = "JPY";
AlipayPlusClient.getInstance().inquireQuote(params, new Callback<InquireQuoteResult>(){

    public void onSuccess(InquireQuoteResult result) {

    }

    public void onFailure(String errorCode, String errorMessage) {


    }

});

```

###