---
title: "Discussion on \"Building High-Frequency Algorithmic Trading & Arbitrage Bots in Pure Python: In-Memory L2 OrderBooks, Triangular Arbitrage & Sub-4µs Execution\" | Hashnode"
description: "Discussion on \"Building High-Frequency Algorithmic Trading & Arbitrage Bots in Pure Python: In-Memory L2 OrderBooks, Triangular Arbitrage & Sub-4µs Execution\". In quantitative finance, latency is measured in microseconds, and slippage separates profitable algorithmic trading firms from liquidated accounts. \nConventional retail trading tutorials teach develop"
url: "https://hashnode.com/posts/building-high-frequency-algorithmic-trading-arbitrage-bots-in-pure-python-in-memory-l2-orderbooks-triangular-arbitrage-sub-4-s-execution/6ae97db975c1c736f9d58145"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Building High-Frequency Algorithmic Trading & Arbitrage Bots in Pure Python: In-Memory L2 OrderBooks, Triangular Arbitrage & Sub-4µs Execution](https://antigravitydev.hashnode.dev/building-high-frequency-algorithmic-trading-arbitrage-bots-in-pure-python-in-memory-l2-orderbooks-triangular-arbitrage-sub-4-s-execution?utm_source=hashnode&utm_medium=feed)

In quantitative finance, latency is measured in microseconds, and slippage separates profitable algorithmic trading firms from liquidated accounts. Conventional retail trading tutorials teach develop

Nov 3 · 5 min read · antigravitydev.hashnode.dev  
Read the article

## Written by

[Antigravity Dev Studio](https://hashnode.com/@antigravitydev)

@antigravitydev

  
[View profile](https://hashnode.com/@antigravitydev)

Building zero-dependency Python + SQLite business systems, Manifest V3 Chrome extensions & developer kits — https://antigone16.gumroad.com/

Software engineering studio building zero-dependency Python + SQLite business tools, Manifest V3 Chrome extensions, and commercial developer starter kits. Storefront: https://antigone16.gumroad.com/

## Responses 1

Markdown supported · ⌘↵ to post

[Arnold Holm](https://hashnode.com/@stratcorealpha)

[Nov 13](https://hashnode.com/posts/building-high-frequency-algorithmic-trading-arbitrage-bots-in-pure-python-in-memory-l2-orderbooks-triangular-arbitrage-sub-4-s-execution/6ae97db975c1c736f9d58145/comment/6af78e79278997a975c99cc7)

I see risk in your triangular arbitrage approval with 0.075% paid on each leg. How would your approval rule handle a case where the best ask on ETH/BTC shifts after Leg 1 fills but before Leg 3 reaches the bid?
