dashed-slug.net › Forums › Exchange extension support › bad orders issue
Tagged: db, wp_wallets_orders, zero, zero order
- This topic has 13 replies, 3 voices, and was last updated 5 years, 3 months ago by alexg.
-
AuthorPosts
-
April 11, 2019 at 2:26 am #6157vorticismParticipant
How do I cancel a specific order?
My exchange has a bad orders.
This issue has been around for a few days, and I updated the plugin today, but it did not work out. What should I do?Attachments:
You must be logged in to view attached files.April 11, 2019 at 10:56 am #6164alexgKeymasterHello,
By “bad” I assume that you mean the amount is zero.
I believe this is due to a previous version that had allowed this type of order to be inserted. I am not certain if the amounts are zero or if they are simply less than one satoshi, there is no way to tell from the screenshot.
In any case, the user who entered the orders should be able to cancel them, from the
[wallets_exchange_orders]
UI. This should be the easiest way.Another way would be to directly delete them from the database:
1. Backup your database.
2. Assuming that your table DB prefix is
wp_
, you can do this in your SQL console:DELETE FROM wp_wallets_orders WHERE amount < 0.000000001;
(That’s eight zeroes after the decimal, followed by a 1) This will delete all orders with amounts less than one Satoshi.
April 11, 2019 at 11:17 pm #6167vorticismParticipantI think all of those orders are filled but remain zero amount.
This issue has been on me.
In db, all orders from that rate are filled.
Can I delete all of those orders?In other pair markets, market order is not traded.
For example, if I place a buy order on doge (ask 0.00000057 DOGE 221.68403500), nothing happens.What if I want to initialize exchange?
Is it possible to erase all orders?April 12, 2019 at 2:31 pm #6169alexgKeymasterYou can always start over if you empty the two tables:
TRUNCATE wp_wallets_orders;
TRUNCATE wp_wallets_trades;
To be clear, this will remove all exchange data. Don’t do this unless you really want to delete everything!!!
If you also need to reverse the trades that have been already executed, so that the funds are returned to the users as if the trades never happened:
DELETE FROM wp_wallets_txs WHERE category='trade';
Before you do anything else, could you please run this query? I’d like to understand if these orders are still open due to some sub-satoshi amount not having been filled.
SELECT amount,filled,status FROM wp_wallets_orders WHERE ( amount - filled ) < 0.00000001 AND amount > filled;
If you can email or post me the output, it will be very helpful for me to see what’s going on.
Thanks again
with regards
July 23, 2019 at 1:10 am #6627AnonymousInactivehello it happens to me too…
there are any way to fix it?
Other question, where are stored the crypto fees? (for example, if users trade in BTC_LTC market)
Attachments:
You must be logged in to view attached files.July 23, 2019 at 7:55 am #6630alexgKeymaster@davej Fees are not stored somewhere, they simply stay with the site’s hot wallet, and they stop belonging to the user who pays them.
About the exchange issue, to be clear, you see orders with a zero amount remaining on the bid/ask tables. I will investigate again and get back to you.
If possible, could you please run the SQL query that I mentioned above? That is:
SELECT amount,filled,status FROM wp_wallets_orders WHERE ( amount - filled ) < 0.00000001 AND amount > filled;
If you could show me the output it would be very helpful.
(Don’t forget to substitute
wp_
with whatever your DB table prefix is)Thank you.
July 23, 2019 at 3:40 pm #6632AnonymousInactive-Hi Alex, I tried to do excecute that code, but this appears: syntax error near unexpected token `(‘ the hosting operator said to me maybe this error is because i dont have root access…do you know maybe if this error is due to something else?
-What I can tell you now is I think it is not due to sub satoshis, because even if I try to fill that order, It cant be filled (as It can be seen in the attached file)
– how the other user (vorticism) can hide the “total” column in the bid and ask tables?
thanks
Attachments:
You must be logged in to view attached files.July 23, 2019 at 8:53 pm #6634AnonymousInactivewhen I try to erase that order, this appears:
Attachments:
You must be logged in to view attached files.July 24, 2019 at 8:06 am #6639alexgKeymaster@davej Hello again,
The errors you see are because you tried to enter SQL queries into the command shell, rather than the DB console.
Nevermind, I will try to recreate the issue on my end and will get back to you.
with regards
July 24, 2019 at 11:00 am #6644alexgKeymaster@davej Hello,
I have been trying to reproduce this issue again but without success. If you like, there’s two things you could do, either one would help me reproduce the problem and thus solve it.
1. Can you locate the SQL console? If you have access to phpMyAdmin then you can find the SQL console there. Alternatively, your host can help you locate it. Please try the following query.
SELECT * FROM wp_wallets_orders WHERE ( amount - filled ) < 0.00001 and status='open';
You might have to replace
wp_
in the query with your actual DB prefix. The DB prefix is shown in the dashboard section under “Bitcoin and Altcoin Wallets”.2. If you cannot execute the query, could you please describe the exact steps that produced the problem? I might be able to recreate the problem by following the actions you performed.
Let me know please. Thank you.
with regards
July 24, 2019 at 1:03 pm #6645AnonymousInactive@alexg hello,
1. I tried to access, but my host said I´m not allowed because my hosting is shared.
2. What I did that reproduced the problem was only to trade, just made some bid and ask orders, fill orders, buy more than the orders opened, among others… everithing well always, but suddenly, that happened… I dont know why.
If you want, we can schedule an appointment and try to find the solution. I want to help solve this.
Thanks
July 24, 2019 at 1:12 pm #6646alexgKeymaster@davej Thank you, I also want to solve this issue very badly, as it has been first reported so long ago.
Usually even shared hosting does give you some limited DB access, but OK.
Since it’s not easy to look at the database tables, here’s one more thing that might help me understand the problem:
Go to https://www.example.com/?__wallets_exchange_action=get_user_orders&__wallets_exchange_open=1 (replace example.com with your actual domain).
What do you see? Please copy the output here or email it. Thank you for your help.
July 24, 2019 at 1:25 pm #6647AnonymousInactive@alexg, now i can acces to sql console, now i executed that code and it shows me result, now im going to send you via email the screen shot, not here for seccurity reasons. stay tuned 😉
August 26, 2019 at 10:49 am #6799alexgKeymasterThe zero orders should no longer appear in the orderbook of version
1.0.0
of the Exchange extension. Full release notes: https://www.dashed-slug.net/exchange-1-0-0/with regards
-
AuthorPosts
- You must be logged in to reply to this topic.