Skip to content

hydrogenbond007/hyperliquid-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hyperliquid CLI

A command-line interface for trading on the Hyperliquid protocol.

Installation

pip install hyperliquid-cli

Configuration

Before using the CLI, you need to set up your configuration. Create a .env file in your home directory with the following:

HYPERLIQUID_PRIVATE_KEY=your_private_key
HYPERLIQUID_ACCOUNT_ADDRESS=your_account_address

Usage

The CLI provides several commands for trading:

# Get market information
hyperliquid market info ETH-PERP

# Place a market order
hyperliquid trade market-buy ETH-PERP 0.1
hyperliquid trade market-sell ETH-PERP 0.1

# Place a limit order
hyperliquid trade limit-buy ETH-PERP 0.1 1800.0
hyperliquid trade limit-sell ETH-PERP 0.1 1900.0

# Get positions
hyperliquid positions

# Get open orders
hyperliquid orders

# Cancel an order
hyperliquid cancel ETH-PERP order_id

# Close a position
hyperliquid close ETH-PERP position_id

# Start the API server
hyperliquid serve

Development

To set up the development environment:

  1. Clone the repository
  2. Install dependencies: pip install -e ".[dev]"
  3. Run tests: pytest

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages