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 with a wallet and proxy wallet set up.
  • 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 is:
For REST requests, path includes /api/v1 and excludes the host and query string.
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. See WebSockets.