Skip to content

Commit

Permalink
Changed var id to orderId
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSamhuns committed Dec 15, 2018
1 parent 62a5679 commit b9731f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ritpytrading/submit_cancel_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def market_order(ses, ticker, side, quantity):
response = ses.post(base_url + '/orders', params=mkt_order_params)
if response.ok:
mkt_order = response.json()
id = mkt_order['order_id']
orderId = mkt_order['order_id']
print('%s %s Market order was submitted and has ID %d' %
(side, quantity, id))
(side, quantity, orderId))
if response.status_code == 429:
print('Error: Orders submitted too frequently.')
else:
Expand All @@ -51,9 +51,9 @@ def limit_order(ses, ticker, side, quantity, price):
response = ses.post(base_url + '/orders', params=lim_order_params)
if response.ok:
lim_order = response.json()
id = lim_order['order_id']
orderId = lim_order['order_id']
print("%s %s Limit order was submitted and has ID %d " %
(side, quantity, id))
(side, quantity, orderId))
elif response.status_code == 429:
print('Error: Orders submitted too frequently.')
else:
Expand Down

0 comments on commit b9731f2

Please sign in to comment.