hedge-position-matching

Group exchange legs into hedge strategy positions by canonical asset and direction.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/kann420/Cross-Arbitrage-Exchange --skill hedge-position-matching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hedge-position-matching
Source: https://github.com/kann420/Cross-Arbitrage-Exchange/tree/main/.claude/hedge-position-matching
Command: npx skills add https://github.com/kann420/Cross-Arbitrage-Exchange --skill hedge-position-matching

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures that AI agents can accurately group exchange trading legs into cohesive hedge strategy positions, preventing errors like double-counting exposure or miscalculating PnL.

Core Features & Use Cases

  • Deterministic Grouping: Creates stable, unique IDs for hedge strategy positions.
  • Cross-Quote Handling: Safely matches positions with different quote assets (e.g., USDG vs USDT).
  • Lifecycle Management: Tracks positions through open, partially closed, and closed states.
  • Use Case: Automatically group a long KITE spot position on OKX with a short KITE perpetual hedge on Binance, even if they use different quote currencies, and flag any significant deviations in hedge ratio.

Quick Start

Use the hedge-position-matching skill to group exchange legs into hedge strategy positions.

Frequently Asked Questions about hedge-position-matching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I group exchange legs into hedge positions across different crypto exchanges?

Group exchange legs into hedge positions by standardizing the matching of normalized legs based on canonical asset, complementary direction, instrument type compatibility, and quantity alignment. This creates stable, unique IDs for cross-exchange hedge and carry management.

What is cross-quote pairing when matching hedge positions?

Cross-quote pairing is the process of safely matching hedge positions that use different quote assets, such as USDG versus USDT. It allows exchange legs with varying quote currencies to be grouped into a single cohesive hedge strategy position.

How does hedge position lifecycle management handle open and closed states?

Hedge position lifecycle management tracks grouped exchange legs through open, partially closed, and closed states. This prevents errors like double-counting exposure or miscalculating PnL during cross-exchange carry management.

Can I match a long spot position on one exchange with a short perpetual hedge on another?

Yes, you can match a long spot position on one exchange with a short perpetual hedge on another. The matching logic supports cross-exchange pairing by verifying canonical asset compatibility and complementary direction.

Why does my cross-exchange hedge position matching fail due to quantity deviations?

Cross-exchange hedge position matching requires strict quantity alignment between normalized legs. Significant deviations in hedge ratio will prevent legs from grouping correctly into a cohesive hedge strategy position.

Does crypto arbitrage position matching support different instrument types?

Crypto arbitrage position matching supports different instrument types through instrument type compatibility checks. This ensures distinct exchange legs, such as spot and perpetual contracts, can be grouped into a unified hedge position.