---
updatedAt: 2026-06-20T07:34:07.000Z
agentTools:
  projectIndex: https://docs.wirexapp.com/llms.txt
---

# Estimate FX swap

Creates a swap estimation with deposit address for Circle FX stablecoin swap

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "request.FxEstimateRequest": {
        "properties": {
          "correlation_id": {
            "description": "CorrelationId is an optional client-provided identifier for tracking the request",
            "example": "550e8400-e29b-41d4-a716-446655440000",
            "type": "string"
          },
          "destination_asset_address": {
            "description": "DestinationAssetAddress is the contract address of the token to receive (e.g., EURC)",
            "example": "0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",
            "type": "string"
          },
          "destination_asset_amount": {
            "description": "DestinationAssetAmount is the desired amount of destination token, at most 2 decimal places (mutually exclusive with source_asset_amount)",
            "example": "95.25",
            "type": "string"
          },
          "source_asset_address": {
            "description": "SourceAssetAddress is the contract address of the token to swap from (e.g., USDC)",
            "example": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
            "type": "string"
          },
          "source_asset_amount": {
            "description": "SourceAssetAmount is the amount of source token to swap, at most 2 decimal places (mutually exclusive with destination_asset_amount)",
            "example": "100.50",
            "type": "string"
          }
        },
        "required": [
          "destination_asset_address",
          "source_asset_address"
        ],
        "type": "object"
      },
      "response.ErrorCategory": {
        "properties": {
          "category": {
            "type": "string"
          },
          "grpc_status_code": {
            "type": "integer"
          },
          "http_status_code": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "response.ErrorDetails": {
        "properties": {
          "details": {
            "type": "string"
          },
          "key": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "response.ErrorResponse": {
        "properties": {
          "error_category": {
            "$ref": "#/components/schemas/response.ErrorCategory"
          },
          "error_description": {
            "type": "string"
          },
          "error_details": {
            "items": {
              "$ref": "#/components/schemas/response.ErrorDetails"
            },
            "type": "array"
          },
          "error_reason": {
            "example": "ErrorInvalidField",
            "type": "string"
          }
        },
        "type": "object"
      },
      "response.FxEstimateResponse": {
        "properties": {
          "deposit_address": {
            "description": "Deprecated: still populated for backward compatibility, but consumers should read destination_address — this field carries the address where source tokens must be sent, which is now exposed as destination_address.",
            "example": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
            "type": "string"
          },
          "destination_address": {
            "description": "DestinationAddress is the address where the client should send the source tokens. Preferred field; deposit_address mirrors the same value for backward compatibility.",
            "example": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
            "type": "string"
          },
          "destination_asset_address": {
            "description": "DestinationAssetAddress is the contract address of the token to be received",
            "example": "0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",
            "type": "string"
          },
          "destination_asset_amount": {
            "description": "DestinationAssetAmount is the amount of destination token to be received (in decimal format, rounded to 2 fractional digits)",
            "example": "95.25",
            "type": "string"
          },
          "destination_asset_amount_precise": {
            "description": "DestinationAssetAmountPrecise is the same destination amount in base units of the destination token, as a decimal string scaled by destination_asset_decimals",
            "example": "95250000",
            "type": "string"
          },
          "destination_asset_decimals": {
            "description": "DestinationAssetDecimals is the number of fractional digits destination_asset_amount_precise is scaled by",
            "example": 6,
            "type": "integer"
          },
          "estimation_id": {
            "description": "EstimationId is the unique identifier for this estimation, used when executing the swap",
            "example": "550e8400-e29b-41d4-a716-446655440000",
            "type": "string"
          },
          "expiration_time": {
            "description": "ExpirationTime is the RFC3339 timestamp after which this estimation expires",
            "example": "2024-01-15T10:30:00Z",
            "type": "string"
          },
          "rate_decimals": {
            "description": "RateDecimals is the number of fractional digits trade_rate_precise is scaled by. Absent whenever trade_rate_precise is absent",
            "example": 18,
            "type": "integer"
          },
          "source_asset_address": {
            "description": "SourceAssetAddress is the contract address of the token being swapped from",
            "example": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
            "type": "string"
          },
          "source_asset_amount": {
            "description": "SourceAssetAmount is the amount of source token to be swapped (in decimal format, rounded to 2 fractional digits)",
            "example": "100.50",
            "type": "string"
          },
          "source_asset_amount_precise": {
            "description": "SourceAssetAmountPrecise is the same source amount in base units of the source token, as a decimal string scaled by source_asset_decimals",
            "example": "100500000",
            "type": "string"
          },
          "source_asset_decimals": {
            "description": "SourceAssetDecimals is the number of fractional digits source_asset_amount_precise is scaled by",
            "example": 6,
            "type": "integer"
          },
          "trade_rate": {
            "description": "TradeRate is the exchange rate applied to the swap",
            "example": "0.9525",
            "type": "string"
          },
          "trade_rate_precise": {
            "description": "TradeRatePrecise is the same rate in base units, as a decimal string scaled by rate_decimals. Empty when the upstream estimator reports a rate that does not convert",
            "example": "952500000000000000",
            "type": "string"
          }
        },
        "required": [
          "deposit_address",
          "destination_address",
          "destination_asset_address",
          "destination_asset_amount",
          "destination_asset_amount_precise",
          "destination_asset_decimals",
          "estimation_id",
          "expiration_time",
          "source_asset_address",
          "source_asset_amount",
          "source_asset_amount_precise",
          "source_asset_decimals",
          "trade_rate"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "ChainId": {
        "description": "EIP-155 id of the chain that the request should be executed for (e.g. 1001996)",
        "in": "header",
        "name": "X-Chain-Id",
        "type": "apiKey"
      },
      "UserAddress": {
        "description": "Address of the crypto wallet associated with the user for whom the request should be executed.",
        "in": "header",
        "name": "X-User-Wallet",
        "type": "apiKey"
      },
      "WirexPartnerToken": {
        "description": "Token obtained using Wirex Partner Credentials grant flow. Please see [Authentication](doc:authentication) Server-to-Server Authentication section",
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      },
      "WirexUserToken": {
        "description": "Wirex issued JWT token that can be obtained by following [Authentication](doc:authentication) User Token Issuance section",
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "contact": {
      "email": "company@wirexpaychain.com",
      "name": "API Support Team"
    },
    "description": "The **Wirex BaaS API** enables partners to deliver non-custodial financial services directly to their retail users. Through a single integration, partners can onboard users, verify identities, issue smart wallet–linked cards, and enable crypto-backed bank transfers—without ever handling fiat or taking custody of user funds.</br>All transactions are powered by **user-owned smart wallets**, ensuring security, transparency, and full user control. Wirex acts as the infrastructure provider, so you can focus on building exceptional user experiences while we handle the heavy lifting.",
    "title": "Wirex Retail BaaS API",
    "version": "1.0"
  },
  "openapi": "3.0.3",
  "paths": {
    "/api/v1/fx/estimate": {
      "post": {
        "description": "Creates a swap estimation with deposit address for Circle FX stablecoin swap",
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/request.FxEstimateRequest"
              }
            }
          },
          "description": "Body data",
          "required": true,
          "x-originalParamName": "bodyData"
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.FxEstimateResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorResponse"
                }
              }
            },
            "description": "Bad Request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/response.ErrorResponse"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "WirexUserToken": []
          },
          {
            "ChainId": [],
            "UserAddress": [],
            "WirexPartnerToken": []
          }
        ],
        "summary": "Estimate FX swap",
        "tags": [
          "FX"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api-baas.wirexapp.com"
    },
    {
      "url": "https://api-baas.wirexapp.tech"
    }
  ],
  "tags": [
    {
      "description": "The **FX APIs** enable partners to perform stablecoin currency swaps for users, powered by Circle FX. The flow is split into an estimation step that issues a deposit address and an execution step that completes the swap once funds are received.\n\n### Key Features:\n\n- **Swap Estimation**:\n  - Create a swap estimation that returns a deposit address for a Circle FX stablecoin swap.\n  - Preview the expected swap outcome before committing funds.\n\n- **Swap Execution**:\n  - Execute the swap after the client has sent payment to the Circle wallet deposit address.\n\n---\n\nWith the FX APIs, partners can offer users seamless stablecoin conversions with predictable, estimate-first execution.",
      "name": "FX"
    }
  ],
  "x-readme": {}
}
```