tradingpost-fees
Tiny module to calculate the fees of the tradingpost on GW2
This is part of gw2efficiency. Please report all issues in the central repository.
Install
npm install gw2e-tradingpost-fees
This module can be used for Node.js as well as browsers using Browserify.
Usage
// Subtract both the 5% listing fee and the 10% tax// -> 85000 // Subtract the 10% tax// -> 90000 // Subtract the 5% listing fee// -> 95000 // Get the 10% tax// -> 10000 // Get the 5% listing fee// -> 5000
But why not just
price * 0.85
?
Because that's not how it works ingame. It is missing that there is a minimum of 1 copper for the listing fee, tax, as well as propper rounding. Yes, that makes a difference for cheap items.
Tests
npm test
Licence
MIT