Quick Start
Quick Start
Section titled “Quick Start”This guide will walk you through creating your first trading flow in GrailHub.
Step 1: Create a New Flow
Section titled “Step 1: Create a New Flow”- Log in to GrailHub at
http://localhost:3000 - Click the “New Flow” button
- Give your flow a name, e.g., “My First Trading Bot”
- Click “Create”
Step 2: Add Components
Section titled “Step 2: Add Components”Let’s build a simple flow that monitors Bitcoin price and sends a notification when it crosses a threshold.
Add a Ticker Component
Section titled “Add a Ticker Component”- Open the Components panel on the left
- Search for “Ticker”
- Drag the Binance Ticker component onto the canvas
- Configure it:
- Symbol:
BTCUSDT - Interval:
1s
- Symbol:
Add a Condition Component
Section titled “Add a Condition Component”- Search for “Condition”
- Drag the Condition component onto the canvas
- Configure it:
- Operator:
greater_than - Threshold:
50000
- Operator:
Add a Notification Component
Section titled “Add a Notification Component”- Search for “Notification”
- Drag the Telegram Notification component onto the canvas
- Configure it:
- Bot Token: Your Telegram bot token
- Chat ID: Your Telegram chat ID
- Message:
Bitcoin price is above $50,000!
Step 3: Connect Components
Section titled “Step 3: Connect Components”- Click on the output handle of the Ticker component (the small circle on the right)
- Drag to the input handle of the Condition component
- Click on the true output of the Condition component
- Drag to the input handle of the Notification component
Your flow should look like this:
[Binance Ticker] → [Condition] → [Telegram Notification]
↓
(if false, do nothing)Step 4: Save and Run
Section titled “Step 4: Save and Run”- Click the “Save” button in the top right
- Click the “Run” button to start your flow
- The flow will now monitor Bitcoin price and send you a notification when it goes above $50,000
Step 5: Monitor Execution
Section titled “Step 5: Monitor Execution”- Click on the “Logs” tab to see execution logs
- You’ll see each component’s output and any errors
- Click on individual nodes to see their state and data
Understanding the Flow
Section titled “Understanding the Flow”Let’s break down what’s happening:
- Binance Ticker fetches the current Bitcoin price every second
- Condition checks if the price is greater than $50,000
- If true, Telegram Notification sends you a message
- If false, nothing happens and the flow continues
Next Steps
Section titled “Next Steps”Now that you’ve created your first flow, explore more:
- Use the Debug Mode: Click the bug icon to see data flowing through your flow in real-time
- Save Often: GrailHub auto-saves, but it’s good practice to save manually after major changes
- Test with Small Amounts: When building trading strategies, always test with small amounts first
- Use Conditions: Add conditions to prevent unwanted trades or notifications