 		case "-v":
 			verbose = true
 			break
-			
+		
+		case "-a":
+			all = true
+			break
+		
 		case "-h":
 			let msg = Process.arguments[0] + " -t STOCK_TICKET [-i QUOTE_INTERVAL_SECONDS] [-d NUM_OF_DAYS] [-x EXCHANGE_NAME]"
 			println(msg)

var ticket:String = "0700"
var exchange = "HKG"
var numOfDays:Int = 1

var skip:Bool = false
for i in 1..<Int(Process.argc)

{
	let timestamp = UInt(NSDate().timeIntervalSince1970 * 1000)
	let url = "http://www.google.com/finance/getprices?q=\(ticket)&x=\(exchange)&i=\(interval)&p=\(numOfDays)d&f=d,c,v,k,o,h,l&df=cpct&auto=1&ts=\(timestamp)&ei=yW0qVam9A-f1igLUvIGQBw"
	return NSURLRequest(URL: NSURL(string: url)!)
}

func getQuoteRequest(ticket:String, #exchange:String)->NSURLRequest
{
	let timestamp = UInt(NSDate().timeIntervalSince1970 * 1000)
	let url = "http://www.google.com/finance/getprices?q=\(ticket)&x=\(exchange)&i=86400&p=40Y&f=d,c,v,k,o,h,l&df=cpct&auto=1&ts=\(timestamp)&ei=yW0qVam9A-f1igLUvIGQBw"
	return NSURLRequest(URL: NSURL(string: url)!)
}

