mikekonan / exchange-proxy

exchange-proxy
GNU General Public License v3.0
110 stars 32 forks source link

Issue with agefilter ? #27

Closed thierryjmartin closed 2 years ago

thierryjmartin commented 2 years ago

Hello,

I'd like to sumbit an issue with Agefilter which might be related to kucoin-proxy :

Using whitelist ['VolumePairList', 'AgeFilter', 'PrecisionFilter', 'PriceFilter', 'SpreadFilter', 'ShuffleFilter'] with 73 pairs
TEL/USDT, RMRK/USDT, NUM/USDT, SHILL/USDT, MANA/USDT, MATIC/USDT, SOL/USDT, ADA/USDT, ONE/USDT, QNT/USDT, BCH/USDT, ENJ/USDT, XMR/USDT, FTM/USDT, XRP/USDT, DOT/USDT, LINK/USDT, LTC/USDT, ROSE/USDT, VET/USDT, ETH/USDT, SAND/USDT, QRDO/USDT, MOVR/USDT, FIL/USDT, KOK/USDT, FLUX/USDT, BTC/USDT, STRONG/USDT, XLM/USDT, EGLD/USDT, AXS/USDT, GRT/USDT, UOS/USDT, BLOK/USDT, DOGE/USDT, HTR/USDT, XTM/USDT, PYR/USDT, THETA/USDT, 1INCH/USDT, SUPER/USDT, COMP/USDT, JASMY/USDT, VR/USDT, ALGO/USDT, LUNA/USDT, CRO/USDT, BTT/USDT, PBX/USDT, ALICE/USDT, GALAX/USDT, SOUL/USDT, RNDR/USDT, HERO/USDT, EOS/USDT, LRC/USDT, DYDX/USDT, DODO/USDT, ATOM/USDT, KDA/USDT, NAKA/USDT, AVAX/USDT, VRA/USDT, TRIAS/USDT, ICP/USDT, NEAR/USDT, ZEC/USDT, TRX/USDT, KCS/USDT, RUNE/USDT, XTZ/USDT, CREDI/USDT
"pairlists": [
    {
        "method": "VolumePairList",
        "number_assets": 90,
        "sort_key": "quoteVolume",
        "min_value": 0,
        "refresh_period": 1800
    },
          {"method": "AgeFilter", "min_days_listed": 21},
          {"method": "PrecisionFilter"},
          {"method": "PriceFilter", "low_price_ratio": 0.002},
          {"method": "SpreadFilter", "max_spread_ratio": 0.004},
          {"method": "ShuffleFilter"}
         ], 

I have CREDI/USDT in my whitelist which is one day old I'm using kucoin and kucoin proxy, freqtrade version is docker 2021.11

Below some freqtrade logs which show that agefilter is sometimes active and sometimes not :

2021-12-09 10:39:37,299 - VolumePairList - INFO - Searching 90 pairs: ['BTC/USDT', 'ETH/USDT', 'LUNA/USDT', 'MATIC/USDT', 'XRP/USDT', 'LRC/USDT', 'AVAX/USDT', 'VRA/USDT', 'SAND/USDT', 'KDA/USDT', 'DOT/USDT', 'XTZ/USDT', 'SOL/USDT', 'MANA/USDT', 'NEAR/USDT', 'ADA/USDT', 'ATOM/USDT', 'LINK/USDT', 'CRO/USDT', 'BLOK/USDT', 'FTM/USDT', 'EOS/USDT', 'WAXP/USDT', 'VR/USDT', 'LTC/USDT', 'PYR/USDT', 'XLM/USDT', 'KCS/USDT', 'BTT/USDT', 'ROSE/USDT', 'QRDO/USDT', 'RMRK/USDT', 'GALAX/USDT', 'ICP/USDT', 'HERO/USDT', 'HTR/USDT', 'TRX/USDT', 'DOGE/USDT', 'NAKA/USDT', 'VET/USDT', 'EGLD/USDT', 'QNT/USDT', 'SUPER/USDT', 'FIL/USDT', 'UOS/USDT', 'ONE/USDT', 'SHILL/USDT', 'RNDR/USDT', 'TRIAS/USDT', 'MOVR/USDT', 'ENJ/USDT', 'IMX/USDT', 'TEL/USDT', 'GRT/USDT', 'FLUX/USDT', 'ALGO/USDT', 'KOK/USDT', 'DYDX/USDT', 'CRV/USDT', 'SUSHI/USDT', 'XTM/USDT', 'RUNE/USDT', '1INCH/USDT', 'RSR/USDT', 'ILA/USDT', 'STX/USDT', 'SOUL/USDT', 'ELON/USDT', 'BCH/USDT', 'THETA/USDT', 'TLM/USDT', 'MASK/USDT', 'ALICE/USDT', 'XPR/USDT', 'PBX/USDT', 'CIRUS/USDT', 'ZEC/USDT', 'GODS/USDT', 'KIN/USDT', 'UNI/USDT', 'MIR/USDT', 'FTT/USDT', 'DODO/USDT', 'RFOX/USDT', 'CREDI/USDT', 'WOO/USDT', 'LTO/USDT', 'KSM/USDT', 'CBC/USDT', 'XMR/USDT']
2021-12-09 10:39:37,861 - AgeFilter - INFO - Removed CREDI/USDT from whitelist, because age 0 is less than 21 days
2021-12-09 10:39:37,862 - AgeFilter - INFO - Validated 87 pairs.

2021-12-09 11:10:28,822 - VolumePairList - INFO - Searching 90 pairs: ['BTC/USDT', 'ETH/USDT', 'LUNA/USDT', 'MATIC/USDT', 'XRP/USDT', 'LRC/USDT', 'SAND/USDT', 'AVAX/USDT', 'VRA/USDT', 'KDA/USDT', 'XTZ/USDT', 'DOT/USDT', 'SOL/USDT', 'MANA/USDT', 'NEAR/USDT', 'ADA/USDT', 'ATOM/USDT', 'BLOK/USDT', 'FTM/USDT', 'CRO/USDT', 'LINK/USDT', 'EOS/USDT', 'WAXP/USDT', 'VR/USDT', 'LTC/USDT', 'XLM/USDT', 'PYR/USDT', 'KCS/USDT', 'BTT/USDT', 'GALAX/USDT', 'ROSE/USDT', 'QRDO/USDT', 'RMRK/USDT', 'HERO/USDT', 'HTR/USDT', 'ICP/USDT', 'TRX/USDT', 'NAKA/USDT', 'DOGE/USDT', 'EGLD/USDT', 'VET/USDT', 'QNT/USDT', 'SUPER/USDT', 'ONE/USDT', 'FIL/USDT', 'RNDR/USDT', 'UOS/USDT', 'SHILL/USDT', 'TRIAS/USDT', 'MOVR/USDT', 'ENJ/USDT', 'KOK/USDT', 'IMX/USDT', 'GRT/USDT', 'TEL/USDT', 'FLUX/USDT', 'DYDX/USDT', 'ALGO/USDT', 'SUSHI/USDT', 'CRV/USDT', 'XTM/USDT', 'RUNE/USDT', '1INCH/USDT', 'ILA/USDT', 'CREDI/USDT', 'RSR/USDT', 'STX/USDT', 'ALICE/USDT', 'SOUL/USDT', 'BCH/USDT', 'ELON/USDT', 'THETA/USDT', 'MASK/USDT', 'TLM/USDT', 'XPR/USDT', 'PBX/USDT', 'CIRUS/USDT', 'ZEC/USDT', 'KIN/USDT', 'GODS/USDT', 'FTT/USDT', 'MIR/USDT', 'CBC/USDT', 'RFOX/USDT', 'DODO/USDT', 'UNI/USDT', 'WOO/USDT', 'API3/USDT', 'KSM/USDT', 'XMR/USDT']
2021-12-09 11:10:29,422 - AgeFilter - INFO - Validated 87 pairs.

'LRC/USDT', 'DOT/USDT', 'KDA/USDT', 'ADA/USDT', 'NEAR/USDT', 'GALAX/USDT', 'KOK/USDT', 'LINK/USDT', 'BLOK/USDT', 'PYR/USDT', 'CRO/USDT', 'FTM/USDT', 'KCS/USDT', 'ATOM/USDT', 'FLUX/USDT', 'MIR/USDT', 'QRDO/USDT', 'ROSE/USDT', 'LTC/USDT', 'RMRK/USDT', 'XTZ/USDT', 'HERO/USDT', 'XLM/USDT', 'EOS/USDT', 'TRX/USDT', 'BTT/USDT', 'CREDI/USDT', 'VET/USDT', 'HTR/USDT', 'RNDR/USDT', 'WAXP/USDT', 'DOGE/USDT', 'EGLD/USDT', 'UOS/USDT', 'NAKA/USDT', 'ONE/USDT', 'MOVR/USDT', 'TEL/USDT', 'QNT/USDT', 'ENJ/USDT', 'IOTX/USDT', 'FIL/USDT', 'TRIAS/USDT', 'ICP/USDT', 'ALICE/USDT', 'CBC/USDT', 'RSR/USDT', 'ALGO/USDT', 'SHILL/USDT', 'DYDX/USDT', 'IMX/USDT', 'ILA/USDT', 'CRV/USDT', 'ELON/USDT', 'API3/USDT', 'SUPER/USDT', 'JASMY/USDT', 'NUM/USDT', 'SOUL/USDT', 'TLM/USDT', 'ZEC/USDT', 'GRT/USDT', 'KIN/USDT', 'RUNE/USDT', 'XTM/USDT', '1INCH/USDT', 'DODO/USDT', 'PBX/USDT', 'THETA/USDT', 'RFOX/USDT', 'CIRUS/USDT', 'BCH/USDT', 'XMR/USDT', 'ZKT/USDT', 'AXS/USDT', 'STRONG/USDT', 'COMP/USDT', 'MASK/USDT', 'GODS/USDT']
2021-12-10 03:25:54,453 - AgeFilter - INFO - Removed GODS/USDT from whitelist, because age 11 is less than 21 days
2021-12-10 03:25:54,453 - AgeFilter - INFO - Validated 88 pairs.
mikekonan commented 2 years ago

Looks like a duplicate of https://github.com/mikekonan/freqtrade-proxy/issues/19

thierryjmartin commented 2 years ago

yes but #19 is closed an unsolved

mikekonan commented 2 years ago

How does it work without proxy? Is CREDI/USDT 0 is less than 21 days is incorrect?

thierryjmartin commented 2 years ago

Yes it is correct. In first exemple, AgeFilter worked well for CREDI/USDT. The problem is 2nd and 3rd exemple where CREDI/USDT is not filtered by agefilter anymore. AgeFilter doesn't looks consistant with proxy. The result is quite random.

Without proxy a pair is filtered from 0 to 21 days old.

mikekonan commented 2 years ago

@thierryjmartin could you try https://github.com/mikekonan/exchange-proxy/releases/tag/v1.2.0-rc1?

mikekonan commented 2 years ago

Closed due no resp