Showing posts with label bitcoin. Show all posts
Showing posts with label bitcoin. Show all posts

Wednesday, January 23, 2013

comparison of cgminer, poclbm, mac, and linux

At first this was about getting cgminer working on mac, with minimal effort...It turns out more than minimal effort is required. Anyway It's probably a nice read if your interested in bitcoin mining.

I was using a macbook pro from Mid 2010(4 gigs of ram, intel core 2 duo) An old linux box I built with 2 cores(amd) And the graphics card is a 6970 or 6950 I can't remember, it's the one with the shaders off, that you can unlock with a firmware update. And a BFL Single FPGA

Wire shelf, panels off I basically took my fedora core script and made some changes. I like cgminer, probably because the bitforce documentation said it was going to be the harder one to get working(Fuck the world, choose the wrench). And my single(FPGA) was acting funny and making noises. Essential the fan was to close or something, how that happend over the past 6 months I don't know, but I took it all apart, and then I reassembled the peices I thought it needed to work. I rescured the fan tight, but not so tight it was bumping as before, and I ran the fan wire in such a way it wouldn't fall into the fan. and then I elevated the feet with two notebooks, and it started running better than ever, hopefully by the end of writing this, it will be sitting on a wire shelf providing it with the same extra ventelation the two notebooks propping it up, now are. Now it normally runs on my linux box, but I decided I wanted to see if it ran on my Mac, so what I did was run the script below to install cgminer. If you notice I enable bitforce compatibility in the script.

So on my *nix box I was topping out at about 877
And on my mac box I'm topping out at...
However with my linux box, what i was able to do was to start using cgminer to do my graphics card which was topping out at 350 usually running at about 330 -340, and that's with --od-enable Clocks set at 920,1250, I saw the occasional problem if I bumped it to 925, 1250.

You have to have brew installed to do this
Make this script below then run it.

#!/usr/bin/perl
use strict;
use warnings;

my $brew;

my @brew_installs = qw( 
    autoconf    automake    binutils    boost   bzip2   curl    curl    curl-ca-bundle      curl-ca-bundle      cyrus-sasl2     db48    flex    gdbm    gdbm    gettext            glib2    gnutls      gperf   help2man    icu     jansson     jpeg    kerberos5   libffi      libgcrypt   libgpg-error    libiconv    libidn      libpng      libtasn1    lzo2      m4    miniupnpc   ncurses     openssl     ossp-uuid   p5-locale-gettext   p5.12-locale-gettext    perl5   perl5.12    perl5.12    pkgconfig   pv      qemu    qrencode             readline   texinfo     xz      yasm    zlib )
;

&array_cracker();

           sub array_cracker(){
            foreach(@brew_installs){
               print $_; 
                  $brew = `brew install $_`;
                     print $brew;
                       }   
                       }   


Now I tried hard to script the next part but I had some problems so here are some manual commands you will have to type in:

cd ~
mkdir Build
cd Build
git clone https://github.com/ckolivas/cgminer.git
cd cgminer
./autogen.sh
./configure --enable-scrypt
sudo make install

I didn't have any problems after that, some people said before they did their commands they had to do this: eval `brew --config | grep HOMEBREW_PREFIX | sed 's/: /=/'` sudo bash -c 'echo '$HOMEBREW_PREFIX/share/aclocal' >> `aclocal --print-ac-dir`/dirlist' I imagine you would want to do that after all your installs from the perl brew script. So what's the verdict on speed. By using cgminer on my *nix box rather than poclbm i picked up about 10Mhs, it seems to consistently run at 362. Now the bitforce fpga, seemed to run about 800 on average, sitting in the same place with the side cover off, and as high as 1000(on the mac). However, moving it to it's new location, it seems to be running consistently in the high 800s. What does this mean....Well I can't leave it hooked up to my mac all the time as it is a laptop I use for work and have to go places with it as such. However, it's new location on a wire shelf(ie a shelf less likely to get hot), it's side panels taken off, those are permenant. And when i finally reconnect it to the linux box, I will be using cgminter to run both my fpga and gpu. And next weekends experiment will be trying the bitforce with raspberry pi, and also switching them away from deepbit.net, and back to my favorite pool fireducks horrible horrendous terrible tremendous pool. PS My mac command looked like this: cgminer --scan-serial /dev/cu.usbserial-00001024 --url deeptbit.net:8332 --user dusty@safenachos_fam --pass hammer --verbose Reason being the /dev/tty.usbetc Didn't work, and I'm sure there is a duhuh explanation for why that is, but just in case you didn't know.

