compose-copy-trader-setup
Setup: Compose copy-trader
This skill makes the cloned copy-trader example runnable under the user's own Goldsky account. Two moving parts: a Turbo pipeline (pipeline/polymarket-ctf-events.yaml) that indexes Polymarket OrderFilled events on Polygon and webhooks them into Compose, and a Compose app (compose.yaml) with three tasks — copy_trade (http, mirrors each fill), setup_approvals (http, one-time), and redeem (cron every 5 min).
This is the most complex example. Do not skip any preflight or ordering step.
Non-negotiables
- Never run
goldsky compose deploy,goldsky turbo apply,goldsky secret create,goldsky compose secret set,git push, orgh repo createwithout showing the exact command first and getting explicit confirmation. WATCHED_WALLETSmust be identical in two places: theWATCHED_WALLETS:env var insideenv.cloud:ofcompose.yaml, AND themaker IN (...)/taker IN (...)lists inside thewatched_fillsSQL transform ofpipeline/polymarket-ctf-events.yaml. Mismatch = fills get indexed but not mirrored, or vice versa. Triple-check the addresses are lowercased, comma-separated, and identical in casing.- Order of operations matters: deploy the Compose app first, because the pipeline YAML's webhook URL contains the Compose app name. If you deploy the pipeline before the app exists (or with a stale app name), every webhook will 404.
- The
PRIVATE_KEYsecret is a real funded EOA on Polygon mainnet. This is not a testnet. Treat the key with care; do not print it, commit it, or log it. Polymarket CLOB orders are signed as this EOA — orders execute for real money. - US geo-blocking: Polymarket's CLOB API blocks US IPs. Compose hosts may be in the US. The default
CLOB_HOSTis a shared Fly.io proxy in the EU. For production, the user should deploy their own proxy (link in README).
Variable handling for agents
When this skill says $FOO, capture the literal value from the prior command's output and substitute it directly into the next command. Do not rely on shell variables persisting between separate Bash tool invocations — each invocation gets a fresh shell with no env carryover from earlier commands.