This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
marx2k
Voice
Posts: 10 Joined: Sun Jan 23, 2011 10:34 am
Post
by marx2k » Fri Jun 10, 2011 8:23 am
It would be amazing if there was a script that would take the BitCoin market exchange rate from MtGox and provide a public trigger to display the data.
Their public API can be used here:
https://mtgox.com/support/tradeAPI
Speicifically, ticker JSON results can be attained from :
http://mtgox.com/code/data/ticker.php
Perhaps a public trigger such as: !bc
Information can look like:
BitCoin Last Trade Data -- High: 31.5, Low: 25.626, Vol: 44193, Buy: 26.6, Sell: 26.7899, Last: 26.79
Perhaps have it configurable for single or multi-line.
Also... colors!
marx2k
Voice
Posts: 10 Joined: Sun Jan 23, 2011 10:34 am
Post
by marx2k » Fri Jun 24, 2011 7:11 pm
?? nobody?
marx2k
Voice
Posts: 10 Joined: Sun Jan 23, 2011 10:34 am
Post
by marx2k » Fri Jun 24, 2011 10:19 pm
Hm, never mind. I guess mtgox has crapped out and is no longer offering the API I linked to :/
pitbull
Voice
Posts: 13 Joined: Sun Aug 12, 2007 12:12 pm
Post
by pitbull » Sat Dec 31, 2011 9:45 pm
Here's something I scratched together to do this in our chan. Thanks to speechless for the http/ssl part (the bulk of the code, really).
Code: Select all
package require http
package require tls
http::register https 443 [list ::tls::socket -require 0 -request 1]
proc s:wget { url } {
http::config -useragent "Mozilla/EggdropWget"
catch {set token [http::geturl $url -binary 1 -timeout 10000]} error
if {![string match -nocase "::http::*" $error]} {
s:debug "Error: [string totitle [string map {"\n" " | "} $error]] \( $url \)"
return 0
}
if {![string equal -nocase [::http::status $token] "ok"]} {
s:debug "Http error: [string totitle [::http::status $token]] \( $url \)"
http::cleanup $token
return 0
}
if {[string match "*[http::ncode $token]*" "303|302|301" ]} {
upvar #0 $token state
foreach {name value} $state(meta) {
if {[regexp -nocase ^location$ $name]} {
if {![string match "http*" $value]} {
if {![string match "/" [string index $value 0]]} {
set value "[join [lrange [split $url "/"] 0 2] "/"]/$value"
} else {
set value "[join [lrange [split $url "/"] 0 2] "/"]$value"
}
}
s:wget $value
return
}
}
}
if {[string match 4* [http::ncode $token]] || [string match 5* [http::ncode $token]]} {
s:debug "Http resource is not evailable: [http::ncode $token] \( $url \)"
return 0
}
set data [http::data $token]
http::cleanup $token
return $data
}
bind pub - !btc get_bitcoin
proc get_bitcoin {nick uhost handle chan arg} {
set data2 [s:wget https://mtgox.com/api/0/data/ticker.php]
set btc [regexp {high\":(.*?),\"low\":(.*?),\"avg\":(.*?),\"vwap\":.*?,\"vol\":(.*?),\"last_all\":.*?,\"last_local\":.*?,\"last\":.*?,\"buy\":(.*?),\"sell\":(.*?)\}} $data2 match btchigh btclow btcavg btcvol btcbuy btcsell]
putserv "PRIVMSG $chan :\002Bitcoin Market Data\002 (MtGox): High: \$$btchigh Low: \$$btclow Volume: $btcvol Buy: \$$btcbuy Sell: \$$btcsell"
}
khalidxpert
Voice
Posts: 18 Joined: Sat Jan 26, 2008 2:03 am
Post
by khalidxpert » Fri Mar 23, 2018 12:24 pm
hi there
i am getting error tls please help me to install bitcoin.tcl how i can fix tls problem
khalidxpert
Voice
Posts: 18 Joined: Sat Jan 26, 2008 2:03 am
Post
by khalidxpert » Wed Feb 12, 2020 8:10 am
khalidxpert wrote: hi there
i am getting error tls please help me to install bitcoin.tcl how i can fix tls problem
i am also getting tls error any one will help ?
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Thu Feb 13, 2020 1:37 am
There's nothing that can be fixed at this moment since mtgox.com is down. Find another website that offers this service and we can take it from there.
Once the game is over, the king and the pawn go back in the same box.
ComputerTech
Master
Posts: 399 Joined: Sat Feb 22, 2020 10:29 am
Contact:
Post
by ComputerTech » Mon May 04, 2020 3:43 pm
hmm check out blackshadow's new currency.tcl
Last edited by
ComputerTech on Mon Aug 10, 2020 11:22 pm, edited 1 time in total.
ComputerTech
Dominatez
Halfop
Posts: 50 Joined: Mon Jan 14, 2019 5:08 pm
Location: United Kingdom
Post
by Dominatez » Tue May 26, 2020 6:16 pm
caesar wrote: There's nothing that can be fixed at this moment since mtgox.com is down. Find another website that offers this service and we can take it from there.
https://www.coingecko.com
They don't even use an api because they say all info should be free.