# Hummingbot 連接器

在 PredictAsiaX 市場上執行 Hummingbot 策略。此連接器並非官方 Hummingbot 發布版的一部分，而是作為 Hummingbot v2.18.0 的補丁在此提供。

## 功能說明

- 交易所名稱 `predictasiax`。每個市場都是以太幣 USDT 結算的 YES/NO 市場，且每個結果都是一個交易對：市場 `btc-200000-hit-2026` 對應 `BTC_200000_HIT_2026_YES-USDT` 與 `BTC_200000_HIT_2026_NO-USDT`。
- 訂單類型：limit、limit maker (post-only) 與 market。價格為 0.001 至 0.999 之間、符合 tick 網格的機率。最小訂單名目金額為 1 USDT，除非是賣出整個持倉。
- 訂單簿與成交資料來自公開的 WebSocket 頻道 `book:<market>`，並透過 REST 快照進行重新同步。
- 訂單與撤單透過已登入的 WebSocket 傳送，每秒上限以登入時回報的數值為準。當 WebSocket 不可用時，則改用 REST。成交會依交易 id 比對，並包含實際收取的手續費。
- 手續費：掛單不收取手續費；吃單者需支付公開的手續費曲線（請參閱 [手續費架構](https://docs.predictasiax.com/zh-hant/fee-architecture)）。

## 安裝

```
git clone --branch v2.18.0 --depth 1 https://github.com/hummingbot/hummingbot.git
cd hummingbot
git switch -c predictasiax
curl -fsSLO https://docs.predictasiax.com/downloads/hummingbot/predictasiax-hummingbot-v2.18.0.patch
shasum -a 256 predictasiax-hummingbot-v2.18.0.patch
git apply predictasiax-hummingbot-v2.18.0.patch
```

接著以一般方式（從原始碼或本機 Docker 建置；請參閱 [Hummingbot 的安裝文件](https://hummingbot.org/installation/)）在此資料夾安裝 Hummingbot。此連接器為純 Python 撰寫，不會新增任何依賴套件。在 Hummingbot 中執行 `connect predictasiax`，並貼上你的 API 金鑰（`sk_live_...`）。關於如何取得金鑰，請參閱 [快速入門](https://docs.predictasiax.com/zh-hant/getting-started)；進行實盤交易需要使用透過 `POST /v1/apply` 取得的實盤金鑰。

## 下載

[predictasiax-hummingbot-v2.18.0.patch](https://docs.predictasiax.com/downloads/hummingbot/predictasiax-hummingbot-v2.18.0.patch) (171 KB, SHA-256 `11ee15beebdfa1e0eace3b8c7eaf3f9be1bafdfe6a15bdde5fbbc80f9ff514ef`)。適用於 Hummingbot v2.18.0。

雙邊掛單也能獲得 USDT 津貼與 PAX 掛單獎勵。請參閱 [造市商](https://docs.predictasiax.com/zh-hant/market-makers#quote-rewards)。

Source: https://docs.predictasiax.com/zh-hant/hummingbot
