htx/funding-rate
HTX USDT-M perpetual funding rate — current / market-wide batch / history / estimated next-period klines.
What this skill does
# Funding Rate
Monitor HTX USDT-M perpetual funding rate. **No API key required**.
Funding rate settles every 8 hours (UTC 0:00 / 8:00 / 16:00). **Positive rate** means longs pay shorts; **negative rate** means shorts pay longs. Useful for:
- Arbitrage (short perpetual + spot long hedge when rate is positive)
- Sentiment signal (extreme positive rate = longs overheated, potential squeeze)
- Position cost estimation
## When to use
- Query the current funding rate of a single contract
- Market-wide scan to find contracts with abnormal funding rates
- Pull historical funding rate series for trend analysis
- Estimate the next-period funding rate trend (kline form)
## Quick start
```bash
# BTC perpetual current funding rate
htx-cli funding-rate current -p contract_code=BTC-USDT
# All perpetual funding rates market-wide
htx-cli funding-rate batch
# BTC historical funding rate (last 30 periods = 10 days)
htx-cli funding-rate history -p contract_code=BTC-USDT -p page_size=30
```
## Available commands (4 endpoints)
| Command | HTX endpoint | Description |
|---------|--------------|-------------|
| `current` | `GET /linear-swap-api/v1/swap_funding_rate` | Single-contract current rate + next settlement time |
| `batch` | `GET /linear-swap-api/v1/swap_batch_funding_rate` | Batch funding rates for all contracts market-wide |
| `history` | `GET /linear-swap-api/v1/swap_historical_funding_rate` | Historical funding rate series (paginated) |
| `estimated-kline` | `GET /linear-swap-ex/market/history/funding_rate` | Estimated next-period funding rate kline |
## Parameter reference
- `contract_code` — `BTC-USDT` / `ETH-USDT` / `SOL-USDT` etc.
- `page_index` — page number, starting from 1
- `page_size` — records per page, max 50
- `period` — kline period (used by `estimated-kline`): `1min` `5min` `15min` `30min` `60min` `4hour` `1day`
- `size` — number of klines, 1-2000
## Typical scenarios
**"What is the current funding rate of BTC perpetual?"**
```bash
htx-cli funding-rate current -p contract_code=BTC-USDT
# Returns funding_rate (current period) + estimated_rate (estimated next period) + next_funding_time
```
**"Which coins have negative funding rates? (Get paid for going long?)"**
```bash
htx-cli funding-rate batch
# AI Agent filters contracts where funding_rate < 0
```
**"BTC funding rate trend over the last 7 days"**
```bash
# 7 days = 21 periods
htx-cli funding-rate history -p contract_code=BTC-USDT -p page_size=21
# Array sorted by time descending
```
**"Top 5 hottest (highest funding rate) perpetuals market-wide"**
```bash
htx-cli funding-rate batch
# Sort descending by funding_rate, take top 5
```
## Output schema excerpt
`current` returns:
```json
{
"status": "ok",
"data": {
"contract_code": "BTC-USDT",
"fee_asset": "USDT",
"funding_time": "1712345600000",
"funding_rate": "0.00012500",
"estimated_rate": "0.00009800",
"settlement_time": "1712376000000",
"next_funding_time": "1712376000000"
}
}
```
## Interpretation guidance
| funding_rate range | Meaning |
|--------------------|---------|
| > 0.0005 (0.05%) | Longs overheated; watch for pullback |
| 0.0001 ~ 0.0005 | Bullish-leaning |
| -0.0001 ~ 0.0001 | Neutral |
| < -0.0001 | Bearish-leaning |
| < -0.0005 | Shorts overheated; potential rebound |
> Note: judgment must be combined with spot/derivatives spread, OI changes, etc. A single indicator is not enough.
## Installation
```bash
curl -fsSL https://github.com/htx-exchange/htx-skills-hub/releases/latest/download/install.sh | bash -s -- funding-rate
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.