---
title: "Execute currency exchange"
method: POST
path: "/v1/exchange"
tags: ["Delegated Contract Mode"]
---

# Execute currency exchange

`POST /v1/exchange`

Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Exchanges one fiat token balance for another on behalf of the user. Amounts are smallest-unit strings (100.00 USD is "10000"). requestId is the idempotency key; keep it stable across retries.

## Headers

- `X-Api-Signature` string, required
- `X-Api-Deadline` string, required
- `X-Api-PublicKey` string

## Request body

- object
  - `urId` integer, required — UR user ID.
  - `inputToken` string, required — Input token symbol from /v1/tokens.
  - `outputToken` string, required — Output token symbol from /v1/tokens.
  - `amount` string, required — Exchange amount in smallest units.
  - `requestId` string, required — Idempotency key; reuse on retry.

## Response `200`

Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.

- DcEnvelope — Standard response envelope for the partner API (openapi.ur.app).
  - `code` integer, required — 0 on success; non-zero indicates a business rejection.
  - `message` string, required — Human-readable diagnostic; empty on success.
  - `data` unknown

---

[API](https://skmtc.net/ur/apis/ur-api.md) · [All operations](https://skmtc.net/ur/apis/ur-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ur/ur-api/revisions/087dcf516ce2/schema)
