GET /trade/v1/{chainId}/approval/transaction

It generates the data needed for calling the contract in order to allow Unizen DEX Aggregator to spend funds.

Generate data for calling the contract in order to allow Unizen DEX Aggregator to spend funds

get
Authorizations
Path parameters
chainIdnumber · enumRequired

The chain ID of the chain to approve token

Example: 1Possible values:
Query parameters
tokenAddressstringRequired

Token address you want to exchange

Example: 0xc52c326331e9ce41f04484d3b5e5648158028804
amountstringOptional

The number of tokens that the Unizen DEX Aggregator contract is allowed to spend. If not specified, it will be allowed to spend an infinite amount of tokens.

Example: 100000000000
contractVersionstring · enumRequired

Contract version, return from quote endpoint

Example: v1Possible values:
Responses
200
Transaction body to allow the exchange with Unizen DEX Aggregator contract
application/json
get
GET /trade/v1/{chainId}/approval/transaction?tokenAddress=text&contractVersion=v1 HTTP/1.1
Host: 
Authorization: Bearer Bearer
Accept: */*
200

Transaction body to allow the exchange with Unizen DEX Aggregator contract

{
  "data": "00000000000000000000000041b2500ab719942a50ea52e75cbacda5ed2fe364",
  "to": "0xc52c326331e9ce41f04484d3b5e5648158028804",
  "value": "0",
  "gasPrice": "21662881870"
}

Last updated

Was this helpful?