ClearBank

FX trade

Foreign exchange trade

Our FX trade offering allows you to buy and sell currency in real-time – you submit a trade order to ClearBank, we perform the required validation checks on your order and upon successful validation, execute it in the foreign exchange market against live market rates.

You can use our FX trade functionality to perform FX trades between accounts which belong to the same owner. For example, let’s assume that you want to sell GBP from Account A to purchase EUR for Account B – in doing so, you will need to ensure that the owner of both accounts is the same. This applies to two accounts that belong to you, that is, the financial institution or your customers.

When initiating a FX trade order via our API, you can either specify the amount of the currency you wish to buy or the amount you wish to sell. The specified amount (and currency) is referred to as the fixed side of the trade. Whereas the amount (and currency) that has not been specified is referred to as the floating side of the trade.

Additionally, you can also specify your margin (%) to be applied to the trade. The margin amount is automatically calculated, applied to the credit/debit Transaction amount of the buy and sell accounts, and credited to a separate account of your choice. The margin is always reflected in the calculation of the credit/debit transaction of the floating currency.

Example: Specifying the sell amount with margin

Trade Request:

  • InstructedAmount: 1000
  • FixedSide: Sell
  • BuyCurrency: USD
  • SellCurrency: GBP (This means the fixed side of the trade is GBP and the floating side is USD. Therefore, the margin will be in USD).
  • Margin: 0.01 (Where 0.01 represents a 1% margin)
  • Assume the ClearBank rate is: 1.40 for GBP/USD
  • Margin amount: 1.4 x 0.01 x GBP 1000 = USD 14

Resulting transactions in respective accounts:

  • Debit to the sellAccount: GBP 1000.00
  • Credit to the buyAccount: USD 1386 [USD 1.4 x (1-0.01) x 1000]
  • Credit to the specified margin account: USD 14

Example: Specifying the buy amount with margin

Trade Request:

  • InstructedAmount: 1400
  • FixedSide: Buy
  • BuyCurrency: USD
  • SellCurrency: GBP
  • This means the fixed side of the trade is USD and the floating side is GBP, therefore the margin will be in GBP
  • Margin: 0.01 (Where 0.01 represents a 1% margin)
  • Assume the ClearBank rate is: 1.40 for GBP/USD
  • Margin amount: 1400 / 1.4 x 0.01 = GBP 10

Resulting transactions in respective accounts:

  • Debit to the sellAccount: GBP [1110 (1400 / 1.4 x (1 + 0.01)]
  • Credit to the buyAccount: USD 1400
  • Credit to the specified margin account: GBP 10

FX trade minimum values

FX trades have minimum trading values defined for each currency. If you try to request a trade below these values, you will receive a 400 error response.

CurrencyCurrency codeMinimum value
Canadian DollarCAD17
Swiss FrancCHF11
Czech KorunaCZK279
Danish KroneDKK86
EuroEUR12
British PoundsGBP10
Hungarian ForintHUF4411
Norwegian KroneNOK134
Polish ZlotyPLN52
Romanian LeuRON54
Swedish KronaSEK135
United States DollarUSD13

FX trade cut-off times

FX trades are subject to the cut-off times of both currencies in the trade. In order to execute a same-day trade, both currencies must be within their operating hours. A trade scheduled for next day or 2 days' time (indicated by a valueDate of T+1/T+2) can be executed for all currencies up to 23:30.

  • If a trade is booked in time for same-day settlement, you will receive a webhook notification of the settlement. If it fails to settle (typically because there are insufficient funds in the account), you will learn of the failure immediately. ClearBank will then send a fx-trade-cancelled-v1 webhook.
  • If you attempt to book a trade but one or both currencies are outside of the operating hours, you will receive a 400 error response.
  • Trades scheduled for next day or 2 days' time are typically processed around 8am of the valueDate.
  • If a trade is booked, but cannot be settled until a later day, and the settlement fails, the fx-trade-settlement-failed-v1 webhook notifies you of the failure. Make sure you subscribe to this webhook if you are making FX trades with a value (settlement) date later than the day of booking.

For further details on cut-off times, refer to the below table detailing the cut-off times for all currently supported currencies. Note that all times are in UK time.

CurrencyCurrency codeStart timeFX cut-off time (same day)FX cut-off time (next day/2 days' time)
Canadian DollarCAD07:0017:0023:30
Swiss FrancCHF07:0011:0023:30
Czech KorunaCZK07:0008:3023:30
Danish KroneDKK07:0011:0023:30
EuroEUR07:0014:3023:30
British PoundsGBP07:0015:0023:30
Hungarian ForintHUF07:0009:3023:30
Norwegian KroneNOK07:0011:0023:30
Polish ZlotyPLN07:0009:3023:30
Romanian LeuRON07:0008:3023:30
Swedish KronaSEK07:0011:0023:30
United States DollarUSD07:0017:0023:30

Create a Foreign Exchange (FX) buy and sell order

post/fx/v1/order

This endpoint is used to create a Foreign Exchange (FX) trade with the buy or sell amount specified.

Parameters

    Request Payload (application/json)

    • customerInformation object, Required

      Account information of the customer for whom the FX trade is being created.

    • tradeInformation object, Required

      Trade infomation of the customer for whom the FX trade is being created.

    request

    {
    "customerInformation": {
    "sellAccount": {
    "owner": "string",
    "iban": "string"
    },
    "buyAccount": {
    "owner": "string",
    "iban": "string"
    },
    "attestation": "string"
    },
    "tradeInformation": {
    "valueDate": "2019-08-24T14:15:22Z",
    "details": {
    "instructedAmount": 0,
    "fixedSide": "stri",
    "sellCurrency": "str",
    "buyCurrency": "str"
    },
    "margin": {
    "amount": 0.0499,
    "account": {
    "owner": "string",
    "iban": "string"
    }
    },
    "endToEndId": "string",
    "unstructuredInformation": "string"
    }
    }
    Code copied

    Response (application/json)

    • 202 Success
    • 400 Bad Request

    Bad Request

    {
    "type": "string",
    "title": "string",
    "status": 0,
    "detail": "string",
    "instance": "string",
    "property1": null,
    "property2": null
    }
    Code copied

    Associated Webhooks

    FX trade webhooks