Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 0x Gasless Trading Bot #45

Merged
merged 4 commits into from
Dec 19, 2024
Merged

Add 0x Gasless Trading Bot #45

merged 4 commits into from
Dec 19, 2024

Conversation

jlin27
Copy link
Collaborator

@jlin27 jlin27 commented Dec 18, 2024

Context

Add a demo that showcases a TypeScript-based CLI trading bot that automates ERC20 token trades using the 0x Gasless API on the Base network. The bot is designed to help traders execute gasless trades with intelligent, risk-managed strategies.

Details

Once the inputs are entered, the bot will run the following:

  1. Buys the specified ERC20 token using WETH.
    • If not the wallet does not have enough WETH, it will try to wrap ETH for WETH.
  2. Watches for conditions:
    • Price increases by X% → Trigger "Take Profit" → Sell.
    • Price drops by Y% → Trigger "Stop Loss" → Sell.
    • Timeout after Z sec → Trigger "Timeout" → Sell.
  3. Updates MongoDB with trade results and PnL.

Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
0x-examples ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 11:59pm
0x-swap-v2-demo-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 11:59pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant