ElyraElyraOpen the app

Docs

Order types

Every type below is the same struct with different parameters. Nothing else needs to be deployed for a new strategy.

Limit

No condition, parts = 1. The order fills in any batch that pays at least buyAmount for sellAmount, fully or in pieces if partiallyFillable is true.

Stop

A limit with a condition: kind 2 (value at or below) on the HyperCore mid for a stop loss, kind 1 (at or above) for a breakout. The condition decides when the order may fill; the limit still sets the worst price. Example: sell 20 WHYPE for at least 1,180 USDC once HYPE.mid is at or below 60.

TWAP

parts = N and partInterval = T. Each part sells at most sellAmount at a limit of buyAmount, and only inside its own window. A part that does not fill in its window does not roll into the next one, so the schedule holds.

Basket

Several orders, each with its own tokens and limit, signed once as a Bundle: the Merkle root of their uids (sorted pairs, the OpenZeppelin MerkleProof convention). Each leg fills on its own.

Hyperliquid condition

Any order can wait on a HyperCore value: the mid or the hourly funding of HYPE, BTC, ETH or SOL. "Buy HYPE when funding on HyperCore turns negative" is a USDC to HYPE order with the condition HYPE.funding at or below 0.