Wallet Manager Project Code
Posted: 2012-10-22 Filed under: industry, market | Tags: api, industry, trade 65 CommentsIf you haven’t been following this blog, I’ve periodically posted about a “Wallet Manager” project that myself and my trading partners, Raath and James, have been working on for the past two years to help us manage our Eve activities using the Eve API.
The project started small, with the first page being driven only by the wallet API feed. As we expanded our industrial scope in the game so too did the Wallet Manager’s requirements. Soon I needed to keep track of blueprints, assets, capital production, PI, and tech 2 invention; each new requirement expanded the original scope.
What grew was a project that contained many methods by coders of different proficiencies. James took my undergraduate C/C++ knowledge and showed me how to work with more objects, models, JavaScript, and even Ajax. Over the course of two years we spent many hours developing methods to handle assets (when items get stacked their unique ID changes), minerals pricing, API caching, and ultimately usability.
The code backend is not something we are extremely proud of, but the presentation and workflow has suited our operations well. If you have the fortitude to tolerate our design, then feel free to give our project a test run.
Disclaimer *IMPORTANT*
- Code is provided as is.
- If you want to try to setup your own instance, I would advice that you have an understanding of PHP, MySQL, and general code architecture. Getting this to run is not a beginner project.
- I cannot provide any commitment for bugs corrections, adding features, or providing support.
- There are many, many non-sanitized input points that are major security issues as noted in this post. I would not use this as a public-facing site.
- There are unfinished pages, hacked together solutions, code in the view, display code in the controllers, etc. — don’t expect clean, production quality code.
- Be prepared to edit the database table to enter your users and API keys. The ‘admin’ section is only partially completed.
Prerequisites
- MySQL, PHP5+
- Yii Framework
- phpMyAdmin to efficiently work with the database
Installation
- Download the ZIP here. [April 2014 Update] I’ve moved the project to GitHub here.
- Extract the code to your var/www folder
- Edit protected/config/main.php.changeme
- Line 29 contains IP limitations for working with Gii. Enter your WAN IP address here if you want to work with this module.
- Line 57/58 contain your database connection information.
- Rename to main.php
- Edit protected/config/console.php.changeme
- Line 22 contains the database name. My project was named after my holding corporation PROHD so the database name is ‘prohd’.
- Line 24/25 contain the user/password to login to the application.
- Rename to console.php.
- Modify Yii path in index.php
- Change the path to your Yii framework location $yii=’/usr/local/lib/yii/yii.php’;
- Replace /usr/local/lib/yii/caching/CDbCache.php with the one in the zip.
- Create database structure with prohd.sql
- Create a login in the ‘accounts’ table. The default userLevel is ‘1’.
- Enable the API feed by adding a 1,1 row to the apiStatus table.
- Define a group in trackingGroups table.
- Add your character information in the ‘characters’ table.
- Import the Eve static data tables from https://www.fuzzwork.co.uk/dump/
- Import the following table into typeBuildReqs for Tech 2 items. You can generate this table using my query or import from the previous table export.
Recommendations
If you are intimated by the scope of the setup procedure, I would recommend that you use the DRK Industry Tracker for your construction projects as my partner Raath is actively developing this project.
Update
https://k162space.com/2013/08/13/wallet-manager-code-update/
Journey to 100B ISK
Posted: 2012-04-04 Filed under: industry, market | Tags: arkonor, ishtar, maelstrom, market, megacyte, noctis, profit, rigs, trade, trimark 4 CommentsVisions of power come in many forms in the Eve universe. Some people aspire for political wealth and the ability to spin the wheels of war with a few verbal orders. Others find power in numbers, the blinking of a wallet ever increasing towards a higher value.
I have always identified with the industry people, who wish to put disparate pieces together to create something grand. Ammo to Jump Freighters — I’ve built them all and have quite the journey.
In March of this year, I hit a new milestone as I saw my net value pass 100B for the first time.
Carebear Stare
As I reflect, I find the notion that I once held of an Iteron V being a masterful machine to be almost comical. Powerful Mining lasers from a Navitas frigate don’t seem to bring me the same thrill as before.
Now I am playing with what I consider to be the real industry and market people, who shift prices en mass and send ripples down the chain. I can now fund large conflicts and build something from nothing.
For one individual, vocal clout on comms provides wealth. For me, the work I am doing to drive conflict with money is far more entertaining.
The Vast Unknown
All journeys start with a decision that drives change. In 2008, fresh to the space opera, I found myself making small amounts of gains in highsec and eager for larger things. One day a corpmate approached me and lured me into unknown space with the promise of riches.
The introduction of wormhole space brought new fields of ABC ores to the galaxy. As my wormhole corporation climbed up the class ladder from a C3 into a C6, we grew in mining, production, and salvage efficiency.
In early 2009, the number of roaming gangs and gankers was drastically smaller than the current numbers. We would often mine for hours without seeing another incoming connection forming. The field was new and full of new mechanics that are drastically different than aged nullsec.
We used newly discovered mechanics to keep ourselves isolated. Knowing that not warping to an outgoing connection will keep it despawned, helped keep our isolation from neighbors. When we saw a new signature from a nosy neighbor, we used the mass of our carriers and battleships to collapse the connection.
Isolation kept the Arkonor flowing and with each jetcan worth 14M ISK, our wallets fattened. We purchased carriers, a Rorqual, battleships, and funded second or third characters.
Clicking on Planets
Liquid ISK, which was created by piles of Megacyte mined in wormshole space, gave me the capital for my next venture.
I speculated heavily on the PI market before the Tyrannis patch. When NPC orders were removed, it paid off. I put 10B into NPC items such as robotics, construction blocks, coolant, and mechanical parts. As the prices peaked, I sold off the stock pushing my net worth up to 20/25B.
Market Epiphany
Another breakthrough came when I took up missioning as a side interest.
Running L4 missions.
Hmm, I need ammo and to rig this Dominix.
Hmm, why are rigs 3M more than Jita.
Hmm. Hmm. *click*
I should stock this mission hub.
Major Performers
Advice
Close Jita local and pretend it does not exist.
Expansions breed change. Pay attention to leaked patch notes, and review for manipulation attempts. If there is a change to loot drops proposed, get on the test server and figure out the refine value or use the static data set that CCP provides.
Stay away from the Official Eve Online forums, especially for market information. The reliability and quality of information is far too low.
Put on your tinfoil hat and join the r/eve and kugutsumen.com communities.
Read, read, read, use Excel or another tool, read, and read.
Take a risk and do something that you have never done before. Some of the most important trade data or inspiration has come out of new aspects of the game that I have never attempted before such as large 500 person fleet fights, mission running, or Incursions.
K162 Trade Index
Posted: 2012-04-02 Filed under: market | Tags: index, m3, profit, sql, trade 1 CommentAs a trader you continually ask yourself, what are the best items that I need to be working with?
This is a hard question to answer as there are many ways of using statistics to derive an answer. A common method is to use weights on criteria to come up with an index. The better this number, the better the item performs.
My trading partner James and I put weight on an items total profit, profit per transaction, profit per item, volume, opportunity cost. We have 35,852 transactions dating back to October of 2010, but I wanted a current snapshot of my trading performance so we limited the interval to 3 months of history.
$sql = ('SELECT SUM(wallet.quantity) as totalQuantity, invTypes.volume, wallet.typeName, wallet.typeID, (SUM(wallet.profit) / 100000000) + (AVG(wallet.profit) / 100000000) + ((SUM(wallet.profit) / SUM(wallet.quantity)) / 40000000) + ((SUM(wallet.profit) / (SUM(wallet.quantity) * invTypes.volume)) / 1000000) - (((SUM(wallet.price) - SUM(wallet.profit)) / SUM(wallet.quantity)) / 500000000) as ticketWeight FROM wallet JOIN invTypes ON (wallet.typeID = invTypes.typeID) WHERE wallet.transactionDateTime > DATE_SUB(CURDATE(), INTERVAL 120 DAY) AND transactionType = "sell" GROUP BY wallet.typeID ORDER BY ticketWeight DESC');
We’re open to critiques of our method, as this is our first attempt to come up with more intelligence beyond ‘what items have the most profit on average per time period’.
K162 2012 Q1 Trade Index 50
Note that PLEX is very over-weighted due to its extremely small size (0.01 m3). We are not currently eliminating outliers.
Traders Rejoice, Market Buff
Posted: 2012-03-30 Filed under: market | Tags: buff, deadspace, faction, module, officer, trade Leave a commentRevised killmails are coming with Inferno.
It looks like CCP took design inspiration from our popular 3rd party killboards, which is nice. Why reinvent the wheel?
At the bottom of the new killmails is information for the total value of the killmail. Currently killboards have to manually store and guesstimate the value of items that are contract only, like officer/faction/deadspace modules.
For my needs, I have been manually updating prices for these non-market items from http://prices.c0rporation.com by importing the XML price list. I’ve also had to edit some numbers are they were not up to date or way overpriced.
Officer/faction/deadspace modules have always been a thorn in my side as far as pricing went.
In order for the new in-game killmail to have a price for these items, CCP decided to add them to the market.
Very exciting news for traders. We’re now going to be able to clearly see price and volume for these high meta items.
From the Devblog:
…
To get this to work properly, we’ve (with help from team Game of Drones) added everything to the market and fixed a few items that didn’t have a price (like Titans), with the price being based on material ingredients.
Confirmation from CCP SoniClover:
Q: Everything on market now?
A: More or less. Basically, everything that exists, is published and has a meta level is on the market now.
link
2011 Trading and Industry Report
Posted: 2012-01-13 Filed under: eveonline, industry, market | Tags: market, profit, ships, tech 2, trade 3 CommentsThis post serves as an expansion on the 2011 Trading and Industry Reflection post where I outline some of the high level items that brought success to my efforts in 2011. After some further database work, I created a page that shows items in groups on a more granular level.
Q: How was your list created?
I spent a lot of time looking at items that are consumed for mission runners, PVP, and nullsec fleet doctrines.
Q: I might want to take a stab at creating a report of my own. How did you create this page?
All the items have been manually entered into an array.
... '12773', //Barrage M '191',//Fusion M '193',// EMP M ...
The array is then used in a very non-optimized query to produce volume and profit numbers over the past 365 days.
$eveDate = $this->getEveTimeSql(); $sql = ('SELECT typeID, typeName, sum( profit ) AS totalProfit, sum( quantity ) AS totalVolume FROM wallet WHERE DATE( transactionDateTime ) > DATE_SUB( DATE( :eveDate ), INTERVAL 365 DAY ) AND personal = 0 AND transactionType = "sell" AND typeID = :typeID GROUP BY typeID ORDER BY totalProfit DESC');
956 x 2993 report page:
Q: What happened with the Improved Cloaking Device II?
I fat fingered the sell price and was off by a power. Whoops.
Q: Surprises or unexpected trends?
I was completely floored by the amount of Capital Shield Transports that I was able to move in 2011. The new Tier3 BCs did not sell as well as I expected.
Q: Why didn’t you trade xxx or yyy?
There are still a lot of markets that I need to test out.
If you have any more questions, please ask!