An API for trading bots and MCP for AI
A bot written for Binance USD-M Futures runs on a BuyCrypt demo account without rewriting: only the API address changes. And Claude, ChatGPT and Cursor see tournaments, trader ratings and your demo account through the BuyCrypt MCP server.
{ "symbol": "BTCUSDT", "price": "…" }
The bot trades. The assistant answers questions.
API for trading bots
Request, signature and response formats are the same as Binance USD-M Futures. The bot places orders on your BuyCrypt demo account: market prices, demo money.
- The same libraries: binance-futures-connector, your own code on requests
- REST, a private WebSocket via listenKey, candles and mark price in the stream
- The key is created in the app and works with one demo account only
MCP for AI assistants
One address in the Claude, ChatGPT or Cursor settings, and the assistant pulls BuyCrypt data by itself when you ask about it.
- Tournaments, prizes, the participant table, leaders by coin
- Trader passport: rating out of 1000, level, trading style
- Your demo account: balance, positions, orders (with a read-only key)
MCP: connect BuyCrypt to Claude, ChatGPT and Cursor
MCP is an open standard through which AI assistants connect to external data and tools. The BuyCrypt server gives the assistant live platform data. No sign-up or key needed; you need a key only for your demo account.
https://buycrypt.com/mcp
- Open claude.ai or the Claude Desktop app → Customize → Connectors.
- Click + Add → Add custom connector.
- Name — BuyCrypt, URL — https://buycrypt.com/mcp, then Continue.
- Under Authentication choose No sign in and click Add.
Custom connectors are available on all Claude plans; the free plan allows one. In Team and Enterprise, the organization owner adds the connector in Organization settings → Connectors. For your own demo account, add the key in the Request headers block of the same window — how to do it.
- Run one command in the terminal:
claude mcp add --transport http buycrypt https://buycrypt.com/mcp
Check: claude mcp list — buycrypt will appear in the list. Add --scope user to make the server available in all projects.
- Open chatgpt.com/plugins in your browser.
- Click + → Add custom MCP server.
- Name — BuyCrypt; under Connection choose a public URL and enter https://buycrypt.com/mcp.
- Authentication — No authentication. Confirm the I understand and want to continue warning and click Create.
Custom MCP servers in ChatGPT can be added only in the web version and aren't available on all plans. If the option is missing, your plan or the workspace admin has disabled it. You can't connect your demo account in ChatGPT: it doesn't pass keys to the server. Claude, Claude Code and Cursor work for that.
The button opens Cursor with the setup ready. Or manually: add to ~/.cursor/mcp.json (for all projects) or .cursor/mcp.json in the project root:
{
"mcpServers": {
"buycrypt": {
"url": "https://buycrypt.com/mcp"
}
}
}Any client that supports Streamable HTTP will do: enter the URL https://buycrypt.com/mcp, no authorization needed. If the client can only run local servers (stdio), connect through the mcp-remote bridge; Node.js is required:
{
"mcpServers": {
"buycrypt": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://buycrypt.com/mcp"]
}
}
}Check the server without an assistant: npx @modelcontextprotocol/inspector --cli https://buycrypt.com/mcp --transport http --method tools/list
What the server can do
platform_overviewWhich tournaments are running now, which starts next, how many traders are in tournaments, the latest prizes.
no keylist_tournamentsRunning, upcoming and finished tournaments: coin, scoring method, prize pool, entry, participants.
no keyget_tournamentA single tournament: prizes by place and the participant table with results.
no keyleaderboardLeaders by coin over 7, 30 or 90 days — as on the Top Traders page.
no keytrader_profileTrader passport by nickname: rating out of 1000, level, the five parts of the score, style. Public profiles only.
no keymarket_tickerPrice and 24-hour change for a perpetual contract, for example BTCUSDT.
no keydemo_accountBalance, margin and open positions of your demo account.
your keydemo_open_ordersOpen orders of your demo account.
your keydemo_recent_resultsLatest demo account results: profit and loss of closed trades, fees.
your keyNo tool places orders, joins tournaments or moves money — the server only reads.
What to ask the assistant
Click a question to copy it.
How the assistant sees BuyCrypt
Below is the real response of the https://buycrypt.com/mcp server right now. The assistant gets the same data and retells it in its own words.
Your demo account in the assistant
The demo_account, demo_open_orders and demo_recent_results tools read your demo account. For them, the client sends your API key to the server in two headers: X-BuyCrypt-Api-Key and X-BuyCrypt-Api-Secret. Create a read-only key for the assistant: it sees the balance, positions and orders, but BuyCrypt will not place an order, cancel one or change leverage with it (response 403). How to get one.
claude mcp add --transport http buycrypt https://buycrypt.com/mcp \ --header "X-BuyCrypt-Api-Key: YOUR_API_KEY" \ --header "X-BuyCrypt-Api-Secret: YOUR_API_SECRET"
{
"mcpServers": {
"buycrypt": {
"url": "https://buycrypt.com/mcp",
"headers": {
"X-BuyCrypt-Api-Key": "YOUR_API_KEY",
"X-BuyCrypt-Api-Secret": "YOUR_API_SECRET"
}
}
}
}- When adding the connector (Customize → Connectors → Add custom connector), choose No sign in after the URL.
- In the Request headers block add two headers: X-BuyCrypt-Api-Key and X-BuyCrypt-Api-Secret with your values.
- Click Add. If the connector was already added without a key, remove it and add it again with the headers.
Read-only
The MCP server does not place or cancel orders. It needs the key to read the balance, positions and orders. A read-only key can't be used to trade, even if it ends up in the wrong hands.
One demo account
A BuyCrypt key works only with the demo account it was created for. It gives no access to real exchange accounts.
A separate key
Create a separate read-only key for the assistant. The key is sent only to buycrypt.com; the server does not store it or write it to logs. You can revoke it in the same place where you created it.
An API compatible with Binance USD-M Futures
Paths, HMAC-SHA256 signature, parameters and response format are the same as Binance USD-M Futures. There is one difference: orders are executed on your BuyCrypt demo account at market prices and never go to a real exchange. That way you can test a strategy on the market without risking money.
How to start
- Account. Sign in to the web terminal or the BuyCrypt app with Google or Apple. The demo account appears at once.
- Key. In the web terminal or the app: Profile → API keys → your demo account → the Bot API keys block → Generate API key. Copy the apiKey and apiSecret: the secret is shown only once. For an AI assistant or monitoring, the web terminal has a Generate read-only key (for MCP) button.
- Address. In your library set https://api.buycrypt.com instead of https://fapi.binance.com. The /fapi/v1/… paths stay the same.
- Check. Request the balance — GET /fapi/v2/balance: the response will show the USDT of your demo account.
What to know
- USDT contracts and one-way position mode only; hedge mode isn't supported.
- The ticker price is /fapi/v1/ticker/price. The /fapi/v2/ticker/price path that newer library versions call isn't supported yet.
- The public stream delivers @kline_1m candles (every 5 s) and @markPrice (every second).
- recvWindow is 5,000 ms by default, up to 60,000 ms. Sync your clock via /fapi/v1/time.
- An account with a trading API key gets a 🤖 badge in the app's rating, so everyone can see that a program is trading.
- Key permissions: a regular key (READ_TRADE) reads and trades; a read-only key (READ) allows only GET requests and listenKey. An order, cancellation, leverage or margin request with it returns HTTP 403 and code -2015.
import os from binance.um_futures import UMFutures client = UMFutures( key=os.environ["BUYCRYPT_API_KEY"], # key from the BuyCrypt app secret=os.environ["BUYCRYPT_API_SECRET"], base_url="https://api.buycrypt.com", # the only line that changes ) print(client.balance()) # demo account USDT client.change_leverage(symbol="BTCUSDT", leverage=5) order = client.new_order(symbol="BTCUSDT", side="BUY", type="MARKET", quantity=0.002) print(order["orderId"], order["status"]) print(client.get_position_risk(symbol="BTCUSDT"))
import hashlib, hmac, os, time, urllib.parse, requests API = "https://api.buycrypt.com" KEY = os.environ["BUYCRYPT_API_KEY"] SECRET = os.environ["BUYCRYPT_API_SECRET"] def signed(method, path, **params): params["timestamp"] = int(time.time() * 1000) query = urllib.parse.urlencode(params) sig = hmac.new(SECRET.encode(), query.encode(), hashlib.sha256).hexdigest() r = requests.request(method, f"{API}{path}?{query}&signature={sig}", headers={"X-MBX-APIKEY": KEY}, timeout=10) r.raise_for_status() return r.json() print(signed("GET", "/fapi/v2/balance")) print(signed("POST", "/fapi/v1/order", symbol="BTCUSDT", side="BUY", type="LIMIT", timeInForce="GTC", quantity=0.002, price=60000))
# public data — no key curl "https://api.buycrypt.com/fapi/v1/ticker/price?symbol=BTCUSDT" curl "https://api.buycrypt.com/fapi/v1/klines?symbol=ETHUSDT&interval=1h&limit=3" # demo account balance — a signed request KEY="YOUR_API_KEY"; SECRET="YOUR_API_SECRET" Q="timestamp=$(date +%s)000" SIG=$(printf '%s' "$Q" | openssl dgst -sha256 -hmac "$SECRET" | sed 's/^.* //') curl -H "X-MBX-APIKEY: $KEY" "https://api.buycrypt.com/fapi/v2/balance?$Q&signature=$SIG"
Methods
The REST base URL is https://api.buycrypt.com. Signed methods require the X-MBX-APIKEY header, timestamp and signature.
Market data no key
Account and positions signed
Trading signed
WebSocket streams
Limits and errors
Subscribers for your bot (beta)
A bot can be registered as public: a user taps Connect in the app, BuyCrypt opens a separate demo account for them with 1,000 demo USDT and issues a key to that account only. The key is sent to your webhook in a subscription.created event, and the bot trades on the subscriber's demo account. When the user disconnects, the positions are closed, the key stops working and you receive subscription.disconnected.
The bot never gets users' real accounts or exchange keys — only a key to a separate demo account.
Registration is a signed POST /fapi/v1/bot/profiles with the parameters slug, displayName, webhookUrl (HTTPS only) and webhookSecret (32 characters or more); the bot has the PENDING_REVIEW status until it is reviewed. Every event is signed: the X-BuyCrypt-Signature header = HMAC-SHA256(webhookSecret, timestamp + "." + body), the time is in X-BuyCrypt-Timestamp. Delivery is retried up to 6 times (immediately, after 10 s, 30 s, 2 min, 10 min, 1 h); after 10 failed deliveries in a row the webhook is disabled — support can turn it back on.
import hashlib, hmac, os, time WEBHOOK_SECRET = os.environ["BUYCRYPT_WEBHOOK_SECRET"] def verify(headers, raw_body: bytes) -> bool: ts = int(headers["X-BuyCrypt-Timestamp"]) if abs(time.time() * 1000 - ts) > 5 * 60 * 1000: # older than 5 minutes — reject return False expected = hmac.new(WEBHOOK_SECRET.encode(), f"{ts}.".encode() + raw_body, hashlib.sha256).hexdigest() return hmac.compare_digest(expected, headers["X-BuyCrypt-Signature"])
A BuyCrypt key opens only a demo account
Tied to one account
An API key is created for a specific demo account and works only with it. Real exchange accounts are not available through this API. A read-only key can't trade on this account either.
The secret is shown once
Keep the key and secret in environment variables or a secrets manager, not in code and not in public repositories.
Revoke in a second
In the web terminal or the app, in the same "Bot API keys" block, press "Revoke": all requests with this key will get a 401 error right away.
Frequently asked questions
Does the bot trade real money?
No. The BuyCrypt API executes orders on your demo account: market prices, a balance in demo USDT. Orders aren't sent to an exchange, so you can test a strategy without risk.
Do I need to rewrite my bot for BuyCrypt?
Usually not. If the bot works with Binance USD-M Futures, change the base URL to https://api.buycrypt.com and plug in a BuyCrypt key. The paths, signature and response format are the same. Check that the bot doesn't use hedge mode or the /fapi/v2/ticker/price path.
Where do I get an API key?
In the BuyCrypt web terminal or app: Profile → API keys → your demo account → Bot API keys → Generate API key. For MCP and AI assistants, use "Generate read-only key (for MCP)" in the web terminal: this key sees the account but does not trade. The secret is shown only once, so save it right away. You can also revoke the key there.
What is MCP and why do I need it?
MCP (Model Context Protocol) is an open standard through which AI assistants connect to external data. Once you connect the https://buycrypt.com/mcp server, you can ask Claude, ChatGPT or Cursor about tournaments, leaders and trader passports, and the assistant will answer using live BuyCrypt data.
Do I need to sign up to connect MCP?
No. Tournaments, the rating, trader passports and prices are available without a key. A key is needed only for the three tools that read your demo account, and a read-only key is enough.
Can an AI assistant trade through MCP?
No. All nine server tools only read data: no orders are placed or cancelled, nobody joins tournaments, no money is moved.
Will the bot developer get my exchange keys?
No. When you connect someone else's bot, BuyCrypt opens a separate demo account for it and issues a key to that account only. Your real accounts and exchange keys are never passed to the bot. More about data protection on the Security page.
Start with a demo account
A BuyCrypt account is free: a demo account for your bot, an API key in the app, tournaments and a rating that show what your strategy is worth.