-
-
Save AhmedSakrr/152532c0f773538ea002978626270faa 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 main(): | |
| start_time = time() | |
| csvfile = open('arbitrage', 'w', newline='', encoding='UTF8') | |
| result_writer = csv.writer(csvfile, delimiter=',') | |
| n = 0 | |
| while n < ITERATIONS: | |
| n += 1 | |
| prices = get_prices() | |
| triangles = list(find_triangles(prices)) | |
| if triangles: | |
| for triangle in sorted(triangles, key=itemgetter('profit'), reverse=True): | |
| describe_triangle(prices, triangle, result_writer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment