MoonPeg

Alert delivery guides

Every channel includes only your subscribed symbols. Create credentials and manage delivery in Settings. The buttons below send tests to your account when you are signed in.

Email

Quick start

  1. Turn on email alerts and choose fills and closes or every order update.
  2. Send a test alert.
  3. Add the MoonPeg sender to your contacts to improve inbox placement.
Common problems
  • Check spam and promotions folders.
  • Workplace filters can delay or block alert email. Ask your administrator to allow the MoonPeg sender.
  • Change which events are emailed with the What to email selector. Mute individual symbols below when needed.
Tips and tricks
  • Email defaults to fills and closes to reduce noise.
  • Above 30 alert emails in an hour, the rest are combined into a digest every 15 minutes.

Web and device push

Quick start

  1. Open Settings on the device you want to use and enable notifications.
  2. On iPhone or iPad with iOS 16.4 or later, add MoonPeg to the Home Screen first, then open that app icon and enable notifications.
  3. Send a test alert and check the device notification center.
Common problems
  • Enable push separately on every device.
  • If permission was blocked, reset Notifications in the browser's site settings, then try again.
  • Private or incognito windows and some browsers do not support push.
  • Focus or Do Not Disturb can hide banners. Check the notification center.
  • Clearing site data removes the device registration, so enable it again afterwards.
Tips and tricks
  • Keep at least one registered device and remove devices you no longer use.
  • Choose fills and closes only if every order update is too noisy.

Signals API

Quick start

  1. Create an API key and private RSS address. They are shown only once.
  2. Use the API for JSON polling or paste the RSS address into your reader.
  3. Send a test event, then check your API or reader. Regenerate both credentials if either one is shared.
Common problems
  • A 401 means the API key is invalid, disabled or regenerated. A 404 means the RSS token is invalid, disabled or regenerated.
  • Feed readers often poll every 15 to 60 minutes, so RSS is not real-time. Use webhook or push for speed.
  • The API allows 60 requests per minute per key. A 429 response includes Retry-After: 60.
Tips and tricks
  • Treat the RSS address as a secret because its token is in the URL.
  • Use the since parameter with an ISO date or unix seconds. The API returns up to 500 events and at most 30 days of history.

Request

GET https://moonpeg.com/api/public/v1/signals?since=2026-11-10T00:00:00Z
Authorization: Bearer mpk_…

since is an ISO date or unix seconds. The default is the last 7 days, and the maximum history is 30 days. Results are newest first, up to 500. The limit is 60 requests per minute per key. Exceeding it returns 429 with Retry-After: 60.

curl -H "Authorization: Bearer $MOONPEG_KEY" \
  "https://moonpeg.com/api/public/v1/signals?since=$(date -u -d '-1 hour' +%s)"

Private RSS feed

Paste your private RSS address into a reader. It contains up to 100 events from the last 7 days and refreshes every minute on MoonPeg. Your reader may poll only every 15 to 60 minutes, so use webhook or push when speed matters. Anyone with the address can read it. Regenerate it if shared.

Signed webhooks

Quick start

  1. Save an HTTPS endpoint that accepts POST requests with a JSON body and replies with a 2xx status within 5 seconds.
  2. In n8n, activate the workflow and copy its Production URL containing /webhook/. Do not use the Test URL containing /webhook-test/. In Zapier, Make and Pipedream, turn on the workflow and use its live trigger URL.
  3. Copy the signing secret, verify every request, then use Send test alert.
Common problems
  • A 404 from n8n usually means the workflow is inactive or the address is a Test URL.
  • Each event arrives as its own request. One alert can produce two requests, such as trade closed followed by new order.
  • Deduplicate on trade_id + event + bar_time because MoonPeg retries failed requests.
  • Cloudflare and other firewalls or bot protection can block our POST requests. Allow the MoonPeg user agent or your verified webhook path.
  • Retries now spread over about 61 minutes. The final failure also sends you an email.
Tips and tricks
  • Reply quickly and do slow work after your response.
  • Reject signatures that do not match and timestamps more than 5 minutes old.
  • Keep the raw request body for signature verification. Parsing and re-stringifying JSON can change the signed bytes.

Request and full payload

