For the complete documentation index, see llms.txt. This page is also available as Markdown.

Using Madjik API for ML

Build and train machine learning models using Madjik's comprehensive crypto market data.

Overview

Madjik API provides ML-ready data:

  • Historical time series for model training

  • Normalized features (0-100 scales) requiring minimal preprocessing

  • Multiple timeframes (1min, 5min, 1hr, 1day)

  • Rich feature set across 44 metrics

ML Use Cases

1. Price Prediction Models

import pandas as pd
from sklearn.ensemble import RandomForestRegressor

# Fetch historical features
def get_training_data(days=90):
    features = ["ME10014", "ME10015", "ME10016", "ME10030"]
    data = []
    
    for metric in features:
        resp = requests.get(
            f"https://api.madjik.io/v1/metrics/{metric.lower()}/history",
            params={"days": days},
            headers={"Authorization": "Bearer YOUR_API_KEY"}
        )
        data.append(pd.DataFrame(resp.json()['data']))
    
    return pd.concat(data, axis=1)

# Train model
X = get_training_data()
y = get_price_returns()  # Your price data
model = RandomForestRegressor()
model.fit(X, y)

2. Regime Classification

3. Anomaly Detection

Feature Engineering Tips

Madjik Metric
ML Feature Ideas

ME10014 (Funding)

Rolling mean, z-score, regime changes

ME10016 (Liquidation)

Threshold crossings, acceleration

ME10030 (Sentiment)

Delta, momentum, divergence from price

ME10010 (Whale)

Flow direction, accumulation streaks

Best Practices

  1. Normalize consistently - Madjik metrics are 0-100, but double-check

  2. Handle missing data - Use forward-fill or interpolation

  3. Feature selection - Start with correlated metrics, prune redundant

  4. Cross-validation - Crypto regimes shift; use time-series CV

  5. Retrain regularly - Market structure changes

See Also

Last updated