# Funding carry across five perp venues -- raw side ## Question Funding carry. For the BTC and ETH perpetuals on Hyperliquid, edgeX, Extended, Nado and Pacifica, over 2026-09-21 00:00 to 2026-09-28 00:00 UTC: give the mean funding rate each venue charged longs, annualised as a simple APR in percent, per venue and coin. Then name the single best delta-neutral carry trade (long the perp on one venue, short the same coin on another) and its annualised funding spread. Say how you handled each venue's funding interval. ## System prompt You are an agent assisting a quantitative researcher. Work the question end to end: find the data, compute, check your own numbers, and make the judgement calls a careful quant would make. You have a Bash tool; Python 3 with duckdb, pandas, pyarrow and numpy is at /tmp/peerfeed-a21/venv/bin/python. Work inside your current directory. When you are done, end with a section headed FINAL ANSWER that gives every number asked for and states each judgement call you made. The researcher has downloaded PeerFeed's parquet archive for the relevant venues and data types to /tmp/peerfeed-a21/archive, in the layout PeerFeed delivers it. That directory is your only source of market data; there is no API access. ## [agent thinking] ## [tool call 1] Bash { "command": "cd /tmp/peerfeed-a21/archive; find . | head -100; find . -type f | wc -l; find . -name \"*.md\" -o -name \"*.txt\" -o -name \"*.json\" | head" } ## [tool result] . ./apex ./dydx ./paradex ./pacifica ./edgex ./extended ./hyperliquid ./nado ./apex/trades ./dydx/trades ./paradex/trades ./pacifica/trades ./pacifica/prices ./edgex/trades ./edgex/ticker ./extended/funding ./hyperliquid/trades ./hyperliquid/activeAssetCtx ./nado/funding_rate ./nado/trades ./nado/trades/parquet ./apex/trades/parquet ./dydx/trades/parquet ./paradex/trades/parquet ./nado/trades/parquet/2026 ./nado/trades/parquet/2026/09 ./apex/trades/parquet/2026 ./dydx/trades/parquet/2026 ./paradex/trades/parquet/2026 ./nado/trades/parquet/2026/09/27 ./nado/trades/parquet/2026/09/22 ./nado/trades/parquet/2026/09/26 ./nado/trades/parquet/2026/09/20 ./nado/trades/parquet/2026/09/23 ./nado/trades/parquet/2026/09/24 ./nado/trades/parquet/2026/09/21 ./nado/trades/parquet/2026/09/28 ./nado/trades/parquet/2026/09/25 ./apex/trades/parquet/2026/09 ./dydx/trades/parquet/2026/09 ./paradex/trades/parquet/2026/09 ./pacifica/trades/parquet ./pacifica/prices/parquet ./edgex/trades/parquet ./edgex/ticker/parquet ./extended/funding/parquet ./hyperliquid/trades/parquet ./hyperliquid/activeAssetCtx/parquet ./nado/funding_rate/parquet ./nado/trades/parquet/2026/09/25/12-14.parquet ./nado/trades/parquet/2026/09/25/18-20.parquet ./nado/trades/parquet/2026/09/25/22-24.parquet ./nado/trades/parquet/2026/09/25/04-06.parquet ./nado/trades/parquet/2026/09/25/06-08.parquet ./nado/trades/parquet/2026/09/25/00-02.parquet ./nado/trades/parquet/2026/09/25/02-04.parquet ./nado/trades/parquet/2026/09/25/14-16.parquet ./nado/trades/parquet/2026/09/25/08-10.parquet ./nado/trades/parquet/2026/09/25/16-18.parquet ./nado/trades/parquet/2026/09/25/10-12.parquet ./nado/trades/parquet/2026/09/25/20-22.parquet ./apex/trades/parquet/2026/09/27 ./apex/trades/parquet/2026/09/22 ./apex/trades/parquet/2026/09/26 ./apex/trades/parquet/2026/09/20 ./apex/trades/parquet/2026/09/23 ./apex/trades/parquet/2026/09/24 ./apex/trades/parquet/2026/09/21 ./apex/trades/parquet/2026/09/28 ./apex/trades/parquet/2026/09/25 ./dydx/trades/parquet/2026/09/27 ./dydx/trades/parquet/2026/09/22 ./dydx/trades/parquet/2026/09/26 ./dydx/trades/parquet/2026/09/20 ./dydx/trades/parquet/2026/09/23 ./dydx/trades/parquet/2026/09/24 ./dydx/trades/parquet/2026/09/21 ./dydx/trades/parquet/2026/09/28 ./dydx/trades/parquet/2026/09/25 ./paradex/trades/parquet/2026/09/22 ./paradex/trades/parquet/2026/09/20 ./paradex/trades/parquet/2026/09/21 ./paradex/trades/parquet/2026/09/28 ./apex/trades/parquet/2026/09/25/12-14.parquet ./apex/trades/parquet/2026/09/25/18-20.parquet ./apex/trades/parquet/2026/09/25/22-24.parquet ./apex/trades/parquet/2026/09/25/04-06.parquet ./apex/trades/parquet/2026/09/25/06-08.parquet ./apex/trades/parquet/2026/09/25/00-02.parquet ./apex/trades/parquet/2026/09/25/02-04.parquet ./apex/trades/parquet/2026/09/25/14-16.parquet ./apex/trades/parquet/2026/09/25/08-10.parquet ./apex/trades/parquet/2026/09/25/16-18.parquet ./apex/trades/parquet/2026/09/25/10-12.parquet ./apex/trades/parquet/2026/09/25/20-22.parquet ./dydx/trades/parquet/2026/09/25/12-14.parquet ./dydx/trades/parquet/2026/09/25/18-20.parquet ./dydx/trades/parquet/2026/09/25/22-24.parquet ./dydx/trades/parquet/2026/09/25/04-06.parquet 1220 Shell cwd was reset to /tmp/peerfeed-a21/work-t1-raw ## [tool call 2] Bash { "command": "cd /tmp/peerfeed-a21/archive; for d in pacifica/prices edgex/ticker extended/funding hyperliquid/activeAssetCtx nado/funding_rate; do echo \"== $d\"; find $d -type f | sort | head -3; find $d -type f | wc -l; find $d -type f | sort | tail -2; done; find . -type f ! -name \"*.parquet\"" } ## [tool result] == pacifica/prices pacifica/prices/parquet/2026/09/20/00-02.parquet pacifica/prices/parquet/2026/09/20/02-04.parquet pacifica/prices/parquet/2026/09/20/04-06.parquet 108 pacifica/prices/parquet/2026/09/28/20-22.parquet pacifica/prices/parquet/2026/09/28/22-24.parquet == edgex/ticker edgex/ticker/parquet/2026/09/20/00-02.parquet edgex/ticker/parquet/2026/09/20/02-04.parquet edgex/ticker/parquet/2026/09/20/04-06.parquet 108 edgex/ticker/parquet/2026/09/28/20-22.parquet edgex/ticker/parquet/2026/09/28/22-24.parquet == extended/funding extended/funding/parquet/2026/09/20/00-02.parquet extended/funding/parquet/2026/09/20/02-04.parquet extended/funding/parquet/2026/09/20/04-06.parquet 108 extended/funding/parquet/2026/09/28/20-22.parquet extended/funding/parquet/2026/09/28/22-24.parquet == hyperliquid/activeAssetCtx hyperliquid/activeAssetCtx/parquet/2026/09/20/00-02.parquet hyperliquid/activeAssetCtx/parquet/2026/09/20/02-04.parquet hyperliquid/activeAssetCtx/parquet/2026/09/20/04-06.parquet 108 hyperliquid/activeAssetCtx/parquet/2026/09/28/20-22.parquet hyperliquid/activeAssetCtx/parquet/2026/09/28/22-24.parquet == nado/funding_rate nado/funding_rate/parquet/2026/09/20/00-02.parquet nado/funding_rate/parquet/2026/09/20/02-04.parquet nado/funding_rate/parquet/2026/09/20/04-06.parquet 108 nado/funding_rate/parquet/2026/09/28/20-22.parquet nado/funding_rate/parquet/2026/09/28/22-24.parquet Shell cwd was reset to /tmp/peerfeed-a21/work-t1-raw ## [tool call 3] Bash { "command": "cd /tmp/peerfeed-a21/archive; P=/tmp/peerfeed-a21/venv/bin/python; $P -c \"\nimport duckdb\nfor d in ['pacifica/prices','edgex/ticker','extended/funding','hyperliquid/activeAssetCtx','nado/funding_rate']:\n print('=====',d)\n con=duckdb.connect()\n r=con.sql(f\\\"select * from read_parquet('{d}/parquet/*/*/*/*.parquet', union_by_name=true)\\\")\n print(r.describe().df().T.to_string()[:3000] if False else '')\n print(con.sql(f\\\"describe select * from read_parquet('{d}/parquet/*/*/*/*.parquet', union_by_name=true)\\\").df()[['column_name','column_type']].to_string())\n print(r.limit(3).df().T.to_string())\n print(con.sql(f\\\"select count(*) from read_parquet('{d}/parquet/*/*/*/*.parquet', union_by_name=true)\\\").fetchall())\n\"" } ## [tool result] ===== pacifica/prices column_name column_type 0 symbol VARCHAR 1 funding DOUBLE 2 next_funding DOUBLE 3 oracle DOUBLE 4 mark DOUBLE 5 mid DOUBLE 6 yesterday_price DOUBLE 7 open_interest DOUBLE 8 volume_24h DOUBLE 9 timestamp TIMESTAMP WITH TIME ZONE 10 recorded_at TIMESTAMP WITH TIME ZONE 0 1 2 symbol ENA VVV TAO funding 0.000013 0.000013 0.000013 next_funding 0.000013 0.000013 0.000013 oracle 0.204265 25.845107 263.824316 mark 0.204265 25.845107 263.976677 mid 0.204425 25.8745 264.055 yesterday_price 0.16825 28.026 250.24 open_interest 1891600.0 4096.2 1187.2 volume_24h 920662.26392 186107.8524 186614.7538 timestamp 2026-09-20 01:59:01.421000+02:00 2026-09-20 01:59:01.421000+02:00 2026-09-20 01:59:01.421000+02:00 recorded_at 2026-09-20 01:59:01.553000+02:00 2026-09-20 01:59:01.553000+02:00 2026-09-20 01:59:01.553000+02:00 [(17465832,)] ===== edgex/ticker column_name column_type 0 contractId BIGINT 1 contractName VARCHAR 2 priceChange DOUBLE 3 priceChangePercent DOUBLE 4 trades BIGINT 5 size DOUBLE 6 value DOUBLE 7 high DOUBLE 8 low DOUBLE 9 open DOUBLE 10 close DOUBLE 11 highTime BIGINT 12 lowTime BIGINT 13 startTime BIGINT 14 endTime TIMESTAMP WITH TIME ZONE 15 lastPrice DOUBLE 16 indexPrice DOUBLE 17 oraclePrice DOUBLE 18 markPrice DOUBLE 19 openInterest DOUBLE 20 fundingRate DOUBLE 21 fundingTime BIGINT 22 nextFundingTime BIGINT 23 bestAskPrice DOUBLE 24 bestBidPrice DOUBLE 25 marketOpen BOOLEAN 26 recorded_at TIMESTAMP WITH TIME ZONE 27 liquidity VARCHAR 0 1 2 contractId 30000030 30000010 30000108 contractName PLTRUSDC SPYUSDC SHAZUSDC priceChange 0.05 0.43 -0.9 priceChangePercent 0.000281 0.000563 -0.015641 trades 3128 3077 3073 size 1459.18 287.061 4737.21 value 258453.1411 219054.43035 270128.9228 high 177.54 764.87 57.8 low 176.57 761.88 56.05 open 177.42 762.71 57.54 close 177.47 763.14 56.64 highTime 1789862188644 1789843059612 1789774414550 lowTime 1789799485660 1789819121607 1789830436642 startTime 1789773300000 1789773300000 1789773300000 endTime 2026-09-20 01:45:00+02:00 2026-09-20 01:45:00+02:00 2026-09-20 01:45:00+02:00 lastPrice 177.47 763.14 56.64 indexPrice 177.140415 763.47677 56.50649 oraclePrice 177.227208 763.450858 56.527426 markPrice 177.227208 763.450858 56.527426 openInterest 239.13 832.735 281.18 fundingRate 0.000162 -0.000163 0.000355 fundingTime 1789848000000 1789848000000 1789848000000 nextFundingTime 1789862400000 1789862400000 1789862400000 bestAskPrice NaN NaN NaN bestBidPrice NaN NaN NaN marketOpen False False False recorded_at 2026-09-20 01:59:00.171000+02:00 2026-09-20 01:59:00.171000+02:00 2026-09-20 01:59:00.171000+02:00 liquidity None None None [(5303743,)] ===== extended/funding column_name column_type 0 m VARCHAR 1 f VARCHAR 2 T TIMESTAMP WITH TIME ZONE 3 ts BIGINT 4 seq BIGINT 0 1 2 m BTC-USD ETH-USD SOL-USD f 0.000013 0.000013 0.000013 T 2026-09-20 01:59:10.283000+02:00 2026-09-20 01:59:10.283000+02:00 2026-09-20 01:59:10.283000+02:00 ts 1789862350283 1789862350287 1789862350287 seq 153565 153566 153567 [(7506486,)] ===== hyperliquid/activeAssetCtx column_name column_type 0 coin VARCHAR 1 funding DOUBLE 2 openInterest DOUBLE 3 prevDayPx DOUBLE 4 dayNtlVlm DOUBLE 5 premium DOUBLE 6 oraclePx DOUBLE 7 markPx DOUBLE 8 midPx DOUBLE 9 impactPxs VARCHAR 10 dayBaseVlm DOUBLE 11 recorded_at TIMESTAMP WITH TIME ZONE 0 1 2 coin xyz:XYZ100 xyz:INTC xyz:COIN funding 0.000001 0.000052 0.000029 openInterest 6278.7984 873558.56 87773.778 prevDayPx 29652.0 109.14 194.4 dayNtlVlm 29796236.1123 4360293.4479 4414606.1359 premium -0.000135 0.001215 0.000351 oraclePx 29641.0 109.9 194.92 markPx 29638.0 110.04 194.99 midPx 29637.0 110.035 194.995 impactPxs [29636.0, 29638.0] [110.0201, 110.0469] [194.977, 195.0] dayBaseVlm 1005.6051 39995.8 22615.184 recorded_at 2026-09-20 01:59:00.365000+02:00 2026-09-20 01:59:00.366000+02:00 2026-09-20 01:59:00.366000+02:00 [(27939037,)] ===== nado/funding_rate column_name column_type 0 type VARCHAR 1 timestamp TIMESTAMP WITH TIME ZONE 2 product_id BIGINT 3 funding_rate_x18 BIGINT 4 update_time BIGINT 5 recorded_at TIMESTAMP WITH TIME ZONE 0 1 2 type funding_rate funding_rate funding_rate timestamp 2026-09-20 01:59:19.124121+02:00 2026-09-20 01:59:19.124121+02:00 2026-09-20 01:59:19.124121+02:00 product_id 22 30 32 funding_rate_x18 1616799209314133 300000000000000 620149304413478 update_time 1789862359 1789862359 1789862359 recorded_at 2026-09-20 01:59:19.237000+02:00 2026-09-20 01:59:19.237000+02:00 2026-09-20 01:59:19.237000+02:00 [(2019799,)] Shell cwd was reset to /tmp/peerfeed-a21/work-t1-raw ## [agent thinking] ## [tool call 4] Bash { "command": "cd /tmp/peerfeed-a21/archive; P=/tmp/peerfeed-a21/venv/bin/python; $P -c \"\nimport duckdb\ncon=duckdb.connect(); con.sql(\\\"set TimeZone='UTC'\\\")\nprint(con.sql(\\\"select min(recorded_at),max(recorded_at), count(*) from 'hyperliquid/activeAssetCtx/parquet/2026/09/20/00-02.parquet'\\\").fetchall())\nprint(con.sql(\\\"describe select * from read_parquet('nado/trades/parquet/*/*/*/*.parquet')\\\").df()[['column_name','column_type']].to_string())\nprint(con.sql(\\\"select * from read_parquet('nado/trades/parquet/2026/09/21/*.parquet') limit 3\\\").df().T)\nprint(con.sql(\\\"select product_id, count(*), min(funding_rate_x18), max(funding_rate_x18) from read_parquet('nado/funding_rate/parquet/*/*/*/*.parquet') group by 1 order by 1\\\").df().to_string())\n\"" } ## [tool result (error)] Exit code 1 Traceback (most recent call last): File "", line 4, in _duckdb.InvalidInputException: Invalid Input Error: Required module 'pytz' failed to import, due to the following Python exception: ModuleNotFoundError: No module named 'pytz' ## [agent thinking] ## [tool call 5] Bash { "command": "cd /tmp/peerfeed-a21/archive; P=/tmp/peerfeed-a21/venv/bin/python; $P -c \"\nimport duckdb\ncon=duckdb.connect(); con.sql(\\\"set TimeZone='UTC'\\\")\nprint(con.sql(\\\"select min(recorded_at)::varchar,max(recorded_at)::varchar, count(*) from 'hyperliquid/activeAssetCtx/parquet/2026/09/20/00-02.parquet'\\\").fetchall())\nprint(con.sql(\\\"describe select * from read_parquet('nado/trades/parquet/*/*/*/*.parquet')\\\").df()[['column_name','column_type']].to_string())\nprint(con.sql(\\\"select * from read_parquet('nado/trades/parquet/2026/09/21/*.parquet') limit 3\\\").df().T)\nprint(con.sql(\\\"select product_id, count(*), min(funding_rate_x18), max(funding_rate_x18) from read_parquet('nado/funding_rate/parquet/*/*/*/*.parquet') group by 1 order by 1\\\").df().to_string())\n\"" } ## [tool result] [('2026-09-19 23:59:00.365+00', '2026-09-20 01:58:59.673+00', 213922)] column_name column_type 0 type VARCHAR 1 timestamp TIMESTAMP WITH TIME ZONE 2 product_id BIGINT 3 price VARCHAR 4 taker_qty VARCHAR 5 maker_qty VARCHAR 6 is_taker_buyer BOOLEAN 7 recorded_at TIMESTAMP WITH TIME ZONE 0 ... 2 type trade ... trade timestamp 2026-09-20 23:59:00.375546+00:00 ... 2026-09-20 23:59:00.406484+00:00 product_id 4 ... 4 price 2643200000000000000000 ... 2643400000000000000000 taker_qty 757000000000000000 ... 144000000000000000 maker_qty 757000000000000000 ... 144000000000000000 is_taker_buyer True ... True recorded_at 2026-09-20 23:59:00.592000+00:00 ... 2026-09-20 23:59:00.592000+00:00 [8 rows x 3 columns] product_id count_star() min(funding_rate_x18) max(funding_rate_x18) 0 2 27853 -1222634534162192 300000000000000 1 4 15309 -1317128310369950 300000000000000 2 8 15134 -2591614841138834 300000000000000 3 10 296 -914935402962419 937379249567822 4 14 14720 -692577896503877 300000000000000 5 16 2637 -1676020161524936 475862437252757 6 18 1825 -1209694367591198 2425785762345836 7 20 29211 -3804922659037810 3091176432858786 8 22 34373 -476068534724007 9910092731359773 9 24 5293 -3180837738956588 4171604011026413 10 26 4467 -1798352110019483 10527434539570346 11 28 2427 -582362351119703 300000000000000 12 30 30698 162764014749709 5753263247682362 13 32 22652 -101034166150730 6570059795659058 14 34 21413 219286595199755 11969234422484156 15 36 13743 -3632460309985100 1158773084508689 16 38 22783 -1175040707139335 8680819009072900 17 40 25788 -3030138991882025 3657891677704980 18 42 26551 -3618928857099901 20000000000000000 19 44 20 0 0 20 46 7804 -2078594864536994 4637440781564156 21 48 20377 -1192376979590312 525252822044195 22 50 26420 -3985233369955291 10017819813737935 23 52 23530 -1302319847640501 666874913356936 24 54 18305 -480984124613204 300000000000000 25 56 30994 -2884933185319891 2843807763400864 26 58 24868 -13669354838709644 10420907833158698 27 60 24227 299999999999995 300000000000000 28 62 9528 -20000000000000000 20000000000000000 29 64 17903 -3586642273869335 2464917703293413 30 66 601 299999999999998 300000000000000 31 68 13864 -4343149633413248 1546996244339978 32 70 17099 299999999999995 300000000000000 33 72 22180 -3507870817298256 6647839955620311 34 74 3510 -3166487840992052 898456740191672 35 76 7726 -3877929335985605 1431641038467659 36 78 18212 -4031244262194650 16001337061471964 37 80 25554 -9944983492354529 5437685116109374 38 82 26305 -3826504769608461 791006580550816 39 84 18289 299999999999998 300000000000000 40 86 21672 -4151803678535081 3354248634046991 41 88 36992 -1175714958163081 1537929603197136 42 90 36992 -1456081768004913 1695251431913064 43 92 36988 -1151649980900307 5239127980600904 44 94 36992 -20000000000000000 16001252998202432 45 96 36982 -97927601066050 414148152633223 46 98 36992 -2467202708040501 1271564829187292 47 100 36992 -1358151414909957 1316902223831052 48 102 36991 -1713850259857066 923086169524869 49 104 36991 -2925455485098640 2081271130838822 50 106 36990 -2371397893611232 1207794070172766 51 108 36992 -3498898400941514 2088675507975095 52 110 36992 -2586830280880147 1251252932389616 53 112 36991 -2225986763979147 1615854434092572 54 114 36992 -2999517882352148 1136416062574261 55 120 36992 -1053384359658239 1036295486098012 56 122 2276 299999999999999 5272293367252526 57 124 1241 -1134876023263031 2604829220971058 58 126 36992 -6201214389067865 7283969570201080 59 128 36992 -3354285081601334 3916155319605559 60 130 36992 -3078835850924936 8489198623130089 61 132 36992 -8107770218758542 5281050646570219 62 134 36991 -5560651984671619 5527334095202351 63 136 36992 -8663270042358681 2890331578129839 64 138 36987 -10905784009680649 5898756994408564 65 140 36992 -1823209796477987 2679147371630780 66 142 36992 -1521829208573488 4166645731273293 67 158 36899 -4498061262784540 20000000000000000 68 162 128 299999999999999 300000000000000 69 164 36992 -20000000000000000 10046749544494000 70 166 36992 -12899294493644070 8508718334434545 71 168 34 299999999999999 300000000000000 72 170 36992 -13239971403380415 6443100983202790 73 172 18610 -3548923679060661 2214949098053223 74 174 36992 -7759553057983566 4157158754671900 75 176 36990 -17717216476885423 20000000000000000 76 178 36990 -20000000000000000 2730002601443091 77 180 36992 -10445167040825176 4782837930757476 78 182 36992 -20000000000000000 2582226285052818 79 184 29167 299999999999992 300000000000000 80 186 30994 -3761481935088805 14451262575787832 81 188 20574 299999999999998 4294827285803522 Shell cwd was reset to /tmp/peerfeed-a21/work-t1-raw ## [agent thinking] ## [agent] The archive has five funding sources. Next I'm mapping Nado product IDs to coins and checking each venue's funding cadence. ## [tool call 6] Bash { "command": "cd /tmp/peerfeed-a21/archive; P=/tmp/peerfeed-a21/venv/bin/python; $P -c \"\nimport duckdb\ncon=duckdb.connect(); con.sql(\\\"set TimeZone='UTC'\\\")\nprint(con.sql(\\\"select product_id, median(price::hugeint/1e18) from read_parquet('nado/trades/parquet/2026/09/2*/*.parquet') where product_id in (2,4) group by 1\\\").df())\nq=\\\"select update_time, to_timestamp(update_time)::varchar t, funding_rate_x18/1e18 r, count(*) n, min(recorded_at)::varchar from read_parquet('nado/funding_rate/parquet/*/*/*/*.parquet') where product_id=2 group by all order by 1\\\"\nd=con.sql(q).df(); print(len(d)); print(d.head(30).to_string()); print(d.update_time.diff().value_counts().head())\n\"" } ## [tool result] product_id median((CAST(price AS "HUGEINT") / 1e+18)) 0 4 2686.7 1 2 84189.0 27853 update_time t r n CAST(min(recorded_at) AS VARCHAR) 0 1789880410 2026-09-20 05:00:10+00 0.000300 1 2026-09-20 05:00:10.929+00 1 1789885711 2026-09-20 06:28:31+00 0.000300 1 2026-09-20 06:28:31.907+00 2 1789885771 2026-09-20 06:29:31+00 0.000300 1 2026-09-20 06:29:32.153+00 3 1789898422 2026-09-20 10:00:22+00 0.000236 1 2026-09-20 10:00:22.247+00 4 1789898442 2026-09-20 10:00:42+00 0.000300 1 2026-09-20 10:00:42.324+00 5 1789900128 2026-09-20 10:28:48+00 0.000300 1 2026-09-20 10:28:49.004+00 6 1789900169 2026-09-20 10:29:29+00 0.000300 1 2026-09-20 10:29:29.173+00 7 1789900249 2026-09-20 10:30:49+00 0.000300 1 2026-09-20 10:30:49.488+00 8 1789900450 2026-09-20 10:34:10+00 0.000300 1 2026-09-20 10:34:10.286+00 9 1789900530 2026-09-20 10:35:30+00 0.000300 1 2026-09-20 10:35:30.837+00 10 1789900791 2026-09-20 10:39:51+00 0.000300 1 2026-09-20 10:39:51.629+00 11 1789900871 2026-09-20 10:41:11+00 0.000300 1 2026-09-20 10:41:11.956+00 12 1789905209 2026-09-20 11:53:29+00 0.000300 1 2026-09-20 11:53:29.315+00 13 1789905229 2026-09-20 11:53:49+00 0.000299 1 2026-09-20 11:53:49.381+00 14 1789905249 2026-09-20 11:54:09+00 0.000298 1 2026-09-20 11:54:09.471+00 15 1789905269 2026-09-20 11:54:29+00 0.000297 1 2026-09-20 11:54:29.558+00 16 1789905289 2026-09-20 11:54:49+00 0.000297 1 2026-09-20 11:54:49.631+00 17 1789905309 2026-09-20 11:55:09+00 0.000297 1 2026-09-20 11:55:09.71+00 18 1789905329 2026-09-20 11:55:29+00 0.000297 1 2026-09-20 11:55:29.795+00 19 1789905349 2026-09-20 11:55:49+00 0.000298 1 2026-09-20 11:55:49.866+00 20 1789905369 2026-09-20 11:56:09+00 0.000298 1 2026-09-20 11:56:09.949+00 21 1789905389 2026-09-20 11:56:29+00 0.000299 1 2026-09-20 11:56:30.023+00 22 1789905409 2026-09-20 11:56:49+00 0.000299 1 2026-09-20 11:56:50.104+00 23 1789905430 2026-09-20 11:57:10+00 0.000299 1 2026-09-20 11:57:10.18+00 24 1789905450 2026-09-20 11:57:30+00 0.000299 1 2026-09-20 11:57:30.253+00 25 1789905470 2026-09-20 11:57:50+00 0.000300 1 2026-09-20 11:57:50.333+00 26 1789905490 2026-09-20 11:58:10+00 0.000300 1 2026-09-20 11:58:10.432+00 27 1789905510 2026-09-20 11:58:30+00 0.000299 1 2026-09-20 11:58:30.516+00 28 1789905530 2026-09-20 11:58:50+00 0.000298 1 2026-09-20 11:58:50.592+00 29 1789905550 2026-09-20 11:59:10+00 0.000298 1 2026-09-20 11:59:10.663+00 update_time 20.0 25010 21.0 2177 60.0 284 40.0 133 61.0 84 Name: count, dtype: int64 Shell cwd was reset to /tmp/peerfeed-a21/work-t1-raw ## [agent thinking] ## [tool call 7] Bash { "command": "cd /tmp/peerfeed-a21/archive; P=/tmp/peerfeed-a21/venv/bin/python; $P -c \"\nimport duckdb\ncon=duckdb.connect(); con.sql(\\\"set TimeZone='UTC'\\\")\ndef g(path,coincol,coins,extra=''):\n q=f\\\"select {coincol} c, epoch_ms(recorded_at) t from read_parquet('{path}/parquet/*/*/*/*.parquet') where {coincol} in {coins} {extra}\\\"\n d=con.sql(q).df().sort_values(['c','t'])\n for c,x in d.groupby('c'):\n dt=x.t.diff()/1000\n print(path,c,len(x),'median dt',dt.median(),'max gaps',dt.nlargest(4).tolist())\ng('hyperliquid/activeAssetCtx','coin',\\\"('BTC','ETH')\\\")\ng('pacifica/prices','symbol',\\\"('BTC','ETH')\\\")\ng('extended/funding','m',\\\"('BTC-USD','ETH-USD')\\\")\ng('edgex/ticker','contractName',\\\"('BTCUSD','ETHUSD','BTCUSDC','ETHUSDC')\\\")\ng('nado/funding_rate','product_id',\\\"(2,4)\\\")\n\"" } ## [tool result (error)] Exit code 1 Traceback (most recent call last): File "", line 12, in File "", line 6, in g _duckdb.BinderException: Binder Error: Referenced column "recorded_at" not found in FROM clause! Candidate bindings: "seq" hyperliquid/activeAssetCtx BTC 424249 median dt 1.08 max gaps [193.283, 72.802, 35.744, 34.31] hyperliquid/activeAssetCtx ETH 280620 median dt 1.954 max gaps [198.407, 73.939, 51.993, 50.444] pacifica/prices BTC 255920 median dt 3.0 max gaps [735.081, 712.52, 690.428, 87.852] pacifica/prices ETH 254609 median dt 3.0 max gaps [735.082, 712.519, 690.428, 87.852] ## [tool call 8] Bash { "command": "cd /tmp/peerfeed-a21/archive; P=/tmp/peerfeed-a21/venv/bin/python; $P -c \"\nimport duckdb\ncon=duckdb.connect(); con.sql(\\\"set TimeZone='UTC'\\\")\ndef g(path,coincol,coins,tc='epoch_ms(recorded_at)'):\n q=f\\\"select {coincol} c, {tc} t from read_parquet('{path}/parquet/*/*/*/*.parquet') where {coincol} in {coins}\\\"\n d=con.sql(q).df().sort_values(['c','t'])\n for c,x in d.groupby('c'):\n dt=x.t.diff()/1000\n print(path,c,len(x),'median dt',dt.median(),'max gaps',dt.nlargest(4).tolist())\ng('extended/funding','m',\\\"('BTC-USD','ETH-USD')\\\",'ts')\nprint(con.sql(\\\"select distinct contractName from read_parquet('edgex/ticker/parquet/*/*/*/*.parquet') where contractName like 'BTC%' or contractName like 'ETH%'\\\").fetchall())\ng('edgex/ticker','contractName',\\\"('BTCUSD','ETHUSD','BTCUSDC','ETHUSDC')\\\")\n\"" } ## [tool result] extended/funding BTC-USD 18320 median dt 59.997 max gaps [119.935, 62.379, 61.942, 61.717] extended/funding ETH-USD 18626 median dt 59.988 max gaps [119.927, 62.375, 61.939, 61.711] [('BTCUSDC',), ('ETHUSDC',)] edgex/ticker BTCUSDC 364797 median dt 0.992 max gaps [389.953, 354.989, 305.075, 303.015] edgex/ticker ETHUSDC 505597 median dt 0.854 max gaps [263.987, 235.979, 222.007, 200.005] Shell cwd was reset to /tmp/peerfeed-a21/work-t1-raw ## [agent thinking] ## [tool call 9] Bash { "command": "cd /tmp/peerfeed-a21/archive; P=/tmp/peerfeed-a21/venv/bin/python; $P -c \"\nimport duckdb, pandas as pd\npd.set_option('display.width',250)\ncon=duckdb.connect(); con.sql(\\\"set TimeZone='UTC'\\\")\nW=\\\"recorded_at >= '2026-09-22 00:00:00+00' and recorded_at < '2026-09-22 03:00:00+00'\\\"\nd=con.sql(f\\\"select recorded_at::varchar t, contractName, fundingRate, fundingTime, nextFundingTime from read_parquet('edgex/ticker/parquet/*/*/*/*.parquet') where contractName='BTCUSDC' and {W} order by recorded_at\\\").df()\nd['chg']=d.fundingRate.ne(d.fundingRate.shift())|d.fundingTime.ne(d.fundingTime.shift())\nprint(d[d.chg].head(40).to_string())\nprint(con.sql(\\\"select (nextFundingTime-fundingTime)/3600000 h, contractName, count(*) from read_parquet('edgex/ticker/parquet/*/*/*/*.parquet') where contractName in ('BTCUSDC','ETHUSDC') group by all\\\").df())\n\"" } ## [tool result] t contractName fundingRate fundingTime nextFundingTime chg 0 2026-09-22 00:00:01.321+00 BTCUSDC 0.00005 1790035200000 1790049600000 True h contractName count_star() 0 4.0 BTCUSDC 364797 1 4.0 ETHUSDC 505597 Shell cwd was reset to /tmp/peerfeed-a21/work-t1-raw ## [agent thinking] ## [tool call 10] Bash { "command": "cd /tmp/peerfeed-a21/archive; P=/tmp/peerfeed-a21/venv/bin/python; $P -c \"\nimport duckdb, pandas as pd\npd.set_option('display.width',250)\ncon=duckdb.connect(); con.sql(\\\"set TimeZone='UTC'\\\")\nd=con.sql(f\\\"select contractName c, to_timestamp(fundingTime/1000)::varchar ft, fundingRate r, count(*) n, min(recorded_at)::varchar first, max(recorded_at)::varchar last from read_parquet('edgex/ticker/parquet/*/*/*/*.parquet') where contractName in ('BTCUSDC','ETHUSDC') group by all order by c, ft, first\\\").df()\nprint(d.to_string())\n\"" } ## [tool result (error)] Exit code 1 Traceback (most recent call last): File "", line 5, in _duckdb.ParserException: Parser Error: syntax error at or near "first" LINE 1: ... ft, fundingRate r, count(*) n, min(recorded_at)::varchar first, max(recorded_at)::varchar last from read_parquet... ^ ## [tool call 11] Bash { "command": "cd /tmp/peerfeed-a21/archive; P=/tmp/peerfeed-a21/venv/bin/python; $P -c \"\nimport duckdb, pandas as pd\npd.set_option('display.width',250)\ncon=duckdb.connect(); con.sql(\\\"set TimeZone='UTC'\\\")\nd=con.sql(f\\\"select contractName c, to_timestamp(fundingTime/1000)::varchar ft, fundingRate r, count(*) n, min(recorded_at)::varchar t0, max(recorded_at)::varchar t1 from read_parquet('edgex/ticker/parquet/*/*/*/*.parquet') where contractName in ('BTCUSDC','ETHUSDC') group by all order by c, ft, t0\\\").df()\nprint(d.to_string())\n\" | head -120" } ## [tool result] c ft r n t0 t1 0 BTCUSDC 2026-09-19 20:00:00+00 -0.000058 53 2026-09-19 23:59:00.295+00 2026-09-19 23:59:59.153+00 1 BTCUSDC 2026-09-19 20:00:00+00 -0.000056 1 2026-09-19 23:59:00.395+00 2026-09-19 23:59:00.395+00 2 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 176 2026-09-20 00:00:00.491+00 2026-09-20 02:48:58.287+00 3 BTCUSDC 2026-09-20 00:00:00+00 -0.000056 7 2026-09-20 00:01:43.216+00 2026-09-20 00:01:47.163+00 4 BTCUSDC 2026-09-20 00:00:00+00 -0.000052 26 2026-09-20 00:02:00.435+00 2026-09-20 00:03:00.501+00 5 BTCUSDC 2026-09-20 00:00:00+00 -0.000057 38 2026-09-20 00:03:00.415+00 2026-09-20 00:04:00.231+00 6 BTCUSDC 2026-09-20 00:00:00+00 -0.000055 10 2026-09-20 00:04:01.204+00 2026-09-20 00:04:08.26+00 7 BTCUSDC 2026-09-20 00:00:00+00 -0.000057 4 2026-09-20 00:05:56.203+00 2026-09-20 00:05:58.167+00 8 BTCUSDC 2026-09-20 00:00:00+00 -0.000052 16 2026-09-20 00:06:26.206+00 2026-09-20 00:07:00.328+00 9 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 10 2026-09-20 00:07:01.187+00 2026-09-20 00:08:00.491+00 10 BTCUSDC 2026-09-20 00:00:00+00 -0.000057 44 2026-09-20 00:08:00.324+00 2026-09-20 01:46:00.257+00 11 BTCUSDC 2026-09-20 00:00:00+00 -0.000056 19 2026-09-20 00:09:18.114+00 2026-09-20 00:09:59.155+00 12 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 25 2026-09-20 00:10:04.2+00 2026-09-20 00:11:00.3+00 13 BTCUSDC 2026-09-20 00:00:00+00 -0.000059 83 2026-09-20 00:11:01.215+00 2026-09-20 03:36:00.443+00 14 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 7 2026-09-20 00:12:41.213+00 2026-09-20 00:12:49.163+00 15 BTCUSDC 2026-09-20 00:00:00+00 -0.000056 29 2026-09-20 00:15:00.717+00 2026-09-20 00:15:57.164+00 16 BTCUSDC 2026-09-20 00:00:00+00 -0.000050 22 2026-09-20 00:17:12.221+00 2026-09-20 00:18:00.41+00 17 BTCUSDC 2026-09-20 00:00:00+00 -0.000054 45 2026-09-20 00:18:01.203+00 2026-09-20 02:14:53.159+00 18 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 13 2026-09-20 00:19:29.213+00 2026-09-20 00:19:58.288+00 19 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 24 2026-09-20 00:20:08.206+00 2026-09-20 00:20:54.154+00 20 BTCUSDC 2026-09-20 00:00:00+00 -0.000055 19 2026-09-20 00:21:00.332+00 2026-09-20 00:22:00.251+00 21 BTCUSDC 2026-09-20 00:00:00+00 -0.000050 6 2026-09-20 00:22:07.209+00 2026-09-20 00:22:21.159+00 22 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 53 2026-09-20 00:24:06.203+00 2026-09-20 01:33:59.154+00 23 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 65 2026-09-20 00:25:01.63+00 2026-09-20 00:25:59.152+00 24 BTCUSDC 2026-09-20 00:00:00+00 -0.000056 25 2026-09-20 00:26:02.204+00 2026-09-20 00:26:49.144+00 25 BTCUSDC 2026-09-20 00:00:00+00 -0.000056 17 2026-09-20 00:27:03.202+00 2026-09-20 00:28:00.288+00 26 BTCUSDC 2026-09-20 00:00:00+00 -0.000060 31 2026-09-20 00:28:01.297+00 2026-09-20 00:28:48.144+00 27 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 13 2026-09-20 00:29:04.211+00 2026-09-20 00:29:20.165+00 28 BTCUSDC 2026-09-20 00:00:00+00 -0.000055 21 2026-09-20 00:30:03.307+00 2026-09-20 00:30:43.153+00 29 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 33 2026-09-20 00:31:03.215+00 2026-09-20 00:32:00.339+00 30 BTCUSDC 2026-09-20 00:00:00+00 -0.000059 47 2026-09-20 00:32:01.218+00 2026-09-20 00:32:58.293+00 31 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 39 2026-09-20 00:33:04.21+00 2026-09-20 00:33:55.203+00 32 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 21 2026-09-20 00:34:06.696+00 2026-09-20 00:34:58.153+00 33 BTCUSDC 2026-09-20 00:00:00+00 -0.000055 26 2026-09-20 00:35:17.212+00 2026-09-20 00:35:39.151+00 34 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 19 2026-09-20 00:36:03.662+00 2026-09-20 00:36:52.223+00 35 BTCUSDC 2026-09-20 00:00:00+00 -0.000050 12 2026-09-20 00:37:20.203+00 2026-09-20 00:37:57.153+00 36 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 163 2026-09-20 00:38:09.202+00 2026-09-20 03:00:57.166+00 37 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 27 2026-09-20 00:39:03.201+00 2026-09-20 00:40:00.309+00 38 BTCUSDC 2026-09-20 00:00:00+00 -0.000052 122 2026-09-20 00:40:00.46+00 2026-09-20 03:04:00.887+00 39 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 17 2026-09-20 00:41:13.197+00 2026-09-20 00:41:58.147+00 40 BTCUSDC 2026-09-20 00:00:00+00 -0.000052 2 2026-09-20 00:42:01.205+00 2026-09-20 00:42:02.161+00 41 BTCUSDC 2026-09-20 00:00:00+00 -0.000059 8 2026-09-20 00:43:09.199+00 2026-09-20 00:43:17.17+00 42 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 19 2026-09-20 00:44:01.223+00 2026-09-20 00:44:42.213+00 43 BTCUSDC 2026-09-20 00:00:00+00 -0.000054 23 2026-09-20 00:45:00.762+00 2026-09-20 00:45:37.159+00 44 BTCUSDC 2026-09-20 00:00:00+00 -0.000056 140 2026-09-20 00:47:02.227+00 2026-09-20 03:09:00.379+00 45 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 14 2026-09-20 00:48:00.335+00 2026-09-20 00:48:54.152+00 46 BTCUSDC 2026-09-20 00:00:00+00 -0.000056 15 2026-09-20 00:49:10.211+00 2026-09-20 00:49:59.149+00 47 BTCUSDC 2026-09-20 00:00:00+00 -0.000055 79 2026-09-20 00:51:20.211+00 2026-09-20 02:31:51.17+00 48 BTCUSDC 2026-09-20 00:00:00+00 -0.000060 5 2026-09-20 00:52:23.203+00 2026-09-20 00:52:41.149+00 49 BTCUSDC 2026-09-20 00:00:00+00 -0.000055 9 2026-09-20 00:54:04.204+00 2026-09-20 00:54:29.158+00 50 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 6 2026-09-20 00:55:00.434+00 2026-09-20 00:55:40.162+00 51 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 2 2026-09-20 00:56:19.201+00 2026-09-20 00:56:24.159+00 52 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 8 2026-09-20 00:57:07.196+00 2026-09-20 00:57:58.158+00 53 BTCUSDC 2026-09-20 00:00:00+00 -0.000059 20 2026-09-20 00:58:03.209+00 2026-09-20 00:58:48.16+00 54 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 6 2026-09-20 00:59:06.211+00 2026-09-20 00:59:14.151+00 55 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 8 2026-09-20 01:00:00.39+00 2026-09-20 01:00:27.146+00 56 BTCUSDC 2026-09-20 00:00:00+00 -0.000052 12 2026-09-20 01:01:06.211+00 2026-09-20 01:01:55.146+00 57 BTCUSDC 2026-09-20 00:00:00+00 -0.000057 15 2026-09-20 01:02:26.204+00 2026-09-20 01:03:00.45+00 58 BTCUSDC 2026-09-20 00:00:00+00 -0.000054 20 2026-09-20 01:04:22.213+00 2026-09-20 01:04:59.152+00 59 BTCUSDC 2026-09-20 00:00:00+00 -0.000059 32 2026-09-20 01:05:15.645+00 2026-09-20 01:05:59.152+00 60 BTCUSDC 2026-09-20 00:00:00+00 -0.000052 9 2026-09-20 01:06:04.21+00 2026-09-20 01:06:19.147+00 61 BTCUSDC 2026-09-20 00:00:00+00 -0.000056 34 2026-09-20 01:07:00.447+00 2026-09-20 01:39:00.307+00 62 BTCUSDC 2026-09-20 00:00:00+00 -0.000054 6 2026-09-20 01:08:31.301+00 2026-09-20 01:08:36.153+00 63 BTCUSDC 2026-09-20 00:00:00+00 -0.000052 32 2026-09-20 01:09:01.229+00 2026-09-20 01:09:59.15+00 64 BTCUSDC 2026-09-20 00:00:00+00 -0.000059 59 2026-09-20 01:10:01.417+00 2026-09-20 01:25:48.279+00 65 BTCUSDC 2026-09-20 00:00:00+00 -0.000050 14 2026-09-20 01:11:01.196+00 2026-09-20 01:11:45.152+00 66 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 39 2026-09-20 01:12:06.154+00 2026-09-20 01:13:00.311+00 67 BTCUSDC 2026-09-20 00:00:00+00 -0.000054 48 2026-09-20 01:13:01.229+00 2026-09-20 01:13:56.237+00 68 BTCUSDC 2026-09-20 00:00:00+00 -0.000052 50 2026-09-20 01:14:01.321+00 2026-09-20 01:14:59.152+00 69 BTCUSDC 2026-09-20 00:00:00+00 -0.000059 39 2026-09-20 01:15:00.309+00 2026-09-20 01:16:00.311+00 70 BTCUSDC 2026-09-20 00:00:00+00 -0.000054 126 2026-09-20 01:16:01.234+00 2026-09-20 03:15:00.301+00 71 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 14 2026-09-20 01:17:13.21+00 2026-09-20 01:18:00.308+00 72 BTCUSDC 2026-09-20 00:00:00+00 -0.000057 35 2026-09-20 01:18:00.375+00 2026-09-20 01:19:00.348+00 73 BTCUSDC 2026-09-20 00:00:00+00 -0.000052 28 2026-09-20 01:19:03.202+00 2026-09-20 01:19:43.155+00 74 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 20 2026-09-20 01:20:07.212+00 2026-09-20 01:20:53.161+00 75 BTCUSDC 2026-09-20 00:00:00+00 -0.000055 17 2026-09-20 01:21:18.225+00 2026-09-20 01:21:52.152+00 76 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 15 2026-09-20 01:22:33.207+00 2026-09-20 01:22:49.155+00 77 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 4 2026-09-20 01:23:42.209+00 2026-09-20 01:23:47.156+00 78 BTCUSDC 2026-09-20 00:00:00+00 -0.000057 8 2026-09-20 01:24:08.197+00 2026-09-20 01:24:38.152+00 79 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 183 2026-09-20 01:26:06.217+00 2026-09-20 03:22:00.379+00 80 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 10 2026-09-20 01:27:01.314+00 2026-09-20 01:27:34.149+00 81 BTCUSDC 2026-09-20 00:00:00+00 -0.000059 42 2026-09-20 01:28:06.208+00 2026-09-20 01:59:59.15+00 82 BTCUSDC 2026-09-20 00:00:00+00 -0.000054 27 2026-09-20 01:29:09.21+00 2026-09-20 01:29:54.159+00 83 BTCUSDC 2026-09-20 00:00:00+00 -0.000059 47 2026-09-20 01:30:00.54+00 2026-09-20 01:30:59.157+00 84 BTCUSDC 2026-09-20 00:00:00+00 -0.000057 32 2026-09-20 01:32:21.201+00 2026-09-20 01:32:53.161+00 85 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 30 2026-09-20 01:34:01.201+00 2026-09-20 01:34:51.154+00 86 BTCUSDC 2026-09-20 00:00:00+00 -0.000055 16 2026-09-20 01:35:02.235+00 2026-09-20 01:35:17.156+00 87 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 41 2026-09-20 01:36:12.205+00 2026-09-20 01:37:00.322+00 88 BTCUSDC 2026-09-20 00:00:00+00 -0.000057 31 2026-09-20 01:37:01.202+00 2026-09-20 01:38:00.281+00 89 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 22 2026-09-20 01:39:27.206+00 2026-09-20 01:39:51.155+00 90 BTCUSDC 2026-09-20 00:00:00+00 -0.000054 29 2026-09-20 01:40:03.206+00 2026-09-20 01:41:00.669+00 91 BTCUSDC 2026-09-20 00:00:00+00 -0.000056 68 2026-09-20 01:41:00.415+00 2026-09-20 03:24:58.169+00 92 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 14 2026-09-20 01:42:01.423+00 2026-09-20 01:42:31.154+00 93 BTCUSDC 2026-09-20 00:00:00+00 -0.000054 32 2026-09-20 01:44:11.273+00 2026-09-20 01:44:57.153+00 94 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 21 2026-09-20 01:46:01.182+00 2026-09-20 01:46:58.161+00 95 BTCUSDC 2026-09-20 00:00:00+00 -0.000056 50 2026-09-20 01:47:00.321+00 2026-09-20 01:48:00.297+00 96 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 48 2026-09-20 01:48:00.413+00 2026-09-20 01:48:42.161+00 97 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 19 2026-09-20 01:49:05.245+00 2026-09-20 01:49:50.166+00 98 BTCUSDC 2026-09-20 00:00:00+00 -0.000056 35 2026-09-20 01:50:02.259+00 2026-09-20 01:50:59.167+00 99 BTCUSDC 2026-09-20 00:00:00+00 -0.000055 15 2026-09-20 01:51:00.418+00 2026-09-20 01:51:53.151+00 100 BTCUSDC 2026-09-20 00:00:00+00 -0.000052 34 2026-09-20 01:52:14.197+00 2026-09-20 01:53:00.597+00 101 BTCUSDC 2026-09-20 00:00:00+00 -0.000052 36 2026-09-20 01:53:02.171+00 2026-09-20 01:53:52.284+00 102 BTCUSDC 2026-09-20 00:00:00+00 -0.000059 32 2026-09-20 01:54:04.24+00 2026-09-20 01:54:59.15+00 103 BTCUSDC 2026-09-20 00:00:00+00 -0.000059 26 2026-09-20 01:55:03.203+00 2026-09-20 01:55:55.15+00 104 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 42 2026-09-20 01:56:01.21+00 2026-09-20 01:56:59.149+00 105 BTCUSDC 2026-09-20 00:00:00+00 -0.000059 10 2026-09-20 01:57:06.2+00 2026-09-20 01:58:00.362+00 106 BTCUSDC 2026-09-20 00:00:00+00 -0.000054 6 2026-09-20 01:58:04.238+00 2026-09-20 01:58:19.153+00 107 BTCUSDC 2026-09-20 00:00:00+00 -0.000060 38 2026-09-20 02:00:02.217+00 2026-09-20 02:00:52.158+00 108 BTCUSDC 2026-09-20 00:00:00+00 -0.000056 37 2026-09-20 02:01:01.339+00 2026-09-20 02:01:38.153+00 109 BTCUSDC 2026-09-20 00:00:00+00 -0.000060 12 2026-09-20 02:03:01.244+00 2026-09-20 02:04:00.306+00 110 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 33 2026-09-20 02:04:01.169+00 2026-09-20 02:04:56.156+00 111 BTCUSDC 2026-09-20 00:00:00+00 -0.000050 15 2026-09-20 02:05:02.191+00 2026-09-20 02:05:42.163+00 112 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 4 2026-09-20 02:07:21.208+00 2026-09-20 02:07:27.159+00 113 BTCUSDC 2026-09-20 00:00:00+00 -0.000055 4 2026-09-20 02:08:33.22+00 2026-09-20 02:08:48.159+00 114 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 21 2026-09-20 02:09:04.383+00 2026-09-20 02:09:49.155+00 115 BTCUSDC 2026-09-20 00:00:00+00 -0.000053 12 2026-09-20 02:11:11.217+00 2026-09-20 02:11:47.154+00 116 BTCUSDC 2026-09-20 00:00:00+00 -0.000051 23 2026-09-20 02:12:17.221+00 2026-09-20 02:13:00.353+00 117 BTCUSDC 2026-09-20 00:00:00+00 -0.000052 21 2026-09-20 02:13:00.597+00 2026-09-20 02:13:58.227+00 118 BTCUSDC 2026-09-20 00:00:00+00 -0.000058 40 2026-09-20 02:15:02.189+00 2026-09-20 02:15:51.16+00 Traceback (most recent call last): File "", line 6, in BrokenPipeError: [Errno 32] Broken pipe Shell cwd was reset to /tmp/peerfeed-a21/work-t1-raw ## [agent thinking] ## [agent] Four venues publish rates at different frequencies and in different units, so I'm checking each cadence before building a single time-weighted computation. ## [tool call 12] Bash { "command": "cd /tmp/peerfeed-a21/archive; P=/tmp/peerfeed-a21/venv/bin/python; $P -c \"\nimport duckdb, pandas as pd\npd.set_option('display.width',250)\ncon=duckdb.connect(); con.sql(\\\"set TimeZone='UTC'\\\")\nW=\\\"recorded_at >= '2026-09-23 00:00:00+00' and recorded_at < '2026-09-23 03:00:00+00'\\\"\nd=con.sql(f\\\"select recorded_at::varchar t, funding, next_funding from read_parquet('pacifica/prices/parquet/*/*/*/*.parquet') where symbol='BTC' and {W} order by recorded_at\\\").df()\nc=d.funding.ne(d.funding.shift())|d.next_funding.ne(d.next_funding.shift())\nprint(d[c].to_string()[:3000])\nd=con.sql(f\\\"select recorded_at::varchar t, funding, premium from read_parquet('hyperliquid/activeAssetCtx/parquet/*/*/*/*.parquet') where coin='BTC' and {W} order by recorded_at\\\").df()\nc=d.funding.ne(d.funding.shift())\nprint(c.sum()); print(d[c].head(15).to_string())\nd=con.sql(f\\\"select T::varchar t, f from read_parquet('extended/funding/parquet/*/*/*/*.parquet') where m='BTC-USD' and T >= '2026-09-23 00:00:00+00' and T < '2026-09-23 03:00:00+00' order by T\\\").df()\nprint(d.f.astype(float).describe()); print(d.head(5), d.f.nunique())\n\"" } ## [tool result] t funding next_funding 0 2026-09-23 00:00:01.516+00 0.000013 0.000013 34 t funding premium 0 2026-09-23 00:00:02.238+00 0.000013 0.000336 1860 2026-09-23 01:00:01.535+00 0.000016 0.000625 1862 2026-09-23 01:00:06.199+00 0.000022 0.000729 1865 2026-09-23 01:00:12.568+00 0.000014 0.000531 1868 2026-09-23 01:00:15.476+00 0.000013 0.000538 1886 2026-09-23 01:00:46.09+00 0.000013 0.000879 1888 2026-09-23 01:00:51.214+00 0.000014 0.000705 1891 2026-09-23 01:00:56.356+00 0.000014 0.000624 1894 2026-09-23 01:01:00.518+00 0.000015 0.000728 1896 2026-09-23 01:01:05.548+00 0.000015 0.000613 1897 2026-09-23 01:01:10.737+00 0.000015 0.000607 1900 2026-09-23 01:01:15.743+00 0.000015 0.000607 1903 2026-09-23 01:01:20.807+00 0.000015 0.000601 1905 2026-09-23 01:01:25.933+00 0.000015 0.000601 1908 2026-09-23 01:01:30.963+00 0.000014 0.000532 count 1.800000e+02 mean 1.300000e-05 std 1.698791e-21 min 1.300000e-05 25% 1.300000e-05 50% 1.300000e-05 75% 1.300000e-05 max 1.300000e-05 Name: f, dtype: float64 t f 0 2026-09-23 00:00:10.287+00 0.000013 1 2026-09-23 00:01:10.283+00 0.000013 2 2026-09-23 00:02:10.288+00 0.000013 3 2026-09-23 00:03:10.282+00 0.000013 4 2026-09-23 00:04:10.285+00 0.000013 1 Shell cwd was reset to /tmp/peerfeed-a21/work-t1-raw ## [agent thinking] ## [agent] Now the full computation: a time-weighted mean of each venue's published rate, converted to an hourly rate using that venue's interval. ## [tool call 13] Bash { "command": "mkdir -p /tmp/peerfeed-a21/work-t1-raw; cat > /tmp/peerfeed-a21/work-t1-raw/funding.py <<'EOF'\nimport duckdb, pandas as pd, numpy as np\nA='/tmp/peerfeed-a21/archive'\ncon=duckdb.connect(); con.sql(\"set TimeZone='UTC'\")\nS=pd.Timestamp('2026-09-21',tz='UTC').value//10**6; E=pd.Timestamp('2026-09-28',tz='UTC').value//10**6\ndef q(sql): return con.sql(sql).df()\n# per venue: (sql returning coin,t_ms,rate_native), hours per native interval\nsrc={\n 'Hyperliquid':(f\"select coin c, epoch_ms(recorded_at) t, funding r from read_parquet('{A}/hyperliquid/activeAssetCtx/parquet/*/*/*/*.parquet') where coin in ('BTC','ETH')\",1),\n 'edgeX':(f\"select replace(contractName,'USDC','') c, epoch_ms(recorded_at) t, fundingRate r from read_parquet('{A}/edgex/ticker/parquet/*/*/*/*.parquet') where contractName in ('BTCUSDC','ETHUSDC')\",4),\n 'Extended':(f\"select replace(m,'-USD','') c, ts t, f::double r from read_parquet('{A}/extended/funding/parquet/*/*/*/*.parquet') where m in ('BTC-USD','ETH-USD')\",1),\n 'Nado':(f\"select case product_id when 2 then 'BTC' else 'ETH' end c, update_time*1000 t, funding_rate_x18/1e18 r from read_parquet('{A}/nado/funding_rate/parquet/*/*/*/*.parquet') where product_id in (2,4)\",24),\n 'Pacifica':(f\"select symbol c, epoch_ms(recorded_at) t, funding r from read_parquet('{A}/pacifica/prices/parquet/*/*/*/*.parquet') where symbol in ('BTC','ETH')\",1),\n}\nrows=[]\nfor v,(sql,h) in src.items():\n d=q(sql)\n for c,x in d.groupby('c'):\n x=x.sort_values('t').drop_duplicates('t',keep='last')\n pre=x[x.t=S)&(x.t3600].index:\n a,b=x.t[i-1],x.t[i]\n others=d[(d.t>a)&(d.t', pd.to_datetime(b,unit='s'), round((b-a)/3600,2),'h rate before',x.r[i-1],'after',x.r[i],' other-product msgs in gap:',len(others), others.p.nunique())\nall_=d.t.drop_duplicates().sort_values().diff(); print('max gap any product (s):', all_.max())\n\"" } ## [tool result] 4 2026-09-23 01:04:44 -> 2026-09-23 02:06:18 1.03 h rate before 0.000299999999999999 after 0.000297659704640765 other-product msgs in gap: 10073 66 4 2026-09-23 02:27:43 -> 2026-09-23 06:00:34 3.55 h rate before 0.000299999999999999 after 0.000195731376651695 other-product msgs in gap: 33938 71 4 2026-09-23 13:00:34 -> 2026-09-23 15:02:04 2.02 h rate before 0.000299999999999999 after -8.9373042651068e-05 other-product msgs in gap: 10718 71 4 2026-09-23 17:43:42 -> 2026-09-23 19:01:01 1.29 h rate before 0.000299999999999999 after 0.000271886733201728 other-product msgs in gap: 14029 75 4 2026-09-24 01:01:47 -> 2026-09-24 03:00:35 1.98 h rate before 0.000299999999999999 after 0.000285609938238746 other-product msgs in gap: 20187 74 4 2026-09-25 13:39:13 -> 2026-09-25 15:02:33 1.39 h rate before 0.000299999999999999 after 0.000281981481113594 other-product msgs in gap: 6072 67 4 2026-09-26 22:02:36 -> 2026-09-26 23:03:30 1.01 h rate before 0.000299999999999999 after 0.000292830294242888 other-product msgs in gap: 10018 68 4 2026-09-26 23:03:50 -> 2026-09-27 01:00:38 1.95 h rate before 0.000299999999999999 after 0.000265724929116596 other-product msgs in gap: 18540 70 4 2026-09-27 01:01:18 -> 2026-09-27 04:49:32 3.8 h rate before 0.000299999999999999 after 0.000299877002439404 other-product msgs in gap: 37105 69 4 2026-09-27 09:00:12 -> 2026-09-27 12:00:15 3.0 h rate before 0.000299999999999999 after 0.000271307505351296 other-product msgs in gap: 28344 70 4 2026-09-27 12:00:35 -> 2026-09-27 14:00:03 1.99 h rate before 0.000299999999999999 after 0.000160046799669038 other-product msgs in gap: 18922 64 4 2026-09-28 13:00:12 -> 2026-09-28 14:22:13 1.37 h rate before 0.000299999999999999 after 0.00028441700877311 other-product msgs in gap: 8858 69 4 2026-09-28 17:18:35 -> 2026-09-28 20:00:14 2.69 h rate before 0.000299999999999999 after -0.000141782836491014 other-product msgs in gap: 25223 68 max gap any product (s): 562.0 Shell cwd was reset to /tmp/peerfeed-a21/work-t1-raw ## [agent thinking] ## [tool call 15] Bash { "command": "cd /tmp/peerfeed-a21/archive; P=/tmp/peerfeed-a21/venv/bin/python; $P -c \"\nimport duckdb, pandas as pd, numpy as np\ncon=duckdb.connect()\nS=1789948800; E=S+7*86400\nd=con.sql(f\\\"select product_id p, update_time t, funding_rate_x18/1e18 r from read_parquet('nado/funding_rate/parquet/*/*/*/*.parquet') where update_time between {S-86400} and {E} order by t\\\").df()\nfor p in (2,4):\n x=d[d.p==p].reset_index(drop=True); g=x.t.diff()\n bad=0\n for i in g[g>3600].index:\n a,b=x.t[i-1],x.t[i]; o=d[(d.t>a)&(d.t1h',(g>3600).sum(),'with non-default level',bad, 'min other msgs', min([len(d[(d.t>x.t[i-1])&(d.t3600].index]))\nprint('max gap any product (s):', d.t.drop_duplicates().diff().max())\n\"" } ## [tool result] 2 gaps>1h 12 with non-default level 0 min other msgs 10937 4 gaps>1h 29 with non-default level 0 min other msgs 6072 max gap any product (s): 562.0 Shell cwd was reset to /tmp/peerfeed-a21/work-t1-raw ## [agent thinking] ## [agent] I ran it over 2026-09-21 00:00 to 2026-09-28 00:00 UTC. **The best trade is long BTC on Nado and short BTC on Hyperliquid, with an annualised funding spread of about 9.6%.** The rates are what longs pay: positive means longs pay shorts. APR is the mean hourly rate × 8,760, with no compounding. **Funding APR, time-weighted:** | Venue | Rate interval / units | BTC APR | ETH APR | |---|---|---|---| | Hyperliquid | per hour | **11.12%** | **12.40%** | | edgeX | per 4 hours | **6.65%** | **10.95%** | | Extended | per hour | **7.59%** | **11.26%** | | Nado | quoted as a 24-hour rate, paid hourly | **1.52%** | **8.48%** | | Pacifica | per hour | **10.02%** | **10.95%** | **Best delta-neutral carry trade:** - **Long BTC perp on Nado (pays 1.52%) and short BTC perp on Hyperliquid (receives 11.12%): about 9.60% APR.** Using only the rate in force at each settlement instead gives 9.51%. - The next best is long Nado, short Pacifica on BTC at about 8.5%. The best ETH trade is long Nado, short Hyperliquid at about 3.9%. - This is funding only. It excludes trading fees, spread, the price gap between the two perps and the cost of holding margin on two venues. Nado's BTC rate moves a lot, so a week of data doesn't show whether the spread will last. **Judgement calls:** 1. **Rescaling each venue's interval:** I converted every rate to an hourly rate before annualising. Hyperliquid, Extended and Pacifica are already hourly. edgeX quotes a 4-hour rate (its next funding time is always 4 hours after the last), so I divided by 4. Nado quotes a 24-hour rate paid hourly, so I divided by 24. The checks: each venue's resting level works out to about 0.00125% per hour (the 0.01% per 8 hours baseline). On edgeX that is 0.00005 per 4 hours, and on Nado 0.0003 per day. Without this step, edgeX would be overstated 4× and Nado 24×. 2. **Time-weighting:** each published rate counts for as long as it stayed in force, carrying the last value before 21 Sep 00:00 into the window. I didn't average the raw rows, because the feeds update at very different speeds (Hyperliquid about every second, Extended about every minute, Nado only when the rate changes). As a check, I also sampled the rate in force just before each settlement (hourly, or every 4 hours on edgeX). The two methods agree within about 0.45 points. 3. **Nado gaps:** Nado BTC and ETH went up to about 12 hours without an update. I kept the last value through these gaps rather than treating them as missing data. Every gap longer than an hour happened while the rate sat at the 0.0003/day resting level, and other Nado products kept updating throughout. So the feed was working and these rates just weren't changing. This matters: a plain average of the rows gives −0.52% for Nado BTC instead of +1.52%. 4. **Which field I used on each venue:** - Nado: product 2 is BTC and product 4 is ETH. I inferred this from trade prices (about 84,000 and 2,690), because the funding file has no coin names. - edgeX: I used the BTCUSDC and ETHUSDC contracts. - Pacifica: I used the `funding` field, not the `next_funding` forecast. - Hyperliquid: `funding` is the live estimate for the current hour. Sampling it at each hour's settlement gives nearly the same result (11.09% against 11.12% for BTC). 5. **Timestamps:** the files display times in +02:00, so I converted everything to UTC. I filtered on event time rather than the file folders, which are offset by about a minute. **Data coverage:** apart from the Nado gaps above, the longest gaps were about 12 minutes on Pacifica, 6.5 minutes on edgeX, 3 minutes on Hyperliquid and 2 minutes on Extended. edgeX ETH and Pacifica ETH stayed at the baseline all week, which is why both show exactly 10.95%. The script is `funding.py` and the per-venue results are in `funding_apr.csv`, both in `/tmp/peerfeed-a21/work-t1-raw/`. ## FINAL ANSWER **Mean funding charged to longs, simple APR, 2026-09-21 00:00 to 2026-09-28 00:00 UTC:** | Venue | BTC | ETH | |---|---|---| | Hyperliquid | 11.12% | 12.40% | | edgeX | 6.65% | 10.95% | | Extended | 7.59% | 11.26% | | Nado | 1.52% | 8.48% | | Pacifica | 10.02% | 10.95% | **Best carry trade:** long BTC perp on Nado, short BTC perp on Hyperliquid, with a funding spread of **about 9.60% APR** (9.51% using settlement-time rates). This is before fees, spread, price gap between the perps and margin costs. **Judgement calls:** - **Funding intervals:** I converted every rate to hourly before annualising. Hyperliquid, Extended and Pacifica are hourly. I divided edgeX's 4-hour rate by 4 and Nado's 24-hour rate by 24. - **Averaging:** each rate is weighted by how long it was in force, with the last value before the start carried in. I checked this against rates sampled at each settlement. - **Nado gaps:** I kept the last value through gaps of up to 12 hours. The rate sat at its resting level throughout, and other Nado products kept updating. - **Nado coin mapping:** product 2 = BTC and product 4 = ETH, inferred from trade prices. - **Fields used:** Pacifica's `funding` rather than `next_funding`, and Hyperliquid's live `funding` estimate. - **Time zone:** all timestamps converted to UTC. ## [run ended] subtype=success turns=16 duration_ms=132421