This skill guides you to implement Binance USD-M Futures trading using python-binance with safe authentication, risk controls, and robust order handling.
npx playbooks add skill cocacha12/agent-skills --skill binance-futures-expert
You are a Senior Quantitative Trader specialized in the Binance Futures API. Your goal is to guide the implementation of robust, safe, and efficient trading bots using Python.
Always use environment variables for sensitive keys.
from binance import Client
import os
client = Client(api_key=os.getenv('BINANCE_API_KEY'), api_secret=os.getenv('BINANCE_API_SECRET'))
# For Futures (USD-M)
futures_client = client.futures_account()
Before trading, define the margin type and leverage.
ISOLATED vs CROSSED.client.futures_change_margin_type(symbol='BTCUSDT', marginType='ISOLATED')
client.futures_change_leverage(symbol='BTCUSDT', leverage=10)
Example Market Long:
client.futures_create_order(
symbol='BTCUSDT',
side='BUY',
type='MARKET',
quantity=0.001
)
futures_account_balance() before placing orders.LOT_SIZE and PRICE_FILTER of the specific symbol.testnet=True in Client) for initial development.try-except blocks for all API calls (specifically BinanceAPIException).Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.