MoonPeg sends one POST request per event with Content-Type: application/json and User-Agent: MoonPeg-Alerts/1. Your endpoint must use HTTPS and return a 2xx response within 5 seconds.

POST /your-endpoint
Content-Type: application/json
X-MoonPeg-Timestamp: 1764438002
X-MoonPeg-Signature: sha256=<64 lowercase hex characters>

{
  "symbol_code": "GEM-USDCUSD-XXXX",
  "exchange": "gemini",
  "pair": "USDC/USD",
  "bar_time": "2026-11-11T23:00:00Z",
  "event": "ENTRY_PLACED",
  "book": "buy",
  "trade_id": "GEM-USDCUSD-XXXX-B-1794438000",
  "side": "buy",
  "price": 0.99956,
  "prev_price": null,
  "size": 100.04,
  "tp": 0.99972,
  "exit_reason": null,
  "net_usd": null,
  "net_pct": null
}
symbol_code
MoonPeg's unique strategy code. The example uses a placeholder; your real codes are listed in Settings → Webhooks and RSS / API once you subscribe.
exchange
The exchange: binance, coinbase, gemini or kraken.
pair
The human-readable stablecoin pair.
bar_time
The UTC strategy candle time for this alert.
event
ENTRY_PLACED, ENTRY_MOVED, ENTRY_CANCELLED, ENTRY_FILLED, TP_MOVED or TRADE_CLOSED.
book
The strategy book: buy or sell.
trade_id
The stable trade reference used for idempotency.
side
The order side: buy or sell.
price
The current limit, fill or close price. Null when not supplied.
prev_price
The previous order price for moves and cancellations. Otherwise null.
size
The order or position size. Null when not supplied.
tp
The current take-profit price. Null when not supplied.
exit_reason
Why a trade closed, such as tp. Null for other events.
net_usd
Closed-trade net result in USD after fees. Null for other events.
net_pct
Closed-trade net percentage after fees. Null for other events.

Exactly how the signature is computed

Use your webhook signing secret as the HMAC-SHA256 key. Sign the exact UTF-8 bytes of the Unix timestamp string, followed by one literal period, followed by the raw request body bytes exactly as received. The expression is HMAC_SHA256(secret, timestamp + "." + rawBody). Send the lowercase hex digest as X-MoonPeg-Signature: sha256=<digest>. The same Unix seconds value appears in X-MoonPeg-Timestamp.

Reject requests when verification fails or when the timestamp is more than 5 minutes old. Do not parse and rebuild the JSON before verification.

Node.js verification

import crypto from "node:crypto";

// rawBody must be the exact received bytes, not parsed and rebuilt JSON.
export function verifyMoonPeg(req, secret) {
  const timestamp = req.headers["x-moonpeg-timestamp"];
  const signature = req.headers["x-moonpeg-signature"];
  if (!timestamp || !signature) return false;
  const age = Math.abs(Math.floor(Date.now() / 1000) - Number(timestamp));
  if (!Number.isFinite(age) || age > 300) return false;

  const rawBody = req.rawBody; // Buffer or Uint8Array
  const digest = crypto.createHmac("sha256", secret)
    .update(timestamp + ".", "utf8")
    .update(rawBody)
    .digest("hex");
  const expected = Buffer.from("sha256=" + digest);
  const received = Buffer.from(signature);
  return received.length === expected.length && crypto.timingSafeEqual(received, expected);
}

Python verification

import hashlib
import hmac
import time

def verify_moonpeg(headers, raw_body: bytes, secret: str) -> bool:
    timestamp = headers.get("x-moonpeg-timestamp", "")
    signature = headers.get("x-moonpeg-signature", "")
    if not timestamp or not signature:
        return False
    if abs(int(time.time()) - int(timestamp)) > 300:
        return False

    signed = timestamp.encode("utf-8") + b"." + raw_body
    expected = "sha256=" + hmac.new(
        secret.encode("utf-8"), signed, hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(signature, expected)

Retries and idempotency

A non-2xx response, timeout or network error is retried up to 5 times over about 61 minutes. After the final attempt, MoonPeg marks the delivery failed and emails you. Deduplicate on trade_id + event + bar_time. Each event is a separate request, so one strategy alert can produce a trade-closed request followed by a new-order request.

Not financial advice. Trading involves risk of loss. Past and backtested performance does not guarantee future results.