Created
June 9, 2021 11:36
-
-
Save ugik/4b7d689f1964decb6d26edd60d74f3c4 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