Bitcoin Forum
May 02, 2024, 04:53:32 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 ... 149 »
  Print  
Author Topic: **CEX.IO Bitcoin Exchange ** Buy Bitcoins with Cards in iOS / Android App***  (Read 422130 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
tk1337
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
October 27, 2013, 05:05:34 PM
 #21

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:

Code:
<?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($chCURLOPT_RETURNTRANSFERtrue);
                
curl_setopt($chCURLOPT_USERAGENT'Mozilla/4.0 (compatible; BTCE PHP client; '.php_uname('s').'; PHP/'.phpversion().')');
        }
        
curl_setopt($chCURLOPT_URL'https://cex.io/api/place_order/GHS/BTC');
        
curl_setopt($chCURLOPT_POSTFIELDS$post_data);
        
curl_setopt($chCURLOPT_HTTPHEADER$headers);
        
curl_setopt($chCURLOPT_SSL_VERIFYPEERFALSE);
 
        
// run the query
        
$res curl_exec($ch);
        if (
$res === false) throw new Exception('Could not get reply: '.curl_error($ch));
        
$dec json_decode($restrue);
        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.
1714625612
Hero Member
*
Offline Offline

Posts: 1714625612

View Profile Personal Message (Offline)

Ignore
1714625612
Reply with quote  #2

1714625612
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
papaminer
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250


Free World


View Profile WWW
October 27, 2013, 05:21:11 PM
 #22

@CEX

Is it possible to support SCRYPT-BASED MINERS?

Like LiteCoin?


฿: 1L7dSte4Rs4KyyxRCgrqSWYtkXdAb4Gy1z

MORE INFO ABOUT ME: BTC
kickbit
Sr. Member
****
Offline Offline

Activity: 276
Merit: 250


In Blockchain We Trust!


View Profile WWW
October 27, 2013, 08:17:28 PM
 #23

@CEX

Is it possible to support SCRYPT-BASED MINERS?

Like LiteCoin?



I think no, it's all about bitcoins Smiley

BitMedia.IO - Advertise Your Bitcoin Project!

Realtime Bitcoin Price! Search - "Bitcoin price for Chrome" in Chrome App Store!
CEX (OP)
Legendary
*
Offline Offline

Activity: 1227
Merit: 1003



View Profile WWW
October 27, 2013, 09:01:17 PM
 #24

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:

Code:
<?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($chCURLOPT_RETURNTRANSFERtrue);
                
curl_setopt($chCURLOPT_USERAGENT'Mozilla/4.0 (compatible; BTCE PHP client; '.php_uname('s').'; PHP/'.phpversion().')');
        }
        
curl_setopt($chCURLOPT_URL'https://cex.io/api/place_order/GHS/BTC');
        
curl_setopt($chCURLOPT_POSTFIELDS$post_data);
        
curl_setopt($chCURLOPT_HTTPHEADER$headers);
        
curl_setopt($chCURLOPT_SSL_VERIFYPEERFALSE);
 
        
// run the query
        
$res curl_exec($ch);
        if (
$res === false) throw new Exception('Could not get reply: '.curl_error($ch));
        
$dec json_decode($restrue);
        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);

?>


Hey!
Here is a working example.
http://pastebin.com/h1TrCJD1

Buy/sell BTC and ETH using your Visa/Mastercard. Instant payments, low fees, worldwide coverage, 100% secure. Register
Join Bitcoin Affiliate program! Invite users and get 30% lifetime bonus. Join now
CEX (OP)
Legendary
*
Offline Offline

Activity: 1227
Merit: 1003



View Profile WWW
October 27, 2013, 09:04:05 PM
 #25

@CEX

Is it possible to support SCRYPT-BASED MINERS?

Like LiteCoin?



I think no, it's all about bitcoins Smiley

Bitfury ASIC can only calculate SHA-256 hashes, that is why we can not mine litecoins.

Best Reagards,
CEX.IO

Buy/sell BTC and ETH using your Visa/Mastercard. Instant payments, low fees, worldwide coverage, 100% secure. Register
Join Bitcoin Affiliate program! Invite users and get 30% lifetime bonus. Join now
Jude Austin
Legendary
*
Offline Offline

Activity: 1140
Merit: 1000


The Real Jude Austin


View Profile WWW
October 27, 2013, 09:25:40 PM
 #26

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:

Code:
<?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($chCURLOPT_RETURNTRANSFERtrue);
                
curl_setopt($chCURLOPT_USERAGENT'Mozilla/4.0 (compatible; BTCE PHP client; '.php_uname('s').'; PHP/'.phpversion().')');
        }
        
curl_setopt($chCURLOPT_URL'https://cex.io/api/place_order/GHS/BTC');
        
curl_setopt($chCURLOPT_POSTFIELDS$post_data);
        
curl_setopt($chCURLOPT_HTTPHEADER$headers);
        
curl_setopt($chCURLOPT_SSL_VERIFYPEERFALSE);
 
        
// run the query
        
$res curl_exec($ch);
        if (
$res === false) throw new Exception('Could not get reply: '.curl_error($ch));
        
$dec json_decode($restrue);
        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);

?>


Hey!
Here is a working example.
http://pastebin.com/h1TrCJD1

Yeah, I finally got it working.

Thanks.

Buy or sell $100 of Crypto and get $10!
papaminer
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250


Free World


View Profile WWW
October 27, 2013, 09:42:48 PM
 #27

@CEX

Is it possible to support SCRYPT-BASED MINERS?

Like LiteCoin?



I think no, it's all about bitcoins Smiley

Bitfury ASIC can only calculate SHA-256 hashes, that is why we can not mine litecoins.

Best Reagards,
CEX.IO


I understand... and I know there are no ASICs for alt-crypt yet...

but I am talking about hosted scrypt-based miners... The old RIGs type of miners... you know... mobos/ram/hd/cpu/gpu... (IN THE CLOUD)...

Smiley

฿: 1L7dSte4Rs4KyyxRCgrqSWYtkXdAb4Gy1z

MORE INFO ABOUT ME: BTC
ny2cafuse
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002


HODL for life.


View Profile
October 28, 2013, 01:51:50 AM
 #28

CEX,

   You could probably make a killing if you guys offered scrypt based cloud-mining.  If CryptoIndustries gets machines out the door, they would make a killing on your site.  A dozen or so Horus units and shares for 100-200khs/share.  I'd definitely buy in if you guys ever went that route.  Here's a link to the Horus.

http://www.cryptoindustries.com/?product=horus-10mh

-fuse

Community > Devs
bitdigger2013
Sr. Member
****
Offline Offline

Activity: 397
Merit: 250



View Profile WWW
October 28, 2013, 03:47:27 AM
 #29

Just trying to understand the fees.

Your saying 0.001 BTC/GHS/HOUR?

so for 24 hours of mining at 1 GHS the fee will be about 0.024BTC?

Let me know if I am do the math correctly.

ny2cafuse
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002


HODL for life.


View Profile
October 28, 2013, 03:50:03 AM
 #30

Just trying to understand the fees.

Your saying 0.001 BTC/GHS/HOUR?

so for 24 hours of mining at 1 GHS the fee will be about 0.024BTC?

Let me know if I am do the math correctly.



No, you read it wrong.  It's $0.001, as in a tenth of a penny.

Community > Devs
PatMan
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1000


Watch out for the "Neg-Rep-Dogie-Police".....


View Profile WWW
October 28, 2013, 02:50:44 PM
 #31

BTC0.1027 per G/h? That's just nuts  Roll Eyes

"When one person is deluded it is called insanity - when many people are deluded it is called religion" - Robert M. Pirsig.  I don't want your coins, I want change.
Amazon UK BTC payment service - https://bitcointalk.org/index.php?topic=301229.0 - with FREE delivery!
http://www.ae911truth.org/ - http://rethink911.org/ - http://rememberbuilding7.org/
davecoin
Hero Member
*****
Offline Offline

Activity: 816
Merit: 1000


View Profile
October 28, 2013, 02:54:53 PM
 #32

Just trying to understand the fees.

Your saying 0.001 BTC/GHS/HOUR?

so for 24 hours of mining at 1 GHS the fee will be about 0.024BTC?

Let me know if I am do the math correctly.



No, you read it wrong.  It's $0.001, as in a tenth of a penny.

Correct, it's $0.024 per day per GH.  This amounts to $1.00 per kWh.
mobile
Sr. Member
****
Offline Offline

Activity: 400
Merit: 250


the sun is shining, but the ice is still slippery


View Profile
October 28, 2013, 04:52:48 PM
 #33

Dear CEX users,
There were some minor data-center issues, which resulted 0 hash power for some time.
However everything is fixed now, and ALL users will be compensated for their losses, to make sure you are 100% happy with our service.

I am glad you like our service, we will keep it up an running for your benefit Wink



Just saw this. Compensation from data center downtime? Wow!
This speaks volumes. Well done CEX. Cheers...

1MoBi1eNbqh8QMuvtZjYzQGV8NEckJJYcT rep|GnuPG <3 CLAM <3
CEX (OP)
Legendary
*
Offline Offline

Activity: 1227
Merit: 1003



View Profile WWW
October 28, 2013, 05:17:16 PM
 #34

Dear CEX users,
The maintenance fee will be less.
We are just running some final calculations, and will get back with exact information soon.

Buy/sell BTC and ETH using your Visa/Mastercard. Instant payments, low fees, worldwide coverage, 100% secure. Register
Join Bitcoin Affiliate program! Invite users and get 30% lifetime bonus. Join now
PatMan
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1000


Watch out for the "Neg-Rep-Dogie-Police".....


View Profile WWW
October 28, 2013, 05:20:45 PM
 #35

Nice one  Grin

Can you lower the G/h price too?......... Cheesy Cheesy

"When one person is deluded it is called insanity - when many people are deluded it is called religion" - Robert M. Pirsig.  I don't want your coins, I want change.
Amazon UK BTC payment service - https://bitcointalk.org/index.php?topic=301229.0 - with FREE delivery!
http://www.ae911truth.org/ - http://rethink911.org/ - http://rememberbuilding7.org/
CEX (OP)
Legendary
*
Offline Offline

Activity: 1227
Merit: 1003



View Profile WWW
October 28, 2013, 05:49:32 PM
 #36

haha) Nice try Wink

Buy/sell BTC and ETH using your Visa/Mastercard. Instant payments, low fees, worldwide coverage, 100% secure. Register
Join Bitcoin Affiliate program! Invite users and get 30% lifetime bonus. Join now
PatMan
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1000


Watch out for the "Neg-Rep-Dogie-Police".....


View Profile WWW
October 28, 2013, 05:54:30 PM
 #37

DOH!!   Busted  Tongue

"When one person is deluded it is called insanity - when many people are deluded it is called religion" - Robert M. Pirsig.  I don't want your coins, I want change.
Amazon UK BTC payment service - https://bitcointalk.org/index.php?topic=301229.0 - with FREE delivery!
http://www.ae911truth.org/ - http://rethink911.org/ - http://rememberbuilding7.org/
PaulC2K
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
October 28, 2013, 07:02:10 PM
 #38

@CEX

I registered last weekend and was very unimpressed, i was sent there by a friend without really knowing anything and just assumed it was in early beta, because the site is like 90% empty, unpopulated.
I mentioned this to said friend last night and he gave me his login so i could see what its about, but again, empty. Firefox, Chrome, IE... empty.

I fired up my remote connection into my homeserver and tried through that, and its all there as i'd been told it was.

I've just found out that Malwarebytes is basically blocking your site, i used Firebug to look for errors and this seems to be what is picking up on:

ReferenceError: io is not defined
var socketio = io.connect('https://ws.cex.io/');
www.cex.io (line 527)

What is thats going on there which is causing MB to block your IP address, and (before adding to ignore list) basically turn your website into a content-less waste of space when visiting it.
PatMan
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1000


Watch out for the "Neg-Rep-Dogie-Police".....


View Profile WWW
October 28, 2013, 07:08:48 PM
 #39

False positive by any chance?

https://www.virustotal.com/en-gb/url/209b3949abf26e9ba67cb3ca17ccfbc41a2d198a3f5fb0efd8c64220c45bb274/analysis/1382987137/

VirusTotal also uses MB & it comes up clean - so maybe your MB settings are wrong - or you've got a virus yourself.... Wink

"When one person is deluded it is called insanity - when many people are deluded it is called religion" - Robert M. Pirsig.  I don't want your coins, I want change.
Amazon UK BTC payment service - https://bitcointalk.org/index.php?topic=301229.0 - with FREE delivery!
http://www.ae911truth.org/ - http://rethink911.org/ - http://rememberbuilding7.org/
papaminer
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250


Free World


View Profile WWW
October 28, 2013, 07:18:06 PM
 #40

I mentioned that virus thing too...

here:

https://bitcointalk.org/index.php?topic=318010.msg3418826#msg3418826

฿: 1L7dSte4Rs4KyyxRCgrqSWYtkXdAb4Gy1z

MORE INFO ABOUT ME: BTC
Pages: « 1 [2] 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 ... 149 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!