Treasury

In this chapter we will show examples of making a forex trade

Schedule Currency Trading

Create a new trade by using the scheduleCurrencyTrading mutation. This mutation will create a new trade in the 360t system.

Loading GraphiQL...

For details of what each input field means, you can check ScheduleCurrencyTradingInput.

The waitToken in the response can be used to check for the status of the trade.

By using the fxForward query, you can get the status and execution details.

Loading GraphiQL...

Webhook Notifications

Kronor will send notifications to the webhook URL provided by the merchant. The notification will be sent when the trade status changes.

The notification will be a POST request with the following payload:

{
    "events": [
        {
            "event": "fxForwardUpdateEvent",
            "id": "123456",
            "triggeredAt": "2024-11-11T14:42:45.315318+00:00",
            "additionalData": {
                "amount": "100000000",
                "createdAt": "2024-11-11T14:42:45.315318+00:00",
                "currencyToBuy": "EUR",
                "currencyToPayWith": "USD",
                "desiredQuotes": 4,
                "errorMessage": null,
                "fxForwardExecutionDetail": {
                    "executedQuoteId": "2-000004",
                    "executedRate": "1.0648708",
                    "executionId": "457021057",
                    "id": "2",
                    "orderId": "2",
                    "settleDate": "2024-11-18"
                },
                "nominalCurrency": "EUR",
                "settlementDate": "2024-11-18",
                "status": "success",
                "id": "12345"
            }
        }
    ]
}