Is it possible to market-buy from the stellar distributed exchange? Or do you have to get the current sell offers and construct a bid for exactly the price of what people are willing to sell?
2 Answers
The Stellar Laboratory is an awesome tool/resource where you can answer questions like these for yourself and explore how Stellar works...
For instance, here is an orderbook for "NATHAN"
There is 1 offer currently available. Use this keypair to create a buy offer for those NATHAN
Public Key
GAMZNHJS3QCM2FJXXU4V2S2CFRVRQYTSIQFIK2H3V72WB3S7IVE5ONZW
Secret Key
SB3T5DEZMCYNOFW4ENGKX26LEZVYKCK5LZ4ZUKHNSK346BAGPWGHXTII
The Asset was created by this public key and asset code is NATHAN.
When you offer up XLM, first set the XLM price to 9999 and then to 0.0000001 and you'll see what happens first-hand.
No, just set the minimum possible price, 0.0000001
and you'll buy on the market price.
-
Sholudn't it be the maximum possible price for buy order? If he sets the minimum price the order will go to the back of the queue Commented Feb 5, 2018 at 9:57
-
Im pretty sure that the lowest possible price would create an offer for the lowest possible price? Wouldn't that defeat the point of allowing low-bid offers?– JovakCommented Feb 5, 2018 at 10:03
-
4@Jovak & Francesco -- no, this is correct. When you are buying an Asset you are always selling another. If I want to buy 100 "NATHAN" coin and there is a market selling NATHAN for XLM, I will need to create an offer to sell XLM and buy NATHAN. After typing in the Alphanumeric 12 "NATHAN" and issuing account, I will then select the number of units I want to sell and name a price of 1 unit of asset for sale (XLM). If I make this number tiny, I'll achieve a market-buy. Commented Feb 5, 2018 at 10:34