Sovereign Bridge SDK for Triple-Lock AI validation
Project description
🌍 DeepAlgo Sovereign SDK (Manifold Edition) The DeepAlgo SDK provides programmatic access to the Sovereign Triple-Lock Engine. This hybrid library allows local scanners to offload heavy AI consensus (HMM, Neural Proxy, and Transformer DNA) to the DeepAlgo high-compute cluster.
🚀 Quick Start The SDK is data-agnostic. While it includes built-in support for OANDA auditing, the core engine can process market data from any source (Binance, MetaTrader, Interactive Brokers, or custom CSV feeds).
Installation Bash
pip install deepalgo-sovereign Basic Usage Python
from deepalgo_sovereign import DeepAlgoClient
Initialize the Sovereign Bridge
client = DeepAlgoClient(api_key="your_sovereign_key")
Pass data from ANY market feed (Forex, Indices, Bonds, Commodites)
market_data = { "symbol": "AUD_USD", "timeframe": "M5", "data": [...] # Your price action data }
Get Triple-Lock Consensus
validation = client.validate_trade(market_data) print(f"Sovereign Decision: {validation['decision']}")
🛠️ System Architecture
The Sovereign SDK is designed as a low-latency gateway between local execution environments and the DeepAlgo High-Compute Cluster.
deepalgo_sovereign/: Core package directory containing the encrypted API handshake logic.DeepAlgoClient: The primary Python interface for regime validation and Triple-Lock consensus.MQL5 Signal Bridge: Native MetaTrader 5 integration components for pre-trade authorization.Forensic Audit Layer: Built-in methods for parsing VPIN toxicity and mark-out statistics.
🚀 Key Features
- Universal Triple-Lock Validation The SDK validates trades through three distinct AI layers before execution, regardless of the data source:
Lock 1 (HMM): Mathematical regime alignment and volatility filtering.
Lock 2 (Neural Proxy): Deep learning consensus on price action.
Lock 3 (Transformer DNA): Temporal sequence validation.
The system includes an Automated Audit Engine accessible via the DeepAlgoClient that: Parses real-time logs for throughput and AI veto statistics."
⚙️ Configuration The SDK supports standard Environment Variable management for secure API Key handling. We recommend using a .env file for local development.
Ini, TOML
DeepAlgo API
DEEPALGO_API_URL=https://api.deepalgo.co.uk DEEPALGO_API_KEY=your_sovereign_key
Broker Integration (Optional - for P/L Auditing)
USE_DEMO=True OANDA_DEMO_TOKEN=your_demo_token OANDA_DEMO_ACCOUNTID=your_demo_id
🛡️ Institutional Signal Bridge (MT5 Integration) The Sovereign Bridge acts as a pre-trade validator. Before your MT5 Expert Advisor (EA) sends an order to the broker, it pings the Bridge to verify market "DNA" against the Triple-Lock consensus.
Step 1: MT5 Terminal Setup Open MetaTrader 5 and go to Tools > Options.
Navigate to the Expert Advisors tab.
Check "Allow WebRequest for listed URL".
Add your API URL: http://your-server-ip:8000
Step 2: The Sovereign Guard (MQL5 Snippet) Include this function in your MQL5 project. Call it before OrderSend() to ensure the trade is authorized by the AI ensemble.
C++
//+------------------------------------------------------------------+ //| DEEPALGO SOVEREIGN BRIDGE - PRE-TRADE AUTHORIZATION | //+------------------------------------------------------------------+ bool IsSovereignAuthorized(string symbol) { string url = "http://your-server-ip:8000/v1/bridge/check-lock"; string apiKey = "your_bletchley_key_here";
char post[], result[];
string result_headers;
// Prepare JSON & Headers
string json = "{\"instrument\":\"" + symbol + "\"}";
StringToCharArray(json, post, 0, StringLen(json));
string headers = "X-DeepAlgo-Key: " + apiKey + "\r\nContent-Type: application/json\r\n";
ResetLastError();
int res = WebRequest("POST", url, headers, 500, post, result, result_headers);
if(res == 200)
{
string response = CharArrayToString(result);
if(StringFind(response, "\"authorized\":true") >= 0) return true;
}
Print(">>> [SOVEREIGN VETO] Trade Blocked: Market DNA mismatch.");
return false;
} 💎 Multi-Asset Intelligence The SDK v4.1 (Gold Edition) features Dynamic Pip Scaling. It automatically detects the asset class and applies the correct institutional pip-multiplier:
Asset Type Identification Multiplier Meaning Gold XAU or Price > 1000 10.0 0.10 price move = 1 Pip JPY Pairs "JPY" in Symbol 100.0 0.01 price move = 1 Pip Forex Standard Pairs 10000.0 0.0001 price move = 1 Pip
Export to Sheets
📊 Core Features
- Triple-Lock Validation Every request is passed through three AI layers:
Lock 1 (HMM): Filters for regime alignment and volatility spikes.
Lock 2 (Neural Proxy): Deep-learning consensus on current price-action fragments.
Lock 3 (Transformer DNA): Validates temporal sequences and institutional flow.
-
VPIN Toxicity Filtering The bridge returns a vpin_toxicity score. High toxicity indicates predatory flow or extreme slippage conditions, triggering an automatic Veto.
-
Mark-out Auditing The SDK tracks "Pips Saved"—the cumulative distance the market moved against trades that were successfully blocked by the Sovereign Shield.
📜 Support & Disclaimer For technical support or API key issues, contact the Divergence Capital infrastructure team.
Disclaimer: Trading involves risk. The Sovereign SDK is a probabilistic filtering tool and does not guarantee results. Always test in a demo environment first.
Key Improvements for your Clients:
- Direct Instructions: It tells them exactly what to do in MT5 (the
Ctrl+Osteps). - Asset Table: The "Multi-Asset Intelligence" table makes them feel like they are using a high-end, sophisticated tool that understands different market structures (Gold vs. JPY).
- Clean Code: The MQL5 snippet is "plug-and-play."
- Value Proposition: It emphasizes "Pips Saved" and "VPIN Toxicity," which are strong selling points for an institutional SDK.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deepalgo_sovereign-0.1.2.tar.gz.
File metadata
- Download URL: deepalgo_sovereign-0.1.2.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cefa16b6431b1ea9c34d32a4b31335c053465f4d455c0551b9c89b270d6363f
|
|
| MD5 |
1cdac30d8005884d7fb2247f6e2ec3c1
|
|
| BLAKE2b-256 |
8ed2021ff7dfb4d0bd3adc5dbcd21bdb727d11c05055ddc0f27c6d5c13cd537d
|
File details
Details for the file deepalgo_sovereign-0.1.2-py3-none-any.whl.
File metadata
- Download URL: deepalgo_sovereign-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cd6097ff8ed62dc1b42610f8d809d240d3a3a4773e77d4726155ed8ed478994
|
|
| MD5 |
22c8bfeeb0ca4e4d894ab5acd460ffd6
|
|
| BLAKE2b-256 |
42b4343e1fe49498e4e483f61263cb62a0518aebb2b337aaaab0a8bee046ccfd
|