binance-pump-alerts icon indicating copy to clipboard operation
binance-pump-alerts copied to clipboard

TypeError

Open padevin opened this issue 1 year ago • 6 comments

File "c:\Users\yusufarsln342\Desktop\projeee\binance-pump-alerts-masternew\binance-pump-alerts-master\alerter\BinancePumpAndDumpAlerter.py", line 156, in filter_and_convert_assets symbol = exchange_asset["symbol"] ~~~~~~~~~~~~~~^^^^^^^^^^ TypeError: string indices must be integers, not 'str'

padevin avatar Mar 14 '23 13:03 padevin

Can you paste your config.yml file? I suspect its to do with it.

brianleect avatar Mar 14 '23 22:03 brianleect



# Binance Pump and Dump Alert Configuration

# Using Spot API with url set to https://api.binance.com/api/v3/ticker/price
# Using Futures API with url set to: https://fapi.binance.com/fapi/v1/ticker/price
apiUrl: https://api.binance.com/api/v3/ticker/price

# Intervals which are monitored. Add or remove intervals as you like.
chartIntervals:
 - 1s
 - 5s
 - 15s
 - 30s
 - 1m
 - 5m
 - 15m
 - 30m
 - 1h
 - 3h
 - 6h

# Values in % at which an alert is triggered. Ensure interval exists in chartIntervals as well.
outlierIntervals:
 "1s": 0.02
 "5s": 0.05
 "15s": 0.06
 "30s": 0.08
 "1m": 0.1
 "5m": 0.10
 "15m": 0.15
 "30m": 0.20
 "1h": 0.30
 "3h": 0.4
 "6h": 0.5

# Used for telegram bot updates

# Insert telegramToken obtained from @BotFather here
telegramToken: token
# Insert Chat ID obtained from @get_id_bot here
telegramChatId: id
# Insert Chat ID for top pump dump alert, if left on `0` it'll send the message to telegram chat id
telegramAlertChatId: 0

# Useful Params

# Interval between each price extract from Binance REST API
extractInterval: 1s

# Watchlist only mode, if enabled, ONLY pairs in watchlist will be monitored
# E.g. 'ADAUSDT', 'ETHUSDT'
watchlist:
 - OCEANUSDT
 - MAGICUSDT
 - DARUSDT
 - HFTUSDT
 - HOOKUSDT
 - PHBUSDT
 - AMBUSDT
 - SANTOSUSDT
 - PORTOUSDT
 - LAZIOUSDT
 - ALPINEUSDT
 - ATMUSDT
 - ACMUSDT
 - PSGUSDT
 - CITYUSDT
 - OGUSDT
 - ASRUSDT
 - TVKUSDT
 - TLMUSDT
 - USTCUSDT
 - LUNCUSDT
 - LUNAUSDT
 - DFUSDT
 - CVPUSDT
 - COSUSDT
 - COCOSUSDT
 - AVAXUSDT
 - JOEUSDT
 - DEGOUSDT
 - ERNUSDT
 - HIGHUSDT
 - LOKAUSDT
 - VOXELUSDT
 - MANAUSDT
 - SANDUSDT
 - ENJUSDT
 - SNMBUSD
 - VIBUSDT
 - PROSUSDT
 - AERGOBUSD
 - ONEUSDT
 - CELRUSDT
 - WINGUSDT
 - BONDUSDT
 - AUTOUSDT
 - BIFIUSDT
 - QUICKUSDT
 - FARMUSDT
 - AXSUSDT
 - SLPUSDT
 - PERLUSDT
 - PNTUSDT
 - SFPUSDT
 - C98USDT
 - TWTUSDT
 - SHIBUSDT
 - DOGEUSDT
 - GASBUSD
 - NEOUSDT
 - JSTUSDT
 - SUNUSDT


# Blacklist only mode, if enabled, pairs in blacklist will be IGNORED it DOES NOT IMPACT pairsOfInterest
blacklist:
 - NBTUSDT
#  - ETHUSDT

# List the trading currency you are interested in. Other options include 'BUSD', 'BTC' , 'ETH'
pairsOfInterest:
 - USDT
 - BUSD

# Feature params

# Determine whether to look at DUMPs
dumpEnabled: False

# Top Pump & Dump Feature Params

# Set to false if not interested in top pump info
topPumpEnabled: True
# Set to false if not interested in top dump info
topDumpEnabled: True
# Set to false if not interested in net movement of coins
additionalStatsEnabled: True
# Top X amount of coins shown in the interval report, adjust to show more or less within the timeframe
noOfReportedCoins: 5
# Intervals for top pump and dump to be sent, ensure its in chartIntervals + outlierIntervals as well
topReportIntervals:
 - 3h
 - 6h

# Define your own bot emojis.
botEmoji: ! "\U0001F916" # 🤖
pumpEmoji: ! "\U0001F7E2" # 🟢 or '\U0001F4C8' 📈 '\U0001F53C'🔼
dumpEmoji: ! "\U0001F534" # 🔴 or '\U0001F4C9' 📉 '\U0001F53D'🔽
topEmoji: ! "\U0001F3C6" # 🏆
newsEmoji: ! "\U0001F4F0" # 📰 or '\U0001F680' 🚀

# Debug Params (Avoid touching it if there's no issues)

# If False we do not print unnecessary messages
debug: False
# Skip alert at higher timeframes when change in % did not change value by threshold in percentage points
alertSkipThreshold: 0.75
# Interval for clearing array to prevent memory can handle up to 12h+ depending on system
resetInterval: 6h
# In the case of get price fail, this is the time delay before re-attempt
priceRetryInterval: 5s
# Disables checking and adding of new listing pairs
checkNewListingEnabled: True
# Disables rounding to nearest hour for first TPD if false
topReportNearestHour: True #

padevin avatar Mar 15 '23 16:03 padevin

it works on my laptop but wont work in my google vm

padevin avatar Mar 15 '23 16:03 padevin

same version of python and packages in both

padevin avatar Mar 15 '23 16:03 padevin

waiting for solution

padevin avatar Mar 16 '23 11:03 padevin

hmm I'm not too familiar with the difference in environment for google vm and the normal env. Are you running it with the correct python? Sometimes there are multiple versions on python in the OS and a different version may be called depending if you used python ___ vs python3 ___ etc

Not too sure if I can help much outside of this since it functions for me on my local laptop and also ec2 environment.

Alternative may be to try running it via docker but I'm not too familiar with using it and the person previously who maintained is no longer actively contributing to this repo.

brianleect avatar Mar 16 '23 14:03 brianleect