본문으로 건너뛰기

ORDER_PRIORITY

업데이트됨:
Jul 17, 2026

개요

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.

하천 유형: ORDER_PRIORITY
API 이용 가능 여부: gRPC API 전용
권수: 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 또는 전체 블록/replica_cmds payloads yourself. This stream is an order-flow stream, not an order book stream.

이 스트림은 다음과 같은 경우에 유용합니다:

  • 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

데이터 출처

The ORDER_PRIORITY stream derives events from two sources:

출처설명추가 필드
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_cmds완료된 거래 처리를 나타내는 확인된 블록 데이터.블록 번호, 블록 시간, 번들 인덱스, 결과

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

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 Points참고 사항
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 ~의 10000, and the 8-100 bps testnet IOC range corresponds to raw p values of 80000 ~에 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.

이벤트 구조

멤풀 이벤트

{
"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
}

확인된 이벤트 (replica_cmds 소스)

{
"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"
}

응답 필드

분야유형설명
유형문자열Event type: "order"
출처문자열데이터 출처: “mempool_txs”(합의 전) 또는 “replica_cmds”(확정)
첫_확인_시간문자열(mempool_txs 전용) 멤풀에서 처음 감지된 시점의 ISO 8601 타임스탬프
tx_hash문자열(mempool_txs only) Transaction hash (0x-prefixed)
signed_action_index숫자(mempool_txs 전용) 트랜잭션 내 서명된 액션의 인덱스
order_index숫자(mempool_txs only) Index of the order within the action
블록 번호숫자(replica_cmds only) Block number where the order was confirmed
block_time문자열(replica_cmds 전용) 블록의 ISO 8601 타임스탬프
번들 인덱스숫자(replica_cmds 전용) 블록 내 번들의 인덱스
asset_id숫자Numerical asset/coin ID
market_type문자열Market type (e.g., "perp")
동전문자열Trading pair symbol (e.g., "BTC", "ETH")
cloid문자열(optional) Client order ID
p숫자Raw 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)
측면문자열Order side: "buy" or "sell"
px문자열Order price
sz문자열Order size
tif문자열Time in force: "Ioc" (Immediate or Cancel) or "Alo" (Add Liquidity Only)
reduce_only부울Whether the order can only reduce an existing position
논스숫자(mempool_txs only) Transaction nonce
사용자문자열(optional) User address
방송인문자열(optional) Broadcaster address
결과문자열(replica_cmds only) Execution outcome (e.g., "filled")

ALO Priority Orders

Add Liquidity Only (ALO) priority orders have tif set to "Alo":

{
"tif": "Alo"
}

필터링

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

분야예시 값설명
출처mempool_txs, replica_cmds데이터 소스별로 필터링
유형order이벤트 유형별로 필터링
동전BTC, ETH, SOLFilter by trading pair
market_typeperpFilter by market type
asset_id0, 1, 2Filter by asset ID
p10000, 80000, 1000000Filter by priority fee value
측면buy, sellFilter by order side
tifIoc, AloFilter by time in force
결과filledFilter by execution outcome (replica_cmds only)
사용자0x...Filter by user address
방송인0x...Filter by broadcaster address
tx_hash0x...Filter by transaction hash
블록 번호581285917Filter by block number

필터 예시

// 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 low-latency order-flow monitoring:

ORDER_PRIORITY + source=mempool_txs

For confirmation and reconciliation:

ORDER_PRIORITY + source=replica_cmds

고객은 과거 기록을 검색해야 할 경우 이벤트를 영구 저장해야 합니다. StreamData는 실시간 스트림이므로, 자체적으로는 과거 기록 재생을 지원하지 않습니다.

gRPC

파이썬 예제
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 예제
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);

중요 사항


  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. 이중 출처 - 이벤트는 멥풀(합의 전)과 확정된 블록(합의 후) 모두에서 발생합니다.
  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. 압축 - 대역폭 효율성을 높이기 위해 gRPC zstd 압축을 활성화하는 것을 고려해 보세요.

  • 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

gRPC 설정에 대한 자세한 내용은 gRPC 문서를 참조하십시오.