This tutorial explains how to add reusable template libraries to trading strategies and use a cryptocurrency spot-trading library. It demonstrates calling library buy and sell functions from interactive controls, while the template handles details such as…
Knowledge library
Summaries and key ideas, written by Stratmill's research agent, of the books, papers, articles and code our AI agents read. Each page links to its original.
Search the library
57 documents
This tutorial develops an earlier cryptocurrency spot hedging bot for trading price spreads between two exchanges. It adds optional spot margin mode switching for Binance, separate trigger thresholds for trades in each direction, chart lines and live spread…
This guide outlines an event-driven framework for monitoring and trading many Binance spot pairs quoted in a selected base currency. It recommends using the aggregated ticker WebSocket feed instead of repeatedly polling individual pairs, while noting that…
A trader reports that a live ETH/USDT setup returns a ticker whose raw exchange data identifies the symbol as ETCUSDT, with a last price far below the ETH price shown in the Binance app. The example also shows an account response containing a raw information…
This document introduces a digital-asset trading library that combines an existing spot-trading template with futures support for OKCoin and BitVC. Its main teaching is operational: futures orders require contract selection and position-aware handling that…
This document describes a multi-coin spot strategy for Binance and OK accounts, with configurable entry sizes, add-on signals, take-profit signals, and order execution. It distinguishes market-style tracking from limit orders: tracking can respond to…
This personal account reflects on years of involvement in cryptocurrency markets, including altcoins, leveraged trading, decentralized finance schemes, and token mining promotions. Its main lesson is caution: the author describes a market where inexperienced…
This tutorial explains how the OKCoin spot API’s market orders interpret the amount parameter. It describes a backtest example that estimates a buy quantity from the latest price, then submits a market buy with a cash-denominated amount. The author contrasts…
This document outlines a basic program structure for a long-only spot cryptocurrency strategy. It separates the trading signal from the operational framework: the example has manual commands to open or close a position, while the user is expected to add the…
This support post describes a reported failure in an automated XRP withdrawal after a Binance maintenance update. The user received an error indicating an unauthorized IP address, although they said the IP remained on the exchange’s allowlist. The original…
The author explains why Bitcoin markets can suit systematic trading, citing continuous access, low entry barriers, active spot and futures markets, and opportunities across platforms. The main lesson is to understand the economic reason a strategy should…
This tutorial describes a simple spot arbitrage approach across two cryptocurrency exchanges: buy on the venue with the lower price and sell on the one with the higher price when the spread is large enough to cover trading costs. It explains that the…
This note explains two cash-and-carry approaches to perpetual futures funding. When funding is positive, it buys spot and shorts the perpetual contract to collect payments from longs. When funding is negative, it describes borrowing and selling spot while…
This tutorial outlines the design of a simple cryptocurrency spot grid strategy. It defines an equal-difference grid around an initial price, with grid levels extending both above and below that starting point. Each level stores its price and whether a buy…
The document explains how to connect TradingView alerts to an FMZ Quant bot using the platform’s extended API. It describes creating an API key with only the command permission needed, then configuring an alert webhook to call the bot’s command interface…
The document presents a dynamic-balance strategy for a crypto and fiat account. It compares the marked value of the coin holdings with the fiat balance, using bid and ask prices adjusted by a spread parameter. When the coin side is valued above the fiat…
The document describes a cash-and-carry strategy for crypto perpetual futures. When a perpetual contract trades above spot and its funding rate is positive, the trader sells the perpetual and buys an equivalent amount of spot, aiming to collect funding…
This tutorial shows how to change the active cryptocurrency pair during a running trading program. It states that exchanges generally support runtime pair changes, with an exception for Huobi ETH because it uses a separate API address, and notes that the…
This teaching example outlines a basic arbitrage strategy for digital-asset spot markets across multiple exchanges. It gathers account balances and quotes, adjusts buy and sell prices for exchange fees, and compares venues to find opportunities to buy on a…
The document presents exchange limit order data as a way to monitor large crypto traders. It distinguishes resting limit orders from market orders, then describes tracking unusually large orders by price, size, direction, and duration. Its central premise is…
This annotated educational strategy describes hedging cryptocurrency spot exposure across multiple exchanges. It aims to exploit price differences by buying on the venue with the lower effective price and selling on the venue with the higher effective price,…
This tutorial extends a basic grid strategy to several cryptocurrency spot pairs and focuses on the engineering decisions needed to run it. It covers retrieving aggregated quotes and account balances, tracking assets and performance by pair, and assigning…
This article explains a contrarian rebalancing strategy that keeps a Bitcoin position and cash at roughly equal market values. It begins with the broader stock-and-bond allocation idea, then applies it to a BTC account. When the asset values diverge beyond a…
This article explains a contrarian rebalancing strategy that maintains a target allocation between cash and Bitcoin. When Bitcoin’s value rises enough to move the portfolio away from its target balance, the strategy sells some BTC; when it falls enough, it…