Zum Hauptinhalt springen

ORDER_PRIORITY

Aktualisiert am
Jul 17, 2026

Übersicht

The ORDER_PRIORITY stream provides normalized priority-fee order events from Hyperliquid transaction data. It emits one JSON event per priority order action, derived from both mempool transactions and confirmed block data.

Stream Type: ORDER_PRIORITY
Verfügbarkeit der API: Nur gRPC -API
Volume: Variable - Depends on priority-fee order activity


When to Use ORDER_PRIORITY

Use ORDER_PRIORITY when you want to observe priority-fee order flow without parsing raw MEMPOOL_TXS or full BLÖCKE/replica_cmds payloads yourself. This stream is an order-flow stream, not an order book stream.

This stream is valuable for:

  • Priority-Fee Monitoring - Track orders with priority fees in real-time
  • Fee Analysis - Analyze priority fee patterns across different markets
  • Order Flow Intelligence - Understand priority order submission patterns
  • Pre-Confirmation Visibility - See priority orders from mempool before block inclusion
  • Confirmation Tracking - Monitor execution outcomes for priority orders

Data Sources

The ORDER_PRIORITY stream derives events from two sources:

SourceBeschreibungAdditional Fields
mempool_txsPre-consensus priority activity from the mempool. Events are not finalized and may be rejected, reordered, or absent from the finalized chain.first_seen_time, tx_hash, nonce, cloid
replica_cmdsConfirmed block data representing finalized transaction processing.block_number, block_time, bundle_index, outcome

Priority Detection

Priority orders are detected when an order action contains the grouping field with a priority fee value:

"grouping": { "p": 10000 }

Priority Fee Values

Die p value represents the priority fee, and its range depends on the network and order type.

Testnet IOC values are expressed in basis points (bps):

p ValueBasis PointsNotes
100001 bpBase unit (p = 10000 means 1 bp)
800008 bpsMinimum for testnet IOC priority fees
1000000100 bpsMaximum for testnet IOC priority fees

Mainnet values look very different from the testnet IOC range. Note the units when comparing: p is a raw integer interpreted as the fraction p / 100,000,000, so 1 bp equals a raw p von 10000, and the 8-100 bps testnet IOC range corresponds to raw p values of 80000 zu 1000000. Priority activity on mainnet is predominantly ALO orders carrying far smaller raw p values, typically between 1 and roughly 400 (about 0.04 bp at the upper end), often in per-user ladders as orders compete for queue position. A much smaller share of mainnet priority orders are IOC, and those can carry larger p values (raw values above 10000 observed), though still well below the testnet 8-100 bps band in observed traffic.

Per the official Hyperliquid priority fee documentation, ALO orders placed at the same price level within a T = 400 ms window are sorted in decreasing order of priority rate, and ALO priority fees are deducted at order placement from the undelegated staking balance, converted to HYPE using the spot mark price.

Network-Specific Protocol Behavior

On testnet:

  • IOC priority fees support the 8-100 bps range
  • ALO orders support priority fees
  • Within the 8-100 bps IOC range, priority fees are used as a sorting mechanism for orders received at a similar time and have the same mempool prioritization effect

ALO priority affects queue position after L1 execution and does not provide the same mempool-prioritization behavior as IOC priority.

Mainnet and testnet both support the gRPC stream types. Actual events, and the observed p ranges, depend on the priority activity occurring on the selected network.

Event Structure

Mempool Event

{
"type": "order",
"source": "mempool_txs",
"first_seen_time": "2026-06-02T13:48:49.578877529",
"tx_hash": "0x...",
"signed_action_index": 0,
"order_index": 0,
"asset_id": 0,
"market_type": "perp",
"coin": "BTC",
"cloid": "0x...",
"p": 10000,
"side": "buy",
"px": "100000",
"sz": "0.001",
"tif": "Ioc",
"reduce_only": false,
"nonce": 1780408128806
}

Confirmed Event (replica_cmds source)

{
"type": "order",
"source": "replica_cmds",
"block_number": 581285917,
"block_time": "2026-06-02T13:48:49.626754186",
"bundle_index": 0,
"asset_id": 0,
"market_type": "perp",
"coin": "BTC",
"p": 10000,
"side": "buy",
"px": "100000",
"sz": "0.001",
"tif": "Ioc",
"reduce_only": false,
"outcome": "filled"
}

