RealStockMarket
Real Stock Market
Tired of fake stocks and predictable stock markets on your server? Use in-game money to buy and sell real-world stocks!
Features Overview
- View latest prices for any real-world US stock. Ex:
/sm view AAPL
- Every command supports multiple symbols at once! Ex:
/sm view AAPL,GOOG
- Drop-in installation, no configuration!
- Uses
sqlite
database to track purchase and sale transactions
Note: This plugin connects to a finance website/API to obtain required pricing information for stocks. All API calls are done on an async thread so if there's a delay or network problem, we're not going to affect performance of your server. No information about your server is transmitted aside from the IP the request comes from. View/buy/sell actions may not be possible if the API become unavailable.
Installation
- Throw the latest .jar into your
plugins
directory. - Start your server once to generate config/database.
Grant permissions if you wish, but the defaults are designed responsibly.
Permissions / Commands
For everyone
realstockmarket.view
-/sm view (symbols)
- View latest prices of stock symbolsrealstockmarket.buy
-/sm buy (symbols) (quantity)
- View latest prices of stock symbolsrealstockmarket.portfolio.others
-/sm portfolio (player)
- View another player's portfolio
Get Help
IRC: irc.esper.net #prism
Credits
This plugin was custom designed by viveleroi for the amazing s.dhmc.us Minecraft server.
Authors
- viveleroi (Creator, Lead Developer)
Donate to Vive
I'm viveleroi, author of RealStockMarket and other plugins like Prism, Oracle, Darmok, Craftys, DarkMythos, InventoryToolkit, and more. There's no pay in making plugins but it's rewarding knowing you all use them - so please help bridge the gap and donate to cover my own time and money investment.
So please, make a donation and make it easier for me to continue with these amazing plugins.
Metrics
This plugin utilizes Hidendra's plugin metrics system, which, if enabled, anonymously tracks the following about your server at mcstats.org: A unique identifier, server java version, online mode, plugin & server versions, OS version/name and architecture, cpu core count, player counts.
This information is used purely to help inform our technical decisions and boost our egos with how many people are enjoying our work.
Opting out of this service can be done by editing plugins/Plugin Metrics/config.yml and changing opt-out to true.
Development Builds
We offer access to development builds through our Jenkins server. Use these only if you're comfortable using development builds. These have not yet been reviewed by Bukkit staff but are what we'll include in our next release submission.
When I install the plugin, I attempt to purchase a stock, but it will not allow myself or my users to view the stock in their portfolio. When you try selling stocks you bought, it says "No current holdings found for GOOG".
Any suggestions?
Instead of NO configuration, can you add support for stock broker fees per transaction (percentage, and flat), as well as support to customize all messages, prefixes, commands and colors?
Add support for players to directly trade stocks with the server instead of selling and then buying the stock they want. (broker fee applied).
Explanation: If player has 5 stocks that are valued at $50 each (total $250) and stock X costs $30 each, then player 1 could trade their current stocks for a maximum of 5 of stock X shares since that would be of equal value PER SHARE (Greatest Common Factor). The player can use a command like "/sm trade <currentstocktick> <preferedstocktick> (amount)". If the amount is incorrect, it will return,"You can only trade a maximum of <amount >. Try again." ect... If no amount is defined, it will trade the maximum allowed. Any leftover stocks will remain in the player's portfolio because they paid for them. Broker fee applied from config. This works best when a large amount of stocks are involved.
Broker fee explained: Broker fee should be a percentage and/or flat rate set in config per buy/sell/trade/transaction. The fee is deducted from the player AFTER the transaction (can cause player to have negative balance).
Example: If flat rate is set to $10 and the percentage is set to 5%, then the total applied fee is $25+(.05*X) X= total price of stocks (percentage can be less than 1%(.01)(.00010 = 1/1000th% ect...)
So, if you purchased 100 stocks for $75 each, the total fee is $400 ($25+(0.05*$7500))
If only the flat rate is defined, the fee would be $25 instead of $400. If only the percentage if defined, the total fee would have been $375 (0.05*$7500). After the transaction, the plugin will return,"You paid ($400) in brokerage fees." ect...
I personally argue that sign support would cause strain on the server because all signs have to update every X minutes, and if there are many signs in one place, players nearby might lag and disconnect. I suggest the use of multi-threading to divide the workload if you choose to add sign support in the future.
If I think of anything else, I'll edit this post accordingly. Please comment and add suggestions!
This is the easiest to use, most efficient, and best designed stocks plugin I have come across. Agree that sign support would be cool, just for users who want to see popular stocks instead of looking up symbols online. 10 outta 10 haha
YES YES YES YES.... omg, you are a GOD......
Thank u so much
@MinecraftMadeAutomatic
I couldn't say, any errors in console? Remember, US Stocks only change price during US business hours. Roughly 9-5 Easter time, Monday-Friday.
I used this plugin in my server and it does not seem to update the price Any fix? or is there something wrong i did I am using the essentials, vaults, clear lagg and this plugin yet will be adding more soon
Anyway you can add some type of sign support so we could list the stocks and they change with the stocks?
This is honestly an amazing plugin and I am looking forward to using this on my server! Thanks so much!
Easily the best plugin I have ever had the pleasure of using on my server! I have literally waited years for one worthy of our server! <3 Will you be adding sign integration? I want to make a job 'Stock broker!' Thanks for the epic plugin!
@botskonet
Thank you, much appreciated :)
@PunJedi
The update is now pending bukkit approval. It can be loaded just fine, no issues with existing data.
@botskonet
Thanks for the response and the effort. My members instantly fell in love with this simple and fun plugin and we've been yearning to have it back in.
I have currently just renamed the .jar to .back and kept the folders intact as we have members with money tied up in some stocks. Will I need to have them all sell out in prep for the new build or do you think it will merge just fine with your update?
Thanks again.
@botskonet
(will make a new release soon with these fixes)
Ok, the portfolio view command was not running async so I have a fix for that.
Any stocks that return with a 0 price will be ignored - yahoo shows 0 prices for invalid symbols so this should resolve that problem.
I'll add a donate link to the description, though I have it listed on my other projects.
The only reason I haven't added any sort of recurring/auto update system (others asked for an in-game window) is just to keep the API calls to a minimum.
@PunJedi
Shouldn't have impacted the server because those API lookups should be async. I'll look into what we may have missed.
I'll look into what we can do about invalid stocks.
Was working fine until the Yahoo API page was unconnectable. Immediately hard crash server.
java.io.IOException: Server returned HTTP response code: 502 for URL: http://download.finance.yahoo.com/d/quotes.csv?s=GOOG,HPQ,T&f=nsl1op [07:53:01] [Server thread/WARN]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) and on and on...
Worked again once the yahoo finance list was live again. Found a new and major error though. Folks are able to by non-existant stocks or pre-release stocks and suddenly gain millions in moments. If you could fix so that if the list is down it doesn't crash, and make it so you can only buy/sell existing live stocks and not fake/nonexistant, that would be awesome. Thank you.
Update - over an hour in, had a few people using it and unless they do /sm mine too fast we see no issues. We do have request, two actually.
1. Do you have a Donations link anywhere?
2. Any chance of adding a sign function that we simply put like [RSM] first line (Stock Initials) second line
And have it just show maybe approx every 5 minutes the current data? I realize this could be tricky or beyond the scope of what you intended , but I figured I would ask anyhow :)
Thank you again.
Using it at XeGaming.Com Works like a charm. Already have members going broke buying stock. We all know its beta and things could go snap any moment but so far we really like what you have done. If you want to come check it out and get some feedback, feel free.
My question is. As we buy and sell in game, do we use the internal db generated? Meaning, I assume the prices are pulled from online but the shares are affected by our purchase of em in game right?
cooooool