Skip to main content
POST
/
dex
/
approve
Get token approval data
curl --request POST \
  --url https://api-partner.houdiniswap.com/v2/dex/approve \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "quoteId": "69a02882f48d56c923119d95",
  "addressFrom": "0xb7dE6b6eEBF7401aFea5a49D6405C9048fEf2d40",
  "usePermit": false
}
'
{
  "approvals": [
    {
      "data": "<string>",
      "to": "<string>",
      "from": "<string>",
      "fromChain": {
        "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
      }
    }
  ],
  "signatures": [
    {
      "data": {
        "domain": {
          "name": "<string>",
          "version": "<string>",
          "chainId": 123,
          "verifyingContract": "<string>",
          "salt": "<string>"
        },
        "types": {},
        "primaryType": "<string>",
        "message": {}
      },
      "type": "single",
      "totalSteps": 123,
      "step": 123,
      "isComplete": true,
      "key": "<string>",
      "swapRequiredMetadata": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

Body

application/json
quoteId
string
required

Quote ID from a prior quote response.

Example:

"69a02882f48d56c923119d95"

addressFrom
string
required

Address from which the amount will be deducted (EVM or Tron)

Pattern: ^(0x[0-9a-fA-F]{40}|T[1-9A-HJ-NP-Za-km-z]{33})$
Example:

"0xb7dE6b6eEBF7401aFea5a49D6405C9048fEf2d40"

usePermit
boolean

Whether to use permit instead of approve. Defaults to true for swaps that support it.

Example:

false

Response

Success

approvals
object[]
required
signatures
object[]
required