Antwortfelder

FeldTypBeschreibung
TypZeichenketteEvent type: "order"
sourceZeichenketteData source: "mempool_txs" (pre-consensus) or "replica_cmds" (confirmed)
first_seen_timeZeichenkette(mempool_txs only) ISO 8601 timestamp when first seen in mempool
tx_hashZeichenkette(mempool_txs only) Transaction hash (0x-prefixed)
signed_action_indexZahl(mempool_txs only) Index of the signed action within the transaction
order_indexZahl(mempool_txs only) Index of the order within the action
block_numberZahl(replica_cmds only) Block number where the order was confirmed
block_timeZeichenkette(replica_cmds only) ISO 8601 timestamp of the block
bundle_indexZahl(replica_cmds only) Index of the bundle within the block
asset_idZahlNumerical asset/coin ID
market_typeZeichenketteMarket type (e.g., "perp")
MünzeZeichenketteTrading pair symbol (e.g., "BTC", "ETH")
KloidZeichenkette(optional) Client order ID
pZahlRaw priority fee value, interpreted as the fraction p / 100,000,000 (10000 = 1 bp). Testnet IOC orders use 80000-1000000 (8-100 bps); mainnet ALO orders carry far smaller values, typically 1 to ~400 (up to ~0.04 bp)
SeiteZeichenketteOrder side: "buy" or "sell"
pxZeichenketteOrder price
szZeichenketteOrder size
tifZeichenketteTime in force: "Ioc" (Immediate or Cancel) or "Alo" (Add Liquidity Only)
nur_reduzierenbooleschWhether the order can only reduce an existing position
NonceZahl(mempool_txs only) Transaction nonce
BenutzerZeichenkette(optional) User address
broadcasterZeichenkette(optional) Broadcaster address
outcomeZeichenkette(replica_cmds only) Execution outcome (e.g., "filled")

ALO Priority Orders

Add Liquidity Only (ALO) priority orders have tif auf … einstellen "Alo":

{
"tif": "Alo"
}

Filtering

The ORDER_PRIORITY stream supports standard gRPC field filtering. Useful fields:

FeldExample ValuesBeschreibung
sourcemempool_txs, replica_cmdsFilter by data source
TyporderFilter by event type
MünzeBTC, ETH, SOLFilter by trading pair
market_typeperpFilter by market type
asset_id0, 1, 2Filter by asset ID
p10000, 80000, 1000000Filter by priority fee value
Seitebuy, sellFilter by order side
tifIoc, AloFilter by time in force
outcomefilledFilter by execution outcome (replica_cmds only)
Benutzer0x...Filter by user address
broadcaster0x...Filter by broadcaster address
tx_hash0x...Filter by transaction hash
block_number581285917Filter by block number

Filter Examples

// Get BTC priority orders only
filters: {
"coin": FilterValues { values: ["BTC"] }
}

// Get IOC priority orders from mempool
filters: {
"source": FilterValues { values: ["mempool_txs"] },
"tif": FilterValues { values: ["Ioc"] }
}

// Get filled priority orders from confirmed blocks
filters: {
"source": FilterValues { values: ["replica_cmds"] },
"outcome": FilterValues { values: ["filled"] }
}

// Get high-value priority fees (8+ bps)
filters: {
"p": FilterValues { values: ["80000", "100000", "500000", "1000000"] }
}

For complete filtering documentation, see Stream Filtering Guide.

For low-latency order-flow monitoring:

ORDER_PRIORITY + source=mempool_txs

For confirmation and reconciliation:

ORDER_PRIORITY + source=replica_cmds

Customers should persist events if they need historical search. StreamData is a live stream and does not provide historical replay by itself.

gRPC

Python Example
import grpc
import json
from pb import streaming_pb2, streaming_pb2_grpc

GRPC_ENDPOINT = 'your-endpoint.hype-mainnet.quiknode.pro:10000'
AUTH_TOKEN = 'your-auth-token'

def stream_order_priority():
credentials = grpc.ssl_channel_credentials()
channel = grpc.secure_channel(
GRPC_ENDPOINT,
credentials,
options=[
('grpc.max_receive_message_length', 100 * 1024 * 1024),
]
)

stub = streaming_pb2_grpc.StreamingStub(channel)
metadata = [('x-token', AUTH_TOKEN)]

