trading library written by c