Skip to main content
By the end you have a small server that posts a line to a Discord channel each time a sports market’s price moves past your threshold. It runs on the market_price_moved webhook, so 0xinsider measures the move and your server only formats and forwards it. Each alert names the outcome, the move, the spread, the dollars resting within 2 cents of the price, and the large trades that landed in the same window. You need a Pro or Max API key, a Discord channel webhook URL (channel settings, then Integrations, then Webhooks), and Node.js 20 or later. See Authentication.

1. Pick what counts as a move

A subscription names one threshold and one window. 0xinsider sends at most one delivery per market per window, and a second one only when the move grows further in the same direction. min_book_usd_within_2c keeps out moves on thin books, where one small order can shift the price by several cents.

2. The server

The server verifies each delivery’s signature, ignores a delivery it already posted, and forwards the rest to Discord. When Discord refuses a message, the server answers 503, so 0xinsider retries the delivery later on its retry schedule.
discord-line-moves.ts
Run it with the two secrets in the environment:
<t:...:R> is Discord’s relative timestamp, so the channel shows how long ago the move happened. That matters on a retried delivery, which can arrive minutes after the move.

3. Test it before a live move

The market_price_moved page has an example delivery: a 6-cent move on the Heat moneyline before the Heat and Warriors game on November 5, 2026. Sign it with your secret and post it to the server. The Discord channel should show one alert, and a second post of the same body shows nothing, because the event id was already posted.
Expect 204. A 401 means the secret differs from the one the server reads.

4. Subscribe

Expose the server on a public HTTPS URL, then create the webhook. The response carries signing_secret once; put it in OXINSIDER_WEBHOOK_SECRET and restart the server before you verify.
Then verify the endpoint with the returned verification.token, as the Webhooks guide shows. The server answers the signed challenge with 204, and the webhook becomes active. To change the threshold later, send a PATCH with a new price_move_filters. A PATCH without it keeps the stored settings.

Limits

  • The list of posted ids lives in memory. After a restart, a retry of an event posted just before the restart is posted a second time.
  • The server posts before it answers, so a Discord outage longer than the 15-second delivery deadline turns into a retry. After 8 failed attempts the delivery is dead_letter, and the delivery log lists it.
  • book_depth_within_2c is null when we had no recent full order book for the market, so a min_book_usd_within_2c subscription skips those moves. Leave the filter out to see every move.