Tick history via R

I am interested in interfacing your tick history platform with a programming language such as R (statistical software, http://www.r-project.org/), using an API or functions you would have written.


As I imagine it, there would ideally exist a R function that would allow me to send a request to your tick history platform in order to retrieve the history of a given ticker at a certain date/time.

Best Answer

  • LarryT
    LarryT Contributor
    Answer ✓

    Yes, it is possible to use TRTH via R.

    Download the API from the TRTH download page here on the Developer portal.

    To install please select "Run As an Adminstrator" before running R.

    You will need to select from the menu bar "Packages" and then
    "Install packages(s) from local zip files..."

    You will also need to install RCurl, XML and the base64 packages prior to
    loading THAPI in R. You can install these in the R GUI from the Packages &
    Data menu.

    Once you have installed the package, you will need to call the library function
    to load the package into R. This will automatically load THAPI and its
    auxiliary packages.

    library(THAPI)

    Before you use any of the Tick History services, you will need to create a
    login object containing your username and password:

    rdth <- createCredential(user="username@xyz.com",
    password="your password")

Answers