RC1 - Slow down order/balance fetching

Issue #654 resolved
Desrever Nu created an issue

On exchanges such as bitspark there are way too many retry calls to the API which makes the UI feel unstable and risk delaying strategy execution. try to at least double fetch time to reduce incidences

Below a count of how many retries happened in a 3 minutes session.

20:57:15.785 DEBUG - Retrying for the 1 time. Sleep for 238; Method=getInfo - [qtp2001044548-28 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:16.027 DEBUG - Retrying for the 2 time. Sleep for 670; Method=getInfo - [qtp2001044548-28 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:16.701 DEBUG - Retrying for the 3 time. Sleep for 912; Method=getInfo - [qtp2001044548-28 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:23.790 DEBUG - Retrying for the 1 time. Sleep for 265; Method=getInfo - [qtp2001044548-47 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:24.058 DEBUG - Retrying for the 2 time. Sleep for 592; Method=getInfo - [qtp2001044548-47 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:24.799 DEBUG - Retrying for the 1 time. Sleep for 340; Method=openOrders - [qtp2001044548-48 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:24.800 DEBUG - Retrying for the 1 time. Sleep for 247; Method=getInfo - [qtp2001044548-28 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:25.054 DEBUG - Retrying for the 2 time. Sleep for 678; Method=getInfo - [qtp2001044548-28 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:25.142 DEBUG - Retrying for the 2 time. Sleep for 529; Method=openOrders - [qtp2001044548-48 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:25.734 DEBUG - Retrying for the 3 time. Sleep for 933; Method=getInfo - [qtp2001044548-28 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:25.794 DEBUG - Retrying for the 1 time. Sleep for 219; Method=openOrders - [qtp2001044548-47 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:33.861 DEBUG - Retrying for the 1 time. Sleep for 207; Method=openOrders - [qtp2001044548-47 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:34.069 DEBUG - Retrying for the 2 time. Sleep for 656; Method=openOrders - [qtp2001044548-47 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:39.221 DEBUG - Retrying for the 1 time. Sleep for 392; Method=getInfo - [qtp2001044548-29 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:39.804 DEBUG - Retrying for the 1 time. Sleep for 225; Method=getInfo - [qtp2001044548-46 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:40.032 DEBUG - Retrying for the 2 time. Sleep for 674; Method=getInfo - [qtp2001044548-46 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:54.359 DEBUG - Retrying for the 1 time. Sleep for 223; Method=getInfo - [Strategy Crypto Task - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:57:54.587 DEBUG - Retrying for the 2 time. Sleep for 630; Method=getInfo - [Strategy Crypto Task - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:13.910 DEBUG - Retrying for the 1 time. Sleep for 343; Method=openOrders - [priceTriggerTask - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:14.053 DEBUG - Retrying for the 1 time. Sleep for 301; Method=openOrders - [qtp2001044548-48 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:14.053 DEBUG - Retrying for the 1 time. Sleep for 352; Method=getInfo - [qtp2001044548-29 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:14.360 DEBUG - Retrying for the 2 time. Sleep for 650; Method=openOrders - [qtp2001044548-48 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:14.411 DEBUG - Retrying for the 2 time. Sleep for 610; Method=getInfo - [qtp2001044548-29 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:15.016 DEBUG - Retrying for the 3 time. Sleep for 897; Method=openOrders - [qtp2001044548-48 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:15.027 DEBUG - Retrying for the 3 time. Sleep for 871; Method=getInfo - [qtp2001044548-29 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:15.840 DEBUG - Retrying for the 1 time. Sleep for 372; Method=getInfo - [qtp2001044548-46 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:15.903 DEBUG - Retrying for the 4 time. Sleep for 1255; Method=getInfo - [qtp2001044548-29 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:15.916 DEBUG - Retrying for the 4 time. Sleep for 1286; Method=openOrders - [qtp2001044548-48 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:16.213 DEBUG - Retrying for the 2 time. Sleep for 663; Method=getInfo - [qtp2001044548-46 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:16.883 DEBUG - Retrying for the 3 time. Sleep for 928; Method=getInfo - [qtp2001044548-46 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:17.160 DEBUG - Retrying for the 5 time. Sleep for 1465; Method=getInfo - [qtp2001044548-29 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:17.207 DEBUG - Retrying for the 5 time. Sleep for 1433; Method=openOrders - [qtp2001044548-48 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:17.815 DEBUG - Retrying for the 4 time. Sleep for 1297; Method=getInfo - [qtp2001044548-46 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:18.631 DEBUG - Retrying for the 6 time. Sleep for 1799; Method=getInfo - [qtp2001044548-29 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:18.645 DEBUG - Retrying for the 6 time. Sleep for 1855; Method=openOrders - [qtp2001044548-48 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:20.503 DEBUG - Retrying for the 7 time. Sleep for 2003; Method=openOrders - [qtp2001044548-48 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:33.800 DEBUG - Retrying for the 1 time. Sleep for 352; Method=openOrders - [qtp2001044548-28 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:33.861 DEBUG - Retrying for the 1 time. Sleep for 388; Method=openOrders - [qtp2001044548-121 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:34.156 DEBUG - Retrying for the 2 time. Sleep for 653; Method=openOrders - [qtp2001044548-28 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:34.254 DEBUG - Retrying for the 2 time. Sleep for 683; Method=openOrders - [qtp2001044548-121 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:34.941 DEBUG - Retrying for the 3 time. Sleep for 876; Method=openOrders - [qtp2001044548-121 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:39.864 DEBUG - Retrying for the 1 time. Sleep for 350; Method=getInfo - [qtp2001044548-28 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:48.918 DEBUG - Retrying for the 1 time. Sleep for 327; Method=openOrders - [qtp2001044548-28 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:48.919 DEBUG - Retrying for the 1 time. Sleep for 350; Method=getInfo - [qtp2001044548-29 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:49.270 DEBUG - Retrying for the 2 time. Sleep for 596; Method=getInfo - [qtp2001044548-29 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:58:53.870 DEBUG - Retrying for the 1 time. Sleep for 351; Method=openOrders - [qtp2001044548-28 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:59:02.259 DEBUG - Retrying for the 1 time. Sleep for 313; Method=openOrders - [qtp2001044548-28 - /orders - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:59:02.260 DEBUG - Retrying for the 1 time. Sleep for 202; Method=getInfo - [qtp2001044548-29 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:59:02.467 DEBUG - Retrying for the 2 time. Sleep for 550; Method=getInfo - [qtp2001044548-29 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 
20:59:03.018 DEBUG - Retrying for the 3 time. Sleep for 867; Method=getInfo - [qtp2001044548-29 - /balances - c.n.n.t.w.BitcoinCoIDWrapper:558] 

Comments (4)

  1. Benjamin Cordes

    We introduced the timebound method for this and use 4 seconds. These are re-rtries. Has nothing to do with the UI in my opinion.

  2. Desrever Nu reporter

    I mentioned the UI because with all of these errors the balance and orders are constantly changed

  3. Desrever Nu reporter

    setting refresh time to 10 seconds helped. Still getting some retries but significantly less.THere are only a few exchanges with this issue where we need to cycle all the active order history before counting balance.

  4. Log in to comment