From 1f20d29497b650baf15faca8255f4083ea175903 Mon Sep 17 00:00:00 2001 From: david-hummingbot Date: Fri, 20 Dec 2024 16:49:21 +0800 Subject: [PATCH] release notes 2.2.0 --- docs/exchanges/dexalot.md | 56 ++++----- docs/exchanges/hyperliquid.md | 89 ++++++++++++-- docs/release-notes/2.2.0.md | 119 +++++++++++++++++++ docs/release-notes/index.md | 9 ++ docs/v2-strategies/executors/gridexecutor.md | 104 ++++++++++++++++ mkdocs.yml | 2 + 6 files changed, 337 insertions(+), 42 deletions(-) create mode 100644 docs/release-notes/2.2.0.md create mode 100644 docs/v2-strategies/executors/gridexecutor.md diff --git a/docs/exchanges/dexalot.md b/docs/exchanges/dexalot.md index 42fda63d..3483a009 100644 --- a/docs/exchanges/dexalot.md +++ b/docs/exchanges/dexalot.md @@ -5,23 +5,24 @@ | Component | Status | Notes | | --------- | ------ | ----- | -| [🔀 Spot Connector](#spot-connector) | ✅ | +| [🔀 Spot Connector](#spot-connector) | ✅ | Supports testnet | [🔀 Perp Connector](#perp-connector) | Not available -| [đŸ•¯ AMM Data Feed](#amm-data-feed) | ✅ | -| [📓 Connector Guide](/academy-content/using-dexalot-with-hummingbot/) | ✅ | +|| [đŸ•¯ Spot Candles Feed](#spot-candles-feed) | Not available | +| [đŸ•¯ Perp Candles Feed](#perp-candles-feed) | Not available | +| [📓 Connector Guide](../blog/posts/using-dexalot-with-hummingbot/index.md) | ✅ | ## ℹī¸ Exchange Info - **Website**: - **CoinMarketCap**: - **CoinGecko**: -- **API Docs**: +- **API Docs**: - **Fees**: ## 🔑 How to Connect !!! tip - See the [Dexalot Connector Guide](/academy-content/using-dexalot-with-hummingbot/) for step-by-step instructions. + See the [Dexalot Connector Guide](../blog/posts/using-dexalot-with-hummingbot/index.md) for step-by-step instructions. Create a wallet on one of the supported networks below: @@ -29,20 +30,18 @@ Create a wallet on one of the supported networks below: | ----- | -------- | | `avalanche` | `dexalot` -From inside the Hummingbot client, run `gateway connect dexalot` in order to connect your wallet: +From inside the Hummingbot client, run `connect dexalot` in order to connect your wallet: ``` -Which chain do you want dexalot to connect to? (avalanche) >>> -Which network do you want dexalot to connect to? (dexalot) -Enter your dexalot-avalanche-dexalot wallet private key >>> +Enter your Dexalot private key >>> +Enter your Dexalot wallet address >>> -Enter your Dexalot API Key (you can request one from the Dexalot team) >>> ``` If connection is successful: ``` -The dexalot connector now uses wallet [pubKey] on avalanche-dexalot +You are now connected to Dexalot! ``` @@ -50,34 +49,21 @@ The dexalot connector now uses wallet [pubKey] on avalanche-dexalot *Integration to spot markets API endpoints* - **ID**: `dexalot` -- **Connection Type**: REST via [Gateway](/gateway) -- **API Docs**: -- **Folder**: -- **Default Configs**: +- **Connection Type**: Websocket +- **API Docs**: +- **Folder**: -### Endpoints -- `/clob/orders` -- `/clob/batchOrders` -- `/chain/balances` -- `/chain/poll` +### Order Types -For more info, run Gateway and go to in your browser to see detailed documentation for each endpoint. +This connector supports the following `OrderType` constants: -## đŸ•¯ AMM Data Feed -*Data feed of this exchange's real-time prices* +- `LIMIT` +- `LIMIT_MAKER` +- `MARKET` -- **ID**: `dexalot_[CHAIN]_[NETWORK]` -- **Connection Type**: REST via [Gateway](/gateway) -- **Folder**: +### Paper Trading -### Usage +This perp exchange offers a paper trading mode: -```python -from hummingbot.data_feed.amm_gateway_data_feed import AmmGatewayDataFeed -prices = AmmGatewayDataFeed( - connector_chain_network="dexalot_avalanche_dexalot", - trading_pairs={"WAVAX-USDC", "ALOT-USDC"}, - order_amount_in_base=Decimal("1"), - ) -``` \ No newline at end of file +Afer you create an account and create the API keys, you can enter them by using the `connect dexalot_testnet` command within the Hummingbot client. Once connected, you should be able to use the testnet with the available spot strategies / scripts. \ No newline at end of file diff --git a/docs/exchanges/hyperliquid.md b/docs/exchanges/hyperliquid.md index 9a861181..12cae636 100644 --- a/docs/exchanges/hyperliquid.md +++ b/docs/exchanges/hyperliquid.md @@ -5,11 +5,11 @@ | Component | Status | Notes | | --------- | ------ | ----- | -| [🔀 Spot Connector](#spot-connector) | Not available | +| [🔀 Spot Connector](#spot-connector) | ✅ | | [🔀 Perp Connector](#perp-connector) | ✅ | Supports testnet -| [đŸ•¯ Spot Candles Feed](#spot-candles-feed) | Not available | -| [đŸ•¯ Perp Candles Feed](#perp-candles-feed) | Not available | -| [📓 Connector Guide](/academy-content/using-hyperliquid-vaults-with-hummingbot/) | ✅ | +| [đŸ•¯ Spot Candles Feed](#spot-candles-feed) | ✅ | +| [đŸ•¯ Perp Candles Feed](#perp-candles-feed) | ✅ | +| [📓 Connector Guide](../blog/posts/using-hyperliquid-vaults-with-hummingbot/index.md) | ✅ | ## ℹī¸ Exchange Info @@ -23,11 +23,11 @@ ## 🔑 How to Connect !!! tip - See the [Hyperliquid Vault Guide](/academy-content/using-hyperliquid-vaults-with-hummingbot/) for more details on how to use Hyperliquid VauLts. + See the [Hyperliquid Vault Guide](../blog/posts/using-hyperliquid-vaults-with-hummingbot/index.md) for more details on how to use Hyperliquid VauLts. ### Add Keys to Hummingbot -From inside the Hummingbot client, run `connect hyperliquid_perpetual` in Hummingbot in order to connect your wallet: +From inside the Hummingbot client, run `connect hyperliquid` in Hummingbot in order to connect your wallet: ``` Enter your Arbitrum wallet address >>> @@ -37,9 +37,26 @@ Enter your Arbitrum wallet private key >>> If connection is successful: ``` -You are now connected to hyperliquid_perpetual. +You are now connected to hyperliquid. ``` +## 🔀 Spot Connector +*Integration to spot markets API endpoints* + +- **ID**: `hyperliquid` +- **Connection Type**: WebSocket +- **API Docs**: +- **[Github Folder](https://github.com/hummingbot/hummingbot/tree/master/hummingbot/connector/exchange/hyperliquid)** + +### Order Types + +This connector supports the following `OrderType` constants: + +- `LIMIT` +- `LIMIT_MAKER` +- `MARKET` + + ## 🔀 Perp Connector *Integration to perpetual futures markets API endpoints* @@ -48,6 +65,27 @@ You are now connected to hyperliquid_perpetual. - **Connection Type**: WebSocket - **Folder**: + +### Usage + +From inside the Hummingbot client, run `connect hyperliquid_perpetual`: + +``` +>>> connect hyperliquid_perpetual + +``` + +``` +Enter your Arbitrum wallet address >>> +Enter your Arbitrum wallet private key >>> +``` + +If connection is successful: + +``` +You are now connected to hyperliquid_perpetual +``` + ### Order Types This connector supports the following `OrderType` constants: @@ -68,3 +106,40 @@ This perp exchange offers a paper trading mode: +- **[Github Folder](https://github.com/hummingbot/hummingbot/tree/master/hummingbot/data_feed/candles_feed/hyperliquid_spot_candles)** + +### Usage + +In a Hummingbot script, import `CandlesFactory` to create the candles that you want: +```python + from hummingbot.data_feed.candles_feed.candles_factory import CandlesFactory + candles = CandlesFactory.get_candle(connector="hyperliquid", + trading_pair="ETH-USDT", + interval="1m", max_records=50) +``` + + +## đŸ•¯ Perp Candles Feed +*OHLCV candles data collector from perpetual futures markets* + +- **ID**: `hyperliquid_perpetual` +- **Supported Intervals**: 1m | 3m | 5m | 15m | 30m | 1h | 2h | 4h | 6h | 8h | 12h | 1d | 1w | 1M +- **[Github Folder](https://github.com/hummingbot/hummingbot/tree/master/hummingbot/data_feed/candles_feed/hyperliquid_perpetual_candles)** + +### Usage + +In a Hummingbot script, import `CandlesFactory` to create the candles that you want: +```python + from hummingbot.data_feed.candles_feed.candles_factory import CandlesFactory + candles = CandlesFactory.get_candle(connector="hyperliquid_perpetual", + trading_pair=trading_pair, + interval="3m", max_records=50) +``` + + diff --git a/docs/release-notes/2.2.0.md b/docs/release-notes/2.2.0.md new file mode 100644 index 00000000..3e0da635 --- /dev/null +++ b/docs/release-notes/2.2.0.md @@ -0,0 +1,119 @@ +# Hummingbot v2.2.0 Release Notes + +*Released on December 23, 2024* + +## Introduction + + +| Repository | Description | GitHub Release | DockerHub Release | +|------------|-------------|----------------|-------------------| +| [Hummingbot](https://github.com/hummingbot/hummingbot) | Core Client | [`v2.2.0`](https://github.com/hummingbot/hummingbot/releases/tag/v2.2.0) | [`version-2.2.0`](https://hub.docker.com/r/hummingbot/hummingbot/tags?name=version-2.2.0) | +| [Dashboard](https://github.com/hummingbot/dashboard) | Hummingbot Frontend | [`v2.2.0`](https://github.com/hummingbot/dashboard/releases/tag/v2.2.0) | [`version-2.2.0`](https://hub.docker.com/r/hummingbot/dashboard/tags?name=version-2.2.0) | +| [Backend-API](https://github.com/hummingbot/backend-api) | Hummingbot Backend | [`v2.2.0`](https://github.com/hummingbot/backend-api/releases/tag/v2.2.0) | [`version-2.2.0`](https://hub.docker.com/r/hummingbot/backend-api/tags?name=version-2.2.0) | +| [Gateway](https://github.com/hummingbot/gateway) | DEX Middleware | [`v2.2.0`](https://github.com/hummingbot/gateway/releases/tag/v2.2.0) | [`version-2.2.0`](https://hub.docker.com/r/hummingbot/gateway/tags?name=version-2.2.0) | +| [Deploy](https://github.com/hummingbot/deploy) | Deployment Repo | + +## How to Update + +### Docker + +Re-run the [Deploy](https://github.com/hummingbot/deploy) setup script: +```bash +git clone https://github.com/hummingbot/deploy.git +cd deploy +bash setup.sh +``` + +For individual images, exit running containers, pull the latest images, and restart: +```bash +docker compose down +docker pull hummingbot/hummingbot:latest +docker compose up -d +``` + +### Source + +Update the branches of each repo to this release by running: +```bash +git pull origin master +``` + +## Hummingbot 2.2.0 Highlights + + +### New Dashboard Controller - Grid Strike + +The **Grid Strike** strategy creates a grid of orders within specified price ranges, offering new tools to enhance strategy setup and execution: + +- Dynamic Price Range Defaults: Auto-adjusts grid ranges using live market data for adaptive trading. + +- Visual Grid Configuration: Displays grid ranges and orders on charts for precise adjustments. + +- Multi-Range Support: Enables up to 5 grid ranges with independent settings and allocations. + +- Advanced Risk Management Tools: Adds bounds, time limits, and minimum spreads for controlled trading. + +[Hummingbot #7285](https://github.com/hummingbot/hummingbot/pull/7285) | [Backend-API #46](https://github.com/hummingbot/backend-api/pull/46) | [Dashboard #190](https://github.com/hummingbot/dashboard/pull/190). + +### New Connectors + +- This release now adds support for the `Hyperliquid Spot` market in [Hummingbot #7282](https://github.com/hummingbot/hummingbot/pull/7282). **Thanks to [isreallee82](https://github.com/isreallee82) for this contribution! 🙏** + +### New DEX Connectors + +- In this release, [Hummingbot #7334](https://github.com/hummingbot/hummingbot/pull/7334) & [Gateway #374](https://github.com/hummingbot/gateway/pull/374), introduces new connectors for the `Solana` blockchain and the `Jupiter` aggregator. These additions enable Hummingbot to interact with the Solana network and utilize Jupiter for token swaps. + +### Connector Improvements + +- The `dexalot` connector has been upgraded to the latest API version in [#7291](https://github.com/hummingbot/hummingbot/pull/7291). **Thanks to [yancong001](https://github.com/yancong001) for this contribution! 🙏** + +- Improved `bybit_perpetual` balance fetching in [#7279](https://github.com/hummingbot/hummingbot/pull/7279). **Thanks to [tomasgaudino](https://github.com/tomasgaudino) for this fix! 🙏** + +- Fixed the `binance` websocket reconnection issue in [#7310](https://github.com/hummingbot/hummingbot/pull/7310). **Thanks to [komposter](https://github.com/komposter) for this fix! 🙏** + +- The issue with the `hyperliquid` auth exemption for public data has been fixed in [#7328](https://github.com/hummingbot/hummingbot/pull/7328). **Thanks to [isreallee82](https://github.com/isreallee82) for this fix! 🙏** + + +### General Improvements + +- Enhanced Backtesting Framework: Improved simulation accuracy and performance [Hummingbot #7307](https://github.com/hummingbot/hummingbot/pull/7307). + +- Performance Observability: Backend-API endpoints were added to enable better performance monitoring [Backend-API #36](https://github.com/hummingbot/backend-api/pull/36). + +- Candlestick Data Processing: Added improvements that enhanced the processing of candlestick data in [#7276](https://github.com/hummingbot/hummingbot/pull/7276). + +- Improved `status` Output: Improved the `status` output for directional scripts in [#7341](https://github.com/hummingbot/hummingbot/pull/7341). + + +## Other Updates by Repository + +### Hummingbot + + +- [#7289](https://github.com/hummingbot/hummingbot/pull/7289) - Fixed hard coded symbols in `simple_xemm` script +- [#7319](https://github.com/hummingbot/hummingbot/pull/7319) - Added gas variables to `AMM arbitrage` strategy + + +### Gateway + +- [#370](https://github.com/hummingbot/gateway/pull/370) - Fixed poll route for `Base`approvals +- [#371](https://github.com/hummingbot/gateway/pull/371) - Improved `PancakeSwap` V2 pool fetching + + +### Backend-API + +- [#36](https://github.com/hummingbot/backend-api/pull/36) - Added performance page endpoints **Thanks to [tomasgaudino](https://github.com/tomasgaudino) for this fix! 🙏** +- [#37](https://github.com/hummingbot/backend-api/pull/37) - Enhanced observability and security +- [#47](https://github.com/hummingbot/backend-api/pull/47) - Added manage accounts router **Thanks to [tomasgaudino](https://github.com/tomasgaudino) for this fix! 🙏** +- [#49](https://github.com/hummingbot/backend-api/pull/49) - Used new backtesting interface + +### Dashboard + +- [#184](https://github.com/hummingbot/dashboard/pull/184) - Added Strategy Performance v2 page **Thanks to [tomasgaudino](https://github.com/tomasgaudino) for this fix! 🙏** +- [#188](https://github.com/hummingbot/dashboard/pull/188) - Added Backend API security and minor fixes +- [#215](https://github.com/hummingbot/dashboard/pull/215) - Fixed missing executor handling in Performance page **Thanks to [tomasgaudino](https://github.com/tomasgaudino) for this fix! 🙏** + +### Quants-Lab + +- [#12](https://github.com/hummingbot/quants-lab/pull/12) - Added security to Backend API + diff --git a/docs/release-notes/index.md b/docs/release-notes/index.md index 8be69a6a..e6319491 100644 --- a/docs/release-notes/index.md +++ b/docs/release-notes/index.md @@ -1,5 +1,14 @@ We generally release a new version of Hummingbot **every month**. See below for information about each release. +## [2.2.0](./2.2.0/) + +*Released December 23, 2024* + +**Hummingbot** + +* Github: [`v2.2.0`](https://github.com/hummingbot/hummingbot/releases/tag/v2.2.0) +* DockerHub: [`version-2.2.0`](https://hub.docker.com/r/hummingbot/hummingbot/tags?name=version-2.2.0) + ## [2.1.0](./2.1.0/) *Released October 28, 2024* diff --git a/docs/v2-strategies/executors/gridexecutor.md b/docs/v2-strategies/executors/gridexecutor.md new file mode 100644 index 00000000..cbb24724 --- /dev/null +++ b/docs/v2-strategies/executors/gridexecutor.md @@ -0,0 +1,104 @@ +The **GridExecutor:** is a sophisticated trading executor that implements a grid trading strategy. + +## Key Concepts: + +1. **Grid Trading**: A strategy that places multiple buy and sell orders at regular price intervals (forming a grid), attempting to profit from price oscillations within a range. + +2. **Grid Levels**: The executor creates multiple price levels between a start and end price, where each level represents a potential trading opportunity. + +## Main Features: + +### 1. **Grid Generation**: + +- Creates evenly spaced price levels between start_price and end_price + +- Each level has an associated order amount and take-profit target + +- Supports both spot and perpetual futures trading + +### 2. **Order Management**: + +- Places and monitors orders at different grid levels + +- Manages both open (entry) and close (exit) orders + +- Automatically cancels orders that move outside activation bounds + +- Implements batch order processing to avoid overwhelming the exchange + + +### 3. **Risk Management**: + +- Triple Barrier System: + + - Stop Loss + + - Take Profit + + - Time Limit + +- Trailing Stop functionality + +- Position size limits + +- Maximum open orders control + +### 4. **State Management**: + +Grid levels can be in different states: + +- **NOT_ACTIVE**: No orders placed + +- **OPEN_ORDER_PLACED**: Entry order active + +- **OPEN_ORDER_FILLED**: Entry order completed + +- **CLOSE_ORDER_PLACED**: Exit order active + +- **COMPLETE**: Both entry and exit orders filled + +### 5. **Performance Tracking**: + +- Tracks realized and unrealized PnL + +- Monitors fees and execution costs + +- Calculates position metrics + +- Records filled and failed orders + +Example Usage: +```python +config = GridExecutorConfig( + connector_name="binance", + trading_pair="BTC-USDT", + start_price=30000, + end_price=40000, + total_amount_quote=1000, # Total USDT to deploy + min_spread_between_orders=0.01, # 1% minimum spread + activation_bounds=0.02, # 2% activation bounds +) +executor = GridExecutor(strategy=my_strategy, config=config) +``` + +The executor will: + +1. Create grid levels between $30,000 and $40,000 + +2. Deploy $1000 USDT across these levels + +3. Maintain minimum 1% spread between orders + +4. Only keep active orders within 2% of current price + +5. Automatically manage entry and exit orders + +This is particularly useful for: + +- Range-bound markets + +- Market making strategies + +- Automated rebalancing + +- Risk-managed trading execution diff --git a/mkdocs.yml b/mkdocs.yml index ec6a551a..959fbf35 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -184,6 +184,7 @@ nav: - Executors: - Executors: v2-strategies/executors/index.md - Position Executor: v2-strategies/executors/positionexecutor.md + - Grid Executor: v2-strategies/executors/gridexecutor.md - DCA Executor: v2-strategies/executors/dcaexecutor.md - Arbitrage Executor: v2-strategies/executors/arbitrage-executor.md - XEMM Executor: v2-strategies/executors/xemm-executor.md @@ -352,6 +353,7 @@ nav: - Releases: - Releases: release-notes/index.md - Release Process: governance/releases.md + - 2.2.0: release-notes/2.2.0.md - 2.1.0: release-notes/2.1.0.md - 2.0.1: release-notes/2.0.1.md - 2.0.0: release-notes/2.0.0.md