001_merge_newpair.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # https://dexscreener.com/new-pairs?rankBy=pairAge&order=asc&chainIds=solana&minLiq=1000&minAge=4&maxAge=24&min24HTxns=600&min24HBuys=300&min24HSells=300
  2. # filter已定义好的 的网址
  3. from base_class import BaseVariableFunction
  4. from base_class import *
  5. baseclass = BaseVariableFunction(__file__)
  6. baseclass.makedirpath(baseclass.newpair_merge_path)
  7. print('\n'*5)
  8. print(f"{'{:<6}'.format('ENTER')} {baseclass.scriptfilename} ----------------NOTE-----------NOTE---------------")
  9. df = baseclass.readcsvfiles_2df(baseclass.newpair_from_dexscreener_path)
  10. def makescreenurl( urlname,urlparam):
  11. # pairAddress = series[address_str]
  12. urlname = urlname + urlparam
  13. return '=HYPERLINK("{}","{}")'.format(urlname, urlname)
  14. df["isNormal"] = -1
  15. df['DexScreenURL'] = df.apply(lambda ser: makescreenurl(
  16. "https://dexscreener.com/solana/" ,ser["PairAddress"]), axis=1)
  17. df['TokenIdx'] = df['TokenIdx'].astype(int)
  18. df['Buys'] = df['Buys'].astype(int)
  19. df['Sells'] = df['Sells'].astype(int)
  20. df['Makers'] = df['Makers'].astype(int)
  21. df = df.sort_values(by=["TokenIdx"], ascending=[True])
  22. df.to_excel(baseclass.newpair_merge_path/"un_filter_pairs.xlsx", index=False)
  23. print(f"{'{:<6}'.format('END')} {baseclass.scriptfilename} ----------------NOTE-----------NOTE---------------")