Skip to main content
POST
/
exchanges
Create exchange
curl --request POST \
  --url https://api-partner.houdiniswap.com/v2/exchanges \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "addressTo": "<string>",
  "quoteId": "<string>",
  "addressFrom": "<string>",
  "signatures": [
    {
      "signature": "<string>",
      "key": "<string>",
      "swapRequiredMetadata": {}
    }
  ],
  "destinationTag": "<string>",
  "walletInfo": "<string>"
}
'
{
  "_id": "<string>",
  "statusLabel": "INITIALIZING",
  "inStatusLabel": "NEW",
  "outStatusLabel": "NEW",
  "transactionHash": "<string>",
  "hashUrl": "<string>",
  "depositAddress": "<string>",
  "depositTag": "<string>",
  "id": "<string>",
  "created": "2023-11-07T05:31:56Z",
  "houdiniId": "<string>",
  "receiverAddress": "<string>",
  "status": -2,
  "anonymous": true,
  "expires": "2023-11-07T05:31:56Z",
  "in": "ch",
  "inAmount": 123,
  "inSymbol": "<string>",
  "inStatus": 0,
  "inCreated": "2023-11-07T05:31:56Z",
  "inTransactionInHash": "<string>",
  "outAmount": 123,
  "outSymbol": "<string>",
  "outStatus": 0,
  "receiverTag": "<string>",
  "ffSetEmergency": true,
  "notified": true,
  "multiId": "<string>",
  "ip": "<string>",
  "widgetMode": true,
  "eta": 123,
  "inAmountUsd": 123,
  "isDex": true,
  "inToken": {
    "icon": "<string>",
    "id": "<string>",
    "address": "<string>",
    "chain": "<string>",
    "created": "2023-11-07T05:31:56Z",
    "chainData": {
      "icon": "<string>",
      "addressValidation": "<string>",
      "tokenAddressValidation": "<string>",
      "id": "<string>",
      "created": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "shortName": "<string>",
      "memoNeeded": true,
      "explorerUrl": "<string>",
      "addressUrl": "<string>",
      "kind": "<string>",
      "chainId": 123,
      "enabled": true,
      "shortNameV1": "<string>",
      "modified": "2023-11-07T05:31:56Z",
      "hashUrl": "<string>",
      "priority": 123
    },
    "description": "<string>",
    "decimals": 0,
    "symbol": "",
    "name": "",
    "modified": "2023-11-07T05:31:56Z",
    "mainnet": true,
    "enabled": true,
    "unverified": true,
    "hasDex": true,
    "hasCex": true,
    "cexTokenId": "",
    "rank": 123,
    "cgId": "<string>",
    "marketCapChange24h": 123,
    "circulatingSupply": 123,
    "price": 123,
    "marketCap": 123,
    "volume": 123,
    "fdv": 123,
    "change": 123,
    "priority": 123,
    "warningMessage": "<string>",
    "minMax": {
      "anon": [
        123
      ],
      "cex": [
        123
      ],
      "dex": [
        123
      ]
    }
  },
  "outToken": {
    "icon": "<string>",
    "id": "<string>",
    "address": "<string>",
    "chain": "<string>",
    "created": "2023-11-07T05:31:56Z",
    "chainData": {
      "icon": "<string>",
      "addressValidation": "<string>",
      "tokenAddressValidation": "<string>",
      "id": "<string>",
      "created": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "shortName": "<string>",
      "memoNeeded": true,
      "explorerUrl": "<string>",
      "addressUrl": "<string>",
      "kind": "<string>",
      "chainId": 123,
      "enabled": true,
      "shortNameV1": "<string>",
      "modified": "2023-11-07T05:31:56Z",
      "hashUrl": "<string>",
      "priority": 123
    },
    "description": "<string>",
    "decimals": 0,
    "symbol": "",
    "name": "",
    "modified": "2023-11-07T05:31:56Z",
    "mainnet": true,
    "enabled": true,
    "unverified": true,
    "hasDex": true,
    "hasCex": true,
    "cexTokenId": "",
    "rank": 123,
    "cgId": "<string>",
    "marketCapChange24h": 123,
    "circulatingSupply": 123,
    "price": 123,
    "marketCap": 123,
    "volume": 123,
    "fdv": 123,
    "change": 123,
    "priority": 123,
    "warningMessage": "<string>",
    "minMax": {
      "anon": [
        123
      ],
      "cex": [
        123
      ],
      "dex": [
        123
      ]
    }
  },
  "orderFinishedReceived": "2023-11-07T05:31:56Z",
  "actionRequired": true,
  "swapName": "<string>",
  "statusValidated": true,
  "modified": "2023-11-07T05:31:56Z",
  "metadata": "<unknown>",
  "nonRefundable": true
}

Authorizations

Authorization
string
header
required

Body

application/json

Request body for creating a new exchange

addressTo
string
required

Destination wallet address where funds will be sent

Required string length: 1 - 200
quoteId
string
required

Quote ID from a prior quote response. Amount, from token, to token, and swap provider are retrieved from the provided quote. For CEX exchanges, if the exchange fails with the chosen swap provider, it will fallback to the next best route.

addressFrom
string

Source wallet address (required for DEX, ignored for CEX)

signatures
object[]

EIP-712 signatures for permit-based approvals (DEX only)

destinationTag
string

Destination tag / memo (e.g. for XRP, XLM)

Maximum string length: 64
walletInfo
string

Wallet info string

Maximum string length: 256

Response

Exchange created

_id
string
required

A class representation of the BSON ObjectId type.

statusLabel
enum<string>
required
Available options:
INITIALIZING,
NEW,
WAITING,
CONFIRMING,
EXCHANGING,
ANONYMIZING,
FINISHED,
EXPIRED,
FAILED,
REFUNDED,
DELETED
inStatusLabel
enum<string>
required
Available options:
NEW,
WAITING,
CONFIRMING,
EXCHANGING,
FINISHED,
EXPIRED,
FAILED,
REFUNDED,
SENDING,
VERIFYING,
FALLBACK
outStatusLabel
enum<string>
required
Available options:
NEW,
WAITING,
CONFIRMING,
EXCHANGING,
FINISHED,
EXPIRED,
FAILED,
REFUNDED,
SENDING,
VERIFYING,
FALLBACK
transactionHash
string
required
hashUrl
string
required
depositAddress
string
required
depositTag
string
required
id
string
required
created
string<date-time>
required
houdiniId
string
required
receiverAddress
string
required
status
enum<number>
required
  • -2 Order is being initialized (label: INITIALIZING)
  • -1 Order initialized (label: NEW)
  • 0 Waiting for deposit confirmation (label: WAITING)
  • 1 Deposit is being confirmed (label: CONFIRMING)
  • 2 Exchange is in progress (label: EXCHANGING)
  • 3 Order is going through anonymization (label: ANONYMIZING)
  • 4 Order completed successfully (label: FINISHED)
  • 5 Order has expired (label: EXPIRED)
  • 6 Order failed (label: FAILED)
  • 7 Order was refunded (label: REFUNDED)
  • 8 Order was deleted (label: DELETED)
Available options:
-2,
-1,
0,
1,
2,
3,
4,
5,
6,
7,
8
anonymous
boolean
required
expires
string<date-time>
required
in
enum<string>
required

Exchange In

Available options:
ch,
cl,
cn,
el,
le,
se,
ss,
sz,
sp,
eb,
nx,
cc,
qx,
sw,
dl,
ad,
wh,
cf,
un,
jp,
mn,
rd,
ps,
cs,
kd,
ct,
zx,
wc,
su,
bd,
tt,
sd,
bg,
ab
inAmount
number<double>
required
inSymbol
string
required
inStatus
enum<number>
required
  • 0 New swap
  • 1 Waiting for confirmation
  • 2 Being confirmed
  • 3 Exchange in progress
  • 4 Sending to destination
  • 5 Swap completed
  • 6 Swap failed
  • 7 Swap refunded
  • 8 Verifying swap
  • 9 Swap expired
  • 10 Fallback mode
Available options:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
inCreated
string<date-time>
required
inTransactionInHash
string
required
outAmount
number<double>
required
outSymbol
string
required
outStatus
enum<number>
required
  • 0 New swap
  • 1 Waiting for confirmation
  • 2 Being confirmed
  • 3 Exchange in progress
  • 4 Sending to destination
  • 5 Swap completed
  • 6 Swap failed
  • 7 Swap refunded
  • 8 Verifying swap
  • 9 Swap expired
  • 10 Fallback mode
Available options:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
receiverTag
string
required
ffSetEmergency
boolean
required
notified
boolean
required
multiId
string
required
ip
string
required
widgetMode
boolean
required
eta
number<double>
required

ETA time, depending on swap

inAmountUsd
number<double>
required

Stable coin analitical data

isDex
boolean
required
inToken
object
required
outToken
object
required
orderFinishedReceived
string<date-time>
required
actionRequired
boolean
required
swapName
string
required
statusValidated
boolean
required
modified
string<date-time>
metadata
any
nonRefundable
boolean