πWhat is a Node?
Last updated
Last updated
A node is a basic element in the MindTrade platform that performs a single, specific task within a trading bot's workflow. Think of nodes as individual steps or instructions that come together to build the complete set of operations for the bot.
Each node is designed to carry out one particular action, like making a trade or analyzing market trends. When the trading bot runs, it activates these nodes in a specific order to carry out the trading strategy.
Modularity: Nodes can be combined in different ways to create varied trading strategies.
Encapsulation: All the details needed to perform a nodeβs task are self-contained within the node.
Reusability: You can use the same node across different strategies.
Unique Identifiers: Every node is assigned a unique resource identifier. This identifier is crucial when you want to use the output of one node as the input for another.
Inputs are the information or data that a node needs to perform its task. These inputs can come from several sources:
Outputs from Other Nodes: One nodeβs output can serve as input for another node. This connectivity allows the nodes to interact and build upon each other's results, creating a dynamic flow of data within the bot's architecture.
Secrets: For tasks that require secure data, such as API keys or wallet private keys, you can use secrets as inputs. Secrets are safely stored and managed within the platform to ensure security and confidentiality. You can read more in the Secrets section.
Static Values: Sometimes, a node might need a fixed value to operate. These static values are set directly in the nodeβs configuration and remain unchanged each time the bot runs.
After a node completes its task, it may produce an output. This output is the result of the node's operation and can be utilized in various ways:
Operational Output: Sometimes, the purpose of a node is simply to perform an operation, such as buying an asset. In these cases, the output might not need to be used further, serving primarily as a confirmation or record of the completed action.
Input for Subsequent Nodes: Often, the output of a node is crucial for the continuation of the trading strategy. For example, a node that retrieves current market prices may produce an output that is used as an input for another node responsible for making trading decisions based on those prices.