Commision with One inch plugin

Hello @all
Greetings of the day

I was working with moralis one inch plugin. And i have configured all the required functions for performing swapping & it is working fine.
Now i want to configure commission on each swap .
What can be the possible ways of doing so.
And also it would be great if you can suggest me any way by which i can do it without paying extra gas fee

Hello, from what I know there isnโ€™t a way for you to set the commission in current 1Inch plugin, you will have to use 1Inch API directly if you want to set a commission.

I have configured one inch aggregation APIs directly. And Iโ€™m able to perform swapping also.
But they have not given anything to configure swapping.
So i have configured one more transaction after swapping transactions, dedicatly for the commission.
But this is charging gas fee twice from the user.
So Iโ€™m looking for any efficient solution of doing this without paying extra gas fee .

There is no commission related parameter in 1Inch api?

Yes there is no parameter related to commission in one inch

Strange, I thought that there should be something.

yes, thats why i am looking for an alternate solution. do you have anything in your mind

fee	number	this percentage of fromTokenAddress token amount will be sent to referrerAddress,
the rest will be used as input for a swap
min: 0; max: 3; default: 0;
example to set a fee to 1.5%: &fee=1.5
1 Like

Thank you @cryptokid it will work.
But one issue is there, I am not able to test the one inch aggregation apis on any testnet.

can you please let me know any other way of testing it

I donโ€™t know of a way to test it. Maybe you can test it on a chain with low fees.

1 Like

yehh thatโ€™s only option we have :sweat_smile: