Open extra topbar

bad orders issue

If you are new here, please see some information on how to ask for support. Thank you!

bad orders issue

This topic contains 13 replies, has 3 voices, and was last updated by  alexg 2 weeks, 6 days ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #6157

    vorticism
    Participant

    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.
    #6164

    alexg
    Keymaster

    Hello,

    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.

    #6167

    vorticism
    Participant

    I 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?

    #6169

    alexg
    Keymaster

    You 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

    #6627

    davej
    Participant

    hello 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.
    #6630

    alexg
    Keymaster

    @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.

    #6632

    davej
    Participant

    -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.
    #6634

    davej
    Participant

    when I try to erase that order, this appears:

    Attachments:
    You must be logged in to view attached files.
    #6639

    alexg
    Keymaster

    @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

    #6644

    alexg
    Keymaster

    @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

    #6645

    davej
    Participant

    @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

    #6646

    alexg
    Keymaster

    @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.

    #6647

    davej
    Participant

    @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 😉

    #6799

    alexg
    Keymaster

    The 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

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.