FX Optimizer

Server-Side Implementation

Important
Your integration may be impacted by upcoming certificate changes. Visit our best practices guide to learn more.

Creating a transactionAnchorIcon

When creating a transaction, pass the `exchangeRateQuoteId` from the Java SDK.

The Exchange Rate Quote API is a GraphQL API, and the server-side implementation includes converting the below request passed to the API.

The client-side makes a request by passing the following variables:

  1. Java
ExchangeRateQuoteRequest request = new ExchangeRateQuoteRequest()
    .addExchangeRateQuoteInput()
    .baseCurrency("USD")
    .quoteCurrency("EUR")
    .baseAmount("12.19")
    .markup("12.14")
    .done()
    .addExchangeRateQuoteInput()
    .baseCurrency("EUR")
    .quoteCurrency("CAD")
    .baseAmount("15.16")
    .markup("2.64")
    .done();

Result<exchangeratequotepayload> result = gateway.exchangeRateQuote().generate(request);
List<exchangeratequote> quotes = result.getTarget().getQuotes();