This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(RCurl) | |
require(jsonlite) | |
myticker<-"FB" | |
url.histprice<-function(x){ return(paste0("http://globalquote.morningstar.com/globalcomponent/RealtimeHistoricalStockData.ashx?ticker=",x,"&showVol=true&dtype=his&f=d&curry=USD&range=1900-1-1|2014-10-10&isD=true&isS=true&hasF=true&ProdCode=DIRECT"))} | |
url.keyratios<-function(x){return(paste0("http://financials.morningstar.com/ajax/exportKR2CSV.html?t=",x))} | |
#Retrieve historical prices | |
json.histprice<-getURL(url.histprice(myticker)) | |
json.histprice<-sub("NaN","\"NA\"",json.histprice) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This Gist contains an example of how to write a a FIX protocol parser using QuickFIX/J. | |
It also includes the XML data dictionary and a sample FIX message file with one OrderList message. | |
If you want to build/run this, you will need to link with QuickFIX/J and Jackson jars: | |
quickfixj-all-1.5.3.jar | |
mina-core-1.1.7.jar | |
slf4j-api-1.6.3.jar | |
log4j-1.2.15.jar | |
jackson-core-2.5.1.jar | |
jackson-databind-2.5.1.jar | |
jackson-annotations-2.5.1.jar |