Query treasury.io from R