Skip to main content
POST
/
v1
/
smart-accounts
/
transactions
Create Transfer Transaction
curl --request POST \
  --url https://api.openxswitch.com/v1/smart-accounts/transactions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-wallet-secret: <x-wallet-secret>' \
  --data '
{
  "idempotencyKey": "0e472f6b-336b-4d4f-87d6-4f93e4e4e4e4",
  "walletId": "0e472f6b-336b-4d4f-87d6-4f93e4e4e4e4",
  "amount": "0.5",
  "toAddress": "0x1234567890123456789012345678901234567890",
  "token": "USDT",
  "blockchain": "ethereum-mainnet",
  "refId": "txn_ref_123",
  "note": "This is a test transaction",
  "metadata": {
    "employeeId": "EMP001"
  }
}
'
{
  "success": true,
  "data": {
    "id": "TRANSACTION_ID",
    "refId": "REF_ID",
    "idempotencyKey": "IDEMPOTENCY_KEY",
    "tokenName": "Bitcoin",
    "tokenSymbol": "BTC",
    "tokenTicker": "BTC",
    "tokenAddress": "0x1234567890123456789012345678901234567890",
    "decimals": 18,
    "isNative": true,
    "amount": {
      "formatted": "479000.10",
      "raw": "47900010"
    },
    "totalAmount": {
      "formatted": "479000.10",
      "raw": "47900010"
    },
    "chainDecimals": 18,
    "blockchain": "ethereum",
    "protocol": "EVM",
    "environment": "mainnet",
    "network": "ethereum-mainnet",
    "standard": "ERC20",
    "txType": "incoming",
    "txSubType": "DEPOSIT",
    "status": "pending",
    "fromAddress": "0x1234567890123456789012345678901234567890",
    "toAddress": "0x1234567890123456789012345678901234567890",
    "txHash": "0x1234567890123456789012345678901234567890",
    "totalFee": {
      "formatted": "479000.10",
      "raw": "47900010"
    },
    "feeLevel": "normal",
    "feeToken": "ETH",
    "isBatch": false,
    "note": "Note",
    "triggerOrigin": "TRIGGER_ORIGIN",
    "transactionGroupId": "TRANSACTION_GROUP_ID",
    "confirmation": 1,
    "confirmed": true,
    "confirmedAt": "2022-01-01T00:00:00.000Z",
    "walletId": "WALLET_ID",
    "accountId": "ACCOUNT_ID",
    "workspaceId": "WORKSPACE_ID"
  }
}

Authorizations

Authorization
string
header
required

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

Headers

x-wallet-secret
string
required

Workspace wallet secret for authentication

Body

application/json
idempotencyKey
string
required

This key is utilized to ensure exactly-once execution of mutating requests. If the same key is reused, it will be treated as the same request and the original response will be returned.

Example:

"0e472f6b-336b-4d4f-87d6-4f93e4e4e4e4"

walletId
string
required

The unique identifier of the wallet

Example:

"0e472f6b-336b-4d4f-87d6-4f93e4e4e4e4"

amount
string
required

The transaction amount in token units

Example:

"0.5"

toAddress
string
required

The destination wallet address

Example:

"0x1234567890123456789012345678901234567890"

token
string
required

The token symbol (e.g., USDT, USDC, ETH).

Refer to the Get Supported Tokens endpoint for the list of supported tokens.

Example:

"USDT"

blockchain
string
required

The blockchain network. Can be either the blockchain name or slug.

Refer to the Get Supported Blockchains endpoint for the list of supported blockchains.

Example:

"ethereum-mainnet"

refId
string

The external reference ID to uniquely identify the transaction

Example:

"txn_ref_123"

note
string

An optional note or description for the transaction

Example:

"This is a test transaction"

metadata
object

Additional metadata associated with the transaction

Example:
{ "employeeId": "EMP001" }

Response

success
boolean
required
Example:

true

data
object
required