Thursday, January 3, 2013

Butterfly labs Preorder list sorted by name, rather than date

Someone on bitcointalk noticed that there were starting to be lots of doubles on the pre-order list, so I sorted them by name so you can see who has doubles.


Originally I got the list from here: Forums List

BOW BEFORE MY WASTED YOUTH…I MEAN SUPERIOR REGEXING SKILL:

User:Date Paid:Order Number:Trade-In (Y/N):Qty SC Jalapeno:Qty SC Little Single :Qty SC Single:Qty SC Mini Rig:Wait Time::User

(PIMP) :06/23/2012:1674:Y:0:0:8:0:-:Philj:(PIMP)
2GOOD :07/06/2012:-:N:0:1:0:0:-:2GOOD
2weiX :06/30/2012:2658:N:0:1:0:0:-:2weiX
420session :08/31/2012:6933:N:0:1:0:0:-:420session
6886 :10/24/2012:11682:N:1:0:0:0:-:6886
Aahzman :09/26/2012:9311:N:2:0:0:0:-:Aahzman
Acejam :07/26/2012:3980:N:0:0:4:0:-:Acejam
Akido :09/14/2012:8012:N:0:0:1:0:-:Akido
Akido :09/19/2012:8729:N:0:0:1:0:-:Akido
Alex AXe :07/04/2012:2807:N:1:0:0:0:-:Alex AXe
Atroxes :08/06/2012:4615:N:1:0:0:0:-:Atroxes
Aurics :08/03/2012:4423:N:0:0:1:0:-:Aurics
Azrael_PT :07/24/2012:3865:N:1:0:0:0:-:Azrael_PT
BMF (usagi) :09/11/2012:7839:N:1:0:0:0:-:BMF (usagi)
BMF (usagi) :09/13/2012:7971:N:0:0:1:0:-:BMF (usagi)
BMF (usagi) :09/19/2012:8670:N:1:0:0:0:-:BMF (usagi)
BTC-engineer :06/25/2012:2101:Y:0:0:2:0:-:BTC-engineer
BTC-engineer :06/28/2012:2430:N:0:0:2:0:-:BTC-engineer
BTC-engineer :08/01/2012:4260:N:0:0:2:0:-:BTC-engineer
BTC-engineer :08/04/2012:4494:N:0:0:2:0:-:BTC-engineer
Billington.mark :06/23/2012:1716:N:1:0:0:0:-:Billington.mark
BitMinerN8 :06/23/2012:1676:Y:0:0:4:0:-:BitMinerN8
BitMinerN8 :06/23/2012:1688:N:1:0:0:0:-:BitMinerN8
BitMinerN8 :06/23/2012:1691:Y:0:0:1:0:-:BitMinerN8
BlackPrapor :06/24/2012:1710:Y:0:0:0:2:-:BlackPrapor
BrimStone :06/23/2012:1817:N:-:-:-:-:-:BrimStone
BrimStone :06/28/2012:1817:Y:0:0:1:0:-:BrimStone
BrimStone :06/29/2012:2456:N:0:0:1:0:-:BrimStone
ChipGeek :08/08/2012:-:Y:0:0:1:0:-:ChipGeek
Chomp :08/16/2012:5515:N:0:0:2:0:-:Chomp
Chomp :08/24/2012:6148:N:1:1:0:0:-:Chomp
Crazyates :07/16/2012:3347:Y:0:0:1:0:-:Crazyates
Dargo :06/23/2012:1697:N:0:1:0:0:-:Dargo
Davincij15 :06/24/2012:1864:Y:0:0:3:0:-:Davincij15
Davincij15 :10/16/2012:11139:N:0:0:0:1:-:Davincij15
Davincij15 :10/18/2012:12466:N:3:0:0:0:-:Davincij15
Davincij15 :11/01/2012:12204:N:0:0:2:0:-:Davincij15
Deafboy :09/23/2012:9037:N:3:0:0:0:-:Deafboy
DiCE1904 :09/02/2012:-:N:2:0:0:0:-:DiCE1904
DrG :06/23/2012:1799:N:0:0:2:0:-:DrG
Eveofwar :08/09/2012:4923:N:2:0:0:0:-:Eveofwar
Fcx35x10 (Friend of) :09/07/2012:7476:N:1:0:0:0:-:Fcx35x10 (Friend of)
Fcx35x10 (Friend of) :09/23/2012:9116:N:0:0:1:0:-:Fcx35x10 (Friend of)
Fcx35x10 :09/06/2012:7431:N:0:0:1:0:-:Fcx35x10
Fcx35x10 :10/07/2012:10462:N:0:0:1:0:-:Fcx35x10
Fefox :06/23/2012:1772:Y:0:0:0:2:-:Fefox
Fefox :06/23/2012:1779:Y:0:0:3:0:-:Fefox
Fefox :06/25/2012:2125:N:1:0:0:0:-:Fefox
Garr255 :06/23/2012:1656:N:1:0:0:0:-:Garr255
Grouver :07/08/2012:2977:N:0:0:3:0:-:Grouver
Hfertig :08/05/2012:4574:N:1:0:0:0:-:Hfertig
InfiniTcell :09/01/2012:6973:Y:0:0:1:0:-:InfiniTcell
Insu Dra :08/27/2012:6300:N:1:0:2:0:-:Insu Dra
Iztrojan :09/18/2012:8658:N:0:1:0:0:-:Iztrojan
JWU42 :06/23/2012:1718:Y:0:0:0:1:-:JWU42
JWU42 :06/23/2012:1749:Y:0:0:2:0:-:JWU42
JWU42 :06/23/2012:1783:Y:0:0:4:0:-:JWU42
JackRabiit :10/25/2012:11757:N:1:0:0:0:-:JackRabiit
Jebus :07/02/2012:2642:Y:0:0:1:0:-:Jebus
Jebus :08/21/2012:5520:N:0:0:3:0:-:Jebus
Joshwaa :08/08/2012:4769:N:0:0:1:0:-:Joshwaa
Joshwaa :08/14/2012:5210:N:0:0:1:0:-:Joshwaa
K1773R :09/26/2012:9333:N:1:0:0:0:-:K1773R
KIDC :06/23/2012:1806:Y:0:0:6:0:-:KIDC
Keefe :06/23/2012:1700:N:0:0:2:0:-:Keefe
Keefe :06/23/2012:1846:N:1:0:0:0:-:Keefe
Khanduras :08/03/2012:4443:N:1:0:0:0:-:Khanduras
Kjlimo :07/06/2012:-:N:0:0:1:0:-:Kjlimo
Kjlimo :07/06/2012:-:Y:0:0:3:0:-:Kjlimo
Korbman :08/16/2012:5467:N:1:0:0:0:-:Korbman
KyleH :06/30/2012:2548:N:0:0:1:0:-:KyleH
KyleH :07/15/2012:3316:N:0:0:1:0:-:KyleH
LLight :06/25/2012:2043:N:1:0:0:0:-:LLight
LWCoder :06/24/2012:1931:Y:0:0:1:0:-:LWCoder
LWCoder :06/24/2012:1933:N:1:0:0:0:-:LWCoder
LivTru :07/05/2012:2675:Y:0:0:0:1:-:LivTru
LivTru :07/07/2012:2943:Y:0:0:1:0:-:LivTru
LivTru :08/16/2012:5502:Y:0:0:1:0:-:LivTru
Lotus :09/15/2012:8233:N:2:0:0:0:-:Lotus
Maidak :09/14/2012:8157:N:1:0:0:0:-:Maidak
Maidak :10/10/2012:10662:Y:0:0:1:0:-:Maidak
Mapuo :08/12/2012:5049:Y:1:0:0:0:-:Mapuo
MichaelBliss :08/17/2012:5617:Y:0:0:1:0:-:MichaelBliss
Michail1 :06/26/2012:1751:Y:0:0:0:1:-:Michail1
Miner99er :06/24/2012:1918:N:1:0:0:0:-:Miner99er
MooC Tals :10/12/2012:10833:N:0:0:1:0:-:MooC Tals
Mooc Tals :10/10/2012:10706:N:0:1:0:0:-:Mooc Tals
MoonShad0w384 :06/24/2012:2062:N:4:0:0:0:-:MoonShad0w384
Mushroomized :07/15/2012:3340:N:1:0:0:0:-:Mushroomized
NLA :10/19/2012:11113:N:0:0:0:1:-:NLA
OgNasty :06/23/2012:1657:Y:0:0:6:0:-:OgNasty
OgNasty :06/23/2012:1670:N:1:0:0:0:-:OgNasty
OgNasty :07/24/2012:3899:N:0:0:1:0:-:OgNasty
OgNasty :07/24/2012:3900:N:0:0:1:0:-:OgNasty
OmegaNemesis28 :07/09/2012:3063:N:-:-:-:-:-:OmegaNemesis28
OmegaNemesis28 :07/13/2012:3063:N:0:0:1:0:-:OmegaNemesis28
P!nk4sand :06/23/2012:-:N:0:0:3:0:-:P!nk4sand
Photon939 :06/27/2012:2293:N:2:0:0:0:-:Photon939
Phraust :06/23/2012:1715:Y:0:0:5:0:-:Phraust
Pinwheel :07/05/2012:2831:N:0:0:1:0:-:Pinwheel
RATM69 :10/15/2012:10811:N:0:0:2:0:-:RATM69
RATM69 :10/24/2012:11663:N:0:0:2:0:-:RATM69
SLok :08/05/2012:-:N:0:0:1:0:-:SLok
SgtMoth :08/11/2012:4996:N:1:0:0:0:-:SgtMoth
SgtMoth :09/06/2012:7357:N:1:0:0:0:-:SgtMoth
SgtMoth :09/19/2012:8685:N:1:0:0:0:-:SgtMoth
Shirik :06/23/2012:1706:N:2:0:0:0:-:Shirik
SimBesh :07/18/2012:3483:N:0:0:2:0:-:SimBesh
Soros Shorts :06/27/2012:2355:Y:0:0:1:0:-:Soros Shorts
Soros Shorts :08/31/2012:6936:Y:0:0:1:0:-:Soros Shorts
Soros Shorts :09/01/2012:6977:N:1:0:0:0:-:Soros Shorts
Soros Shorts :09/05/2012:7325:Y:0:0:1:0:-:Soros Shorts
Soros Shorts :09/14/2012:8116:N:0:0:1:0:-:Soros Shorts
Starlightbreaker :07/01/2012:2593:N:1:0:0:0:-:Starlightbreaker
Subo1978 :08/02/2012:4272:N:1:0:0:0:-:Subo1978
Subo1978 :09/19/2012:8639:N:0:0:1:0:-:Subo1978
SupaDupa :11/08/2012:12589:N:1:0:0:0:-:SupaDupa
Tachikoma :06/23/2012:1686:N:2:0:0:0:-:Tachikoma
TechCF :08/05/2012:4571:N:1:0:0:0:-:TechCF
Testit :08/13/2012:5177:N:5:0:0:0:-:Testit
The Joint :06/23/2012:1769:N:3:0:0:0:-:The Joint
Toresh :10/18/2012:11048:N:0:1:0:0:-:Toresh
Unacceptable :06/24/2012:1825:N:0:1:0:0:-:Unacceptable
UnderGod :09/13/2012:7978:N:1:0:0:0:-:UnderGod
Xian01 :06/24/2012:2030:N:0:0:1:0:-:Xian01
Xian01 :06/25/2012:2158:Y:0:0:1:0:-:Xian01
Zeek_W :10/04/2012:10170:N:1:0:0:0:-:Zeek_W
aigeezer :07/07/2012:2951:N:0:1:0:0:-:aigeezer
asdlsd :07/01/2012:2595:N:2:0:0:0:-:asdlsd
avidreader :07/18/2012:3540:N:0:0:0:2:-:avidreader
avidreader :07/20/2012:3621:N:3:0:0:0:-:avidreader
avidreader :07/24/2012:3724:N:0:0:3:0:-:avidreader
bitarrow :08/13/2012:5175:N:0:0:0:2:-:bitarrow
bitboyben :07/03/2012:2764:N:1:0:0:0:-:bitboyben
bitboyben :10/22/2012:11078:N:3:0:0:0:-:bitboyben
bitcoindaddy :06/27/2012:2363:N:0:0:1:0:-:bitcoindaddy
bitcoindaddy :06/28/2012:2442:N:0:0:1:0:-:bitcoindaddy
bitcoindaddy :07/04/2012:2777:N:1:0:0:0:-:bitcoindaddy
bitgirl :08/01/2012:4256:N:0:0:3:0:-:bitgirl
bonks :07/02/2012:2682:Y:0:0:2:0:-:bonks
bpd :07/01/2012:2624:N:1:0:0:0:-:bpd
bsdpunk :09/01/2012:6997:N:1:0:0:0:-:bsdpunk
bsdpunk :11/10/2012:12735:N:1:0:0:0:-:bsdpunk
burger :09/25/2012:9252:N:2:0:0:0:-:burger
chrisrico :07/16/2012:3421:N:1:0:0:0:-:chrisrico
crazyates :06/23/2012:-:Y:4:0:0:0:-:crazyates
dankroxel :06/26/2012:2150:N:0:0:3:0:-:dankroxel
dankroxel :08/09/2012:4886:N:0:0:3:0:-:dankroxel
dargo :06/23/2012:1679:N:0:0:1:0:-:dargo
dave3 :06/24/2012:1801:Y:0:0:2:0:-:dave3
davidspitzer :07/11/2012:3146:Y:8:0:0:0:-:davidspitzer
davidspitzer :07/11/2012:3147:Y:0:0:10:0:-:davidspitzer
davincij15 :09/06/2012:7423:N:0:0:3:0:-:davincij15
dickcheney :06/23/2012:1773:N:5:0:2:0:-:dickcheney
dust :06/25/2012:-:Y:0:0:0:1:-:dust
dyingdreams :07/26/2012:3976:N:1:0:0:0:-:dyingdreams
fatpan :07/22/2012:3758:N:2:0:0:0:-:fatpan
firefop :08/08/2012:4527:Y:0:0:1:0:-:firefop
freshzive :06/29/2012:2498:Y:0:0:1:0:-:freshzive
fulepp :06/29/2012:2360:Y:0:0:0:1:-:fulepp
fuxianhui888 :06/23/2012:1684:Y:0:0:2:0:-:fuxianhui888
fuxianhui888 :08/02/2012:4364:N:0:0:0:1:-:fuxianhui888
gades :09/27/2012:9424:N:1:0:0:0:-:gades
gigavps :06/23/2012:-:Y:0:0:0:4:-:gigavps
gtrrkicw :08/31/2012:6883:N:1:0:0:0:-:gtrrkicw
hacknoid :07/11/2012:3004:N:0:0:2:0:-:hacknoid
hakock :06/27/2012:1972:Y:0:0:1:0:-:hakock
happyland :08/16/2012:5511:N:0:0:2:0:-:happyland
hashalfahalve :09/04/2012:7119:Y:0:0:2:0:-:hashalfahalve
hausmarke :06/28/2012:-:Y:0:0:2:0:-:hausmarke
iztrojan :09/19/2012:8658:N:2:0:0:0:-:iztrojan
iztrojan :09/20/2012:8818:N:1:0:0:0:-:iztrojan
iztrojan :09/27/2012:9322:N:1:0:0:0:-:iztrojan
jojo69 :08/03/2012:4028:N:0:0:1:0:-:jojo69
jorgen :10/04/2012:10127:Y:0:0:1:0:-:jorgen
juggalodarkclow :06/28/2012:2473:Y:8:0:0:0:-:juggalodarkclow
kaneda2004 :06/27/2012:2176:N:0:0:1:0:-:kaneda2004
katie.mckinley :09/14/2012:8087:N:1:0:0:0:-:katie.mckinley
kibblesnbits :06/23/2012:1821:Y:0:0:1:0:-:kibblesnbits
kjlimo :06/24/2012:1870:Y:0:0:1:0:-:kjlimo
kjlimo :08/31/2012:6296:N:0:0:6:0:-:kjlimo
kjlimo :10/24/2012:11447:Y:0:0:4:0:-:kjlimo
kreal :06/24/2012:1964:N:0:0:1:0:-:kreal
kroneko :08/01/2012:4241:N:1:0:0:0:-:kroneko
kroneko :08/04/2012:4479:N:0:0:1:0:-:kroneko
kslavik :09/05/2012:7058:N:1:0:0:0:-:kslavik
kslavik :09/05/2012:7059:N:1:0:0:0:-:kslavik
kslavik :10/08/2012:10503:N:0:1:0:0:-:kslavik
laSeek :09/21/2012:8779:N:1:0:0:0:-:laSeek
leofar :06/24/2012:-:N:0:0:1:0:-:leofar
leofar :06/24/2012:1835:N:0:0:1:0:-:leofar
leofar :06/25/2012:1848:Y:0:0:3:0:-:leofar
leofar :06/30/2012:2451:Y:0:0:2:0:-:leofar
leofar :07/04/2012:2731:N:0:0:1:0:-:leofar
leofar :07/18/2012:3448:N:4:0:0:0:-:leofar
melco :07/02/2012:2194:N:0:0:2:0:-:melco
mentalove :07/02/2012:2423:N:0:0:1:0:-:mentalove
michaelmclees :08/28/2012:6314:N:1:0:0:0:-:michaelmclees
michaelmclees :08/29/2012:6637:N:0:1:0:0:-:michaelmclees
midnight :08/16/2012:5422:N:0:0:2:0:-:midnight
mightygoose :07/02/2012:2229:N:1:0:0:0:-:mightygoose
mikebob :06/23/2012:1714:N:1:0:0:0:-:mikebob
mikebob :06/23/2012:1722:Y:0:0:1:0:-:mikebob
mikeo :07/09/2012:3017:N:0:0:1:0:-:mikeo
mindphlux :06/23/2012:1838:N:0:0:9:0:-:mindphlux
miner3gazillionand8 :08/08/2012:4843:N:4:0:0:0:-:miner3gazillionand8
mitak64 :09/11/2012:7782:Y:0:0:1:0:-:mitak64
mitak64 :09/14/2012:8085:Y:0:0:1:0:-:mitak64
mohawk38 :07/17/2012:3226:N:0:0:1:0:-:mohawk38
mohawk38 :07/19/2012:3430:Y:0:0:1:0:-:mohawk38
mokahless :06/24/2012:1842:N:1:0:0:0:-:mokahless
monstrs :09/24/2012:9144:N:0:1:0:0:-:monstrs
mufa23 :08/27/2012:6386:N:1:0:0:0:-:mufa23
murasha :08/28/2012:6419:N:1:0:0:0:-:murasha
nedbert9 :07/17/2012:3295:Y:0:0:5:0:-:nedbert9
nedbert9 :07/19/2012:3626:Y:0:0:2:0:-:nedbert9
nederhoed :08/06/2012:4646:N:0:0:1:0:-:nederhoed
nederhoed :08/26/2012:6276:N:0:0:1:0:-:nederhoed
nederhoed :08/31/2012:6872:N:0:0:1:0:-:nederhoed
neiros :07/05/2012:2833:N:2:0:0:0:-:neiros
ninjaboon :08/15/2012:5284:N:2:0:0:0:-:ninjaboon
nomorecoin :08/05/2012:4565:N:0:1:0:0:-:nomorecoin
nomorecoin :10/04/2012:10169:N:1:0:0:0:-:nomorecoin
owdbetts :07/21/2012:3734:Y:0:0:1:0:-:owdbetts
phantitox :06/24/2012:2015:N:2:0:0:0:-:phantitox
psilan :06/28/2012:-:Y:0:0:1:0:-:psilan
pyromaniac :09/21/2012:8852:N:3:0:0:0:-:pyromaniac
ragnard :06/28/2012:2469:N:0:1:0:0:-:ragnard
real1510 :07/01/2012:2596:N:0:1:0:0:-:real1510
rjk :06/23/2012:1776:N:2:0:0:0:-:rjk
runlinux :06/23/2012:1824:N:1:0:0:0:-:runlinux
salfter :08/29/2012:6535:N:2:0:0:0:-:salfter
server :06/25/2012:2065:N:0:1:0:0:-:server
server :06/29/2012:2278:N:1:0:0:0:-:server
sexystick :07/05/2012:2741:N:0:0:2:0:-:sexystick
sexystick :08/21/2012:5912:N:0:0:2:0:-:sexystick
sgravina :06/24/2012:1814:N:0:0:0:0:-:sgravina
sgravina :07/13/2012:3242:N:0:0:1:0:-:sgravina
sickstarr :06/25/2012:2133:Y:16:0:0:0:-:sickstarr
sickstarr :06/25/2012:2137:Y:8:0:0:0:-:sickstarr
sickstarr :06/25/2012:2139:Y:8:0:0:0:-:sickstarr
smartlight :08/31/2012:6864:N:2:0:0:0:-:smartlight
somenick :06/25/2012:2119:Y:0:0:10:0:-:somenick
somenick :06/25/2012:2121:Y:0:0:6:0:-:somenick
somenick :08/06/2012:4626:Y:0:0:1:0:-:somenick
somenick :08/09/2012:4891:N:0:0:0:1:-:somenick
soniq :08/27/2012:6464:N:2:0:0:0:-:soniq
sysrun :06/23/2012:-:N:8:0:0:0:-:sysrun
tarrant_01 :07/09/2012:3028:Y:0:0:1:0:-:tarrant_01
tbcoin :08/16/2012:-:N:0:0:1:0:-:tbcoin
tbcoin :10/01/2012:-:N:0:0:0:1:-:tbcoin
tonto :10/18/2012:11302:N:1:0:0:0:-:tonto
tytus :08/18/2012:-:Y:0:0:0:1:-:tytus
uck :06/26/2012:2299:Y:0:0:1:0:-:uck
uck :08/08/2012:4839:Y:0:0:2:0:-:uck
uck :08/12/2012:5107:Y:0:0:0:1:-:uck
urlord :09/12/2012:7906:N:1:0:0:0:-:urlord
vapourminer :06/24/2012:1851:N:1:0:0:0:-:vapourminer
vom :07/29/2012:4093:N:1:0:0:0:-:vom
vom :08/03/2012:4446:N:1:0:0:0:-:vom
wksantiago :09/22/2012:9000:N:1:0:0:0:-:wksantiago
xxaudioxx :06/23/2012:1727:N:0:0:4:0:-:xxaudioxx
xxaudioxx :06/24/2012:1734:N:1:0:0:0:-:xxaudioxx
xxaudioxx :07/03/2012:2708:N:5:0:0:0:-:xxaudioxx
xxaudioxx :07/04/2012:2787:N:0:0:2:0:-:xxaudioxx
yogafan :07/19/2012:3550:N:3:0:0:0:-:yogafan
zikeji :10/11/2012:10797:N:1:0:0:0:-:zikeji

