BTER API Example Code