Bitcoin Forum
December 05, 2016, 04:39:08 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  

Warning: Moderators do not remove likely scams. You must use your own brain: caveat emptor. Watch out for Ponzi schemes. Do not invest more than you can afford to lose.

Pages: [1]
  Print  
Author Topic: [GLBSE] API Frontend to keep track of assets and returns.  (Read 1563 times)
Sp0tter
Sr. Member
****
Offline Offline

Activity: 285


View Profile
June 26, 2012, 02:18:48 AM
 #1

I created a front-end script to access the GLBSE  api and display helpful information about assets and return on investments.  I hope you find it useful.  

Please report any bugs or feature requests here.



md5sum
source488b8027b4b7287cb2f9e262bb9464b9
assets_2012-07-03_1341340694.tar.gz



Instructions
1. Extract to a public html folder.
2. Edit the sample_key file and move it to a non-public folder.
3. Edit $key_file in assets.php to point to the key file.
4. Download/Copy your account_history.csv from GLBSE to the same folder as assets.php.  Update this file when you trade assets or receive dividends.  (Currently there is not a simple way through the private API to check dividends, therefore you must fetch the csv manually.  I have contacted support and it is on their todo list.)

If you do not have a web server set up, you can just run 'php assets.php > assets.html' in linux and then point your web browser to the html file.

Known Issues
1. Warning / Notice output will display if your web server is set to display all of these.  Will fix these.
2.  Currently per/share dividends are only reported correctly for assets which are paid weekly.  (This does not affect cumulative dividends, but only the return on investment estimates).
3.  Occasionally there will be a timeout because of how slowly glbse.com responds.

Please post feedback here or talk to me in #btcguild on irc.

Warning... use at your own risk... (it can't be riskier than 7% interest bonds though right?)  Please check the script and make sure there is nothing shady in there before using.  I do my best to test everything, but will not be responsible for any losses due to the use of this script.

http://allchains.info - First to provide difficulty estimates for forks.
1480912748
Hero Member
*
Offline Offline

Posts: 1480912748

View Profile Personal Message (Offline)

Ignore
1480912748
Reply with quote  #2

1480912748
Report to moderator
There are several different types of Bitcoin clients. Hybrid server-assisted clients like Electrum get a lot of their network information from centralized servers, but they also check the server's results using blockchain header data. This is perhaps somewhat more secure than either server-assisted clients or header-only clients.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480912748
Hero Member
*
Offline Offline

Posts: 1480912748

View Profile Personal Message (Offline)

Ignore
1480912748
Reply with quote  #2

1480912748
Report to moderator
Sp0tter
Sr. Member
****
Offline Offline

Activity: 285


View Profile
June 26, 2012, 02:20:26 AM
 #2

reserved

http://allchains.info - First to provide difficulty estimates for forks.
exahash
Sr. Member
****
Offline Offline

Activity: 276



View Profile
June 26, 2012, 03:05:02 AM
 #3

Thanks Sp0tter!  I made a cl script to do some of this, I like yours better tho.

I see you're doubling the div/day of YABMC... can you instead grab the last two dividends and divide by the actual number of days between them?  I suspect there may be more tickers with irregular (or non-weekly) dividends, such that always dividing by 7 and having to special-case them could be too much work.

FWIW - I see nothing shady in there. :-)
Sp0tter
Sr. Member
****
Offline Offline

Activity: 285


View Profile
June 26, 2012, 03:14:33 AM
 #4

Thanks Sp0tter!  I made a cl script to do some of this, I like yours better tho.

I see you're doubling the div/day of YABMC... can you instead grab the last two dividends and divide by the actual number of days between them?  I suspect there may be more tickers with irregular (or non-weekly) dividends, such that always dividing by 7 and having to special-case them could be too much work.

FWIW - I see nothing shady in there. :-)


I have devoted attention so far to the assets that I actually have.  I will try to cover as manay as possible as time goes on.

Eventually I plan to make a separate data file that lists each asset and describes it's type and payout scheme.  For the mh/s bonds, I will calculate the current PPS and use what it "should be" for the dividend estimation.

Thanks for checking over the script and verifying it for others.  This is my first time using php, I do most of my life in c++, and most of my scripting in perl...  it's not so bad... php makes me feel like a really smart ...11 year old boy.   I appreciate the feedback.    Smiley


http://allchains.info - First to provide difficulty estimates for forks.
Sukrim
Legendary
*
Offline Offline

Activity: 1848


View Profile
June 26, 2012, 07:21:09 AM
 #5

I'd love to see how much I've bought my shares for and for how much I already sold them + dividends gained - fees paid.

Also, why PHP in the first place?

https://bitfinex.com <-- leveraged trading of BTCUSD, LTCUSD and LTCBTC (long and short) - 10% discount on fees for the first 30 days with this refcode: x5K9YtL3Zb
Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf
Sp0tter
Sr. Member
****
Offline Offline

Activity: 285


View Profile
June 26, 2012, 07:23:29 AM
 #6

I'd love to see how much I've bought my shares for and for how much I already sold them + dividends gained - fees paid.

Also, why PHP in the first place?

Just for shits and giggles.  I wanted to do some php....  I wanted reports on my GLBSE.. bam!


Edit:
The avg cost is the average cost that you paid.. and that is all bought - all sold / count.

http://allchains.info - First to provide difficulty estimates for forks.
Nachtwind
Hero Member
*****
Offline Offline

Activity: 700



View Profile
June 26, 2012, 08:18:03 AM
 #7

Useful little script :0)

I think this will be something to keep an eye on!
zerokwel
Sr. Member
****
Offline Offline

Activity: 466



View Profile
June 26, 2012, 02:51:22 PM
 #8

I do use it. Its nice for me to see how much I am making or loosing a week Smiley.

I am going to toss sp0tter a share for his work (now what do I have that's cheap)

Sp0tter
Sr. Member
****
Offline Offline

Activity: 285


View Profile
June 27, 2012, 06:56:49 AM
 #9

The numbers for all weekly dividend assets and all summary items should be correct now.  Several bugs have been fixed.  This should be ready to go Smiley  Please report any bugs or feature requests here.

final = balance + total_sells + total_withdrawals - total_deposits - fees_to_sell

http://allchains.info - First to provide difficulty estimates for forks.
ianspain
Donator
Full Member
*
Offline Offline

Activity: 164



View Profile
June 27, 2012, 07:45:41 PM
 #10

sub

BlockChain Capital
Sp0tter
Sr. Member
****
Offline Offline

Activity: 285


View Profile
June 27, 2012, 10:25:08 PM
 #11

Update:  Moved all rounding to right before display so it does not affect other calcuations.  Cleaned up presentation.  Added 'price gap' column.

http://allchains.info - First to provide difficulty estimates for forks.
vokain
Legendary
*
Offline Offline

Activity: 1610


V.V.V.V.V.


View Profile
July 03, 2012, 03:30:15 PM
 #12

looks very useful! unfortunately i can't download the archive to test it out Sad

...مكتوب
Escape the plutocrats’ zanpakutō, Flower in the Mirror, Moon on the Water: brave “the ascent which is rough and steep” (Plato).
Sp0tter
Sr. Member
****
Offline Offline

Activity: 285


View Profile
July 03, 2012, 06:39:13 PM
 #13

looks very useful! unfortunately i can't download the archive to test it out Sad

Sorry, my vps was down.   It is back up now with the newest version Smiley

http://allchains.info - First to provide difficulty estimates for forks.
Sp0tter
Sr. Member
****
Offline Offline

Activity: 285


View Profile
August 29, 2012, 05:22:39 AM
 #14

Will resume improving this now that pirate is a bust Smiley

http://allchains.info - First to provide difficulty estimates for forks.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!