Track Position (TP/SL) logo

Built-in action Built In

After a swap, record a filled position and optionally create take-profit / stop-loss sell orders. Non-USDC EVM entry costs are quoted to USDC when this action runs and fail closed if a quote is unavailable. Solana mainnet supports entry-record-only positions with canonical-USDC costs; it does not provide live valuation, P&L monitoring, or automated exits.

At a Glance

FieldValue
Action IDtrack-position
CategoryBuilt In
ConnectorNot required
Requires gasNo
Funds movementNone declared
Tagstrading, order, take-profit, stop-loss, tp-sl, defi, swap, polymarket, perp, hyperliquid, position

Payload Schema

FieldTypeRequiredDescription
walletIdstringYesWallet ID that holds the position tokens.
chainIdnumberYesChain ID where the token was bought. Solana mainnet records the filled entry only; it does not provide live valuation, P&L monitoring, or automated exits.
assetAddressstringYesToken mint or contract address of the asset you bought.
entryCoststringYesPositive canonical decimal string (no sign or leading zero): amount of quote token spent. EVM values are bounded by uint256; Solana values are bounded by uint64. Recording fails if the computed per-token price rounds below one USDC base unit.
entryAmountstringYesPositive canonical decimal string (no sign or leading zero): amount of asset received. EVM values are bounded by uint256; Solana values are bounded by uint64. Recording fails if the computed per-token price rounds below one USDC base unit.
entryTxHashstringYesTransaction hash or signature of the buy/entry.
tpMultipliernumber | stringNoTake-profit multiplier (e.g., 2.0 = sell when worth 2x entry cost). Up to 6 decimal places.
slMultipliernumber | stringNoStop-loss multiplier (e.g., 0.5 = sell when worth 50% of entry cost). Up to 6 decimal places.
labelstringNoDisplay name for the position (e.g., 'DEGEN', 'Trump YES').
quoteTokenstringNoToken mint or contract address of what you paid with. Omit only when entryCost is already denominated in canonical USDC for chainId. Non-USDC EVM costs use a current quote when this action runs and fail if a quote is unavailable; no historical entry-transaction lookup is performed. Solana currently requires canonical USDC. Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH.
assetDecimalsnumber | stringYesRequired recovery assertion for this post-swap action. The platform verifies it against the token contract before monitoring and retries verification durably after transient failures.
metadataobjectNoProtocol-specific data (e.g., Polymarket marketId, conditionId, outcome).
sellToTokenstringNoOptional canonical USDC contract address for the selected chain. Omit to use USDC by default; custom settlement targets are not supported.
positionTypestringNoPosition type. Defaults to 'dex'.

Result Schema

FieldTypeRequiredDescription
groupIdstringYesUnique ID of the order group. Use to query order status via API.
ordersarrayYesList of created orders (filled buy + optional TP/SL sell orders).

Examples

json
{ "type": "track-position", "payload": { "walletId": "0x0000000000000000000000000000000000000000", "chainId": 8453, "assetAddress": "0x0000000000000000000000000000000000000000", "assetDecimals": 18, "entryCost": "1000000", "entryAmount": "1000000", "entryTxHash": "example-entryTxHash" }, "children": []}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.