I would Like to charge commission/fee on every DEX transaction using 0x API; i am calling
GET /swap/v1/quote
with adding feeRecipient
& buyTokenPercentageFee
but when a user does a tranx via the API on our UI platform; we are NOT getting any fee.
Should i be using any other API in combination to above? or …
Query string:
https://bsc.api.0x.org/swap/v1/quote?sellToken=BNB&buyToken=DAI&buyAmount=10000000000000000&feeRecipient=0x4519dE0a438aaBBD56f1f268F60325c85250062B&takerAddress=0x4519dE0a438aaBBD56f1f268F60325c85250062B&buyTokenPercentageFee=0.15
Please let me know
Best Answer
Looks like you have
feeRecipient
set to the same address as thetakerAddress
. This means0x4519dE0a438aaBBD56f1f268F60325c85250062B
is effectively paying themselves the commission.