MBMark Balakrishnan
← The build log · 04
Python Telegram Crypto

Telegram Ethereum Price Bot

One command, /ether, returns the live ETH price and the spread between a Singapore and a Korean exchange — the "Kimchi premium" at a glance.

PublishedDecember 2018
ByMark Bala
FieldPython
Telegram chat: sending /ether returns 'Buy ETH on Coinhako S$ at 276.99, -1.00% spread to Korbit, which trades at 274.23'
EtherPriceBot(SG-KR) answering a /ether request.

In 2017–18, Ether often traded at noticeably different prices on Korean exchanges than on the rest of the world — the so-called "Kimchi premium." I wanted to watch that gap without opening two exchanges, so I built a Telegram bot to do it in one message.

What it does

  • Send /ether to the bot and it replies with the current ETH price on Coinhako (Singapore) in SGD.
  • Alongside it, the bot quotes Korbit (Korea) and reports the percentage spread between the two.
  • A negative spread means Singapore is trading below Korea — the Kimchi premium — and the reply frames it as a quick "buy here, sell there" read.
Example reply

Buy ETH on Coinhako S$ at 276.99
-1.00% spread to Korbit, which trades at 274.23

How it works

  • Written for Python 3, using only standard libraries plus requests for the HTTP calls.
  • On each /ether, it pulls the latest quote from both exchange APIs, computes the spread, and formats a single human-readable line.
  • It talks to Telegram through a bot token from BotFather, polling for new messages and replying inline.
  • An optional proxy line lets it run from behind a proxy when an exchange endpoint is geo-restricted.

Running it yourself

  • pip install requests before running the script.
  • Create a bot with BotFather (/newbot), then drop the token into the script.
  • Run it — and message your bot /ether.

The Kimchi premium has long since closed, so this one's a period piece — but the bot still runs.

Code & details
Next in the log · 05

Python RSS Reader