Yesterday, BingX announced the full integration of its TradFi products into the broader BingX ecosystem. Perpetual futures on commodities, forex, stocks, and indices — all running on crypto-native rails, all accessible via the same API that handles their spot and derivatives trading.

If you’re a prediction market builder, this matters more than you’d think at first glance.

BingX isn’t a prediction market. It’s a crypto exchange. But the announcement creates something that didn’t cleanly exist before: a single API-accessible execution layer where an agent can go long gold, short the euro, or take a position on the S&P 500 — all triggered by signals from prediction markets like Kalshi and Polymarket.

This post covers what BingX actually launched, why it opens a new design pattern for prediction market agents, and how to wire the pieces together.


What BingX TradFi Actually Is

BingX TradFi offers perpetual futures contracts on traditional financial instruments. Not tokenized stocks. Not synthetic assets that settle to an oracle. Perpetual futures — the same instrument crypto traders already understand — but referencing commodities (gold, oil), forex pairs (EUR/USD, GBP/USD), equity indices (S&P 500, Nasdaq), and individual stocks.

The key details for builders:

API access. BingX’s entire TradFi product is accessible through the same REST and WebSocket API as their crypto products. Base URL: https://open-api.bingx.com. If you can place a BTC-USDT perp trade via the API, you can place a gold perp trade with the same code — just change the symbol.

Leverage. Up to 500x on some instruments. This is relevant for agents that need capital efficiency — a small prediction market signal can translate into meaningful TradFi exposure without large capital commitment.

HMAC-SHA256 authentication. Standard API key + secret signing. Every request needs a timestamp and signature. The same pattern as most CEX APIs, and well-supported by existing libraries.

Copy trading integration. BingX’s copy trading now extends to TradFi markets, which means an agent’s TradFi trades can be automatically replicated by followers — a potential distribution mechanism for agent-driven strategies.

Demo environment. BingX offers VST (Virtual Standard Token) demo accounts with fake money. You can test your entire pipeline — prediction market signal → TradFi execution — without risking capital.


Why This Matters for Prediction Market Agents

Up until now, the agent betting stack has been mostly self-contained. Your agent watches Polymarket or Kalshi, identifies mispriced markets, and trades within the prediction market itself. The signal and the execution happen on the same platform.

That’s leaving money on the table.

Prediction markets are the best real-time probability-pricing mechanism that exists. When Kalshi’s Fed rate market shifts from 40% to 70% probability of a cut, that’s not just a prediction market trade — it’s a forex signal, a bond signal, a gold signal. When Polymarket’s “Will the EU impose tariffs on X” market spikes, that’s a EUR/USD signal.

The problem has always been execution. Where does an agent act on a prediction market signal outside of the prediction market itself? Traditional brokerages have clunky APIs, slow onboarding, and no crypto-native infrastructure. DeFi perps (dYdX, GMX) have the crypto rails but limited TradFi exposure.

BingX TradFi closes that gap. One API, one account, one authentication flow — and your agent can go from reading a Kalshi WebSocket event to placing a gold futures trade in milliseconds.

Where This Fits in the Agent Betting Stack

If you’ve read our Agent Betting Stack guide, BingX TradFi slots in as a Layer 3 (Execution) addition:

LayerComponentRole
Layer 1Wallets, keys, fundingInfrastructure
Layer 2Market data, signalsIntelligence
Layer 3Polymarket, Kalshi, BingX TradFiExecution
Layer 4Monitoring, risk, loggingOperations

Previously, Layer 3 was limited to prediction market platforms. BingX TradFi extends it to traditional financial instruments — same automation patterns, same agent architecture, new asset classes.


The Architecture: Prediction Market Signal → TradFi Execution

Here’s the concrete design pattern. An agent monitors prediction market feeds for probability shifts, then executes corresponding TradFi trades on BingX.

┌──────────────────────────────────┐
│  SIGNAL LAYER (Layer 2)          │
│                                  │
│  Kalshi WebSocket ───────┐       │
│  (Fed rate, CPI, GDP,    │       │
│   tariff markets)        ├──→ Agent Core
│                          │    (signal processing,
│  Polymarket WebSocket ───┘     threshold logic,
│  (geopolitical events,         position sizing)
│   crypto regulatory)           │
└──────────────────────────────────┘
                                   │
                                   ▼
┌──────────────────────────────────┐
│  EXECUTION LAYER (Layer 3)       │
│                                  │
│  ┌─────────────┐ ┌────────────┐  │
│  │ Prediction  │ │ BingX      │  │
│  │ Markets     │ │ TradFi     │  │
│  │             │ │            │  │
│  │ Kalshi API  │ │ Gold perps │  │
│  │ Polymarket  │ │ Forex      │  │
│  │ CLOB        │ │ Indices    │  │
│  │             │ │ Stocks     │  │
│  └─────────────┘ └────────────┘  │
└──────────────────────────────────┘

Example: Fed Rate Signal → Forex Execution

The clearest use case. Kalshi has the most liquid Fed rate prediction markets. When the probability of a rate cut shifts, it directly impacts forex and precious metals.

import hmac
import hashlib
import time
import requests

# ─── CONFIG ────────────────────────────────────────────
KALSHI_WS = "wss://trading-api.kalshi.com/trade-api/ws/v2"
BINGX_BASE = "https://open-api.bingx.com"
BINGX_API_KEY = "your_api_key"
BINGX_SECRET = "your_secret_key"

# Thresholds — tune these to your strategy
RATE_CUT_THRESHOLD = 0.65  # trigger when probability exceeds 65%
POSITION_SIZE_USDT = 500   # per-trade allocation

# ─── BINGX SIGNATURE ──────────────────────────────────
def sign_bingx(params: dict, secret: str) -> str:
    """HMAC-SHA256 signature for BingX API requests."""
    query = "&".join(f"{k}={v}" for k, v in sorted(params.items()))
    signature = hmac.new(
        secret.encode(), query.encode(), hashlib.sha256
    ).hexdigest()
    return signature

# ─── PLACE BINGX TRADFI ORDER ─────────────────────────
def place_bingx_order(symbol: str, side: str, quantity: float):
    """Place a perpetual futures order on BingX TradFi."""
    timestamp = int(time.time() * 1000)
    params = {
        "symbol": symbol,       # e.g., "GOLD-USDT" or "EUR-USD"
        "side": side,           # "BUY" or "SELL"
        "type": "MARKET",
        "quantity": quantity,
        "timestamp": timestamp,
    }
    params["signature"] = sign_bingx(params, BINGX_SECRET)

    response = requests.post(
        f"{BINGX_BASE}/openApi/swap/v2/trade/order",
        headers={"X-BX-APIKEY": BINGX_API_KEY},
        params=params,
    )
    return response.json()

# ─── SIGNAL PROCESSING ────────────────────────────────
def on_kalshi_price_update(market_ticker: str, yes_price: float):
    """
    Called when a Kalshi market price updates.
    If the Fed rate cut probability crosses our threshold,
    execute a corresponding TradFi trade on BingX.
    """
    if "FED" not in market_ticker:
        return

    probability = yes_price / 100  # Kalshi prices are in cents

    if probability > RATE_CUT_THRESHOLD:
        # Rate cut likely → dollar weakens → go long gold
        result = place_bingx_order(
            symbol="GOLD-USDT",
            side="BUY",
            quantity=POSITION_SIZE_USDT,
        )
        print(f"Fed cut probability {probability:.0%} → Long gold: {result}")

    elif probability < (1 - RATE_CUT_THRESHOLD):
        # Rate cut unlikely → dollar strengthens → short gold
        result = place_bingx_order(
            symbol="GOLD-USDT",
            side="SELL",
            quantity=POSITION_SIZE_USDT,
        )
        print(f"Fed cut probability {probability:.0%} → Short gold: {result}")

This is a simplified example. A production agent would add position tracking, risk limits, slippage protection, and the actual Kalshi WebSocket connection. But the core pattern is clear: read a probability from a prediction market, execute a directional trade on a correlated traditional asset.

Other Signal → Execution Pairs

The Fed rate example is the most obvious. But prediction markets generate signals for dozens of TradFi-relevant events:

Prediction Market SignalBingX TradFi TradeCorrelation
Fed rate cut probability ↑Long gold, short USDStrong — direct macro link
EU tariff probability ↑Short EUR/USDModerate — trade-weighted
US recession probability ↑Short S&P 500 indexStrong — equity risk-off
Oil supply disruption ↑Long crude oilStrong — supply shock
Crypto regulatory crackdown ↑Short BTC (via perps)Strong — direct impact
CPI above X% ↑Short bonds, long goldStrong — inflation hedge

The agent doesn’t need to be right about the event. It needs to be faster than the traditional market at pricing in the probability shift. Prediction markets update in seconds. Traditional instruments take minutes to hours to fully reprice. That’s the edge.


BingX API: Quick Reference for Builders

If you’re coming from the Polymarket or Kalshi APIs, here’s how BingX maps to what you already know.

API Structure

BingX APIEndpoint BaseWhat It Does
Swap (Perpetual Futures)/openApi/swap/v2/The main one. Trade perps on crypto and TradFi
Spot/openApi/spot/v1/Buy/sell crypto spot
Standard Contract/openApi/cfd/v1/CFD-style contracts
Account/Wallet/openApi/api/v3/Balances, transfers, deposits
WebSocketwss://open-api-ws.bingx.com/swapReal-time market data and order updates

