Author

Topic: Bitfinex API question (Read 161 times)

jr. member
Activity: 90
Merit: 3
December 17, 2017, 04:42:09 AM
#2
Hey,  I am currently using  "https://api.bitfinex.com/v1/pubticker/IOTBTC" to get the ticker info for IOTBTC.  I am also using the same command to get Ticker info for many of the other coin pairs.

I'm using php to request the data, but because I want info on many coins I end up sending many requests to the site, and get this error "Too Many Requests" if I run my script more than once every 17 seconds.

My Question:

    Is there a way, in php, to get the ticker info for every trade pair with one request sent to the website?

my code looks like this right now

$getIOTBTC = json_decode(file_get_contents("https://api.bitfinex.com/v1/pubticker/IOTBTC"), true);
$bidIOTBTC = $getIOTBTC['bid'];
$askIOTBTC = $getIOTBTC['ask'];


or if there are any other solutions to my problem, please share  Smiley


Thanks
You should check websocket api - all you need there - is subscribe to tickers and then listen to updates.
https://docs.bitfinex.com/docs/ws-general
newbie
Activity: 1
Merit: 0
December 16, 2017, 07:15:29 PM
#1
Hey,  I am currently using  "https://api.bitfinex.com/v1/pubticker/IOTBTC" to get the ticker info for IOTBTC.  I am also using the same command to get Ticker info for many of the other coin pairs.

I'm using php to request the data, but because I want info on many coins I end up sending many requests to the site, and get this error "Too Many Requests" if I run my script more than once every 17 seconds.

My Question:

    Is there a way, in php, to get the ticker info for every trade pair with one request sent to the website?

my code looks like this right now

$getIOTBTC = json_decode(file_get_contents("https://api.bitfinex.com/v1/pubticker/IOTBTC"), true);
$bidIOTBTC = $getIOTBTC['bid'];
$askIOTBTC = $getIOTBTC['ask'];


or if there are any other solutions to my problem, please share  Smiley


Thanks
Jump to: