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

feat: plugin-hyperliquid #2141

Merged
merged 5 commits into from
Jan 11, 2025
Merged

Conversation

earlyvibz
Copy link
Contributor

Relates to

N/A - New plugin contribution

Risks

Low

  • Only interacts with public Hyperliquid API endpoints
  • Includes price validation to prevent erroneous trades
  • Requires explicit private key configuration
  • Has clear error handling

Background

What does this PR do?

Adds a new Hyperliquid plugin for Eliza that enables spot trading, price checking, and order management on the Hyperliquid DEX.

What kind of change is this?

  • Features (non-breaking change which adds functionality)

Documentation changes needed?

  • My changes do not require a change to the project documentation
  • Documentation is included in the plugin's README.md

Testing

Where should a reviewer start?

  1. src/actions/spotTrade.ts - Core trading functionality
  2. src/actions/priceCheck.ts - Price checking
  3. src/actions/cancelOrders.ts - Order management
  4. src/templates.ts - Command parsing templates
  5. src/types.ts - Type definitions and constants

Detailed testing steps

  1. Setup environment variables:

    • Set HYPERLIQUID_PRIVATE_KEY
    • Set HYPERLIQUID_TESTNET=true
  2. Test price checking:

    • Command: "What's the price of PIP?"
    • Verify: price, 24h change, volume displayed
  3. Test spot trading:

    • Market buy: "buy 1 PIP"
    • Market sell: "sell 1 PIP"
    • Limit buy: "buy 1 PIP at 20 USDC"
    • Limit sell: "sell 1 PIP at 21 USDC"
    • Verify: price validation works
  4. Test order cancellation:

    • Place limit order
    • Command: "Cancel all orders"
    • Verify: orders cancelled

Screenshots

N/A - CLI/API functionality

Deploy Notes

N/A - Plugin package

Discord username

earlyvibz

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @earlyvibz! Welcome to the ai16z community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now a ai16z contributor!

@wtfsayo wtfsayo self-requested a review January 11, 2025 09:45
@wtfsayo wtfsayo merged commit 5bade12 into elizaOS:develop Jan 11, 2025
3 checks passed
@AIFlowML
Copy link
Collaborator

Merged the double. Again.

0xpi-ai pushed a commit to 0xpi-ai/NayariAI that referenced this pull request Jan 15, 2025
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.

4 participants