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.
Authorizations
Path parameters
chainIdnumber · enumRequiredExample:
The chain ID of the chain to approve token
1
Possible values: Query parameters
tokenAddressstringRequiredExample:
Token address you want to exchange
0xc52c326331e9ce41f04484d3b5e5648158028804
amountstringOptionalExample:
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.
100000000000
contractVersionstring · enumRequiredExample:
Contract version, return from quote endpoint
v1
Possible 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?