Use the power of TypeScript and Reactive Programming to research, develop and test your
market-winning short-term and long-term investments.
Documentation
·
Contributing Guidelines
The quantform is a trading automation framework designed for crypto markets, supporting centralized and decentralized exchanges. It enables traders to define strategies in a declarative/reactive way, simplifying modifications and execution. Unlike high-frequency trading solutions, quantform focuses on usability and efficiency, helping users automate both long-term and short-term investments.
Built on Node.js with minimal dependencies, it ensures reliability and performance for handling large data volumes and real-time trading. The framework also facilitates multi-exchange trading to leverage market inefficiencies and reduce risks.
- real-time market data provide traders with up-to-the-moment market, this enables traders to make informed adjustments to their strategies as market conditions change.
- real-time account data offers instant updates on account balances, open orders, and trade history. This allows traders to monitor their account activity.
- paper trading and backetsting to test trading algorithms against historical market data. This enables traders to evaluate the performance of their algorithms and identify areas for improvement.
- stable and reliable built for long-term operation, the system runs continuously for weeks or months without crashes or disruptions. Its stability ensures traders can execute strategies with confidence, minimizing downtime and technical issues.
This mono-repo contains following components:
You can find the documentation on the website.
/**
* Subscribe for given instrument market data and aggregate the volume.
*/
export function whenTradeVolumeAccumulated(instrument: InstrumentSelector) {
const { whenTrade } = useBinance();
const { error } = useLogger(whenTradeVolumeAccumulated.name);
let volume = d.Zero;
return whenTrade(instrument).pipe(
map(it => {
volume = volume.add(it.quantity);
return volume;
}),
catchError(e => {
error('connection lost...');
return throwError(() => e);
}),
retry({ count: 5, delay: 1000 })
);
}
/**
* Describe strategy behavior
*/
export default strategy(() => {
behavior(() => {
const { info } = useLogger('market-data-streaming');
return zip([
whenTradeVolumeAccumulated(instrumentOf('binance:btc-usdt')),
whenTradeVolumeAccumulated(instrumentOf('binance:eth-usdt'))
]).pipe(tap(([btc, eth]) => info(`accumulated volume: ${btc} BTC, ${eth} ETH`)));
});
return [
...binance({}),
sqlite()
];
});
Scaffold a new sample project in project directory:
npx create-quantform-app .
Execute backtest session:
npm start
Please read the full text so that you can understand what actions will and will not be tolerated.
Trading Cryptocurrencies, Futures, Forex, CFDs and Stocks involves a risk of loss. Please consider carefully if such trading is appropriate for you. Past performance is not indicative of future results. Articles and content on this website are for entertainment purposes only and do not constitute investment recommendations or advice.
This project is MIT licensed.