Skip to content

Instantly share code, notes, and snippets.

@AhmedSakrr
Forked from ugik/sniffer main
Created May 29, 2022 11:46
Show Gist options
  • Select an option

  • Save AhmedSakrr/152532c0f773538ea002978626270faa to your computer and use it in GitHub Desktop.

Select an option

Save AhmedSakrr/152532c0f773538ea002978626270faa to your computer and use it in GitHub Desktop.
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