Author

Topic: Cryptsy API simple Ticker (Read 6173 times)

legendary
Activity: 1596
Merit: 1006
October 15, 2013, 12:58:20 AM
#4
I know this was an old thread but I was playing with something similar.

I was able to set one up pretty quickly with the help from luke's post. I pasted the code below.


Code:
#!/usr/bin/env php
$c curl_init();
curl_setopt($cCURLOPT_RETURNTRANSFER1);
curl_setopt($cCURLOPT_HTTPHEADER, array('Accept: application/json''Content-Type: application/json'));
curl_setopt($cCURLOPT_URL'http://pubapi.cryptsy.com/api.php?method=marketdata');

$data curl_exec($c);
curl_close($c);
$obj json_decode($data);
echo 
print_r($obj->{'return'}->{'markets'}->{'ANC'}->{'lasttradeprice'}."\n"true);
?>


Thanks for sharing this. That I was looking for Smiley
member
Activity: 61
Merit: 10
August 26, 2013, 11:27:09 AM
#3
I know this was an old thread but I was playing with something similar.

I was able to set one up pretty quickly with the help from luke's post. I pasted the code below.


Code:
#!/usr/bin/env php
$c curl_init();
curl_setopt($cCURLOPT_RETURNTRANSFER1);
curl_setopt($cCURLOPT_HTTPHEADER, array('Accept: application/json''Content-Type: application/json'));
curl_setopt($cCURLOPT_URL'http://pubapi.cryptsy.com/api.php?method=marketdata');

$data curl_exec($c);
curl_close($c);
$obj json_decode($data);
echo 
print_r($obj->{'return'}->{'markets'}->{'ANC'}->{'lasttradeprice'}."\n"true);
?>
sr. member
Activity: 476
Merit: 250
August 15, 2013, 07:21:31 AM
#2
I found this article really helpful for getting the mtgox feed

https://coderwall.com/p/ksrula

I think you'll be able to edit it for different APIs
sr. member
Activity: 308
Merit: 250
verified ✔
August 15, 2013, 06:27:54 AM
#1
Need the String for a Cryptsy API get,


This URL throws all at me (i'm stupid, i know)

http://pubapi.cryptsy.com/api.php?method=marketdata

as far as i understand i could add more specific Values with &blabla=btc/anc&bla=bla

exp. http://pubapi.cryptsy.com/api.php?method=marketdata&blabla=btc/anc&bla=bla


How to create an GET Call for last sell price for Anoncoin ?


Jump to: