Skip to main content
POST
/
v1
/
instant-swap
Create a new instant swap order
curl --request POST \
  --url https://api.openxswitch.com/v1/instant-swap \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "walletId": "wallet_abc123",
  "fromCoin": "USDT",
  "fromAmount": 100,
  "toCoin": "ETH",
  "extId": "<string>",
  "instantSync": false
}
'
{
  "success": true,
  "data": {
    "id": "swap_abc123",
    "extId": "ext_abc123",
    "fee": "0.0",
    "fromCoin": "USDT",
    "fromAmount": "100",
    "toCoin": "ETH",
    "toAmount": "0.0234",
    "swapPrice": "0.000234",
    "ts": "2025-04-04T12:00:00Z",
    "quoteId": "quote123",
    "walletId": "wallet_001"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.openxswitch.com/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
walletId
string
required

Wallet/Sub-wallet ID

Example:

"wallet_abc123"

fromCoin
string
required

Source coin symbol

Example:

"USDT"

fromAmount
string
required

Amount to swap from

Example:

100

toCoin
string
required

Target coin symbol

Example:

"ETH"

extId
string

External reference ID from client's system.

instantSync
boolean
default:false
deprecated

Immediately sync wallet asset instead of queuing the sync job (default is queued)

Example:

false

Response

success
boolean
required
Example:

true

data
object
required