# How to make CoinGlass ring your phone

Builders · https://lfg.gm/coinglass-phone-alarm · Updated 2026-11-24

To make CoinGlass ring your phone, make an **🔮 Anything** alarm in LFG Alarm, then run a short script on a schedule that reads the CoinGlass API and calls the alarm's private link when a number crosses your line. When BTC longs get flushed, funding spikes or a Hyperliquid whale opens a big position, every phone on the alarm rings like an alarm clock. LFG is your daily alarm and curiosity agent for iPhone and Android, plus lfg.gm in a desktop browser.

CoinGlass's own alerts, under **Alerts** on coinglass.com, watch a pair's price or open interest and market-wide volatility, and reach you in the browser, by email or in the CoinGlass app. They can't call a link, so to ring a phone, a script does the checking. The one below runs free on GitHub Actions.

## What you can ring on

| Ring when | CoinGlass endpoint | Lowest API plan |
|---|---|---|
| BTC longs liquidated in 4 hours pass $100M | Coin Liquidation History | Hobbyist |
| Shorts get squeezed on a coin you trade | Coin Liquidation History, short side | Hobbyist |
| Funding on a coin goes above 0.1% | Coin Funding Rate by Exchange | Hobbyist |
| A Hyperliquid whale opens or closes over $1M | Hyperliquid Whale Alerts | Startup |
| A single liquidation over $1M hits | Liquidation Orders | Standard |

The plans and what each one can call are on CoinGlass's [plans page](https://docs.coinglass.com/reference/plans-and-permissions). Hobbyist reads in steps of 4 hours or more; higher plans read down to 30 minutes or 1 minute.

## Before you start

- **Get the LFG Alarm app on your phone** from Google Play or the App Store, and sign in. The script notices the move; your phone does the ringing.
- **An Anything alarm.** Every LFG account gets one free, and paid plans have room for more; see lfg.gm.
- **A CoinGlass API key**, from your CoinGlass account, on a plan that covers the endpoint you want.
- **A GitHub account**, to run the script on a schedule. Any computer or server that runs cron works too.

## Make the alarm

1. In LFG Alarm, on **Alarms**, tap **🔮 Anything**.
2. Name it for what it means, for example "BTC longs flushed". The ring screen shows the alarm's name and nothing else, so pick a name that says what happened.
3. Pick a **Cooldown**: how long it stays quiet after it rings, from 1 minute to 1 hour.
4. Share it with whoever should hear it, and tap **Arm it**.
5. On the link card, tap **Copy**. It starts with `https://api.lfg.gm/horn/`. Keep it private: anyone with it can ring the alarm.

## Write the check

This script reads the last 4 hours of BTC liquidations across Binance, OKX and Bybit, and rings the alarm when longs passed $100M. It looks at the 4 hours that just ended, so each stretch of time rings at most once.

```python
# check_liquidations.py
import json, os, urllib.request

LIMIT_USD = 100_000_000  # ring when longs liquidated in 4 hours pass this

url = ("https://open-api-v4.coinglass.com/api/futures/liquidation/aggregated-history"
       "?symbol=BTC&exchange_list=Binance,OKX,Bybit&interval=4h&limit=2")
req = urllib.request.Request(url, headers={"CG-API-KEY": os.environ["COINGLASS_API_KEY"]})
rows = json.load(urllib.request.urlopen(req))["data"]

just_ended = sorted(rows, key=lambda r: r["time"])[0]
if just_ended["aggregated_long_liquidation_usd"] > LIMIT_USD:
    urllib.request.urlopen(urllib.request.Request(os.environ["LFG_RING_URL"], data=b"", method="POST"))
```

To watch shorts instead, read `aggregated_short_liquidation_usd`. To watch ETH or SOL, change `symbol`.

## Run it every 4 hours

1. In a GitHub repository, open **Settings**, then **Secrets and variables**, then **Actions**, and add two secrets: `COINGLASS_API_KEY` with your key, and `LFG_RING_URL` with the alarm's link.
2. Add `check_liquidations.py` to the repository.
3. Add this file as `.github/workflows/liquidations.yml`:

```yaml
name: BTC longs flushed
on:
  schedule:
    - cron: "5 */4 * * *"
  workflow_dispatch:
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: python check_liquidations.py
        env:
          COINGLASS_API_KEY: ${{ secrets.COINGLASS_API_KEY }}
          LFG_RING_URL: ${{ secrets.LFG_RING_URL }}
```

It runs five minutes after each 4-hour stretch ends. To try it now, open the **Actions** tab, pick the workflow and click **Run workflow**. To hear the ring without waiting for a big day, set `LIMIT_USD` to `0` for one run, then put it back.

## Let your AI set it up

