matthewpageuk / crypto-portfolio Goto Github PK
View Code? Open in Web Editor NEWA simple crypto portfolio tracker - IN DEVELOPMENT
A simple crypto portfolio tracker - IN DEVELOPMENT
All works with good data, but $unsold[0] can be null with a broken transaction chain or negative balances. Should add some error checking and drop out if problems.
Maybe return -1 on error so it's clear.
This should not allow transactions in the future, see EditTransactionRequest
Rounding issues...
This links in with #14 and in general the storing of transaction values.
https://github.com/MatthewPageUK/crypto-portfolio/wiki/Range-of-numbers-used-in-trading
Make them hide after a few seconds
Download a backup file - upload it again
XML, Json, CSV, Custom
Tokens
Transactions
Time to import 100,000 transactions
Check php execution limit
File size
Update the layouts app.blade and guest.blade to allow passing the page title
Add a page to view the transaction details
Need to test we don't get any negative balance when we change the token or type of transaction.
Not sure allowing the change of token is really a good idea?
And add a precision number wrapper for bc functions..
Invalid Token
Invalid Transaction
Needs to look cleaner....
Remove trailing zeros
Round for display purposes
Use > 0.001 if rounds to zero
Price - £0.0000026
Price - £234,453.0000054 - Display £234,453.00
?
So tiny fractions like 0.00001 are not showing correctly.
Also need to look at 32 / 64 number issues and what the requirements are going to be
Jump to a token...
One fee per transaction
Take into account on financial calculations... avgHodlPrice etc
Name
Email
Password
Confirm password
Breeze?
Tables, models ... etc
View / Edit / Delete / Add
Tokens, Transactions
Blade components for link and svg
Transaction can not be deleted if it results in a negative balance.
Need to do a play back of all transactions to make sure there is no historic negative balance.
TransactionCollection :: validateTransactions() - checks them all ?
😶
Calculate the related buy / sell transactions.
Buy order - show transaction where those tokens were sold
Sell order - show transactions where those tokens were purchased.
eg..
_Buy 1,000 at £1.50
Sold 400 at £1.76
Sold 600 at £1.90_
Profit loss on sold tokens
Still hodl quantity
Profit per day / month
Percentages
Test all methods ...
Need good test cases, and edge cases / all possiblities?
public function sumCurrency( string $key ): Currency
public function sumQuantity( string $key ): Quantity
private function sumNumber( string $key ): Number
public function balance( $at = null, $recalculate = true ): Quantity
public function averageBuyPrice(): Currency
public function averageSellPrice(): Currency
public function averageHodlBuyPrice(): Currency
public function isValid(): bool
private function calcBalance( ?Carbon $at = null, ?Quantity $balance = null ): Quantity
private function calcAveragePrice( $type = CryptoTransaction::BUY, Currency $total = null, Quantity $quantity = null ): Currency
private function validateTransactions( $balance = 0 ): bool
public function unsoldTransactions( Carbon $at = null ): TransactionCollection
Check the rule is working, passes on +1 day, but need a test to see if the Time is also being taken into account.
Try +2 hours
Requests
StoreTransactionRequest
UpdateTransactionRequest
Tests
AddTransactionTest
EditTransactionTest
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.