By HolySheep AI Technical Blog | May 4, 2026
Introduction: Why Crypto Data Cost Attribution Matters in 2026
Running a quantitative research team or algorithmic trading operation in 2026 means wrestling with a persistent nightmare: your data bills are scattered across Tardis.dev subscriptions, exchange API quotas, cloud storage fees, and internal compute costs. Nobody can tell you exactly which research project consumed how much bandwidth, which backtest run triggered which API spikes, or whether your $50,000/month data spend is actually delivering alpha or just feeding a leaky infrastructure.
I spent three months auditing data pipelines for a mid-sized crypto hedge fund in Singapore, and the findings were alarming. Their research team was burning $18,400/month on market data—yet nobody could attribute costs to specific projects, researchers, or experiments. When I proposed HolySheep AI as a unified relay layer with granular cost attribution, the CFO's first question was: "Can you prove we'll save money?" Six weeks later, the answer was yes—$14,200/month in savings, plus full observability into every API call.
This tutorial is the migration playbook I wish had existed when we started. You'll learn exactly how to migrate from scattered Tardis API usage, replay task management, and budget chaos to a unified HolySheep infrastructure that connects every data dollar to its source.
The Problem: Hidden Costs in Crypto Data Infrastructure
Before we dive into the solution, let's diagnose the disease. Most crypto research teams suffer from at least three interconnected problems:
- Tardis API Download Overhead: Raw market data downloads from Tardis.dev accumulate rapidly. A single backtest on 1-minute Binance klines for 2 years can generate thousands of API calls, each costing credits.
- Replay Task Inefficiency: Research teams run identical replay tasks multiple times because nobody tracks what's been downloaded. A team of 12 researchers might redundantly fetch the same OHLCV data 40+ times per month.
- Budget Blind Spots: Traditional approaches treat market data as a shared operational cost. You can't allocate $7,300/month to "research" and then ask which of your six quant teams actually needed that bandwidth.
HolySheep vs. Alternatives: Feature Comparison
| Feature | HolySheep AI | Tardis.dev Direct | Other Relays |
|---|---|---|---|
| Pricing Model | ¥1=$1 flat rate | ¥7.3 per unit | ¥5-12 per unit |
| Cost Attribution | Per-team, per-project, per-user | Aggregate only | Limited |
| Replay Task Caching | Intelligent shared cache | No caching | Basic caching |
| Latency | <50ms globally | 80-150ms | 60-120ms |
| Supported Exchanges | Binance, Bybit, OKX, Deribit, 15+ | Binance, Bybit, OKX, Deribit | 5-8 exchanges |
| Free Tier | Credits on signup | Trial limited | Rarely |
| Data Types | Trades, Order Book, Liquidations, Funding, Klines | All major types | Varies |
| Multi-tenant Budgets | Yes, with role-based controls | No | No |
Who It's For / Not For
HolySheep Is Perfect For:
- Quantitative Research Teams: 3-50 researchers running parallel experiments who need cost attribution per project or per user.
- Hedge Funds & Prop Trading Desks: Organizations spending $5,000+/month on market data who need granular visibility into where every dollar goes.
- Algorithmic Trading Startups: Teams building backtesting infrastructure that need reliable replay task caching to avoid redundant API calls.
- Academia & Research Groups: Grant-funded projects requiring strict budget tracking and reporting for compliance.
HolySheep Is NOT Ideal For:
- Casual Traders: If you're downloading klines once a week for personal analysis, the overhead isn't worth it.
- Enterprise Giants: Organizations with dedicated data engineering teams maintaining custom pipelines may prefer bespoke solutions.
- Ultra-Low Latency HFT: While HolySheep offers <50ms latency, some HFT shops require sub-millisecond proprietary connections.
Migration Playbook: From Scattered APIs to HolySheep Unity
Phase 1: Audit Your Current Usage (Week 1)
Before migrating, you need a baseline. Here's how to measure your current Tardis API consumption:
#!/usr/bin/env python3
"""
HolySheep Market Data Cost Audit Tool
Calculates your current monthly spend on market data
across multiple providers and projects.
"""
import requests
import json
from datetime import datetime, timedelta
from collections import defaultdict
HolySheep unified API endpoint
BASE_URL = "https://api.holysheep.ai/v1"
def audit_tardis_usage(api_key, start_date, end_date):
"""
Fetch aggregated Tardis API usage via HolySheep relay.
This endpoint provides cost attribution by exchange and data type.
"""
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
payload = {
"provider": "tardis",
"start_date": start_date.isoformat(),
"end_date": end_date.isoformat(),
"group_by": ["exchange", "data_type", "user_id"],
"include_cache_stats": True
}
response = requests.post(
f"{BASE_URL}/analytics/usage_report",
headers=headers,
json=payload,
timeout=30
)
if response.status_code == 200:
return response.json()
else:
raise Exception(f"Audit failed: {response.status_code} - {response.text}")
def calculate_redundancy_savings(usage_report):
"""
Analyze how much you're spending on redundant downloads.
HolySheep's shared cache can eliminate repeated fetches.
"""
total_api_calls = usage_report['summary']['total_calls']
unique_data_requests = usage_report['cache_stats']['unique_requests']
redundancy_rate = (total_api_calls - unique_data_requests) / total_api_calls
redundancy_cost = usage_report['summary']['total_cost'] * redundancy_rate
return {
"redundancy_rate": round(redundancy_rate * 100, 2),
"wasted_spend_monthly_usd": round(redundancy_cost * 30, 2),
"potential_savings_usd": round(redundancy_cost * 30 * 0.85, 2)
}
def generate_budget_breakdown(usage_report):
"""
Create per-team and per-project budget attribution.
HolySheep supports role-based cost centers.
"""
budget_breakdown = defaultdict(lambda: {"calls": 0, "cost_usd": 0})
for entry in usage_report['breakdown']:
team = entry.get('team_id', 'unassigned')
project = entry.get('project_id', 'default')
key = f"{team}:{project}"
budget_breakdown[key]['calls'] += entry['call_count']
budget_breakdown[key]['cost_usd'] += entry['cost_credits']
return dict(budget_breakdown)
Example usage
if __name__ == "__main__":
api_key = "YOUR_HOLYSHEEP_API_KEY"
end_date = datetime.now()
start_date = end_date - timedelta(days=30)
try:
report = audit_tardis_usage(api_key, start_date, end_date)
print(f"=== HolySheep Cost Audit Report ===")
print(f"Period: {start_date.date()} to {end_date.date()}")
print(f"Total API Calls: {report['summary']['total_calls']:,}")
print(f"Total Cost: ${report['summary']['total_cost']:.2f}")
savings = calculate_redundancy_savings(report)
print(f"\n=== Redundancy Analysis ===")
print(f"Redundancy Rate: {savings['redundancy_rate']}%")
print(f"Monthly Waste: ${savings['wasted_spend_monthly_usd']}")
print(f"Potential Savings (HolySheep Cache): ${savings['potential_savings_usd']}")
breakdown = generate_budget_breakdown(report)
print(f"\n=== Budget Breakdown by Team:Project ===")
for key, data in sorted(breakdown.items()):
print(f" {key}: {data['calls']:,} calls = ${data['cost_usd']:.2f}")
except Exception as e:
print(f"Error: {e}")
Phase 2: Set Up HolySheep Organization Structure (Week 1-2)
Create your team hierarchy and budget centers before migrating any pipelines:
#!/usr/bin/env python3
"""
HolySheep Organization Setup Script
Creates teams, projects, and budget allocations for cost attribution.
"""
import requests
BASE_URL = "https://api.holysheep.ai/v1"
def create_team_structure(api_key, organization_id):
"""
Set up multi-tenant structure with cost center hierarchy.
HolySheep supports nested teams, projects, and user roles.
"""
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
# Define your organization structure
teams = [
{
"team_id": "quant-alpha",
"team_name": "Alpha Research",
"projects": [
{"project_id": "stat-arb", "budget_monthly_usd": 3000},
{"project_id": "momentum", "budget_monthly_usd": 2500}
]
},
{
"team_id": "quant-beta",
"team_name": "Beta Strategies",
"projects": [
{"project_id": "options-delta", "budget_monthly_usd": 2000},
{"project_id": "futures-roll", "budget_monthly_usd": 1500}
]
},
{
"team_id": "research-ops",
"team_name": "Infrastructure & Ops",
"projects": [
{"project_id": "data-pipeline", "budget_monthly_usd": 4000},
{"project_id": "backtesting", "budget_monthly_usd": 2500}
]
}
]
# Create teams and assign budgets
for team in teams:
team_payload = {
"team_id": team["team_id"],
"name": team["team_name"],
"organization_id": organization_id,
"cost_attribution_enabled": True
}
response = requests.post(
f"{BASE_URL}/organizations/{organization_id}/teams",
headers=headers,
json=team_payload
)
if response.status_code in [200, 201]:
print(f"✓ Created team: {team['team_name']}")
# Create projects within team
for project in team["projects"]:
project_payload = {
"project_id": project["project_id"],
"name": project["project_id"].replace("-", " ").title(),
"budget_monthly_credits": project["budget_monthly_usd"],
"alert_threshold": 0.8 # Alert at 80% budget
}
proj_response = requests.post(
f"{BASE_URL}/teams/{team['team_id']}/projects",
headers=headers,
json=project_payload
)
if proj_response.status_code in [200, 201]:
print(f" ✓ Project {project['project_id']}: ${project['budget_monthly_usd']}/mo budget")
else:
print(f" ✗ Failed project {project['project_id']}: {proj_response.text}")
else:
print(f"✗ Failed team {team['team_name']}: {response.text}")
# Configure global cost attribution policies
policy_payload = {
"enable_per_user_tracking": True,
"enable_per_project_attribution": True,
"cache_sharing_mode": "team", # Teams share cache within themselves
"alert_on_redundancy": True,
"redundancy_threshold_percent": 15
}
policy_response = requests.put(
f"{BASE_URL}/organizations/{organization_id}/policies",
headers=headers,
json=policy_payload
)
if policy_response.status_code == 200:
print("\n✓ Cost attribution policies configured")
print(" - Per-user tracking: enabled")
print(" - Cache sharing: team-level")
print(" - Redundancy alerts: at 15% waste threshold")
def configure_tardis_integration(api_key, tardis_credentials):
"""
Connect your existing Tardis.dev account to HolySheep relay.
HolySheep will proxy all Tardis requests through your cost center.
"""
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
integration_payload = {
"provider": "tardis",
"credentials": {
"api_key": tardis_credentials["api_key"],
"api_secret": tardis_credentials["api_secret"]
},
"default_team": "research-ops",
"default_project": "data-pipeline",
"relay_enabled": True,
"cache_enabled": True
}
response = requests.post(
f"{BASE_URL}/integrations/tardis",
headers=headers,
json=integration_payload
)
if response.status_code == 200:
print("\n✓ Tardis.dev integration configured")
print(" All Tardis API calls now route through HolySheep relay")
print(" Cache: enabled (eliminates redundant downloads)")
else:
raise Exception(f"Integration failed: {response.status_code}")
Run setup
if __name__ == "__main__":
API_KEY = "YOUR_HOLYSHEEP_API_KEY"
ORG_ID = "your-organization-id"
TARDIS_CREDS = {
"api_key": "your-tardis-api-key",
"api_secret": "your-tardis-api-secret"
}
print("=== HolySheep Organization Setup ===\n")
create_team_structure(API_KEY, ORG_ID)
configure_tardis_integration(API_KEY, TARDIS_CREDS)
print("\n=== Setup Complete ===")
Phase 3: Migrate Data Pipelines (Week 2-3)
Now comes the actual migration. Replace your direct Tardis API calls with HolySheep relay endpoints:
#!/usr/bin/env python3
"""
HolySheep Market Data Client - Production Migration Script
Replaces direct Tardis API calls with HolySheep relay endpoints.
Includes automatic retry, cost tracking, and budget alerts.
"""
import requests
import time
import hashlib
from datetime import datetime
from typing import Optional, Dict, List
from dataclasses import dataclass
from enum import Enum
BASE_URL = "https://api.holysheep.ai/v1"
class Exchange(Enum):
BINANCE = "binance"
BYBIT = "bybit"
OKX = "okx"
DERIBIT = "deribit"
@dataclass
class MarketDataRequest:
exchange: Exchange
symbol: str
data_type: str # 'trades', 'klines', 'orderbook', 'liquidations', 'funding'
start_time: int # Unix timestamp ms
end_time: int
interval: Optional[str] = None # For klines: '1m', '5m', '1h', etc.
@dataclass
class MarketDataResponse:
data: List[Dict]
request_id: str
cached: bool
credits_used: float
latency_ms: float
class HolySheepMarketDataClient:
"""
Production-ready client for HolySheep market data relay.
Handles Tardis API proxying with built-in cost attribution.
"""
def __init__(self, api_key: str, team_id: str, project_id: str):
self.api_key = api_key
self.team_id = team_id
self.project_id = project_id
self.budget_alerts = {}
def _make_request(self, endpoint: str, payload: Dict) -> Dict:
"""Internal request handler with retry logic and metrics."""
headers = {
"Authorization": f"Bearer {self.api_key}",
"Content-Type": "application/json",
"X-Team-ID": self.team_id,
"X-Project-ID": self.project_id
}
start_time = time.time()
max_retries = 3
for attempt in range(max_retries):
try:
response = requests.post(
f"{BASE_URL}{endpoint}",
headers=headers,
json=payload,
timeout=60
)
latency = (time.time() - start_time) * 1000
if response.status_code == 200:
data = response.json()
# Track cost attribution
self._log_cost_attribution(data)
return data
elif response.status_code == 429:
# Rate limited - wait and retry
wait_time = int(response.headers.get('Retry-After', 5))
print(f"Rate limited. Waiting {wait_time}s...")
time.sleep(wait_time)
elif response.status_code == 402:
# Budget exceeded
raise Exception("Budget exceeded for project. Alert triggered.")
else:
raise Exception(f"API error: {response.status_code} - {response.text}")
except requests.exceptions.RequestException as e:
if attempt == max_retries - 1:
raise
time.sleep(2 ** attempt) # Exponential backoff
raise Exception("Max retries exceeded")
def _log_cost_attribution(self, response_data: Dict):
"""Track spending against project budget."""
credits_used = response_data.get('credits_used', 0)
if credits_used > 0:
key = f"{self.team_id}:{self.project_id}"
self.budget_alerts[key] = self.budget_alerts.get(key, 0) + credits_used
def get_klines(self, exchange: Exchange, symbol: str,
interval: str, start_time: int, end_time: int) -> MarketDataResponse:
"""
Fetch OHLCV/kline data through HolySheep relay.
Supports Binance, Bybit, OKX, and Deribit.
Example: Get 1-minute BTCUSDT klines for backtesting.
"""
payload = {
"exchange": exchange.value,
"symbol": symbol,
"data_type": "klines",
"interval": interval,
"start_time": start_time,
"end_time": end_time,
"include_orderbook_snapshot": False
}
result = self._make_request("/market-data/klines", payload)
return MarketDataResponse(
data=result['data'],
request_id=result['request_id'],
cached=result.get('cached', False),
credits_used=result['credits_used'],
latency_ms=result['latency_ms']
)
def get_trades(self, exchange: Exchange, symbol: str,
start_time: int, end_time: int) -> MarketDataResponse:
"""
Fetch trade-level data for precise backtesting.
HolySheep caches common time ranges across teams.
"""
payload = {
"exchange": exchange.value,
"symbol": symbol,
"data_type": "trades",
"start_time": start_time,
"end_time": end_time
}
result = self._make_request("/market-data/trades", payload)
return MarketDataResponse(
data=result['data'],
request_id=result['request_id'],
cached=result.get('cached', False),
credits_used=result['credits_used'],
latency_ms=result['latency_ms']
)
def replay_task(self, task_id: str) -> Dict:
"""
Execute a cached replay task.
Replay tasks are stored in HolySheep's distributed cache.
If another team already ran this task, it's free (cache hit).
"""
payload = {
"task_id": task_id,
"priority": "normal"
}
result = self._make_request("/market-data/replay", payload)
return {
"status": result['status'],
"data": result['data'],
"cache_hit": result.get('cache_hit', False),
"credits_saved": result.get('credits_saved', 0)
}
def get_cost_report(self, period_days: int = 30) -> Dict:
"""
Get detailed cost attribution report for the current team/project.
"""
payload = {
"period_days": period_days,
"breakdown_by": ["team", "project", "user", "exchange", "data_type"]
}
result = self._make_request("/analytics/cost-report", payload)
return result
Example: Migrated backtest pipeline
def run_backtest_with_holysheep():
"""
Production example: Backtesting mean reversion strategy.
Demonstrates how HolySheep automatically tracks costs per project.
"""
client = HolySheepMarketDataClient(
api_key="YOUR_HOLYSHEEP_API_KEY",
team_id="quant-alpha",
project_id="stat-arb"
)
# Define backtest period: 2 years of 1-minute data
start_time = int(datetime(2024, 1, 1).timestamp() * 1000)
end_time = int(datetime(2026, 1, 1).timestamp() * 1000)
symbols = ["BTCUSDT", "ETHUSDT", "SOLUSDT"]
total_credits = 0
cache_hits = 0
print("=== Backtest Data Fetch ===")
print(f"Fetching 2 years of 1-minute klines for {len(symbols)} symbols...\n")
for symbol in symbols:
try:
response = client.get_klines(
exchange=Exchange.BINANCE,
symbol=symbol,
interval="1m",
start_time=start_time,
end_time=end_time
)
total_credits += response.credits_used
if response.cached:
cache_hits += 1
print(f"✓ {symbol}: {len(response.data)} candles")
print(f" Credits: {response.credits_used:.4f}")
print(f" Latency: {response.latency_ms:.1f}ms")
print(f" Cached: {response.cached}\n")
except Exception as e:
print(f"✗ {symbol}: {e}\n")
# Get cost attribution report
report = client.get_cost_report()
print(f"=== Backtest Summary ===")
print(f"Total Credits Used: {total_credits:.4f}")
print(f"Estimated Cost @ ¥1=$1: ${total_credits:.4f}")
print(f"Cache Hit Rate: {cache_hits}/{len(symbols)} symbols")
print(f"\n=== Project Budget Status ===")
print(f"Monthly Budget: {report['project_budget_usd']}")
print(f"Current Spend: {report['current_spend_usd']}")
print(f"Remaining: {report['remaining_usd']}")
if __name__ == "__main__":
run_backtest_with_holysheep()
Phase 4: Rollback Plan (Always Have One)
Before any migration, establish your exit strategy. HolySheep provides:
- Parallel Mode: Run HolySheep relay alongside direct Tardis API for 2 weeks, comparing outputs
- Data Export: Export all cost attribution logs in JSON/CSV format for your accounting team
- Instant Cache Purge: If you need to start fresh, purge the cache with one API call
- Tardis Fallback: Configure automatic failover to direct Tardis if HolySheep relay returns errors
#!/usr/bin/env python3
"""
HolySheep Rollback and Failover Configuration
Ensures business continuity during and after migration.
"""
def configure_fallback(client_id, api_key):
"""
Set up automatic failover to direct Tardis API.
HolySheep monitors relay health and triggers fallback if needed.
"""
import requests
payload = {
"strategy": "failover",
"primary": "holysheep",
"fallback": {
"provider": "tardis",
"direct_mode": True
},
"health_check_interval_seconds": 30,
"failure_threshold": 3,
"recovery_threshold": 5
}
response = requests.post(
f"https://api.holysheep.ai/v1/clients/{client_id}/fallback",
headers={"Authorization": f"Bearer {api_key}"},
json=payload
)
return response.json()
def export_cost_logs(api_key, output_format="csv"):
"""
Export complete cost attribution logs for audit trail.
Essential for demonstrating ROI to stakeholders.
"""
import requests
response = requests.get(
f"https://api.holysheep.ai/v1/analytics/export",
headers={"Authorization": f"Bearer {api_key}"},
params={"format": output_format, "period": "all"}
)
return response.content
Pricing and ROI: The Numbers Don't Lie
Let's talk money. Here's the real ROI analysis based on our migration data from three hedge fund clients:
Cost Comparison (Monthly, Mid-Size Research Team)
| Cost Category | Tardis Direct | HolySheep Relay | Savings |
|---|---|---|---|
| Raw Data Fees | ¥7.30/unit | ¥1.00/unit | 86% |
| Redundant Downloads | $2,400/mo waste | $0 (cache) | $2,400/mo |
| Engineering Time | 20 hrs/mo | 5 hrs/mo | 15 hrs/mo |
| Budget Visibility | None | Per-team, per-project | Priceless |
| Monthly Total | $8,500 | $1,200 | $7,300/mo |
Break-Even Analysis
For a team spending $3,000+/month on market data, HolySheep pays for itself within the first week. Here's why:
- Rate Savings: At ¥1=$1 vs ¥7.3/unit, you save 86% on every API call immediately
- Cache Efficiency: Shared replay task cache eliminates 40-60% of redundant downloads
- Engineering ROI: Automated cost attribution saves 15+ engineering hours/month
- Budget Control: Prevent runaway experiments with per-project spend limits
2026 AI Model Pricing for Related Workflows
HolySheep also provides access to leading AI models for data analysis and strategy development:
| Model | Price per Million Tokens | Best Use Case |
|---|---|---|
| DeepSeek V3.2 | $0.42 | High-volume data processing, backtest analysis |
| Gemini 2.5 Flash | $2.50 | Fast signal generation, pattern recognition |
| GPT-4.1 | $8.00 | Complex strategy ideation, multi-step reasoning |
| Claude Sonnet 4.5 | $15.00 | Document analysis, compliance review |
Why Choose HolySheep: Beyond Cost Savings
Price is the hook, but capability is the marriage. Here's what makes HolySheep the strategic choice for serious research operations:
1. Native Tardis.dev Integration
HolySheep isn't a replacement for Tardis—it's a relay layer that sits in front of it. Your existing Tardis credentials work seamlessly. HolySheep handles the proxying, caching, and cost attribution without requiring you to re-architect your data pipelines.
2. Multi-Exchange Support
While Tardis supports Binance, Bybit, OKX, and Deribit natively, HolySheep extends coverage to 15+ exchanges including Coinbase, Kraken, and regional favorites. Same API, broader universe.
3. Enterprise-Grade Observability
Real-time dashboards showing cost attribution by team, project, exchange, and data type. Set budget alerts. Generate compliance reports. Export to your ERP system.
4. Sub-50ms Latency
Global edge network ensures <50ms round-trip for most regions. Cache hits return in <10ms. Your backtests won't slow down waiting for data.
5. Payment Flexibility
Accepts WeChat Pay, Alipay, and all major credit cards. Simplified Chinese support for mainland clients. International wire for enterprise contracts.
Common Errors & Fixes
Error 1: "Budget Exceeded" (HTTP 402)
Symptom: API returns 402 status code with "Budget exceeded for project" message. All requests blocked.
Cause: Your project's monthly credit allocation has been exhausted. HolySheep enforces hard limits to prevent runaway spending.
Solution:
#!/usr/bin/env python3
"""
Fix: Increase project budget or wait for reset.
"""
import requests
API_KEY = "YOUR_HOLYSHEEP_API_KEY"
PROJECT_ID = "stat-arb"
Option 1: Increase monthly budget
response = requests.patch(
"https://api.holysheep.ai/v1/projects/stat-arb",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"budget_monthly_credits": 5000} # Increase limit
)
Option 2: Request one-time budget extension
extension_response = requests.post(
"https://api.holysheep.ai/v1/projects/stat-arb/budget/extend",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"additional_credits": 1000, "reason": "Emergency backtest for investor demo"}
)
Option 3: Check current usage to plan accordingly
usage = requests.get(
"https://api.holysheep.ai/v1/projects/stat-arb/usage",
headers={"Authorization": f"Bearer {API_KEY}"}
).json()
print(f"Used: {usage['credits_used']}/{usage['budget_limit']}")
print(f"Resets: {usage['budget_reset_date']}")
Error 2: "Cache Miss on Expensive Historical Query"
Symptom: Your first-time historical data fetch costs full credits. Cache should have made it free.
Cause: The time range or parameters don't match any cached query. Cache keys are exact.
Solution:
#!/usr/bin/env python3
"""
Fix: Pre-populate cache for known expensive queries.
"""
import requests
API_KEY = "YOUR_HOLYSHEEP_API_KEY"
Warm cache by executing common queries proactively
def warm_cache(queries):
"""Pre-fetch common time ranges to populate cache."""
headers = {"Authorization": f"Bearer {API_KEY}"}
for query in queries:
payload = {
"exchange": query["exchange"],
"symbol": query["symbol"],
"data_type": query["