DEV Community

Cover image for Send Exchange Updates to Discord
Nobbi's Crypto
Nobbi's Crypto

Posted on

Send Exchange Updates to Discord

I’m using Binance as my main exchange. They add new symbols frequently and I want to be notified if there is something new I could trade.

Also, I set up my own Discord server, mainly to receive TradingView alerts so that my inbox is not flooded with emails.

To connect both pieces, I wrote a PowerShell script that checks for new symbols on a daily basis and sends the result to my Discord server. No worries, you need next to zero PowerShell knowledge to use this script.

Results in Discord

Creating a Discord Webhook

The first step is to sign-up on Discord and create a server. That’s pretty straightforward - if you need assistance, though, there are hundreds of tutorials on the Internet.

Next, create a new text channel and give it a name like exchange-updates or similar.

Name

Edit your channel, click on Integrations and create a webhook.

Webhook

Give it a name and copy/paste the webhook URL somewhere safe.

Modifying The Parameters

The script Update-TickerListToDiscord.ps1 is available on GitHub. Go there and download it.

Paste the webhook URL from above between the '' in the following line:

$DiscordWebhook = ''
Enter fullscreen mode Exit fullscreen mode

As you can see in the script, I’m checking three lists:

  • USDT
  • Futures
  • EUR

You can also see that the script gets the lists from the website edgesforledges.com. If you trade other pairs than I, check the website for other lists, download them into the same folder as the script, copy the download URL, and change the variable $Inputs accordingly. sandwich.finance is another site to get lists.

Running The Script

To run the script manually, right-click it and choose Execute with PowerShell.

To run it periodically on Windows, create a scheduled task and set the action as follows:

  • Script: powershell.exe
  • Argument: -executionpolicy bypass -file "Full path to the script"

I'm running this every day at 8 AM via cron on an Ubuntu VPS box.

Top comments (1)

Collapse
 
nobbi profile image
Nobbi's Crypto

I like crypto and scripting. If my stuff makes you money, please consider supporting me.

  • USDT (TRC20) - TMAroqHEg7Z41x8fhY14Xp4R9FtzWkFMpR
  • BTC - bc1qh45t0q0vgazf6l8qe8wf3ek6j3d7pr8awu5rgr
  • ETH - 0x9686360226dAedEf32E904CF3ecEcf6EE4fC31e5