# 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

```objectivec
NS_ASSUME_NONNULL_BEGIN

@interface MPPAlipayPlusClient : NSObject
+ (instancetype)shared;
- (void)inquireQuote:(MPPInquireQuoteParams *)params
   completionHandler:(void(^)(MPPInquireQuoteResult * _Nullable result, NSError *  _Nullable error))completionHandler;
@end

NS_ASSUME_NONNULL_END
```

## Request parameters

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

#### completionHandler

| **Item** | **Type** | **Description** | **Required** |
| --- | --- | --- | --- |
| result | [MPPInquireQuoteResult](ios_appendix#xCYCX) | The exchange rate inquiry result that is required if the inquiry is successful. | O |
| error | NSError | The error code that is required if the inquiry fails. | O |

## Response parameters

N/A

## Sample

```objectivec
#import <MPPAlipayPlusClient/MPPAlipayPlusClientAPI.h>

MPPInquireQuoteParams *params = [MPPInquireQuoteParams new];
params.buyCurrency = @"SGD";
params.sellCurrency = @"USD";
[[AlipayPlusClient shared] inquireQuote:params completionHandler:^(MPPInquireQuoteResult * _Nullable result, NSError *  _Nullable error){
        if (!error){
            // Your logic
        }
}]

```

###