ifttt-example

command module
v0.0.0-...-afb410b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 17 Imported by: 0

README

ifttt-example

Overview

This Go application is a simple WebSocket client that connects to the Whale Alert WebSocket API to receive real-time alerts for cryptocurrency transactions. It integrates with IFTTT by using webhooks based on the alerts received. This code accompanies the tutorial available here.

Features

  • Connects to Whale Alert's WebSocket API to receive real-time alerts.
  • Subscribes to specific blockchains, symbols, and transaction types.
  • Rate-limits IFTTT webhook calls to avoid exceeding API limits.
  • Gracefully handles WebSocket reconnections.
  • Logs alerts and errors for debugging and monitoring.

Prerequisites

  • Go 1.16 or higher
  • Whale Alert API key
  • IFTTT API key

Installation

  1. Clone the repository:
git clone https://github.com/whale-alert/ifttt-example.git
  1. Navigate to the project directory:
cd ifttt-example
  1. Install the required Go packages:
go mod download

Configuration

Replace the following placeholders in the code with your actual API keys:

  • YOUR_WHALE_ALERT_API_KEY: Your Whale Alert API key.
  • YOUR_IFTTT_API_KEY: Your IFTTT API key.

You can also modify the subscription variable to customize the alerts you want to subscribe to.

Usage

  1. Build the project:
go build
  1. Run the executable:
./whale-alert-websocket-client

Contributing

Feel free to open issues or submit pull requests to improve the project.

License

This project is licensed under the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL