egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bitcoin pool BTCGuild api statistic in channel or notice

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
VoodooServ
Voice


Joined: 27 Oct 2013
Posts: 7
Location: Bulgaria / Pleven

PostPosted: Tue Dec 09, 2014 10:55 pm    Post subject: Bitcoin pool BTCGuild api statistic in channel or notice Reply with quote

Hi people. I need eggdrop tcl for Bitcoin pool BTCGuild api statistic in channel or notice.
Back to top
View user's profile Send private message Visit poster's website
dutch1918
Voice


Joined: 30 Jul 2014
Posts: 14

PostPosted: Sun Dec 28, 2014 11:08 am    Post subject: Reply with quote

Not sure what your looking for but assume this:

Code:

proc bcp { min hour day month weekday } {
   set query "https://api.bitcoinaverage.com/ticker/global/USD/"
   ::http::register https 443 [list ::tls::socket -require 0 -request 1]
   http::config -useragent {Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320)}
   set token [http::geturl $query -timeout 6000]
   set rawData [http::data $token]
   http::cleanup $token
   regexp -nocase {"24h_avg":([^\,]*)} $rawData noop avg
   regexp -nocase {"ask":([^\,]*)} $rawData noop ask
   regexp -nocase {"bid":([^\,]*)} $rawData noop bid
   regexp -nocase {"last":([^\,]*)} $rawData noop last
   regexp -nocase {"timestamp":\s?"([^\"]*)} $rawData noop timestamp
   putserv "PRIVMSG $channel :\0030,12BITCOIN\017\00303 24hr Average\017 \002$avg\017 |\00312 Last \017\002$last\017 |\00303 Bid \017\002$bid\017 |\00304 Ask \017\002$ask\017 | $timestamp"
}

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber