Flash Payments Developer API
Back to Flash PaymentsGraphQL Playground
  • Overview
  • Basics
    • Sending data as JSON
  • Authentication
  • Quote
  • Conversions
    • Query conversions
    • Conversion statuses
  • Balance
    • Statement
  • Recipients
    • Required fields
  • Senders
  • Payments
    • Payment statuses
    • Query payments
    • Send funds
    • Auto receive funds
  • Institutions
  • Withdrawals
    • Withdraw funds
    • Withdrawal statuses
    • Query withdrawals
  • Deposits
    • Deposit statuses
    • Query deposits
    • Refund deposits
  • Sub-clients
    • Create sub-clients
    • Disable, Activate and Update sub-clients
    • Query sub-clients
  • Webhooks
    • Regular webhooks
    • Ad hoc webhooks
  • Reference data
    • Bank information
    • Rejection codes
  • Change log
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF

Conversions

Convert between your multi currency balances

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

  1. request a tradeable quote with the applicability: CONVERSION, and

  2. use it whilst creating a conversion.

Get a quote ID:

{
  quote(
    input: { 
      fromCurrency: AUD
      toCurrency: EUR
      size: 10000
      currency: AUD
      tradeable: true
      applicability: CONVERSION
    }
  ) {
    id
    bid
    ask
    symbol
    timestamp
    inverted
    expireAt
  }
}
{
  "data": {
    "quote": {
      "id": "6711ec0e950ae23de886ebe5",
      "bid": 0.61104,
      "ask": 0.62077,
      "symbol": "USDAUD",
      "timestamp": "2024-08-13T07:54:54.993Z",
      "inverted": true,
      "expireAt": "2024-08-13T07:55:54.993Z"
    }
  }
}

Convert funds:

mutation {
  createConversion(
    input: {
      note: "for major client"
      externalId: "561402"
      quoteId: "6711ec0e950ae23de886ebe5"
      callbackUri: "https://example.com/my-webhook/endpoint/"
    }
  ) {
    success
    code
    message
    conversion {
      id
      fromCurrency
      toCurrency
      currencyPair
      fromAmount
      toAmount
      rate
      note
      status
      statusMessage
      callbackUri
      externalId
      createdAt
      updatedAt
    }
  }
}
{
  "data": {
    "createConversion": {
      "success": true,
      "code": "CREATED",
      "message": "Conversion successfully created",
      "conversion": {
        "id": "6711f0a7b549a701ebeb02ac",
        "fromCurrency": "EUR",
        "toCurrency": "AUD",
        "currencyPair": "AUDEUR",
        "fromAmount": 101,
        "toAmount": 159.81,
        "rate": 0.63199,
        "note": "for major client",
        "status": "PENDING",
        "statusMessage": "Awaiting execution",
        "callbackUri": "https://example.com/my-webhook/endpoint/",
        "externalId": "561402",
        "createdAt": "2024-10-18T05:22:47.433Z",
        "updatedAt": "2024-10-18T05:22:47.433Z"
      }
    }
  }
}

PreviousQuoteNextQuery conversions

Last updated 7 months ago

Was this helpful?