In implementing a Bitcoin web wallet with the option to convert your BTC to NBT as a hedge against fluxuation, one must periodically contact an exchange to determine the current conversion and execute trades.
Say i contact the excahnge to request the currecnt price and it tells me:
{“result”:“true”,“last”:0.002654,“high”:0.002672,“low”:0.002469,“avg”:0.002602,“sell”:0.002653,“buy”:0.002653,“vol_nbt”:196278.147,“vol_btc”:510.7163}
-“last”:0.002654,- <— notice the last price
To make an offer on the exchange currency pair (NBT_BTC), trading type (BUY) , rate, and amount must be specified.
My question is, at what rate can i offer BTC to be sure the bot will buy?