Bitcoin Forum
December 14, 2024, 07:40:00 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitfinex API question  (Read 157 times)
zadrel (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
December 17, 2017, 12:15:29 AM
 #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
Daemon_Hell
Jr. Member
*
Offline Offline

Activity: 90
Merit: 3


View Profile WWW
December 17, 2017, 09: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
Pages: [1]
  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!