Right now, there isn't a nice and well documented way to do this as we haven't ever had demand for an API like that. You can reverse engineer the POST for the code ranking to submit your code and the GET for the leaderboard information.