Buy Node
Buy Node is a specialized trading node for executing buy operations on multi-chain networks.
Node Information
Node Type
buy_node
Display Name
Buy
Category
Instance (Trade Execution)
Icon
π Upward Trend Icon
Handle Color
Green
Base Node Type
swap_node
Functionality
Buy Node is a specialized version of Swap Node designed specifically for buy operations, simplifying the trading interface.
Main Uses:
Execute token buy orders
Automated buy strategies
Portfolio rebalancing (buy side)
Trading signal execution
Core Features:
π Multi-Chain Support: Aptos and Flow EVM
π° Simplified Interface: Buy-specific parameters
π Switch Amount Type: Support for both Number and Percentage modes
π‘οΈ Slippage Protection: Automatic price limits
π Transaction Receipt: Complete transaction details
Key Parameters
amount_in_human_readable (Switch Type)
The amount field now supports Switch type, allowing users to toggle between Number and Percentage modes:
Data Structure:
{
mode: "number" | "percentage", // Mode: exact amount or percentage
value: string // Value as string
}Mode 1: Number (Exact Amount)
{
"buy_token": "APT",
"base_token": "USDT",
"amount_in_human_readable": {
"mode": "number",
"value": "100"
}
}
// Meaning: Spend 100 USDT to buy APTMode 2: Percentage (Balance Percentage)
{
"buy_token": "APT",
"base_token": "USDT",
"amount_in_human_readable": {
"mode": "percentage",
"value": "50"
}
}
// Meaning: Spend 50% of USDT balance to buy APTFrontend UI:
User first selects mode (Number or Percentage)
Number mode: Shows numeric input field
Percentage mode: Shows 0-100% slider + input field
π Full Documentation
For detailed documentation including complete parameter descriptions, usage examples, and advanced features, please refer to:
Chinese version - Complete documentation (~9,200 words)
Frontend configuration:
1_weather_frontend/src/pages/flow/components/TFNode/instances/trade/BuyNode.tsxBackend implementation:
3_weather_cluster/tradingflow/station/nodes/swap_node.py
Maintained by: TradingFlow Development Team Version: 1.0.0
Last updated