Skip to main content
Hit exposes public market data endpoints, authenticated trading endpoints and Socket.IO feeds for real-time updates. Use the Developers section for task-based guides. Use the API Reference section for endpoint lists, request shapes and event names.

Base URLs

If you are integrating against staging or local services, keep the same paths and replace only the host.

What You Need

  • A Hit account.
  • A trading API key, secret and passphrase generated from your Hit account.
API secrets and passphrases are only returned when a key is created. Store them immediately in a secrets manager or environment variables.

1. Fetch Markets

Market discovery is public. Start with active events, then pick a market token ID from the returned markets array.
Useful market fields:

2. Read the Order Book

Use the token ID for the outcome you want to trade.
The response contains price levels for the selected token:

3. Configure an API Key

Trading requests use API key credentials instead of a website session. Store these values as environment variables:
See Authentication for HMAC signing in TypeScript, Python and Rust.

4. Place an Order

Authenticated REST requests require these headers:
The signature message joins four parts with newline characters:
pathWithQuery includes /api/v1 and the query string exactly as sent, and excludes the host. body is the exact string you send, or an empty string when there is no body. The older concatenated message is still accepted; see Authentication for both forms and for the requests that accept only the older one.
See Orders for order fields, batch orders and cancellation examples.

5. Stream Updates

Public order book streams do not require authentication.
User-specific streams require API key authentication after connecting to /user, signed with its own message rather than the REST one. See WebSockets.