Bitcoin Forum
May 06, 2024, 12:04:55 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitfinex API question  (Read 120 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
1714997095
Hero Member
*
Offline Offline

Posts: 1714997095

View Profile Personal Message (Offline)

Ignore
1714997095
Reply with quote  #2

1714997095
Report to moderator
1714997095
Hero Member
*
Offline Offline

Posts: 1714997095

View Profile Personal Message (Offline)

Ignore
1714997095
Reply with quote  #2

1714997095
Report to moderator
1714997095
Hero Member
*
Offline Offline

Posts: 1714997095

View Profile Personal Message (Offline)

Ignore
1714997095
Reply with quote  #2

1714997095
Report to moderator
In order to achieve higher forum ranks, you need both activity points and merit points.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
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!