778890ee7e72

latestOpenAPI 3.0.02026-08-14100249502.6 KB
Conversions

Create a conversion

Creates an FX conversion, selling funds in one currency to buy funds in another.

post/conversions

Headers

Accountstring
Example:ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327

The linked accountId (use this to create a conversion for a specific sub account)

Request body

reasonstring nullable

An optional reason for the conversion

termAgreementboolean required

Confirms the account the conversion is created for (your own or a sub account) has agreed to our conversion terms. The request is rejected if this is false, so capture the user's agreement before creating a conversion (e.g. via a tickbox).

Example request

{
  "sell": {
    "currency": "GBP",
    "amount": 100000
  },
  "buy": {
    "currency": "EUR"
  },
  "reason": "Invoice payment",
  "termAgreement": true
}

Response

Conversion created successfully

idstring

The unique ID of the conversion

ratenumber nullable

The gross exchange rate applied, before fees. buy.amount is the converted sell amount at this rate, net of any sell-side fee. Null until the conversion has been priced.

status'InProgress' | 'Settled'

The status of the conversion:

  • InProgress - the conversion has been created and is being processed
  • Settled - the conversion has settled and the bought funds are available
reasonstring nullable

An optional reason supplied when the conversion was created

estimatedSettlementDatestring nullable

The estimated date the conversion will settle (ISO date format). This is an estimate and may not exactly match the final settlement date. Null until the conversion has been priced — populated from the first Conversion.updated event onward.

settledTimestampinteger nullable

The epoch timestamp (seconds) when the conversion settled. Null until the conversion reaches the Settled status.

createdTimestampinteger

The epoch timestamp (seconds) when the conversion was created

Example response

{
  "id": "cv_01FCTS1XMKH9FF43CAFA4CXT3P",
  "sell": {
    "amount": 100000,
    "currency": "GBP",
    "fees": {
      "ryft": {
        "amount": 500
      },
      "platform": {
        "amount": 1000,
        "ryftFee": {
          "amount": 500
        }
      }
    }
  },
  "buy": {
    "amount": 86000,
    "currency": "EUR",
    "fees": {
      "ryft": {
        "amount": 500
      },
      "platform": {
        "amount": 1000,
        "ryftFee": {
          "amount": 500
        }
      }
    }
  },
  "rate": 0.86,
  "status": "Settled",
  "reason": "Invoice payment",
  "estimatedSettlementDate": "2024-03-15",
  "settledTimestamp": 1710460800,
  "createdBy": {
    "id": "usr_01FCTS1XMKH9FF43CAFA4CXT3P",
    "name": "John Smith"
  },
  "createdTimestamp": 1710288000
}