Authentication

BingX uses HMAC-SHA256 signing — similar to Binance’s pattern. Every request requires three headers:

X-BX-APIKEY: your_api_key

And two query parameters:

timestamp: current unix time in milliseconds
signature: HMAC-SHA256(query_string, secret_key)

If you’ve used the Polymarket CLOB API (which uses EIP-712 signatures) or the Kalshi API (RSA-PSS signing), BingX’s auth is significantly simpler. No wallet management, no on-chain transactions, no private key custody concerns.

Key Differences from Prediction Market APIs

AspectPolymarket / KalshiBingX TradFi
SettlementBinary outcomes (YES/NO)Continuous price movement
Position typeEvent contractsPerpetual futures
Price formatProbability (0-100)USD price of underlying
Leverage1x (no leverage)Up to 500x
Auth methodEIP-712 / RSA-PSSHMAC-SHA256
Account fundingUSDC on Polygon / USD bankCrypto deposit
Demo environmentKalshi onlyFull VST demo

Python SDK Options

No official Python SDK from BingX, but several community options:

pip install py-bingx    # Unofficial wrapper for Perpetual Swap API
pip install bingx-api   # Alternative community package
pip install ccxt         # Universal exchange library (includes BingX)

For agents already using ccxt (which supports 100+ exchanges), adding BingX is a one-line config change:

import ccxt

bingx = ccxt.bingx({
    "apiKey": "your_key",
    "secret": "your_secret",
    "options": {"defaultType": "swap"},  # perpetual futures
})

# Fetch gold price
ticker = bingx.fetch_ticker("GOLD/USDT:USDT")
print(f"Gold: ${ticker['last']}")

# Place a market order
order = bingx.create_market_order("GOLD/USDT:USDT", "buy", 100)

The Broker Program: Monetize Your Agent’s Volume

This part is important for anyone building a publicly available agent or tool.

BingX operates a Broker Program where you receive a sourceKey that gets attached to every API request your application makes. Every trade executed through your sourceKey earns you a percentage of the trading fees.

The integration is a single HTTP header:

X-SOURCE-KEY: your_broker_key

That’s it. Add one header to your requests, and every trade your agent places generates commission for you. If you’re building an open-source prediction market agent that others deploy, or a hosted agent service, this is a direct revenue stream tied to trading volume rather than subscriptions.

Apply at [email protected]. The Broker Program is separate from the standard affiliate program (which is referral-link-based and better suited for content, not programmatic integration).

This is analogous to Polymarket’s Builder Program, where trades placed through your builder application earn you ongoing volume-based rewards. If you’re already in the Polymarket Builder Program, the BingX Broker Program is the same concept applied to TradFi execution.


Building This Today: A Practical Checklist

If you want to wire prediction market signals into BingX TradFi execution this week, here’s the sequence:

1. Set up BingX demo account. Create a BingX account and activate the VST demo environment. This gives you fake money to test with — crucial for validating your signal → execution pipeline before going live.

2. Generate API keys. Go to API Management in your BingX account settings. Create a key pair with trading permissions. Whitelist your server’s IP address. Never enable withdrawal permissions on an API key used for trading.

3. Connect to Kalshi or Polymarket data feeds. If you’ve followed our Polymarket API guide or Kalshi API guide, you already have this. If not, start there — the WebSocket connections for real-time price data are the signal layer your agent needs.

4. Define your signal → trade mapping. Which prediction market probability shifts correspond to which TradFi positions? Start with one pair (Fed rate → gold is the cleanest) and validate the correlation before adding more.

5. Implement position sizing and risk limits. This is where agents blow up if you skip it. Set maximum position sizes, maximum drawdown thresholds, and kill switches. BingX supports up to 500x leverage — your agent should never use anything close to that without extreme guardrails.

6. Test on demo. Run the full pipeline against the BingX demo environment. Verify that signals fire correctly, orders execute, positions track, and risk limits hold. Log everything.

7. Go live small. Start with minimal capital. Monitor manually for the first week. Increase size only after you’ve confirmed the pipeline is stable.


What’s Next

We’re working on a full BingX API developer guide — the same depth as our Polymarket and Kalshi guides, covering every endpoint, authentication patterns, WebSocket integration, and production-ready code examples. If you want to know when it drops, check back on the guides page or follow us on Twitter.

We’re also adding BingX TradFi endpoints to the API Playground so you can test market data queries directly from your browser.

The prediction market → TradFi pipeline is a new design pattern. It’s not yet crowded. The builders who wire it up first — while everyone else is still treating prediction markets and traditional finance as separate worlds — will have a meaningful edge.

Build accordingly.


Not financial advice. BingX TradFi perpetual futures carry significant risk, especially with leverage. Prediction market signals are probabilistic, not certain. Built for builders who understand these risks.