Sell Node is a specialized trading node for executing sell operations, an instance node of Swap Node. It provides clear sell semantics and simplifies token selling configuration.
Amber (Orange) / Emerald (Green)
Sell Node is designed specifically for token selling operations. It internally uses Swap Node's complete exchange functionality but provides more intuitive parameter naming. Users only need to specify the token to sell and the token to receive, and the node automatically handles the exchange logic.
Main Uses:
Simplified parameter configuration
Automatic exchange direction handling
Core Features:
πΈ Sell Semantics: sell_token and base_token parameters are more intuitive
π Auto Mapping: Internally converts to Swap Node's from/to parameters
π Full Functionality: Inherits all Swap Node features
π― Sell-Focused: Optimized user experience
Relationship with Swap Node
Sell Node is an instance node of Swap Node:
Parameter Mapping:
sell_token β from_token (token to sell)
base_token β to_token (token to receive)
Comparison with Buy Node:
Node
Operation
from_token
to_token
Parameter
Type
Required
Default
Description
{mode:"sell_fixed",value:""}
Amount (v0.4.1 supports 4 modes)
Vault object (from Vault Node, contains chain, address, balance)
amount_in_human_readable Parameter
Description: Amount setting, v0.4.1 supports 4 modes for flexible amount control.
Type: Switch (Mode Selector)
Data Structure:
Supported Modes:
Sell fixed amount of sell_token
Sell percentage of sell_token balance (0-100)
Receive fixed amount of base_token
Increase base_token holdings by percentage
Mode 1: sell_fixed (Fixed Sell Amount)
Specify exact amount of sell_token to sell.
Mode 2: sell_percent (Percentage Selling)
Sell a percentage of sell_token balance (0-100).
Mode 3: receive_fixed (Fixed Receive Amount)
Specify exact amount of base_token to receive.
Mode 4: receive_percent (Increase Stablecoin Percentage)
Increase current base_token holdings by specified percentage.
Backward Compatibility:
"number" mode auto-maps to "sell_fixed"
"percentage" mode auto-maps to "sell_percent"
slippery Parameter
Format: Percentage (recommended 0.5-5.0)
Scenario
Recommended
Description
vault Parameter
Source: Vault Node output
Description:
Must be received from upstream Vault Node
Contains complete vault info: chain, address, holdings, total_value_usd, etc.
Used for trade execution, balance queries, and chain determination
Output Parameters
Output ID
Display Name
Data Type
Description
Key Fields:
from_token: sell_token value
to_token: base_token value
amount_in: Actual sold amount
amount_out: Actual received amount
tx_hash: Transaction hash
Example 1: Sell APT for USDT (sell_fixed mode)
Scenario: Sell 10 APT for USDT.
Workflow:
Sell Node Configuration:
Example 2: Sell 50% Holdings (sell_percent mode)
Scenario: Sell 50% of current xBTC holdings.
Example 3: Receive Fixed USDT (receive_fixed mode)
Scenario: Sell APT to receive 100 USDT.
Example 4: Increase Stablecoin Ratio (receive_percent mode)
Scenario: Increase USDT holdings by 20%.
Conditional Trading
If sell_token or base_token is an empty string "", the node will skip execution and return a trade_receipt with skipped: true.
Mode Selection (v0.4.1)
Increase stablecoin holdings
Sell Strategies
Full Sell (sell_percent):
Batch Sell (sell_percent):
Technical Specifications
Hyperion (Aptos), Flow DEX
Buy Node - Instance node for buying tokens
Maintained by: TradingFlow Development Team Version: 1.0.0