Guard

Cancel guard

Cancels a guard and creates a settlement for hedge unwinding. Refund amount is calculated based on guard age and maturity, minus the sales margin. Guards with hedges (ACTIVE status) will create a PENDING_SELL option for trader confirmation. Guards without hedges will be immediately settled.

Required entitlement: regulated.risk-management.canBuyGuard
Entitles the regulated user to enter guard trades for their customers

post/api-regulated/v1/guards/{guardId}/cancel-guard

Request

  • Base URL: https://api.currencyguard.com
  • URL: https://api.currencyguard.com/api-regulated/v1/guards/{guardId}/cancel-guard
  • Auth: OAuth 2 (implicit, authorization URL https://auth.currencyguard.com/oauth2/authorize, scopes: regulated.risk-management.canBuyGuard)

Path parameters

guardIdstring required

Request body

salesMarginAmountnumber required

Sales margin adjustment in guard currency. Positive values reduce the refund (PSP retains margin); negative values increase it (PSP adds to refund).

reasonstring

Reason for cancelling the guard (optional)

Example request

{
  "salesMarginAmount": 50,
  "reason": "Client requested cancellation due to contract termination"
}

Response

Guard cancelled successfully

refundAmountnumber

Refund amount returned to the client in guard currency (after deducting sales margin)

salesMarginAmountnumber

Sales margin charged to the client

settlementIdstring

ID of the guard settlement record created for this cancellation

guardCurrencystring

Guard currency code

Example response

{
  "guard": {
    "id": "GSP1000104",
    "originalGuardId": "GSP1000104",
    "previousGuardId": "GSP1000104",
    "introducingBrokerId": "eeeeeeee-ee55-4001-8000-000000000000",
    "regulatedUserId": "9e107d9d-372d-4add-ae2d-f3d1d41fd1d7",
    "salesUserId": "9e107d9d-372d-4add-ae2d-f3d1d41fd1d7",
    "companyId": "9e107d9d-372d-4add-ae2d-f3d1d41fd1d7",
    "customerId": "9e107d9d-372d-4add-ae2d-f3d1d41fd1d7",
    "guardStatus": "ACTIVE",
    "externalRef": "BEN-90210",
    "invoiceExternalRef": "INV-2024-001",
    "guardPeriodFrom": "2024-01-16",
    "tradeDate": "2024-01-16T11:00:00Z",
    "settlementWindowFrom": "2024-01-16",
    "settlementWindowTo": "2024-04-15",
    "guardCurrency": "GBP",
    "foreignCurrency": "USD",
    "currencyPair": "GBPUSD",
    "payReceive": "PAY",
    "foreignAmount": 50000,
    "totalForeignAmountSettled": 15000,
    "guardRate": 1.3121,
    "paymentMarginAtInception": 0.015,
    "midAtInception": 1.34,
    "spotFxBid": 1.3115,
    "spotFxAsk": 1.3125,
    "guardAmount": 38109.75,
    "totalGuardAmountSettled": 11432.92,
    "guardFee": 512,
    "guardFeeDate": "2024-01-18",
    "salesMarginRate": 0.007,
    "salesMargin": 296.02,
    "effectiveRate": 1.2946,
    "guardQuoteId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "versionNumber": 1,
    "updatedBy": "jbloggs24",
    "updatedAt": "2024-10-18T12:30:40Z",
    "createdAt": "2024-10-18T12:30:40Z",
    "expectedPaymentMargin": 1250.5,
    "realizedPaymentMargin": 875.25
  },
  "refundAmount": 334,
  "salesMarginAmount": 50,
  "settlementId": "e1f2d3c4-b5a6-7890-9c8d-7e6f5d4c3b2a",
  "guardCurrency": "GBP"
}

Changes

No recorded changes to this operation across all 1 revision of this API.