Bitcoin Forum
September 15, 2024, 04:47:09 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Mining / Re: CEX.IO-I You Show Me Yours and I will Show You Mine. on: November 20, 2013, 04:31:27 AM
2  Economy / Service Discussion / R Script for CEX.IO Trades on: November 19, 2013, 02:55:21 PM
I thought I would share the script I made to plot CEX.IO data.  You can change the date and time ranges by adding a since parameter to the URL or by changing the bucket size.

Code:
library("rjson")
library("quantmod")

# Add a since parameter here to plot for a certain date range
json_file <- "https://cex.io/api/trade_history/GHS/BTC"
json_data <- fromJSON(paste(readLines(json_file), collapse=""))

cexio <- json_data

trades <- do.call(rbind.data.frame, cexio)

# Change the bucket size here
trades$bucket <- floor(as.integer(trades$date) / (60*5))
buckets <- unique(trades$bucket)

cexio.Dates <- lapply(buckets, function(x){
  first(as.integer(as.character(trades[trades$bucket == x,]$date)))
})
cexio.Open <- lapply(buckets, function(x){
  first(as.double(as.character(trades[trades$bucket == x,]$price)))
})
cexio.High <- lapply(buckets, function(x){
  max(as.double(as.character(trades[trades$bucket == x,]$price)))
})
cexio.Low <- lapply(buckets, function(x){
  min(as.double(as.character(trades[trades$bucket == x,]$price)))
})
cexio.Close <- lapply(buckets, function(x){
  last(as.double(as.character(trades[trades$bucket == x,]$price)))
})
cexio.Volume <- lapply(buckets, function(x){
  sum(as.double(as.character(trades[trades$bucket == x,]$amount)))
})

CEX <- data.frame(
  "Open" = as.double(cexio.Open),
  "High" = as.double(cexio.High),
  "Low" = as.double(cexio.Low),
  "Close" = as.double(cexio.Close),
  "Volume" = as.double(cexio.Volume)
)

CEX <- as.xts(CEX, order.by=as.POSIXlt(unlist(cexio.Dates), origin="1970-01-01", tz="GMT"))

chartSeries(CEX)
addMACD()
addBBands()



3  Other / Beginners & Help / Re: How long does it take for transactions to be "confirmed" or "verified"? (DeepBit on: November 19, 2013, 05:10:07 AM
Did the transaction eventually show up?

I did a transaction yesterday and it took like 20 minutes to get confirmed.  There is a chart that shows how long confirmations take.  I think that will give you some indication of how long it will take to get your transaction confirmed.

http://blockchain.info/charts/avg-confirmation-time
4  Economy / Service Discussion / Re: Cloud mining Cex.io on: November 19, 2013, 04:36:31 AM
I have a couple of questions.  Are there resources online or in print to get a better understanding of this type of market?  I've been messing around with mining as a hobby.  I know very little, but it seems like in the long run, the price per GHS will go down forever.  Are there analogous markets / exchanges.

I've also been struggling to come up with a strategy for reinvesting in more cloud mining capacity. Has anyone documented their thoughts / investment strategies for something like Cex.io?  I'm trying to figure out when to wait versus when to spend more on cloud mining.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!