The Quant Stack

The Quant Stack

Arb Wiki

Small Trader Alpha #7: Perpetual Arbitrage Pt. 2

Advanced perpetual arbitrage strategy

Quant Arb's avatar
Jad Ghalayini's avatar
Quant Arb
and
Jad Ghalayini
Oct 01, 2024
∙ Paid
Create a more glorious and grand cover image for a Substack article about implementing a trading algorithm, in landscape format. The cover should resemble a prestigious, 'holy grail' textbook on perpetual arbitrage for cryptocurrency, sitting on a luxurious wooden table. The book design should be ornate, with gold accents, intricate borders, and a bold title that reads 'Perpetual Arbitrage Trading' in an elegant, commanding font. Include subtle, refined crypto-themed symbols like Bitcoin and Ethereum logos, and trading charts. The lighting should be dramatic, casting a warm, radiant glow on the book, emphasizing its grandeur and importance.

Introduction


In the previous article in the small trader alpha series, we walked through a taker strategy quite broadly. Now, we will dive into the implementation details of that providing the *FULL* code for a perpetual arbitrage scanner in Rust that can be put into production.

This article will explain the code, but the appendix will contain the entire code which can easily be copy-pasted. This is the easiest method instead of everyone having to email me for access to a GitHub. In making this project, we were also able to contribute to barter-rs, an open-source project similar to CCXT but for Rust.

This code is presented with the intention that the comments and naming should be self-documenting. Thus, it is up to the reader to build that understanding of how it works by reading it. This is a simple expectation I hope.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Quant Arb · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture