Allow third-parties to define custom sources by exposing TSM.CustomPrice.RegisterSource via TSMAPI_FOUR
Internally, TSM.CustomPrice.RegisterSource is used to define both internal price sources like DBMarket as well as import external price sources like AtrValue, TUJGlobalMedian, etc. It'd be great if developers could do this without having to modify TSM itself.
I exposed this for myself and here are some of the custom price sources I use:
- playerCopper returns the amount of gold I have, allowing me to create sniper/shopping strings like min(20% PlayerCopper, 20% DBMarket) so that I never spend more than 20% of my gold on a single item.
- dayOfWeek returns 1-7 depending on which day of the week it is, enabling day-specific pricing logic.
- NumSalesWeek, NumCancelsWeek, and NumExpiresWeek for the number of sales, cancels, and expires of the last 7 days (trailing). I expose other timeframes, too. This allows for the calculation of sales rates over those timeframes, better estimation of deposit costs, and actual calculation of things like standard deviation right within TSM.
- currentTime returns the current time (in seconds since epoch)
- lastSaleTime returns the last sale of an item (in seconds since epoch)
- lastPurchaseTime returns the last time you purchased an item
This allows you to calculate things like average time to first sale, sales volume over different time periods, etc.
There are many more I've added, but this is the general flavor. I think that by exposing this API along with a bit more of the TSM AuctionDB data, you'll see people build all kinds of amazing things with TSM.
Adding APIs for people to make local changes like this is not something that would be beneficial for the majority of our users, so this isn’t a change we would make. However, if there is a 3rd party addon that provides pricing data which you feel would be useful in TSM, we are certainly open to adding support for it. Also, if there are specific price sources you feel would add to TSM that we could provide, we would certainly consider those. Feel free to create suggestions for either of these things (if they don’t already exist) along with details on the functionality you are looking for.
other variables regarding quantities would also be extremely useful for reference in various of our formulas. such as bagQuantity, DBmarketQuantity, DBregionQuantity
or in the context of an AH scan, buyoutstackQuantity (for instance would allow us to take into account the buyout*stack count data in sniper)
honestly quantity is really lacking to tsm in my opinion, since a long time. it's needed to be referenced in many fields.