Sunday, July 31, 2011

Modified PHP bot for trading bitcoins on mtgox

General information about bitcoins (mtgox, mining, etc) here: http://bsdpunk.blogspot.com/2011/07/bitcoins-bitcoins-bitcoins.html

I've been messing around with bitcoin, and I found a bot at :
http://bitklein.com/bot.php

What I did was minimize the bot, and change it so it buys bit coins if they are less than 15 dollars, and I have over 60 bucks in my MtGox account.
If the bitcoins become worth over 24 dollars, sell all of them. I also have the mtgox bitcoin app on my phone in case I need to dump them.

function mtgox_query($path, array $req = array()) { 
   $key='yourkey';      //<----KEY! 
   $secret='yoursecret';   //<-SECRET! 
    
                   $mt = explode(' ', microtime()); 
                   $req['nonce'] = $mt[1].substr($mt[0], 2, 6); 
                   $post_data = http_build_query($req, '', '&'); 
                   $headers = array( 
                          'Rest-Key: '.$key, 
                          'Rest-Sign: '.base64_encode(hash_hmac('sha512', $post_data, base64_decode($secret), true)), 
                  ); 
                  static $ch = null; 
                  if (is_null($ch)) { 
                          $ch = curl_init(); 
                          curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
                         curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MtGox PHP client; '.php_uname('s').'; PHP/'.phpversion().')'); 
                  } 
                  curl_setopt($ch, CURLOPT_URL, 'https://mtgox.com/api/'.$path); 
                  curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); 
                  curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 
                  $res = curl_exec($ch); 
                  if ($res === false) throw new Exception('Could not get reply: '.curl_error($ch)); 
                  $dec = json_decode($res, true); 
                  if (!$dec) throw new Exception('Invalid data received, please ma 
  ke sure connection is working and requested API exists'); 
          return $dec; 
          } 
  $decoded=mtgox_query('0/getOrders.php?since=0'); 
  var_dump($decoded); 
  //print_r($decoded); 
 $seconds_wait = 40; 
  $truth =  TRUE; 
  while($truth){ 
          sleep($seconds_wait); 
          echo "----------------------------------------\n"; 
          $r=mtgox_query('0/getFunds.php'); 
          echo "USD TOTAL: ".$r['usds']."\n"; 
          echo "BTC TOTAL: ".$r['btcs']."\n\n"; 
          $decoded=mtgox_query('0/data/ticker.php'); 
  //      echo date('l jS \of F Y h:i:s A')."\n"; 
          echo "LAST:".$cur_last=$decoded['ticker']['last']."\n"; 
          echo "BUY:".$cur_buy=$decoded['ticker']['buy']."\n"; 
          echo "SELL:".$cur_sell=$decoded['ticker']['sell']."\n"; 
          echo "HIGH:".$cur_high=$decoded['ticker']['high']."\n"; 
          echo "AVERAGE:".$cur_avg=$decoded['ticker']['avg']."\n"; 
          echo "VWAP:".$cur_vwap=$decoded['ticker']['vwap']."\n\n"; 
   
  if(($r['usds'] > 60) && ($cur_buy < 15) ){ 
                  $amount= ($r['usds'] / $cur_buy); 
                  $amount = number_format($amount, 2, '.', ''); 
                  $price=$cur_buy; 
                  echo " PRICE: $price AMOUNT: $amount"; 
                  echo "Buying Bit coins to cancel transaction hit Ctrl C\n"; 
                  sleep(30); 
                  $req=array('amount'=>$amount,'price'=>$price); 
                  $decoded=mtgox_query('0/buyBTC.php',$req); 
                  echo "STATUS: ".$decoded['status']."\n"; 
  }                                
          if($cur_sell > 24 ){ 
                  echo "Selling Bitcoins\n"; 
                  $price = $cur_sell; 
                  $amount = $r['btcs']; 
                  $req=array('amount'=>$amount,'price'=>$price); 
                  $decoded=mtgox_query('0/sellBTC.php',$req); 
                  echo "STATUS: ".$decoded['status']."\n"; 
                  $truth = FALSE; 
          } 
  } 




You can get information about mtgox's api here, and about the bot: http://bsdpunk.blogspot.com/2011/07/bitcoin-software-for-mtgoxs-api.html


When I run this script I actually start a screen session, then type: php mtgox.php > mtgox.log
After that I open a terminal window and tail -f mtgox.log