Ultimate magazine theme for WordPress.

rhmaxdotorg/hex-hedron-lp: Scripts for HEX and Hedron liquidity pools

Uses dexscreener’s API to query (largest) pools for HEX and Hedron crypto (as of March 2023) (pools are hard coded so may need to be updated from time to time). Numbers are not retrieved from ALL poolsbut a few significant ones.

It fetches data from https://api.dexscreener.com/latest/dex/pairs/ethereum/ and parses JSON values ​​from the response[‘pair’][‘liquidity’][‘usd’] and formats numbers so that changes and totals are easy to understand.

There are only three tweaks in the code you might want to make (for track mode).

  • Pools for HEX_POOLS and HDRN_POOLS (optional, add/remove depending on scenario)
  • SLEEP_TIME (how long to wait before checking LP again)
  • ALERT_PERCENTAGE (at what threshold do you want to alert)

Windows

Install Python 3 from https://www.python.org/downloads/windows/ and invoke a command line terminal to use Python and run the script.

Linux

Python 3 should be installed by default. If not, run apt install python3 python3-pip -y on Debian/Ubuntu Linux distributions.

Mac

Python 2 may be installed by default, but to install Python 3 you can follow the instructions here and brew install python.

command line interface (Code can also be repurposed for a web portal)

$ ./lp.py ./lp.py [get or track] [hex or hdrn]

Receive Total Hedron liquidity

$ ./lp.py get hdrn HDRN: $4,210,140

Get both HEX and HDRN liquidity

$ ./lp.py gets everything HEX: $13,121,310 HDRN: $3,188,492

Track HEX liquidity changes

$ ./lp.py Trace Hex -0.42% -0.27%

[!!!] LP CHANGED BY -8.96% (Alarm set to >= 5.00%) [!!!]

-8.96% -0.84% ​​+0.59% +0.65% +0.07% +0.60% +0.39% +0.07% +0.81% -1.56% …

note

Of course, this only tests console alerts (these can also be email notifications, written to a monitored file, etc.) at 0.03%, but you can adjust it so that if there are moves of 15% over a 4 Hours will be warned of whatever you think useful for tracking LP.

Learn Crypto Trading, Yield Farms, Income strategies and more at CrytoAnswers
https://nov.link/cryptoanswers

Comments are closed.

%d bloggers like this: