---
title: "[Sandbox] Update swap status"
method: PUT
path: "/sandbox/swap/transactions/{contractId}"
---

# \[Sandbox\] Update swap status

`PUT /sandbox/swap/transactions/{contractId}`

## Request

- Base URL: `https://api-sandbox.straitsx.com/v1`
- URL: `https://api-sandbox.straitsx.com/v1/sandbox/swap/transactions/{contractId}`
- Auth: API key in header `X-XFERS-APP-API-KEY`

[Available in Sandbox environment only] Update status of a swap transaction to completed.

## Path parameters

- `contractId` string, required

## Headers

- `X-XFERS-APP-API-KEY` string, required
- `X-PUBLIC-KEY-ID` string
- `X-TIMESTAMP` string
- `X-NONCE` string
- `X-SIGNATURE` string

## Request body

- object
  - `data` object
    - `attributes` object
      - `status` string: Status of the swap transaction. Accepts only `completed` or `failed`

## Response `200`

200

- object
  - `data` object
    - `id` string: Swap transaction ID.
    - `type` string: Request type.
    - `attributes` object
      - `idempotencyId` string: Idempotency ID of this swap transaction.
      - `quoteId` string: Swap quote ID.
      - `status` string: Status of the swap transaction.
      - `swapPair` string: The currency pair involved in the swap.
      - `sourceCurrency` string: The source currency of requested swap quote.
      - `targetCurrency` string: The target currency of requested swap quote.
      - `fixedSide` string: Indicates which side of the swap has a fixed amount, can be either `source` or `target`.
      - `totalSourceCurrencyAmount` string: The total amount of the source currency that will be deducted for the swap, including any applicable fees.
      - `sourceCurrencyAmount` string: The amount of the source currency being converted, excluding any fees.
      - `targetCurrencyAmount` string: The amount of the target currency that will be received from the swap.
      - `rate` string: The proposed exchange rate.<br><br>Note: The rate is always defined as the first currency in the swap pair quoted against the second currency.
      - `expiresAt` string: The timestamp indicating when the quoted rate expires.
      - `fees` object[]: Additional transaction fees or markup applied on top of the exchange rate.
        - `type` string: Fee type.
        - `amount` string: The amount of the fee charged for the swap, expressed in the specified fee currency.
        - `currency` string: The currency for the fee amount.
      - `createdAt` string: The timestamp indicating when the quoted rate is created.
      - `updatedAt` string: The timestamp indicating when the quoted rate is updated.

---

[API](https://skmtc.dev/straitsx/apis/straitsx-sandbox-base-url.md) - [All operations](https://skmtc.dev/straitsx/apis/straitsx-sandbox-base-url/llms.txt) - [OpenAPI document](https://skmtc.dev/straitsx/apis/straitsx-sandbox-base-url/revisions/d17239d67150?raw)
