Hello everyone! I am currently working on a UI for CEX.IO. I am having a little trouble with the trading part tho. Would anyone be willing to help me with that part? All I need is a single PHP script that I can set type, amount, and price and send it over the API. I tried and tried but I just don't understand what I am doing wrong. Something like this would be perfect: <?php function cex_query($method, array $req = array()) { // API settings $key = ''; // your API-key $secret = ''; // your Secret-key $req['method'] = $method; $mt = explode(' ', microtime()); $req['nonce'] = $mt[1]; // generate the POST data string $post_data = http_build_query($req, '', '&'); $sign = hash_hmac('sha512', $post_data, $secret); // generate the extra headers $headers = array( 'Sign: '.$sign, 'Key: '.$key, ); // our curl handle (initialize if required) 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; BTCE PHP client; '.php_uname('s').'; PHP/'.phpversion().')'); } curl_setopt($ch, CURLOPT_URL, 'https://cex.io/api/place_order/GHS/BTC'); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // run the query $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 make sure connection is working and requested API exists'); return $dec; }
$result = cex_query('Trade', array('type' => 'buy', 'amount' => 1, 'price' => 10)); var_dump($result);
?> Just after a quick glance, I would say, you're not setting the headers correctly, probably should define a content type, maybe a few other things. Granted, I haven't looked much at the API and I am half-awake atm.
|
|
|
Check your safe range for power on the usb hub... http://usbminer.tk1337.com/Should help some people out, it allows for a 0.5watt overhead for a 'safe range'.
|
|
|
If you're using a RaspberryPi w/MinePeon or any USB 2.0 hub and would like to know what's a safe range for your hub, go here: http://usbminer.tk1337.com. (It assumes 0.5w extra overhead for 'safe' range.) I've seen too many random issues due to people not understanding what is a safe range for their hub's when using RaspberryPi's, so I decided to throw this together earlier today, thinking about adding a checkbox so you can take off the 'safe range'/0.5w overhead, it's already in the code, just didn't put the checkbox there.
|
|
|
1) Just announced 2) We are two weeks late. We first planned on shipping mid October 3) Maidak is selling at less then it cost to buy from us. That price is only for his last 20 units.
Beastlymac & ssinc thank you for the compensation. I figured Maidak was selling his own personal units earlier when he was offering a certain # of units a few days ago for below GB costs, I was going to PM him about this (and possibly buy some) but at the time production wasn't started, so I was still unsure about ordering more. Hope to be up and running with BlueFury's soon
|
|
|
Well, ssinc did say compensation was stated for tomorrow (today); It is quite possible since he, nor Beastlymac, nor anyone (on compensation from what I can tell) has posted yet regarding what said compensation is, we still have about 5.5 hours (EST) (8.5 hrs PST) left in the day before jumping the gun, it would be nice to give them time to announce compensation.
Not everyone lives on the computer, some people do tend to have lives outside the digital realm.
|
|
|
The version of BFGMiner in 2.4.0 PR1 (or PR2) does come compiled with libmicrohttpd, you will just need to add the http-port option to the minepeon.conf.
Well that makes it easy, Thanks for the info. I sold my hubs and usb asic's and am replacing them with a couple blades and a drillbit 8 board when they start shipping. I can't wait for the drillbit boards to start shipping Hopefully I'll see my bluefury miners next week as well...
|
|
|
I've noticed over the past couple days even, that you all have been working on the site. I must say, so far it's looking great... I'm curious to know more about use of 'Shareholders' from within GHash.IO, as of right now (and judging by some of the comments in the support forums) no one quiet knows how to use the feature (or if it's even a usable feature at this point and time). I ask this as I'm trying to look for an easy solution to hosting equipment (semi-privately) and have the earnings split between "shareholders". Which from what I could gather is essentially what this feature should do? (please correct me if I'm wrong here...). I almost feel like creating an iOS app for this API... almost... lol
|
|
|
I am pretty confident that Beastly and the boys running the BlueFury's will get the units shipped as fast as humanly possible to the resellers... here is hoping people will have a little more patience while this gets sorted having worked with them before their first concern is making sure they do whatever is required to get them out to you all and if they have said compensation is coming trust me they will get that to you as soon as the shipping is complete. You are dealing with straightforward and honest people and they will rectify this.
Agree +1, Agree'd
|
|
|
I have some left over screens, everything is soldered & ready for you to plug on to your RaspberryPi. RGB Negative LCD VideoRGB Positive LCD VideoRetail on each screen is $25 (as a kit, not soldered)... Would like to get them off my work-bench, so BTC0.1250 including shipping within the US I also have a lot of random spare RaspberryPi Cases (lol): 6x 4x RaspberryPi Cases, each one @ BTC0.0503 including shipping within the US (the 3x custom 3D-printed cases cost me $60 alone) - All the cases you can fit an LCD on to, the 3D cases were made for the LCD, the other 3 have GPIO access which you can attach the LCD on the outside of the case through the GPIO access. 2x One From ModMyPi.com - Bought them before RaspberryPi's even got released, fits both versions, my order actually got lost in the mail (shipped from UK) then ended up finding me almost a year later. 1x Adafruit Cyrstal Blue Case3x Custom 3D Printed Cases - I had these prototyped locally, each one is a little different case #4 (black) hasn't been modified, case #5 (black) was modified with a SD card cut out, rear holes drilled for extra venting, and power adapter hole made so you didn't need to unplug the rPi to put in or out of the case. Case #6 (blue) was shaved down on the back side to make it flush. PM or Post if interested.
|
|
|
I Think we need either a response about what te compensation will be or a refund....
Compensation is being offered tomorrow! BTW I have shipment confirmation for a partial order (FIFO) and a guarantee that the rest will all be shipped Next WEEK! Sorry for the delays everyone but you will be shipped product next week. Have a good weekend everyone
|
|
|
@tk1377 you mentioned a while back you were getting a some asic blade's. You get them up and running yet with minepeon?
yes, without any issues using BFGMiner as a proxy. Any specific issues that you're running into? No just wondering how to set it up on mine peon. I have a blade on the way to me in the mail. I have been reading and it seems the way to run these is through a stratum proxy. Is the version of bfgminer used in the latests beta complied with the needed micro http support? Do I just need to edit the miner start up command to turn it on? The version of BFGMiner in 2.4.0 PR1 (or PR2) does come compiled with libmicrohttpd, you will just need to add the http-port option to the minepeon.conf.
|
|
|
@tk1377 you mentioned a while back you were getting a some asic blade's. You get them up and running yet with minepeon?
yes, without any issues using BFGMiner as a proxy. Any specific issues that you're running into?
|
|
|
This might be too far fetched, but,
I have a cgminer instance on my network with the api enabled. I want to be able to pull stats into minepeon, just as the local cgminer does.
Can this be done? Getting the LCD to work was easy since I just had to specify the api IP on the network.
Yes it can be done, I was doing it for awhile, just takes some modifying of the Python script.
|
|
|
Might be interested in the one w/o a power supply... what are you trying to get for it?
|
|
|
@Barntech sent you a PM, have a few questions before I order, if you could get back to me soon it would be much appreciated so I can place the order thanks.
|
|
|
It looks pretty slick, however I wish the import wallet feature was working.
Good job though thus far.
|
|
|
damn... I guess I should have waited a day before buying that last set from ya I figured they'd still go down, but not a cut-in-half, damn it It's not that bad if you converted your USD-to-BTC to get these USBs. You only lost 20-30 % as compared to what you think! Maybe ? My order is in! Thanks SSB! I haven't converted USD to BTC in awhile.
|
|
|
damn... I guess I should have waited a day before buying that last set from ya I figured they'd still go down, but not a cut-in-half, damn it
|
|
|
How about 64 USB Erupters + a BFL Jalapeno?? Added the jalapeno a couple days ago, but 64 are a star configuration to a single rhb-500 root hub, that root hub feeds the rPi (the white cable goes to the BFL Jalapeno). ------------------------------------------------------------ Great setup! Can I ask what is powering the fans? Peace. the fans are being powered by a 12v (if memory serves me right it's a 12v 1a, but possibly a 12v 2a) power adapter I converted long ago for another project to a 4-pin molex with a voltage regulator to step down the 12v to a 5v on the 5v output (so it acts as a typical 4-pin molex, 12v (yellow) - ground (black) - ground (black) - 5v (red) ) - which I have going into a 4-pin to 6x 3pin fan split, it seemed to run all the fans at full speed without any problems (versus using a PSU which did the same thing).
|
|
|
|