|
@@ -117,7 +117,10 @@ def order():
|
|
|
elif request.json['limit'] is None:
|
|
|
limit = None
|
|
|
else:
|
|
|
- limit = float(request.json['limit'])
|
|
|
+ if buy:
|
|
|
+ limit = floor(float(request.json['limit']) * 10000) / 10000
|
|
|
+ else:
|
|
|
+ limit = ceil(float(request.json['limit']) * 10000) / 10000
|
|
|
except ValueError: # for example when float fails
|
|
|
return bad_request('Invalid limit.')
|
|
|
except KeyError: # for example when limit was not specified
|