I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

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

Cancelled and filled trades not clearing

dashed-slug.net Forums Exchange extension support Cancelled and filled trades not clearing

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #3815
    Anonymous
    Inactive

    There definitely seems to be some error here – On one of the pairs I have listed, some offers and bids are still showing up even though all open orders have been cancelled.

    This is not happening on all the pairs, only on some of them.

    #3825
    alexg
    Keymaster

    Hello,

    Do the orders still show up after you refresh the page?

    Normally after you place an order the orderbook view is refreshed with a new JSON API call to the orderbook API endpoint.

    If this call fails due to network issues the view might not be updated.

    But the bids and asks views only display orderbook data and the query for orderbook data only retrieves open orders.

    Can you check if the orders remain after a page refresh please?

    Thanks.

    kind regards

    #3827
    Anonymous
    Inactive

    Hi Alex,

    Yes, I have refreshed several times. New orders are not showing up on this pair.
    Trades on other pairs are still showing up and are still clearing. I have also tried deleting the pair and creating it again.
    Old trades just stay there even after cancelling all open orders, refreshing the page does not do anything.

    #3828
    alexg
    Keymaster

    To be clear, it is normal for already performed trades to remain in the history views, even after cancelling the open trades.

    I believe you mean that open orders remain in the orderbook views? Is that what you are saying?

    #3829
    alexg
    Keymaster

    Also, is the market pair set to “enabled”?

    #3838
    Anonymous
    Inactive

    Hi Alex,

    1. Yes the order book does not clear or show up any new orders
    2. Yes the pair is enabled

    #3842
    alexg
    Keymaster

    This sounds like it could be due to the calls being cached.

    If so, I will fix this in the next patch.

    Does the problem resolve if you clear your browser’s cache?

    #3845
    Anonymous
    Inactive

    Hi Alex,

    Yes, I have tried clearing the browser cache, it is still not clearing.
    Also tried on another PC.

    #3859
    Anonymous
    Inactive

    Hi Alex,

    Is your plugin creating cached data somehow? And if so is there a way to manually clear it?

    #3860
    alexg
    Keymaster

    Yes, I already thought about this.

    The JSON API does indeed cache the data on WordPress transients, but only for a few seconds.

    Normally transients are stored on the options table in the database, but if you have a solution such as memcached installed, the transients can be stored there.

    Does clearing your server cache resolve your problem?

    #3862
    Anonymous
    Inactive

    Let me just understand in a bit more detail. I checked the wp options table and I found a lot of transients in there related to exchange transactions. Are they all supposed to clear after a couple of seconds? They don’t seem to clear at all in my wp options table.

    #3866
    alexg
    Keymaster

    For some public API endpoints there is a few-seconds cache based on transients. For example, if you check json-api.php you will see that some responses are cached for the amount of seconds specified by the wallets_exchange_memoize_seconds option.

    When there is no object cache installed, WordPress falls back to storing the transients on the options table. If there is an object cache installed the transients are stored on that. This is not the first time I see someone with an object cache experience problems with transients not expiring. After a quick search on the web it seems this is caused by misconfiguration of the object cache, although I’m not sure.

    To check, can you clear your W3 Total Cache, or memcached, or whatever it is you’re using? Does this refresh the output of the APIs?

    You should also be aware that DB rows of transients do not necessarily get deleted just because they are expired. WordPress does some garbage collection but it is not perfect, so third-party solutions exist to clear expired transients from the DB to save space. In any case, the WordPress transients API should not return expired transients even if they exist on the DB, assuming this is where they are stored on your system.

    I can always add a switch to disable cache, but we should at least have some idea of what is going on here. The question is why your transients are not expiring. For example, the transient that stores output of the get_market_summaries call is wallets_exchange_summaries and by default should be cached for 5 seconds.

    Please do let me know if you find anything about this.

    kind regards

    #3913
    Anonymous
    Inactive

    I was running W3Cache and adjusted database and object cache settings. Problem seems to be resolved.

    #3918
    alexg
    Keymaster

    Thank you.

    Glad your problem was resolved.

    I will add this to the troubleshooting instructions.

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.