Post CEX Exchange API

Initiates an exchange transaction, including sender and receiver information, transaction status, quoted amounts, and token details. This information is useful for tracking and managing token exchange

Endpoint: POST/exchange

Request Body: A JSON object containing Exchangedetails.

Request Body Fields:

Field
Type
Description

amount

number

Amount to be exchanged (example: 1)

from

string

Symbol of the input token

(example: ETH)

to

string

Symbol of the output token

(example: BNB)

receiverTag (optional)

string

Optional receiver tag (example: 123)

anonymous

boolean

Indicates if the transaction is anonymous (example: false)

addressTo

string

Destination address

walletId (optional)

string

User's wallet identifier

ip

string

User IP address. Used for fraud prevention only

userAgent

string

User userAgent browser string

timezone

string

User browser timezone

(example: UTC)

useXmr (optional)

string

Use XMR if it is true or if it is false use another token for the anonymous transaction for the quote or exchange.

Example Request:

POST/exchange
Content-Type: application/json

{
  "amount": 1,
  "from": "ETH",
  "to": "BNB",
  "receiverTag": "",
  "addressTo": "0x000000000000000000000000000000000000dead",
  "anonymous": false,
  "ip": "0.0.0.0",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
  "timezone": "UTC",
  "useXmr": false
}

Optional description in partner.exchange Schema

Example Response:

{
  "houdiniId": "mNev2KrGikabTvge75GMwM",
  "created": "2025-02-21T15:32:53.821Z",
  "senderAddress": "0xabb5ac5c686d1614172ac1292519e78ad6c520f5",
  "receiverAddress": "0x000000000000000000000000000000000000dead",
  "anonymous": false,
  "expires": "2025-02-21T16:02:53.821Z",
  "status": 0,
  "inAmount": 1,
  "inSymbol": "ETH",
  "outAmount": 4.189816,
  "outSymbol": "BNB",
  "senderTag": "",
  "receiverTag": "",
  "notified": false,
  "eta": 5,
  "inAmountUsd": 2802.42,
  "inCreated": "2025-02-21T15:32:53.822Z",
  "quote": {
    "amountIn": 1,
    "amountOut": 4.189816,
    "min": 0.001,
    "max": 17.841,
    "path": "ff"
  },
  "outToken": {
    "id": "USDT",
    "name": "Tether",
    "symbol": "USDT",
    "network": {
      "name": "Ethereum Mainnet",
      "shortName": "ETH",
      "addressValidation": "^(0x)[0-9A-Fa-f]{40}$",
      "memoNeeded": false,
      "explorerUrl": "https://etherscan.io/tx/",
      "addressUrl": "https://etherscan.io/address/",
      "priority": 1,
      "kind": "evm",
      "chainId": 1
    },
    "color": "#26a17b",
    "keyword": "usdt usdterc20 tether usdteth erc-20 erc20 eth",
    "displayName": "USDT (ETHEREUM)",
    "chain": 1,
    "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
    "hasMarkup": true,
    "networkPriority": 2,
    "icon": "https://...",
    "hasFixed": true,
    "hasFixedReverse": true
  },
  "inToken": {
    "id": "BNB",
    "name": "BNB",
    "symbol": "BNB",
    "network": {
      "name": "Binance Smart Chain",
      "shortName": "BSC",
      "addressValidation": "^(0x)[0-9A-Za-z]{40}$",
      "memoNeeded": false,
      "explorerUrl": "https://bscscan.com/tx/",
      "addressUrl": "https://bscscan.com/address/",
      "priority": 6,
      "kind": "evm",
      "chainId": 56,
      "icon": "http://127.0.0.1:3000/assets/networks/BSC.png"
    },
    "color": "#FFFFFF",
    "keyword": "BNB BNB Binance Smart Chain evm BNB BNB bsc Binance Smart Chain",
    "displayName": "BNB (BSC)",
    "chain": 56,
    "networkPriority": 1,
    "icon": "http://127.0.0.1:3000/assets/tokens/BNB-BSC.png",
    "hasFixed": false,
    "hasFixedReverse": false
  }
}

Response Fields:

Field
Type
Description

houdiniId

string

Unique identifier for the exchange transaction

created

string

Timestamp of when the transaction was created

senderAddress

string

Address of the sender

receiverAddress

string

Address of the receiver

anonymous

boolean

Indicates if the transaction is anonymous

expires

string

Expiration timestamp of the transaction

status

number

Status code of the transaction

inAmount

number

Amount sent in the exchange

outAmount

number

Amount received in the exchange

inSymbol

string

Symbol of the input token

outSymbol

string

Symbol of the output token

senderTag (optional)

string

Optional sender tag

receiverTag (optional)

string

Optional receiver tag

notified

boolean

Indicates if the user has been notified

eta

number

Estimated time of arrival (in minutes)

inAmountUsd

number

Input amount converted to USD

inCreated

string

Timestamp when the input was created

quote

object

Details of the exchange quote (amounts, min/max limits, path). See QuoteDTO

outToken

object

Details of the output token. See TokenDTO

inToken

object

Details of the input token. See TokenDTO

Last updated