This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Imgoodisher's profile picture

CCStock / CConomy: Money and Stock Market

Started by Imgoodisher, 25 May 2013 - 09:23 PM
Imgoodisher #1
Posted 25 May 2013 - 11:23 PM
CCStock / CConomy

Stocks and Economy


I have created a program that allows you to trade stocks and manage money in ComputerCraft

Features:
  • Account System
  • Money (paying other people or buying stocks (which leads us to…))
  • Buying/Selling stocks
  • Fancy GUI
Screenshots:
SpoilerLogin Screen:



Portfolio: (Note: I raised the starting amount of money from when I took this picture)



Searching for a stock:



Stock details/Buying & Selling:



After buying the stock:



Sell page:



for the record, I couldn't figure out how to take screenshots in ccdesk

Download:
pastebin get LJs3zGBm stock

Web API:
SpoilerFor stock prices and searching, I used http://dev.markitondemand.com/

The rest of the api is on
imgood.hostoi.com

Verify Username/Password:
imgood.hostoi.com/user/login.php?name=<USERNAME>&amp;pass=<PASSWORD>

Check Balance:
imgood.hostoi.com/user/balance.php?name=<USERNAME>

List Stocks:
imgood.hostoi.com/user/stocks.php?name=<USERNAME>
Note: This returns a JSON table. You'll need another API to decode it

Transfer Money:
imgood.hostoi.com/user/transfer.php?from=<USERNAME>&amp;pass=<PASSWORD>&amp;to=<OTHERNAME>&amp;amount=<AMOUNT>
from and pass must be a valid account
to has to be a valid username
amount can not be negative and it can not be more than you have

Buy Stock:
imgood.hostoi.com/stock/buy.php?name=<USERNAME>&amp;pass=<PASSWORD>&amp;symbol=<STOCKSYMBOL>&amp;amount=<AMOUNT>
symbol is a stock's ticker symbol
amount is the amount of shares to buy

Sell Stock:
imgood.hostoi.com/stock/sell.php?name=<USERNAME>&amp;pass=<PASSWORD>&amp;symbol=<STOCKSYMBOL>&amp;amount=<AMOUNT>
symbol is a stock's ticker symbol
amount is the amount of shares to buy
lieudusty #2
Posted 25 May 2013 - 11:23 PM
Awesome program :D/>
ETHANATOR360 #3
Posted 26 May 2013 - 12:18 PM
looks cool and has a very nice interface