I want to get extrinsic fee using polkadot.js/api.
I am checking kusama chain.
I need to get
0.00053835621 fee from above extrinsic. Which api can I use in polkadot.js/api?
I am not sure how Subscan is getting this values, but I believe to get the Used Fee you have to scan the events, see this previous answer in StackExchange: Is there a way to collect fee of transaction?
In particular for fees in balance transfers, a Withdraw event will tell us the fee amount the sender account paid whereas Deposit events will tell us the amount of that fee that was deposited to the Treasury account and the amount that was deposited as tip to the block validator account