**Try this.** Paste it into ChatGPT, Claude, Grok or another AI agent that has the LFG Alarm connector (https://mcp.lfg.gm), not into the LFG Alarm app. The person needs the LFG Alarm app on their phone.

> Use LFG Alarm to make an Anything alarm called "BTC longs flushed" with 60 minutes of quiet time and give me its link. Then write me a Python script and a GitHub Actions workflow that check CoinGlass's Coin Liquidation History every 4 hours and call that link when BTC long liquidations in the last 4 hours pass $100M.

Why it works: One request makes the alarm and writes the check. Connect LFG Alarm to your AI app first: see [AI agents](https://lfg.gm/agents). CoinGlass also has an MCP server, so your AI can look up the right endpoint while it writes the script.

## Good to know

- **Your CoinGlass key stays with you.** The script keeps it in your GitHub secrets. LFG never sees it.
- **GitHub's schedule can run late.** Scheduled workflows can start several minutes after their time when GitHub is busy.
- **Nothing from CoinGlass reaches the ring screen.** The alarm's name is what people see, so name it for the moment.

## If it does not work

- **The run fails with an error from CoinGlass.** Check the key, and check your plan covers the endpoint and the interval. Hobbyist can't read `1h`.
- **The run passes but nothing rings.** The number did not cross your line. Set `LIMIT_USD` to `0` for one run to check the ring itself.
- **It rang but nobody's phone did.** The ring may have fallen inside the alarm's cooldown, or the people on it have not joined yet.
- **Still stuck?** Write to us from the [support page](https://lfg.gm/support).

## Questions

### Does LFG Alarm see my CoinGlass data?
No. The ring link never reads what is sent to it. LFG only learns that the link was called.

### Can I skip the script?
If you use a Mind from Minds, give it your CoinGlass key and it does the checking: see [Make a Mind ring your phone](https://lfg.gm/agents/minds).

### Can one check ring a whole trading desk?
Yes. Everyone who joined the alarm hears it.

## Learn more

- [The Anything alarm](https://lfg.gm/webhook-alarm)
- [Crypto price alarms](https://lfg.gm/crypto-price-alarm)
- [Make a Mind ring your phone](https://lfg.gm/agents/minds)
- [Connect LFG Alarm to your AI app](https://lfg.gm/agents)
- [For developers](https://lfg.gm/developers)

## Sources and further reading

- [CoinGlass docs: Coin Liquidation History](https://docs.coinglass.com/reference/aggregated-liquidation-history)
- [CoinGlass docs: API plans and permissions](https://docs.coinglass.com/reference/plans-and-permissions)
- [CoinGlass docs: MCP](https://docs.coinglass.com/reference/mcp-service)

LFG Alarm is not affiliated with CoinGlass.

## Keep exploring

- [Website change alerts: how to get an alarm when something happens online](https://lfg.gm/alert-when-something-happens-online.md): Point a website change monitor, an uptime monitor, Zapier, IFTTT, GitHub Actions or a cron script at an Anything alarm’s link and it rings your phone.
- [How to make Airtable ring your phone](https://lfg.gm/airtable-phone-alarm.md): An Airtable automation's Run script action calls an Anything alarm's link, so a big deal or an urgent ticket rings every phone on the alarm; Rocco's finds can land as new rows.
- [How to make Databricks ring your phone](https://lfg.gm/databricks-phone-alarm.md): Add an Anything alarm's link as a Databricks webhook destination, so a SQL alert or a failed job rings the on-call team's phones; agents can use LFG through MCP.
- [How to make Dune ring your phone](https://lfg.gm/dune-phone-alarm.md): Paste an Anything alarm's link into a Dune query's webhook alert, so a whale move, a treasury transfer or a volume spike rings every phone on the alarm.
- [How to make Nansen ring your phone](https://lfg.gm/nansen-phone-alarm.md): Add an Anything alarm's link to a Nansen Smart Alert as a webhook channel, so a smart money transfer, a price target or a Hyperliquid trade rings every phone on the alarm.
- [How to make ClickUp ring your phone](https://lfg.gm/clickup-phone-alarm.md): A ClickUp Automation's Call webhook action rings an Anything alarm, so an Urgent task, a blocked status or a due date rings every phone on it; ClickUp's AI can use LFG through MCP.

## About LFG

LFG is your daily social alarm & curiosity agent for iPhone, iPad and Android. It rings for times and for moments (a post on X, a stream going live, a token price, a wallet buying, an event starting), and one shared link makes every phone that joined ring together. Rocco, the cat inside the app, keeps watch and wakes you up.

- Get it on Google Play: https://play.google.com/store/apps/details?id=gm.lfg.app
- Download on the App Store: https://apps.apple.com/app/id6821089085
- Use it from an AI agent: add the MCP server https://mcp.lfg.gm as a connector, then ask in plain words.
- Every page for agents: https://lfg.gm/llms.txt
