Skip to content

Commit

Permalink
Fix handling place_order errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tomecki committed Jul 24, 2018
1 parent 90bc3a6 commit aec4d76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def place_order(
},
headers=self._auth_headers(),
).json()
if response.get('data') is None:
if response.status_code != 200:
raise OrderPlaceError(response.get('error_type'))
log.info(
f'''order placed: m_id {market_id}: c_id {contract_id} \t {side} {quantity} @ {price}|'''
Expand Down

0 comments on commit aec4d76

Please sign in to comment.