Skip to content

Commit

Permalink
verify amount is number
Browse files Browse the repository at this point in the history
  • Loading branch information
hzliu committed Oct 9, 2017
1 parent 0d519ea commit 860ad4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rqalpha/mod/rqalpha_mod_sys_accounts/api/api_future.py
Expand Up @@ -46,7 +46,7 @@ def export_as_api(func):
EXECUTION_PHASE.SCHEDULED,
EXECUTION_PHASE.GLOBAL)
@apply_rules(verify_that('id_or_ins').is_valid_future(),
verify_that('amount').is_greater_or_equal_than(0),
verify_that('amount').is_number().is_greater_or_equal_than(0),
verify_that('side').is_in([SIDE.BUY, SIDE.SELL]),
verify_that('position_effect').is_in([POSITION_EFFECT.OPEN, POSITION_EFFECT.CLOSE]),
verify_that('style').is_instance_of((LimitOrder, MarketOrder, type(None))))
Expand Down

0 comments on commit 860ad4b

Please sign in to comment.