<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://portal.sqd.dev/datasets/hyperliquid-replica-cmds/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'hyperliquidReplicaCmds',
'fromBlock' => 880000000,
'toBlock' => 880000002,
'fields' => [
'block' => [
'number' => true,
'timestamp' => true
],
'action' => [
'actionIndex' => true,
'user' => true,
'action' => true,
'status' => true,
'response' => true,
'nonce' => true
]
],
'actions' => [
[
'user' => [
'0x010461c14e146ac35fe42271bdc1134ee31c703a'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}