Reconciliation and Cleanup

Daily Unreconciled Transaction Alert

The Script

#!/bin/bash
# daily-recon-alert.sh

WEBHOOK_URL="https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK"

count=$(kick transactions list \
  --filter="reconciled=false" \
  --format=json | jq 'length')

if [ "$count" -gt 0 ]; then
  oldest=$(kick transactions list \
    --filter="reconciled=false" \
    --format=json | jq -r 'sort_by(.date) | .[0].date')
  
  message="⚠️ *$count unreconciled transactions*\nOldest: $oldest\n<https://app.kick.co/transactions|View>"
  
  curl -X POST "$WEBHOOK_URL" \
    -H 'Content-Type: application/json' \
    -d "{\"text\":\"$message\"}"
  
  echo "Alert sent: $count unreconciled transactions"
else
  echo "✓ All transactions reconciled"
fi

How to Customize

  • Change notification channel (email, Teams, Discord)

  • Add threshold: only alert if count > 10

  • Schedule with cron to run daily

What It Outputs

⚠️ 23 unreconciled transactions
Oldest: 2026-01-15
Find Transactions Missing Required Fields

The Script

#!/bin/bash
# find-incomplete-transactions.sh

FROM_DATE="2026-01-01"
TO_DATE="2026-01-31"
OUTPUT_FILE="incomplete-transactions.csv"

echo "date,amount,counterparty,missing_fields" > "$OUTPUT_FILE"

kick transactions list \
  --from="$FROM_DATE" \
  --to="$TO_DATE" \
  --format=json | \
jq -r '.[] |
  select(.memo == null or .class == null or .category == null) |
  [
    .date,
    .amount,
    .counterparty,
    ([
      (if .memo == null then "memo" else empty end),
      (if .class == null then "class" else empty end),
      (if .category == null then "category" else empty end)
    ] | join("; "))
  ] |
  @csv' >> "$OUTPUT_FILE"

count=$(tail -n +2 "$OUTPUT_FILE" | wc -l)

echo "Found $count transactions with missing fields"
echo "Exported to $OUTPUT_FILE"

How to Customize

  • Change required fields based on your workflow

  • Add amount threshold

  • Auto-assign default values

What It Outputs

Found 15 transactions with missing fields
Exported to incomplete-transactions.csv

Last updated

Was this helpful?