Complete reference for HGM APIs with code examples and integration guides
Sign up and generate an API key from your dashboard
Estimate costs before making API calls using /pricing/estimate
Include X-API-Key header in all requests
Verify cryptographic receipts for trust and security
import requests
import json
# Initialize HGM client
API_KEY = "your-api-key"
BASE_URL = "https://api.hgm.io/api/v1"
headers = {
"X-API-Key": API_KEY,
"Content-Type": "application/json"
}
# Get opportunities
response = requests.get(
f"{BASE_URL}/opportunities",
params={"asset": "BTC", "min_return": 5},
headers=headers
)
opportunities = response.json()
print(json.dumps(opportunities, indent=2))
# Check cost before executing
cost_response = requests.post(
f"{BASE_URL}/pricing/estimate",
json={
"endpoint": "/opportunities",
"tier": "pro",
"monthly_calls": 1000
},
headers=headers
)
pricing = cost_response.json()
print(f"Cost: {pricing['data']['cost_per_call']} cents")/opportunitiesFetch market opportunities
Cost per call
$0.001
/market-intelligenceGet market trends and analysis
Cost per call
$0.0005
/sentimentGet sentiment analysis
Cost per call
$0.002
/pricingGet pricing for all endpoints
Cost per call
Free
/pricing/estimateEstimate cost for API call
Cost per call
Free
/latency-metricsGet latency metrics
Cost per call
Free
/trust/receipt/:idGet receipt details
Cost per call
Free
/agentsList internal agents
Cost per call
Free
Include X-API-Key header in all requests
X-API-Key: your-api-key-hereUse JWT tokens for session-based auth
Authorization: Bearer eyJhbGc...Include x402 payment proof for premium endpoints
X-Payment-Proof: base64-encoded-proofSign requests with HMAC-SHA256
X-Signature: hmac-sha256-signatureAll API responses follow a standard format:
{
"success": true,
"data": {
// Response data
},
"pricing": {
"cost": 100,
"currency": "USDC",
"tier": "pro",
"endpoint": "/opportunities"
},
"receipt": {
"receipt_id": "receipt_...",
"signature": "abc123...",
"timestamp": 1234567890
},
"timestamp": "2026-03-17T18:00:00Z"
}Complete OpenAPI 3.1 specification
Model Context Protocol manifest for Claude
Complete capability matrix for agents