Relay

Relay

Documentation

What this build does, what it deliberately does not call, and how the pieces fit together.

Wire

With no wire server, headlines come from the simulated provider. Live mode replaces that tape with Bark. A preliminary item is replaced in place when the complete text arrives. A score is attached after the server finishes an analysis, and a headline never sends an order.

The Bark client speaks the documented socket at wss://news.bark.gg/ws: login with the key, ping every 15 seconds, and treat TWEET_FAST, TWEET, and TWEET_UPDATE that share a TWEET_ID as one story. Recent history loads from GET /news/export. The key stays on the persistent server. Tracked accounts are changed with npm run bark:accounts, which calls Bark's settings API. Public redistribution stays off until BARK_REDISTRIBUTION_LICENSED=true. Until then, only wallets in RELAY_NEWS_ALLOWLIST see posts, and only after that wallet signs in.

Markets and orders

Prices, books, and candles come from Hyperliquid mainnet. Native perps use their coin name. HIP-3 markets keep the dex prefix, such as xyz:NVDA. Market orders are immediate-or-cancel limits inside the slippage setting, and a book older than eight seconds blocks a new order. Limit orders rest until they fill or you cancel them. Margin is notional divided by leverage. A trading agent is approved once from the connected wallet and then signs later orders. New orders require $100 of Hyperliquid equity. Deposits, withdrawals, closes, and cancels do not.

Duplicate submits with the same client id fill once. If Hyperliquid account equity is below the requirement, new risk is rejected and close or cancel still goes through.

Wallets

MetaMask, Rabby, and WalletConnect sign a server nonce. The nonce is HMAC-bound, expires, and cannot be reused in the same process. Relay does not ask for a seed phrase or the primary wallet private key. A separate trading agent is generated in the browser and approved by that wallet. It can trade. It cannot withdraw. Funds stay on Hyperliquid.

Run it

npm run dev starts the site. npm run server starts the persistent process after npm install inside server. Copy .env.example when you are ready to point either process at a real provider.

Integration status

6/6