Bitcoin Forum
July 18, 2024, 02:34:40 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: [1]
  Print  
Author Topic: worldcoinindex api  (Read 701 times)
lockepi (OP)
Sr. Member
****
Offline Offline

Activity: 469
Merit: 250


View Profile
January 26, 2016, 04:07:04 PM
 #1

i am using worldcoinindex.com api i get the prices but am struggling to get the correct percentage change for each currency the same as world coin index.

any help appreciated will pay for solution with working example
EngiNerd
Full Member
***
Offline Offline

Activity: 168
Merit: 100


View Profile
January 26, 2016, 04:12:43 PM
 #2

The percentage change depends on the time period you're viewing it over. It's not included in the API response, but all you'd need to do is just store the last price you retrieved and then compare Smiley If you just want the daily % change, you could just fetch all the prices once at the start of the day and compare all future requests to those.

Another (dirtier) option would be manually scrapping it from the main page.

Patatas
Legendary
*
Offline Offline

Activity: 1750
Merit: 1115

Providing AI/ChatGpt Services - PM!


View Profile
January 26, 2016, 08:52:20 PM
 #3

There might be a problem with your parser.Open your Console (preferably Google Chrome) and check the GET requests with the time delays.If you could send me the code or post it here I would have the clear idea of the bug.
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!