Live Flea Prices 1.3.1

Please do not ask when mod authors will update their mods to 3.9.X
Bothering mod authors will lead to warnings and repeat offenses will lead to eventual bans.

Keep your flea prices up to date with data processed from Tarkov.dev

A very simple mod that pulls live flea data from a GitHub mirror of processed Tarkov.dev flea data, this mirror is updated once an hour. The mod will re-download the flea data every hour while your server is active, or if it's been over an hour since the last update when you launch your server.


The flea prices are processed using approximately the same method as SPT utilizes for flea prices, just updated every hour.


Installation

1) Open the downloaded zip file in 7-zip

2) Select the folder in the zip file in 7-zip

3) Drag the selected folder from 7-zip into your SPT folder


Demonstration Video:

wMIskD3.gif



Configuration

Configuration is handled via the config/config.json and config/blacklist.json files


config/config.json:

- maxIncreaseMult - This is used to provide a multiplier above SPTs base flea price that an item is allowed to go (Default: 10, meaning prices are capped at 10x the base SPT flea price)

- pvePrices - Whether to enable PvE prices instead of PvP prices (Default: false)

- nextUpdate - This can be ignored and is just used for keeping track of when the plugin should next pull an updated price file


config/blacklist.json:

The blacklist.json file is just an array of item IDs to exclude from Live Flea Prices. You can find item IDs using https://db.sp-tarkov.com/



If you enjoy my work, you can feed my caffeine addiction

  • Version 1.3.1

    The mod folder name has been changed, DELETE ANY PREVIOUS DrakiaXYZ-LiveFleaPrices folder from `user/mods/` prior to installing 1.3.1 or later

    • Rename mod directory to zzDrakiaXYZ-LiveFleaPrices to make sure we load after custom traders
  • Version 1.3.0

    • Allow switching to PvE prices by setting pvePrices to true in config.json
    • Make sure flea prices are never below vendor prices if useTraderPriceForOffersIfHigher is enabled in SPT settings
      • Resolves the inability to sell keycards at the average price shown in the flea UI
    • Switch to using 24-hour average from Tarkov.dev instead of trying to build from historic prices, as the historic prices API has been unstable recently
    • Price update schedule has been lowered to every 6 hours, as we're using the less precise 24-hour average
  • Version 1.2.0

    • Update for 3.9.0
    • Add blacklist support, thanks @Rsslone !
  • Version 1.1.1

    • Properly refresh the ragfair price service cache on price update
    • Better handling of original prices for overprice checks
  • Version 1.1.0

    • Update for 3.8.0
  • Version 1.0.1

    • Make sure we don't set the price of non-existing items
    • Allow capping item prices, for when live flea goes crazy. Default to 10x base flea price


    New setting in config/config.json, "maxIncreaseMult". This is the maximum multiplier that can be applied to the base flea price of an item. Default: 10

    For example, if the backend has calculated live has a flea price of 500,000 for an item with a base SPT flea price of 10,000, the new price will be capped at 100,000 by default.

  • Version 1.0.0

  • Tarkov.dev API appears to be returning data again, good luck with those early-wipe prices


    If updating from 1.3.0 or earlier, delete `user/mods/DrakiaXYZ-LiveFleaPrices` before installing 1.3.1 or later!

  • Hey, I tried to pull out PVE flea price by changing "pvePrices": false to 'true' in config.json, and set cap parameter to 800. Ingame flea price for millitary filter was around 200k, which is similar to that in PVP mode. I'd like to know if there's anything I'm doing wrong. Thank you. <3

  • I get around 2 million for yellow keycard while the tarkov dev says its trader price is 205000 for therapist (the debug says the mod update its price with around 200K). It is like 10 times diff so i dug a bit, it seems like SPT will use handbook price (~ 3.5 million) to generate ragfair offers (useTraderPriceForOffersIfHigher is true). I tried to update handbookTable as well and both the trader sell price and ragfair offer are live-like.
    I am not sure if this is ok, post here for more discussion

    • SPT will stop flea listings from being under the sell price to traders (By using the trader price for flea) to stop infinite money, this is expected behaviour and not something I plan to change. This mod will also never modify trader prices

    • yellow keycard

      tarkov.dev price ( live price :( ~200k

      tarkov.dev trader sell price (graphql query :( 205000

      mod price printed in debug level log ( useTraderPriceForOffersIfHigher enabled ) ~200k because the traderSellPrice returned from SPT is slighty higher than live but not as 10 times

      SPT ingame ragfair offer price: ~2million which is 10 times higher

      SPT ingame trader sell price: ~2million

      SPT handbook price: 3.5million


      so i checked the code and found that SPT will infer handbook price to calculate maxtraderSellPrice

      then i updated handbook price and things look normal again

    • after updating the handbook price both flea and trader sell price will be the same (~200k

    • it is weird that

      tarkov.dev trade sell price != spt trader price


      so we might be changing handbook price as well

    • That is because BSG adjusts live trader prices between wipes. Again, I have zero intention of making this mod update trader prices, or bypass the SPT restrictions on not allowing infinite money glitches

  • Hello,


    Are there any incompatible mods?

    • There are no known compatibility issues with Live Flea Prices, as long as it's loaded last in your load order

      Thumbs Up 1
  • Hey brother, currently getting this error when loading up the server. I havnt added any new mods since Ive last played and it has been working fine for the last few weeks untill today. Made sure it was the last in the load order and tried deleting the mod and reinstalling it. Still spits out the same error. If you know of any fix I'd appreciate it. Thanks in advance.


    "ModLoader: Error when loading async mod: fetch failed

    TypeError: fetch failed

    at node:internal/deps/undici/undici:12345:11

    at processTicksAndRejections (node:internal/process/task_queues:95:5)

    at Function.updatePrices (D:\SPT\user\mods\zzDrakiaXYZ-LiveFleaPrices\src\mod.ts:72:30)

    at Mod.postDBLoadAsync (D:\SPT\user\mods\zzDrakiaXYZ-LiveFleaPrices\src\mod.ts:46:14)

    at PostDBModLoader.executeModsAsync (C:\snapshot\src\loaders\PostDBModLoader.ts:51:21)

    at PostDBModLoader.onLoad (C:\snapshot\src\loaders\PostDBModLoader.ts:26:13)

    at App.load (C:\snapshot\src\utils\App.ts:51:13)"


    EDIT:

    Leaving this here for other smooth brains like myself, reseting my PC apparently did the trick.


    DrakiaXYZ, sorry to have wasted your time on this one.

    Heart 1
  • Hi. I would like to make certain items, like the Comtac 4 for example, more expensive than they are, since my SPT doesn't have the newer headsets in it and I want the Comtac 4 to be priced as they were last wipe. They're about ~$70K. Is there a way to do this? Essentially I want to take whatever base price the mod pulls from .dev and apply some sort of 3 or 4x multiple to that.


    I read the configs notes on the other page of this mod, but that seems to only create a 'ceiling' above which the price can't go.


    Thanks in advance

    • No, this mod isn't for adjusting flea prices, it is for pulling live flea price data from tarkov.dev and using it in SPT

    • Ok

  • it keeps saying "unable to generate flea offers for trader Sarge, no assort found" what does that mean

    • That is not related to this mod, you will need to ask in the comments of whatever mod "Sarge" is from

    • i don't have a sarge mod

    • Live Flea Prices has nothing to do with the flea offer generation, all it does is update the list of prices used by the flea offer generation code. The error you're seeing is unrelated to this mod

    • :(

  • Hi, sorry to be annoying. I'm getting an error while launching the server


    ModLoader: Error when loading async mod: Unable to find trader: 668aaff35fd574b6dcc4a686 in database

    Error: Unable to find trader: 668aaff35fd574b6dcc4a686 in database

    at DatabaseService.getTrader (C:\snapshot\src\services\DatabaseService.ts:306:19)

    at TraderHelper.getHighestSellToTraderPrice (C:\snapshot\src\helpers\TraderHelper.ts:482:53)

    at Function.updatePrices (D:\SPT\user\mods\zzDrakiaXYZ-LiveFleaPrices\src\mod.ts:134:50)

    at processTicksAndRejections (node:internal/process/task_queues:95:5)

    at Mod.postDBLoadAsync (D:\SPT\user\mods\zzDrakiaXYZ-LiveFleaPrices\src\mod.ts:46:14)

    at PostDBModLoader.executeModsAsync (C:\snapshot\src\loaders\PostDBModLoader.ts:51:21)

    at PostDBModLoader.onLoad (C:\snapshot\src\loaders\PostDBModLoader.ts:26:13)

    at App.load (C:\snapshot\src\utils\App.ts:51:13)


    It doesn't seem to recognize the painter trader mod

    • This means you have adjusted your load order and aren't loading this mod last. When a mod's folder name starts with `z`, that indicates it is meant to be loaded AFTER any other mods

    • Good to know thankyou

  • Is there a way I can change the flea update time to once every 5 minutes out of raid and 20 minutes while in raid?

    I see this line in the Mod.js

    SyntaxEditor Code Snippet

    Code
    // Setup a refresh interval to update once every hour        Mod.updateTimer = setInterval(Mod.updatePrices, (60 * 60 * 1000));

    I can't figure out the 1000 number or how it applies to the hour interval. Can i just change it to (60 * 5 *1000)? Would much appreciate some insight. I know nothing about modding btw.

    • That would be pointless, the backing database is only updated every few hours, so you'd just be needlessly downloading the same file from GitHub every 5 minutes

    • Thank you for the info and the fast reply. Out of curiosity, there used to be a live flea that updated every 5 minutes, why did you decide to make it 1 hour?

    • Because there's zero point in re-calculating a new average price of items more than every few hours, other than pointlessly hammering the API provided by tarkov.dev. And I'd rather not abuse the API provided for everyone to use free of charge

    • Thank you again for the information. I enjoy all of your mods that I use and really appreciate what you do.

  • How do you reset prices after this mod has updated them?

    • The mod only updates prices while it's installed, in memory. It does not modify any SPT files. To revert prices, uninstall the mod

  • The mod always returns "ModLoader: Error when loading async mod: fetch failed" whenever I try to load it. I tried using Load Order Editor and put it at the end, then put it first, to no avail. I've tried changing my DNS, still nothing. I then reinstalled SPT from scratch, so 0 plugins and 0 mods, created a new account, started it, then added the mod, restarted the server and launcher...and the mod still throws fetching error.


    I tried reading the code, found the fetch line, and...is your GitHub DB down? It returns 404 on my side, with different connection, computers, and I had a friend test it on his system, still 404. I guess that's why it doesn't work for us. :D Are you planning on re-doing the DB? Asking just because if you're not planning to, I'll just make a workaround for myself.

    • My bad. I completely misread how the link was written, of course it threw a 404, it still had the {gamemode}.

      But the mod still returns that error, even though I can access those JSONs from the browser. Any idea on what can I do about it?

    • Nvm, fixed it by myself. For future readers:

      If you don't know how to code, just go inside folder 'src', open mod.ts with Notepad++ or any other editor, copy&paste to ChatGPT, let it modify the fetch function so that it uses a JSON you want with all the prices.
      If you know how to code, the fetch funcion works, but somehow it cannot fetch the GitHub link for me no matter what, so I simply edited the fetch into reading a JSON file I downloaded from Github and put on a folder nearby. I downloaded it once because I'm lazy and I don't really care about updating prices every hour, BUT, if you really want that...either ask permission to Drakia FIRST, and if they agree, make a Python/whatever script that downloads the JSON from their GitHub every hour, and then use that to update the mod. Easy as that.

      And again, thanks to Drakia, the mod is wonderful, every mod you did is. :D

  • Super author Hello I am a Chinese player can help me to see what the problem :(

    TypeError: fetch failed

    在节点:internal/deps/undici/undici:12345:11

    在 processTicksAndRejections (节点:内部/进程/任务队列:95:5)

    在 Function.updatePrices 处(F:\yx\xyx\Client.0.14.9.1.30626\user\mods\aaDrakiaXYZ-LiveFleaPrices\src\mod.ts:72:30)

    在 Mod.postDBLoadAsync (F:\yx\xyx\Client.0.14.9.1.30626\user\mods\aaDrakiaXYZ-LiveFleaPrices\src\mod.ts:46:14)

    在 PostDBModLoader.executeModsAsync (C:\snapshot\src\loaders\PostDBModLoader.ts:51:21)

    在 PostDBModLoader.onLoad 处(C:\snapshot\src\loaders\PostDBModLoader.ts:26:13)

    at App.load (C:\snapshot\src\utils\App.ts:51:13)时出错

    • Your ISP most likely blocks access to GitHub's CDN, which is causing the fetch to fail.


      There may be a custom build of this mod on Oddba that uses a Chinese-friendly mirror for the prices JSON file, but I'm unable to access Oddba these days to check if it's been kept up to date

    • 兄弟,我已经完美解决了,把你电脑网络的网关改成google的8.8.8.8或者8.8.4.4(备用)就行了。


      Dude, I have solved it perfectly. Just change the DNS of your computer network to Google's 8.8.8.8 or 8.8.4.4 (backup).

  • Hello, how can i configure prices to be a bit higher (Military Power Filter is sitting around 800k-1kk in SPT while at PVE Ragfair it goes for 3kk+)

    • If you want PvE prices, enable the `pvePrices` option. Note that prices will still be capped at 10x base SPT flea prices by default, adjust `maxIncreaseMult` if you want to increase that multiplier

    • will try to look into it, will give feedback if smth goes wrong😁

    • mod recognizes price fully (checked in items.json by id), but in the game it is still x3 cheaper than on live pve flea (tarkov.dev web).
      Can it conflict with the SVM mod? we have ragfair improvements made there (just a lil bit of price added and speed of selling them) and it is loading before the Live Flea Prices mod.

  • since i deleted 1.3 folder and added 1.3.1 nd moved to bottom of load order i keep getting the same error others have gotten and SPT wont launch, any suggestions


    Update: used load order editor n moved to top n that worked for me so idk wtf happened lmfao

  • Your mod is running correctly on my server,I just want to let you know about this.


    There is a item called : AR-10 7.62x51 Lancer L7AWM 25-round magazine, and its id is 65293c7a17e14363030ad308.

    I think the price of this item is inconsistent with tarkov.dev. In regular mode, its price is 100 000,and in pve mode, its price is 130 000.

    But you can see the price of order in spt is only around 40000.

    • The prices of all other items are the same as those on tarkov.dev, so it must be caused by spt code

    • i found this code in src/services/RagfairPriceService.ts

      i deleted this and compile spt server,the order price for this item will return to 130 000(in pve mode)

    • But what is "unreasonable price"? thats hard to understand for me

  • Might be cool to mention that it *should* load after custom traders for those who curate their own load order

    • If a mod folder starts with`zz`, that is your indication from the mod author it should load last. If it starts with `aa`, that is your indication it should come first. If you're messing with load order manually, this is something you should know, otherwise leave it up to the mods themselves

  • Seems like the new useTraderPriceForOffersIfHigher is causing a bug and is checking for a trader that doesn't exist. You can comment it out in the mod.ts file like so to make the mod start without it: https://i.imgur.com/fDIx6YL.png


    remember to delete mod.js and mod.js.map if you do or it wont update!

    Thumbs Up 1
    • Do not do this, this completely negates the bug fix. Downgrade to 1.2.0 if you must, but don't modify the mod itself

    • Delete the old LiveFleaPrices folder, and install 1.3.1, it fixes this by loading last

  • Hello, after updating i am getting this error, i think it is related to this mod:


    ModLoader: Erro ao carregar o mod assíncrono: Unable to find trader: Evelyn in database

    Error: Unable to find trader: Evelyn in database

    at DatabaseService.getTrader (C:\snapshot\src\services\DatabaseService.ts:306:19)

    at TraderHelper.getHighestSellToTraderPrice (C:\snapshot\src\helpers\TraderHelper.ts:482:53)

    at Function.updatePrices (C:\SPT 3.9.8\user\mods\DrakiaXYZ-LiveFleaPrices\src\mod.ts:134:50)

    at Mod.postDBLoadAsync (C:\SPT 3.9.8\user\mods\DrakiaXYZ-LiveFleaPrices\src\mod.ts:46:24)

    at PostDBModLoader.executeModsAsync (C:\snapshot\src\loaders\PostDBModLoader.ts:51:60)

    at PostDBModLoader.onLoad (C:\snapshot\src\loaders\PostDBModLoader.ts:26:24)

    at App.load (C:\snapshot\src\utils\App.ts:51:26)

    You know how i can fix this ?

    • Have the same error

    • Same here

    • Delete the old LiveFleaPrices folder, and install 1.3.1, it fixes this by loading last

      Heart 1
    • This worked, i made it load last and no error displays now. Thank you!

  • Hello there. what does that mean?


    • confirm, getting the same error when updating from 1.2.0 to 1.3.0

    • Same as well, but does everything still work right in game though?

    • Delete the old LiveFleaPrices folder, and install 1.3.1, it fixes this by loading last

      Thumbs Up 1
    • The old folder was already deleted but put it as last in the load order fixed it. Thanks

  • Is tarkov.dev API broken again? The mod was working fine this morning but it's been reverted back to vanilla spt prices now.

    • Similar

    • Fixed. Yes. Problems was with Tarkov.dev

    • Yes, the API stopped returning historical prices temporarily yesterday. Should be resolved from the looks of things

  • Is there a option to turn on default blacklist? For some reason for me all items are available but i dont wanna buy mjolnir for 50k roubles and some other blocked items for ridiculously low prices

    • Live Flea Prices does not at all touch the flea blacklist

  • Why has the price of laboratory keycards never changed? is there a blacklist in spt?

    • weird, I can confirm that the prices of items in the flea market have changed (using ragfairPriceService. getFleaPriceForItem(templateId)), but some kinds of the price of order in the flea market are still at the default prices

    • Prices are all based on data from Tarkov.dev, the price file on GitHub is being updated properly as far as I can tell, so if prices in-game aren't updated it's probably some other mod conflicting

    • your mod runs properly on my server.

      i just want to know why the price of orders(generated by ai) of a few items will not change.


      for example: the price of TerraGroup Labs keycard (Red) in Tarkov.dev is between 1 million and 2 million , but you can see the price of orders(generated by ai) of TerraGroup Labs keycard (Red) is more than 90 million!

      but the price of most of items are the same as Tarkov.dev,that means your mod is actually working.

    • in my test,i only install this mod on my server, so thats not mod conflicting

    • I'm not sure what would be causing some items to not reflect the price the mod is setting. Looking at the price file this mod uses, red keycards should be listed around ~1.4 million. If the price isn't in that range, it's got to be either SPT itself adjusting it, or another mod


      Are you sure you're not looking at a pack order with multiple cards?

  • Its saying that the prices have been updated but they're not?

    • Yeah, Tarkov.dev API is broken at the moment, so it's not pulling proper prices

  • My PC is connected to GitHub and the market price hasn't changed, what's going on?

    • Tarkov.dev API is probably broken

  • says that the server is down when i go to download it

    correction github is having a huge skill issue and is having a stroke Monkam

  • Mod Loader: Loads asynchronous mods:fetch failed

    TypeError: fetch failed


    Error at node:internal/deps/undici/undici:12345:11

    at processTicksAndRejections (node:internal/process/task_queues:95:5)

    at Function.updatePrices (F:\Escape From Tarkov\user\mods\DrakiaXYZ-LiveFleaPrices\src\mod.ts:65:30)

    at Mod.postDBLoadAsync (F:\Escape From Tarkov\user\mods\DrakiaXYZ-LiveFleaPrices\src\mod.ts:42:14)

    at PostDBModLoader.executeModsAsync (C:\snapshot\src\loaders\PostDBModLoader.ts:51:21)

    at PostDBModLoader.onLoad (C:\snapshot\src\loaders\PostDBModLoader.ts:26:13)

    at App.load (C:\snapshot\src\utils\App.ts:51:13

    • This indicates your PC was unable to make a connection to GitHub to fetch the updated prices, there's nothing the mod can do about this. Either you have a local or remote firewall blocking the connection, or something else on your PC is interfering with the mods ability to fetch price data

    • Thank you for your answer<3

    • Code
      После установки мода будет ли подключение к Git Hub?
    • Is it possible to make a change to try/catch the TypeError when fetch fails and fall back to prices.json (if it's not already doing this?).


      edit: I did get

      try{fetch() and parsing goes here}

      catch{TypeError due to offline/other network issue handled here}


      to work okay, so can fall back on existing files if offline, but maybe using

      fetch()

      .then(...)

      .catch(...)


      Promise type syntax is a better method here? (not experienced with it).

  • Hey, I'm a long time user of your mods and I appreciate your work!


    Yesterday BSG had a little meltdown and as a result people are receiving huge amounts of money and items. Predictably the PVP economy is going crazy and armor and everything else is skyrocketing in price. It seems this is the usual pre-wipe shenanigans. This is all fine and good and the mod is working as intended, but I would rather play with a more steady economy.


    Today I found in my investigations that PVE tarkov has its own live player driven flea market...and that data is on tarkov.dev...and the prices haven't been affected by these aforementioned shenanigans. So please consider this post my feature request: Toggle-able PVE/PVP flea market.


    For now I'll just reduce maxIncreaseMult and continue to enjoy the game. Thanks again.

    • This explains so much, thank you for looking into it. Would love to see a toggleable PVE/PVP option.

    • Yes, I would love to see PVE/PVP FLEA toggle or separate mod for that.

  • for exemple lab card is like 180 000 is that normal ?

  • Same here. The server log states :


    Fetching Flea Prices...

    Flea Prices Updated!


    But it hasnt.


    Patiently waiting for update :)

  • Doesn't work for some reason, prices are still the same, i'm using SPT 3.9.2, what can be a reason? In console it shows that "Flea Prices Updated!" but the prices with or without mod are still the same. I'm using Fika as well. Ver. 1.2.0.