wardbradt/peregrine

AlgoScore
19
Outdated
★1.2k
Forks322
Issues+PR8
Push5.4 y
LicenseMIT

Editorial verdict Outdatedchecked 05.12.2026

What it is good at

A classic teaching example of triangular and cross-exchange arbitrage. Exchange rates become a weighted graph (edge weight is the negative log of the rate) and the Bellman-Ford algorithm hunts for negative cycles, meaning chains of trades that return more than you started with. There are three modes: one pair across many exchanges (best bid versus best ask), many currencies on one exchange, and many currencies across several exchanges. Fees can be included (fees=True) and maximum size can be estimated from order book depth (depth=True). Exchanges can be filtered by country. Data comes through ccxt, no API keys are needed, and everything runs on public quotes.

Weak spots

The repository is archived, with the last commit in June 2021 and no releases. The author states in the README that it was a 2017 proof of concept he no longer has bandwidth to maintain, with known issues. requirements.txt pins ccxt 1.42.99 and an early-2021 dev build of networkx 2.2, and the examples reference long-closed venues such as Bittrex and LakeBTC. Expect to patch the code before it runs on current ccxt. The opportunities it finds ignore latency, cross-exchange withdrawals and slippage, so nearly all of them vanish in live trading.

Who it is for

Anyone who wants to understand the math behind graph-based arbitrage detection and read a compact implementation with clear examples. Works as lecture material or a starting point for your own prototype. Not suitable for trading or a production screener in 2026.

Versus alternatives

For real work, use ccxt and write the cycle search over fresh order books: roughly the same hundred lines on a live API. hummingbot is actively developed and ships executors for arbitrage and cross-exchange market making, including order management. Peregrine remains useful only as a readable explanation of the algorithm.

  • Repository archived
  • Last commit — 28 Jun 2021
  • No GitHub releases; install from git only
  • Dependencies pinned to ccxt 1.42.99
  • License: MIT

Stars by day

Our star series started 05.12.2026: the chart appears after the second snapshot.

GitHub dataGitHub ↗

TopicArbitrage
LanguagePython
Created01.02.2018
Last release—
Releases / tags0 / 0
Contributors9
Commits total / 90d345 / 0
Watchers0

AlgoScore breakdownmethodology →

Popularity12.9/20
Freshness0/20
Community6.4/20
Maturity9.5/15
Momentum—
Usage—

Topic neighboursArbitrage →

#RepositoryAlgoScore★30d growthPushLabel
1 tardis-dev/tardis-nodeConvenient access to tick-level real-time and historical cryptocurrency market data via Node.js 78 367 — today
2 crypto-chassis/ccapiA header-only C++ library for interacting with crypto exchanges. Bindings for Python, Java, C#, Go, and Javascript are provided. 73 750 — 22 d
3 Akagi201/cryptotraderA cryptocurrency trader for all famous exchanges 73 280 — 6 d
4 roq-trading/roq-apiC++ interfaces used to communicate with Roq's market gateways. 67 518 — 1 d
5 Cetipoo/solana-onchain-arbitrage-botSolana arbitrage bot with onchain calculation 66 270 — 7 d
6 WSOL12/Solana-Arbitrage-BotSolana Arbitrage Bot on pump.fun, Meteora, Raydium and Orca using Jito bundling, RPC and gRPC. Solana Arbitrage Bot Solana Arbitrage Bot Solana Arbitrage Bot Solana Arbitrage Bot Solana Arbitrage Bot Solana Arbitrage Bot Solana Arbitrage Bot Solana Arbitrage Bot Solana Arbitrage Bot Solana Arbitrage 64 528 — 9 mo
7 AlexWan/OsEngineOpen Source algo trading platform 63 1.1k — today
8 6eer/uniswap-sushiswap-arbitrage-botTwo bots written in JS that uses flashswaps and normal swaps to arbitrage Uniswap. Includes an automated demostration. 58 608 — 4.9 y