GE API is pretty simple.
buyItem (itemId, "ItemName", Amount, price)
There isnt a selling method at the moment, but you could do something like this
//widget to check if you can collect
if (e.getWidgets().isVisible(465, 6, 1)) {
e.grandExchange.collect();
}
//widget that is only seen when you're on the selling screen
if (!e.getWidgets().isVisible(465,27,0)) {
e.inventory.interact("Offer", "Bow string");
new ConditionalSleep(5000, 5500) {
@[member=Override]
public boolean condition() throws InterruptedException {
return e.getWidgets().isVisible(465, 27, 0);
}
}.sleep();
} else {
//manipulate prices and amount via widgets here
}
That's just something I wrote up pretty quickly. Its a basic way to buy/sell and should work.