I noticed that there's only sell_asset on wallet_api. This is fine because I can sell USD for BTS if I want to buy BTS.
But the issue is when I want to buy BTS at best price, I can't accurately specify amount of BTS I want.
Say I want to buy 1000 BTS and the lowest ask price is [100,0.005]. I want to buy 1000 BTS with highest price 0.006. What I can do is to call
sell_asset xxx 6 USD 1000 BTS .....
Now it will buy 1000+ BTS with 6 USD. But my purpose is to buy 1000 BTS using USD <= 6. It's counter-intuitive and quite different with most exchanges.
Is my understanding wrong? If not, I strongly recommend to allow a way to specify what amount I want to be fixed (BTS or USD) or add a buy_asset API.