Advertisement
efoxxi

eu_test_dict1.py

Dec 24th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. def start_trading(orders):
  2.     counter = 0
  3.     for order in orders:
  4.         print counter, 'Starting:', order['trade_type'], order['amount']
  5.         counter += 1
  6.     print 'Done'
  7.  
  8. orders = [{'amount': 0.01552072,
  9.            'pair': 'btc_usd',
  10.            'rate': 644.622,
  11.            'trade_type': 'buy'},
  12.           {'amount': 0.58821952,
  13.            'pair': 'ltc_btc',
  14.            'rate': 0.02633,
  15.            'trade_type': 'buy'},
  16.           {'amount': 0.58674971,
  17.            'pair': 'ltc_usd',
  18.            'rate': 17.052429,
  19.            'trade_type': 'sell'}]
  20.  
  21. start_trading(orders)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement