402.bot
Recipe
live $0.0100 premium Wallet Intelligence

Winner Trim And Rotate Pack

Turn one winning position plus a few destination candidates into a staged trim-and-rotate packet.

$0.0100price
6steps
10sources
8ktokens saved
4tool calls compressed
median latency
ZapperMessariUniswapGeminiZapper Token BalancesZapper Token PriceMessari Asset TimeseriesUniswap Swap QuoteTrading Candidate Context BatchGoogle Gemini Flash Structured

Endpoint: /v1/recipes/winner-trim-and-rotate-pack/run
Capabilities: trading, trim-and-rotate, profit-taking

Why pay for this?

This recipe turns roughly 4 separate tool operations into one paid endpoint call and saves about ~8k tokens saved.

Turns one winning position and a short destination shortlist into a staged trim-and-rotate packet.

Creator

Name: 402.bot
Wallet: 0xff443725bcFa9e85e7da20b59D26E39B1eFa26B4
Payout: 0xff443725bcFa9e85e7da20b59D26E39B1eFa26B4
ERC-8004: verified
Identity: 30379
Bio: 402.bot managed workflow marketplace recipes.
ERC-8004 reputation: 0.0
Creator score: 21

Usage and trust

Success 30d: 0%
Refund 30d: 0%
Paid runs: 0
Creator recipes: 1
Last run: No recent runs

Pipeline

Stage 1

Load wallet balances

fetch_transform

Source: Zapper Token Balances
Step id: balances

Stage 2

Load winner token price

fetch_transform

Source: Zapper Token Price
Step id: winner_price

Stage 3

Load winner price history

fetch_transform

Source: Messari Asset Timeseries
Step id: winner_timeseries

Stage 4

Quote the trim

fetch_transform

Source: Uniswap Swap Quote
Step id: exit_quote

Stage 5

Build destination context batch

fetch_transform

Source: Trading Candidate Context Batch
Step id: destinations

Stage 6

Build winner trim and rotate pack

fetch_transform

Source: Google Gemini Flash Structured
Step id: summarize

Recent runs

RunStatusTriggerQueued
No recent runs recorded yet. Runs appear here after the first paid execution.
View raw step spec

Load wallet balances

{
  "id": "balances",
  "kind": "fetch_transform",
  "title": "Load wallet balances",
  "request": {
    "params": {
      "first": 10,
      "chainIds": [
        "{{ $.input.chainId }}"
      ],
      "addresses": [
        "{{ $.input.walletAddress }}"
      ]
    },
    "sourceId": "zapper_token_balances",
    "deliveryFormat": "json"
  }
}

Load winner token price

{
  "id": "winner_price",
  "kind": "fetch_transform",
  "title": "Load winner token price",
  "request": {
    "params": {
      "address": "{{ $.input.winnerTokenAddress }}",
      "chainId": "{{ $.input.chainId }}",
      "currency": "USD"
    },
    "sourceId": "zapper_token_price",
    "deliveryFormat": "json"
  }
}

Load winner price history

{
  "id": "winner_timeseries",
  "kind": "fetch_transform",
  "title": "Load winner price history",
  "request": {
    "params": {
      "limit": 14,
      "assetId": "{{ $.input.winnerAssetSlug }}",
      "frequency": "1d",
      "metricKey": "price_usd"
    },
    "sourceId": "messari_asset_timeseries",
    "deliveryFormat": "json"
  }
}

Quote the trim

{
  "id": "exit_quote",
  "kind": "fetch_transform",
  "title": "Quote the trim",
  "request": {
    "params": {
      "amount": "{{ $.input.trimUsd }}",
      "chainId": "{{ $.input.chainId }}",
      "exactSide": "output",
      "slippageBps": "{{ $.input.slippageBps }}",
      "tokenInAddress": "{{ $.input.winnerTokenAddress }}",
      "tokenOutAddress": "0x833589fCD6EDB6E08f4c7C32D4f71b54bdA02913"
    },
    "sourceId": "uniswap_swap_quote",
    "deliveryFormat": "json"
  }
}

Build destination context batch

{
  "id": "destinations",
  "kind": "fetch_transform",
  "title": "Build destination context batch",
  "request": {
    "params": {
      "chainId": "{{ $.input.chainId }}",
      "candidates": "{{ $.input.destinationCandidates }}",
      "quoteAmountUsd": "{{ $.input.trimUsd }}",
      "settlementToken": "{{ $.input.settlementToken }}"
    },
    "sourceId": "trading_candidate_context_batch",
    "deliveryFormat": "json"
  }
}

Build winner trim and rotate pack

{
  "id": "summarize",
  "kind": "fetch_transform",
  "title": "Build winner trim and rotate pack",
  "request": {
    "params": {
      "input": {
        "chainId": "{{ $.input.chainId }}",
        "trimUsd": "{{ $.input.trimUsd }}",
        "balances": "{{ $.stepsById.balances.output }}",
        "exitQuote": "{{ $.stepsById.exit_quote.output }}",
        "winnerPrice": "{{ $.stepsById.winner_price.output }}",
        "destinations": "{{ $.stepsById.destinations.output }}",
        "walletAddress": "{{ $.input.walletAddress }}",
        "winnerAssetSlug": "{{ $.input.winnerAssetSlug }}",
        "winnerTimeseries": "{{ $.stepsById.winner_timeseries.output }}",
        "winnerTokenAddress": "{{ $.input.winnerTokenAddress }}"
      },
      "prompt": "Build a winner trim-and-rotate pack. Focus on the trim plan, the redeploy targets, the exit quote, and concrete next actions.",
      "responseSchema": {
        "type": "object",
        "required": [
          "walletAddress",
          "chainId",
          "winnerTokenAddress",
          "summary",
          "trimPlan",
          "redeployTargets",
          "exitQuote",
          "nextActions"
        ],
        "properties": {
          "chainId": {
            "type": "integer"
          },
          "summary": {
            "type": "string"
          },
          "trimPlan": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "tokenAddress",
                "symbol",
                "action",
                "sizeUsd",
                "confidence",
                "note"
              ],
              "properties": {
                "note": {
                  "type": "string"
                },
                "action": {
                  "enum": [
                    "buy",
                    "add",
                    "trim",
                    "sell",
                    "hold"
                  ],
                  "type": "string"
                },
                "symbol": {
                  "type": "string"
                },
                "sizeUsd": {
                  "type": "number"
                },
                "confidence": {
                  "enum": [
                    "high",
                    "medium",
                    "low"
                  ],
                  "type": "string"
                },
                "tokenAddress": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "description": "Suggested trim actions."
          },
          "exitQuote": {
            "type": "object",
            "required": [
              "tokenInSymbol",
              "tokenOutSymbol",
              "amountIn",
              "amountOut",
              "priceImpactBps",
              "routeHops"
            ],
            "properties": {
              "amountIn": {
                "type": "string"
              },
              "amountOut": {
                "type": "string"
              },
              "routeHops": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "tokenInSymbol": {
                "type": "string"
              },
              "priceImpactBps": {
                "type": "number"
              },
              "tokenOutSymbol": {
                "type": "string"
              }
            },
            "description": "Reference exit quote.",
            "additionalProperties": false
          },
          "nextActions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Suggested next actions."
          },
          "walletAddress": {
            "type": "string"
          },
          "redeployTargets": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "tokenAddress",
                "symbol",
                "action",
                "sizeUsd",
                "confidence",
                "note"
              ],
              "properties": {
                "note": {
                  "type": "string"
                },
                "action": {
                  "enum": [
                    "buy",
                    "add",
                    "trim",
                    "sell",
                    "hold"
                  ],
                  "type": "string"
                },
                "symbol": {
                  "type": "string"
                },
                "sizeUsd": {
                  "type": "number"
                },
                "confidence": {
                  "enum": [
                    "high",
                    "medium",
                    "low"
                  ],
                  "type": "string"
                },
                "tokenAddress": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "description": "Suggested redeploy targets."
          },
          "winnerTokenAddress": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "systemInstruction": "You are compressing profit-taking and redeployment into a bounded operator packet. Stay grounded in the supplied wallet, market, quote, and destination context."
    },
    "sourceId": "google_gemini_flash_structured",
    "deliveryFormat": "json"
  }
}