<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dean Ding</title>
    <description>The latest articles on DEV Community by Dean Ding (@deanding).</description>
    <link>https://dev.to/deanding</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4264193%2Fe1a89b40-f724-47b9-961f-fe26cef135cb.png</url>
      <title>DEV Community: Dean Ding</title>
      <link>https://dev.to/deanding</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deanding"/>
    <language>en</language>
    <item>
      <title>Bitcoin Funding Rates Across Exchanges: Compare 1h and 8h Rates, Spot Crowded Trades, Check the Arbitrage Math</title>
      <dc:creator>Dean Ding</dc:creator>
      <pubDate>Wed, 25 Nov 2026 10:23:42 +0000</pubDate>
      <link>https://dev.to/deanding/bitcoin-funding-rates-across-exchanges-compare-1h-and-8h-rates-spot-crowded-trades-check-the-ghb</link>
      <guid>https://dev.to/deanding/bitcoin-funding-rates-across-exchanges-compare-1h-and-8h-rates-spot-crowded-trades-check-the-ghb</guid>
      <description>&lt;p&gt;The numbers and code below are real; you can run them yourself.&lt;/p&gt;

&lt;p&gt;At 03:18 UTC on November 23, BTC funding on Binance stood at −0.0002%, while Crypto.com was charging longs about 0.002% every hour. Which market was more crowded? Raw numbers can't tell you, because one settles every 8 hours and the other every hour.&lt;/p&gt;

&lt;p&gt;On the same 8-hour basis, Crypto.com came out at +0.0156%, the highest of 18 venues. Three of the top five were on-chain perp exchanges: Hyperliquid (+0.0100%), Lighter (+0.0096%) and Aster (+0.0065%). Binance, MEXC, Bitget and three smaller venues sat at or below zero. Longs on DEXs were paying the most to stay long that morning.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3dxackd18p9ijxjcsfd4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3dxackd18p9ijxjcsfd4.png" alt="BTC funding rate by exchange, normalised to 8 hours" width="800" height="586"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What a funding rate is&lt;/p&gt;

&lt;p&gt;Perpetual futures never expire, so exchanges use periodic payments between longs and shorts to keep the contract close to spot. When funding is positive, longs pay shorts; when it is negative, shorts pay longs. The money moves between traders, not to the exchange. The payment is your position's notional value times the rate, charged only if you hold the position at settlement time.&lt;/p&gt;

&lt;p&gt;Why raw funding rates mislead&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Different intervals. In the snapshot above, Hyperliquid, Lighter, dYdX, Kraken and Crypto.com settle every hour; Binance, OKX and Bybit every 8 hours. Some exchanges use different intervals for different contracts.&lt;/li&gt;
&lt;li&gt;Rescale before you compare: rate × 8 ÷ interval in hours gives the 8-hour equivalent. To annualise, multiply the 8-hour rate by 3 × 365: 0.01% every 8 hours is about 10.95% a year.&lt;/li&gt;
&lt;li&gt;Use one market-wide number. OI-weighted funding weights each venue by its open interest. At capture, BTC OI-weighted funding was 0.0041%.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frw8gdtw7mbrgc4yc9h97.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frw8gdtw7mbrgc4yc9h97.png" alt="Annotated CoinGlass Funding Rate page" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Four ways to use funding data&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Spot crowded trades. On Binance-style formulas the neutral baseline is 0.01% per 8 hours. Funding that stays well above it means longs are paying up to hold their positions. Add rising open interest and you have a crowded long.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;See where the leverage sits. When DEX funding runs above the big centralised exchanges, on-chain traders are leaning harder in one direction. You only see that gap if you compare venues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check the arbitrage math before you trade. Short where funding is high, long where it is low, equal size. On November 23 the Crypto.com–Binance spread was about 0.0158% per 8 hours: roughly $47 a day on $100,000 per leg. At 0.05% per side, opening and closing both legs costs about $200, so the spread has to hold for more than four days just to break even. It rarely holds that steady.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Measure carry over time. Accumulated funding over 1, 7 and 30 days shows what holding a position actually cost.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Pull it with Python&lt;/p&gt;

&lt;p&gt;This ranks BTC funding across exchanges on an 8-hour basis. It needs a CoinGlass API key in the environment variable &lt;code&gt;COINGLASS_API_KEY&lt;/code&gt; (the entry plan is enough).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="no"&gt;API_KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"COINGLASS_API_KEY"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"https://open-api-v4.coinglass.com/api/futures/funding-rate/exchange-list"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"CG-API-KEY"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;API_KEY&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s2"&gt;"0"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;SystemExit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Request failed: {resp.get('code')} {resp.get('msg')}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;btc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"symbol"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"BTC"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;btc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"stablecoin_margin_list"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;                  &lt;span class="c1"&gt;# USDT/USD-margined perps&lt;/span&gt;
    &lt;span class="n"&gt;rate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hours&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"funding_rate"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"funding_rate_interval"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;rate&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;hours&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"exchange"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rate&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;hours&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hours&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# rescale to an 8-hour basis&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;per8h&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hours&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reverse&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{ex:&amp;lt;14}{per8h:&amp;gt;9.4f}%  (settles every {hours}h)"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same API has per-pair funding history, OI-weighted and volume-weighted history, and accumulated funding by exchange. Live page: &lt;a href="https://www.coinglass.com/FundingRate?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=funding" rel="noopener noreferrer"&gt;CoinGlass Funding Rate&lt;/a&gt; · API plans: &lt;a href="https://www.coinglass.com/pricing?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=funding" rel="noopener noreferrer"&gt;coinglass.com/pricing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;FAQ&lt;/p&gt;

&lt;p&gt;How do I compare 1-hour and 8-hour funding rates? Multiply by 8 and divide by the interval in hours. 0.00125% per hour equals 0.01% per 8 hours.&lt;/p&gt;

&lt;p&gt;What is an OI-weighted funding rate? Funding averaged across exchanges, each weighted by its open interest: one number for the whole market.&lt;/p&gt;

&lt;p&gt;Is funding rate arbitrage risk-free? No. Fees, slippage, funding changes and exchange outages can wipe out the spread.&lt;/p&gt;

&lt;p&gt;Not financial advice. Trading futures with leverage carries a high risk of loss.&lt;/p&gt;

</description>
      <category>python</category>
      <category>api</category>
      <category>cryptocurrency</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
