EXAMPLE 16 OF 16 · Advanced
Review a large trade, then place one Pump order
Use an observed trade as a reviewed input, check the current coin venue, and submit one explicitly configured buy or sell with a saved receipt.
Before you begin#
- Choose Solana mainnet and a working RPC route in runtime settings. These examples read live data; illustrative results below will differ.
- Select your signing wallet in Vault. This mainnet example can spend real funds; Test mode is not a simulation of a mainnet Pump trade.
- From the large-trade alert, copy the mint and observed signature into mintAddress and observedSignature. Set your own orderSide, amountUnit, and amount.
- Run manually once. Keep one executor copy, and inspect any previous attempt before submitting another order.
Walk through the workflow#
- Code requires the observed signature, mint, an explicit side, a positive amount, and executeOrder set to true. The default false branch produces a review message without reading State or trading.
- Get State checks the observed signature for a previous attempt. A used signature takes the already-attempted path.
- Get Pump coin checks current state. If its bonding curve is complete, the workflow stops at a venue-change message.
- Set State records an attempt before Swap coin. Swap uses your configured amount, confirmation enabled, and zero automatic retries. On success, the final State write records the returned signature.
Review before execution#
Fill the inputs and first run with executeOrder: false. Inspect the review output. The observed signature is a reference and duplicate-attempt key; this workflow does not independently verify that the referenced transaction met the alert’s threshold. Review the original alert and transaction before changing executeOrder to true.
What changes when you enable it#
The same If node now opens the execution path. The order amount is yours, not the observed trader’s amount. Side and amountUnit jointly determine what you spend or sell. After success, inspect Swap coin’s transactionSignature and the receipt in State.
Why monitoring and execution are separate#
Event streams can overlap. A Get State followed by Set State is not an atomic claim, so connecting every matching event directly to a swap would not guarantee a single order. This example uses a deliberate one-run execution instead. Its State record is a repeat-attempt guard for that workflow and runtime, not a cross-device trading lock.
If submission fails#
The attempt marker intentionally remains. A failed response does not establish that nothing was submitted. Inspect the node output and wallet history before deciding whether to remove that specific State key. Importing a fresh workflow or changing runtimes does not carry this guard with it.
Make one change#
With executeOrder false, switch side and amountUnit and inspect the new review text. Keep scheduling set to Once. A graduated coin needs a separately reviewed PumpSwap operation; this graph does not switch trading venues automatically.