Convert funds

Convert between your multi-currency balances

To convert between, say, AUD and EUR you should:

  1. Request a tradeable quote with applicability: CONVERSION.

  2. Retrieve the quote ID from the response.

  3. Reference the quote ID when creating the conversion.

Get a tradable quote ID:

const bodyJSON = {
  variables: {
    input: {
      fromCurrency: "AUD",
      toCurrency: "EUR",
      size: "10000",
      currency: "AUD",
      tradeable: true,
      applicability: "CONVERSION",
    },
  },
  query: `
query ($input: QuoteInput!) {
  quote(input: $input) {
    id bid ask symbol timestamp inverted expireAt
  }
  }`,
};

Convert funds:

const bodyJSON = {
  variables: {
    input: {
        note: "for major client",
        externalId: "561402",
        quoteId: "6854dcffaa36ba8534d5f8e2",
        callbackUri: "https://example.com/my-webhook/endpoint/",
    },
  },
  query: `
mutation ($input: ConversionInput!) {
  createConversion(input: $input) {    
    success code message 
    conversion { 
      id fromCurrency toCurrency currencyPair fromAmount toAmount rate note 
      status statusMessage callbackUri externalId createdAt updatedAt 
    }
  }
  }`,
};

Last updated

Was this helpful?