Sell Node

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.


Node Information

Property
Value

Node Type

sell_node

Display Name

Sell

Category

Trade (Execution)

Icon

πŸ“‰ Downward Trend Icon

Handle Color

Amber (Orange) / Emerald (Green)

Node Category

Instance Node

Base Node Type

swap_node


Functionality

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:

  • Sell held tokens

  • Clear sell semantics

  • 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

Buy Node

Buy

base_token (pay)

buy_token (receive)

Sell Node

Sell

sell_token (sell)

base_token (receive)


Input Parameters

Parameter List

Parameter
Type
Required
Default
Description

sell_token

searchSelect

βœ…

-

Token symbol to sell

base_token

searchSelect

βœ…

-

Token symbol to receive

amount_in_human_readable

switch

βœ…

{mode:"sell_fixed",value:""}

Amount (v0.4.1 supports 4 modes)

slippery

number

βœ…

1.0

Slippage tolerance (%)

vault

object

βœ…

-

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:

Mode
Description
Use Case

sell_fixed

Sell fixed amount of sell_token

Precise sell quantity

sell_percent

Sell percentage of sell_token balance (0-100)

Proportional reduction

receive_fixed

Receive fixed amount of base_token

Precise income target

receive_percent

Increase base_token holdings by percentage

Stablecoin rebalancing

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

High liquidity

0.5-1.0%

Major pairs

Medium liquidity

1.0-3.0%

Regular tokens

Low liquidity

3.0-5.0%

Small cap tokens

Emergency stop-loss

3.0-5.0%

Ensure execution

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

trade_receipt

Trade Receipt

object

Complete trade receipt

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


Usage Examples

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.


Best Practices

Mode Selection (v0.4.1)

Scenario
Recommended Mode

Precise sell quantity

sell_fixed

Proportional reduction

sell_percent

Receive specific amount

receive_fixed

Increase stablecoin holdings

receive_percent

Sell Strategies

Full Sell (sell_percent):

Batch Sell (sell_percent):


Technical Specifications

Specification
Value

Node Version

0.0.2

Node Category

Instance Node

Base Node

swap_node

Inherited

100%

Chains

Aptos, Flow EVM

DEXs

Hyperion (Aptos), Flow DEX




Maintained by: TradingFlow Development Team Version: 1.0.0

Last updated