dashed-slug.net › Forums › Exchange extension support › Question about order execution
Tagged: execution, fifo, limit order, matching engine, orderbook
- This topic has 6 replies, 2 voices, and was last updated 3 years, 9 months ago by alexg.
-
AuthorPosts
-
March 9, 2021 at 6:18 pm #10189LeinAdParticipant
hey Alex
i dont know if this is a bug but following happen:
on market is an offer: 10 BTC for 100$ (only examle!!!)
Ask: 100$ Size 10BTC and user have 1000$when he click buy max, he got the 10BTC for 1000$ ..
know how i mean?
I have this in a situation with doge / naca
User wrote me: so I had 476 Dogecoin to buy NashCash for voting, I hit max button to buy as much NashCash as I could, it said I was supposed to get like 2,300 nashcash but I ended up with just 21 nashcash and 196 dogecoin left in my walletAttachments:
You must be logged in to view attached files.March 10, 2021 at 5:14 am #10191alexgKeymasterHello,
I have tested the situation you describe with USD_BTC on my end and the exchange appears to function correctly.
In your example, user A has placed an ask order for 10 BTC at a price of $10, with a total order amount of $100.
User B has $1000 in their balance. The current USD_BTC price is $10. User B clicks on the “max” button in the limit buy form, and then clicks on “limit buy btc”. Α bid order is placed on the orderbook for 100BTC at the same price, i.e. for a total of $1000. The order from user A is filled. User B gives $100 to user A. User A gives 10 BTC to user B. The orderbook now has an unfilled bid order for 90 BTC at a price of $10, for a total of $900.
To inspect the orderbook, see the shortcodes:
[wallets_exchange_bids]
and[wallets_exchange_asks]
.Please check a couple of things:
1. Is it possible that, when creating the markets, you mixed up the base and the quote currencies?
https://www.investopedia.com/terms/q/quotecurrency.asp
https://www.investopedia.com/terms/b/basecurrency.aspThe ordering is different from that of most exchanges, for historical reasons that are hard to change right now. “Buy” means buy the quote currency by paying its value in the base currency, and “Sell” means sell the quote currency and get its value in the base currency.
So let me know if you are certain that you’ve set the base and quote coins correctly. I tested with a “USD_BTC” market.
2. Additionally, I see that you are using modified templates. What other code is modified? What version is your copy of the exchange based on? The latest version is 1.3.7.
I can try to help, but it’s very hard to provide support without knowing what was modified (See FAQ under “I want to do changes to the plugin’s code.”)
3. Is it possible for you to test if this occurs with the unmodified exchange 1.3.7?
with regards
March 10, 2021 at 10:45 am #10194LeinAdParticipantHi ,
i only copied and modified two pages you see at the voting page and yes i use 1.3.7this is an other thing what user says me:
it says the total doge price is 196 but then if you actually click buy it says I need 6800 doge for the order
i will take a closer look to this
Attachments:
You must be logged in to view attached files.March 11, 2021 at 5:55 am #10202alexgKeymasterWhen you get a chance to test with the unmodified exchange, focus on the following:
1. Did you place a limit order or market order? Market orders will not execute unless the entire order can be matched against existing open limit orders.
2. Check the orderbook after placing the order. Also check the user history. Click the refresh button to make sure the data is fresh.
Hope this helps.
with regards
March 16, 2021 at 5:55 pm #10225LeinAdParticipantI come back to this issue. So on the attatched pic maybe you can better see. I do a market sell : one nace for 0.00006 NIMB, after pressing “sell” it execute the offer at 0.000009 (the lowest price on bid side)
Attachments:
You must be logged in to view attached files.March 16, 2021 at 6:30 pm #10227LeinAdParticipantok i see whats going on .. but it irritates a lot of user
Attachments:
You must be logged in to view attached files.March 17, 2021 at 8:22 am #10234alexgKeymasterHello,
Thank you for the additional details. This is a lot clearer.
As you pointed out, this is expected behavior:
A “market sell” order sells against the most favorable buy orders on the orderbook (for more information see here: https://www.investopedia.com/terms/m/marketorder.asp). The price field that you’ve set is for limit orders, but it is not used because you issued a market order.
In the UIs that come with the exchange this would be apparent. But with these modified UI templates, it is not apparent that the price is only for limit orders and not for market orders. This is because the two UIs are joined into one (market sell and limit sell).
I think you should aim to redesign the UI, so that your users are not confused. It should somehow be clear from the UI, that the “price” field is for limit orders only, and that market orders are not related to the price field.
with regards
-
AuthorPosts
- You must be logged in to reply to this topic.