Skip to content

Instantly share code, notes, and snippets.

View cookt's full-sized avatar
💭
Just let me cook bro

Tom Cook cookt

💭
Just let me cook bro
View GitHub Profile
@cookt
cookt / gist:4c3887446e01d93d4b65c74617b882f1
Created February 9, 2024 03:51
Tell me about these markets
import ccxt
from typing import List
import itertools
def is_valid_cycle(cycle: List[str]):
"""
Check if the given cycle of currency pairs forms a valid triangular arbitrage loop.
"""
# Split each currency pair into its individual currencies
currencies = [pair.split('_') for pair in cycle]