> For the complete documentation index, see [llms.txt](https://docs.bullpen.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bullpen.fi/execution/hyperliquid-integration.md).

# Hyperliquid Integration

All perpetual futures and major spot assets on Bullpen execute on Hyperliquid's onchain orderbook.

## What is Hyperliquid?

Hyperliquid is a Layer 1 blockchain purpose-built for trading. It runs a fully onchain central limit order book (CLOB) with sub-second latency and block-level finality.

The chain has two main components:

* **HyperCore**: The matching engine and clearinghouse for perps and spot
* **HyperEVM**: An EVM-compatible environment for additional applications

Bullpen interacts primarily with HyperCore.

## How Orders Execute

1. You place an order through Bullpen
2. Order is signed with your wallet
3. Submitted to Hyperliquid's consensus layer
4. Matched against the onchain orderbook
5. Trade settles in the same block

Every step happens onchain. There's no off-chain matching or hidden orderbook.

## Order Book Mechanics

Hyperliquid uses strict **price-time priority**:

1. Best prices execute first
2. At the same price, oldest orders fill first

Orders must use discrete tick sizes and lot sizes (integer multiples defined per asset).

## Margin System

For perpetuals, Hyperliquid enforces margin at two points:

1. **Order placement**: Checks you have sufficient margin to place the order
2. **Match time**: Verifies margin again before finalizing the trade

This "double check" ensures both parties meet collateral requirements even if price moved between order placement and execution.

## Supported Order Types

Bullpen exposes all Hyperliquid order types:

* Market
* Limit (GTC, IOC, ALO)
* Stop Market / Stop Limit
* Take Profit / Stop Loss
* TWAP
* Scale Orders

See [Order Types](/trading/order-types.md) for details on each.

## Spot vs Perps

Both spot and perps trade on the same infrastructure, but with different settlement:

|            | Perpetuals          | Spot           |
| ---------- | ------------------- | -------------- |
| Settlement | USDC margin account | Token delivery |
| Expiry     | Never               | N/A            |
| Leverage   | Up to 50x           | 1x             |
| Funding    | Hourly              | None           |

## Key Hyperliquid Resources

For deeper technical details:

* [Hyperliquid Docs: About](https://hyperliquid.gitbook.io/hyperliquid-docs)
* [Order Types](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/order-types)
* [Margining](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/margining)
* [Liquidations](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/liquidations)
* [Oracle & Price Indices](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/robust-price-indices)
* [API Documentation](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bullpen.fi/execution/hyperliquid-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
