Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1.  
  2. # fee and min_profit in percentages
  3. def check_arbitration(lowest_ask, highest_bid, fee_ask, fee_bid, min_profit):
  4. result = ((((1 / lowest_ask) * (1 - fee_ask / 100)) * highest_bid) * (1 - fee_bid / 100))
  5. profit = result - 1
  6. return profit * 100 > min_profit
  7.  
  8. print(check_arbitration(3.53500000, 3.7239, 0.1, 0.2, 5))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement