-
-
Save AhmedSakrr/3948a4d2c4b890ebcd29d16774017952 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def find_triangles(prices): | |
| triangles = [] | |
| starting_coin = 'USDT' | |
| for triangle in recurse_triangle(prices, starting_coin, starting_coin): | |
| coins = set(triangle['coins']) | |
| if not any(prev_triangle == coins for prev_triangle in triangles): | |
| yield triangle | |
| triangles.append(coins) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment