I'm using the Java SDK.
With the ManageOfferOperation
class passing an amount and price but it's not taking the price I set. Instead it always sets a different price, which I believe is the market price.
Is there something I'm missing?
The price you set with manageOffer
is the maximum price when buying and the minimum price when selling. So it will match the best available price in the orderbook.
If you make an offer that has an immediate counterpart on the orderbook it will behave like a market order (take liquidity).
If you make an offer that doesn't have an immediate counterpart in the orderbook it will behave like a limited order (provide liquidity).