Skip to main content
POST
/
api
/
v1
/
auth
/
swaps
Execute Stablecoin Swap
curl --request POST \
  --url https://crypto.westminister.tech/api/v1/auth/swaps \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from_asset": "USDT",
  "to_asset": "USDT",
  "amount": "<string>",
  "network": "tron",
  "from_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "swap": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "network": "<string>",
    "from_asset": "<string>",
    "to_asset": "<string>",
    "from_amount": "<string>",
    "to_amount": "<string>",
    "fee_amount": "<string>",
    "fee_bps": 123,
    "status": "<string>",
    "created_at": "2023-11-07T05:31:56Z"
  },
  "from_asset": "<string>",
  "to_asset": "<string>",
  "from_amount": "<string>",
  "to_amount": "<string>",
  "fee_amount": "<string>",
  "fee_bps": 123,
  "network": "<string>",
  "wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "message": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.crypto.westminister.tech/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
from_asset
enum<string>
required
Available options:
USDT,
USDC
to_asset
enum<string>
required
Available options:
USDT,
USDC
amount
string
required

Amount to debit from from_asset

network
enum<string>
required
Available options:
tron,
ethereum
from_wallet_id
string<uuid>

Optional; defaults to default-or-only wallet for network

Response

Swap committed

swap
object
from_asset
string
to_asset
string
from_amount
string
to_amount
string
fee_amount
string
fee_bps
integer
network
string
wallet_id
string<uuid>
message
string