def request_generator():
# Subscribe to ORDER_PRIORITY with filters
subscribe_request = streaming_pb2.SubscribeRequest()
subscribe_request.subscribe.stream_type = streaming_pb2.StreamType.ORDER_PRIORITY
subscribe_request.subscribe.filters["coin"].values.extend(["BTC", "ETH"])
subscribe_request.subscribe.filters["tif"].values.append("Ioc")
yield subscribe_request

# Keep connection alive with periodic pings
while True:
time.sleep(30)
ping_request = streaming_pb2.SubscribeRequest()
ping_request.ping.timestamp = int(time.time() * 1000)
yield ping_request

stream = stub.StreamData(request_generator(), metadata=metadata)

for response in stream:
if response.HasField('data'):
data = json.loads(response.data.data)

print(f"Priority Order Event")
print(f"Source: {data.get('source')}")
print(f"Coin: {data.get('coin')}")
print(f"Priority Fee (p): {data.get('p')} ({data.get('p', 0) / 10000} bps)")
print(f"Side: {data.get('side')}")
print(f"Price: {data.get('px')}")
print(f"Size: {data.get('sz')}")
print(f"TIF: {data.get('tif')}")

if data.get('source') == 'replica_cmds':
print(f"Outcome: {data.get('outcome')}")
print(f"Block: {data.get('block_number')}")

print("---")

if __name__ == "__main__":
stream_order_priority()
JavaScript/Node.js Example
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');

const GRPC_ENDPOINT = 'your-endpoint.hype-mainnet.quiknode.pro:10000';
const AUTH_TOKEN = 'your-auth-token';

// Load proto file
const packageDefinition = protoLoader.loadSync('streaming.proto');
const proto = grpc.loadPackageDefinition(packageDefinition).hyperliquid;

// Create channel with credentials
const credentials = grpc.credentials.createSsl();
const client = new proto.Streaming(GRPC_ENDPOINT, credentials);

const metadata = new grpc.Metadata();
metadata.add('x-token', AUTH_TOKEN);

// Subscribe to ORDER_PRIORITY
const call = client.StreamData(metadata);

call.on('data', (response) => {
if (response.data) {
const data = JSON.parse(response.data.data);

console.log(`Priority Order Event`);
console.log(`Source: ${data.source}`);
console.log(`Coin: ${data.coin}`);
console.log(`Priority Fee (p): ${data.p} (${data.p / 10000} bps)`);
console.log(`Side: ${data.side}`);
console.log(`Price: ${data.px}`);
console.log(`Size: ${data.sz}`);
console.log(`TIF: ${data.tif}`);

if (data.source === 'replica_cmds') {
console.log(`Outcome: ${data.outcome}`);
console.log(`Block: ${data.block_number}`);
}

console.log('---');
}
});

call.on('error', (error) => {
console.error('Stream error:', error);
});

// Send subscription with filters
call.write({
subscribe: {
stream_type: 9, // ORDER_PRIORITY
filters: {
coin: { values: ['BTC', 'ETH'] },
tif: { values: ['Ioc'] }
}
}
});

// Send periodic pings
setInterval(() => {
call.write({
ping: { timestamp: Date.now() }
});
}, 30000);

Wichtige Hinweise


  1. Derived Stream - ORDER_PRIORITY is a derived stream that normalizes data from MEMPOOL_TXS and BLOCKS, saving you from parsing raw payloads
  2. Not an Order Book - This stream provides priority order metadata, not order book state
  3. Dual Sources - Events come from both mempool (pre-consensus) and confirmed blocks (post-consensus)
  4. Network-Specific Ranges - The 8-100 bps IOC range applies to testnet and corresponds to raw p values of 80000-1000000 (10000 = 1 bp); on mainnet, priority activity is primarily ALO orders with far smaller raw p values, typically between 1 and ~400 (up to ~0.04 bp)
  5. Compression - Consider enabling zstd compression on your gRPC channel for bandwidth efficiency

  • GOSSIP_PRIORITY - Gossip/read-priority bid events
  • MEMPOOL_TXS - Raw mempool transactions (source data for pre-consensus priority events)
  • BLOCKS - Raw blockchain data (source data for confirmed priority events)
  • ORDERS - Order lifecycle events
  • TRADES - Executed trades

For more information about gRPC streaming setup, see gRPC API Documentation.