Skip to content

Commit c708107

Browse files
committed
adds OTO order lists
1 parent 40beefd commit c708107

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

cryptomarket/args.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ class CONTINGENCY_TYPE(CHECKER):
2727
AON = "allOrNone"
2828
ONE_CANCEL_OTHER = "oneCancelOther"
2929
OCO = "oneCancelOther"
30-
OTOCO = "oneTriggerOneCancelOther"
30+
ONE_TRIGGER_OTHER = "oneTriggerOther"
31+
OTO = "oneTriggerOther"
3132
ONE_TRIGGER_ONE_CANCEL_OTHER = "oneTriggerOneCancelOther"
33+
OTOCO = "oneTriggerOneCancelOther"
3234

3335

3436
class SORT(CHECKER):

cryptomarket/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,25 +604,29 @@ def create_spot_order_list(
604604
605605
- CONTINGENCY.ALL_OR_NONE (CONTINGENCY.AON)
606606
- CONTINGENCY.ONE_CANCEL_OTHER (CONTINGENCY.OCO)
607+
- CONTINGENCY.ONE_TRIGGER_OTHER (CONTINGENCY.OTO)
607608
- CONTINGENCY.ONE_TRIGGER_ONE_CANCEL_OTHER (CONTINGENCY.OTOCO)
608609
609610
Restriction in the number of orders:
610611
611612
- An AON list must have 2 or 3 orders
612613
- An OCO list must have 2 or 3 orders
614+
- An OTO list must have 2 or 3 orders
613615
- An OTOCO must have 3 or 4 orders
614616
615617
Symbol restrictions:
616618
617619
- For an AON order list, the symbol code of orders must be unique for each order in the list.
618620
- For an OCO order list, there are no symbol code restrictions.
621+
- For an OTO order list, there are no symbol code restrictions.
619622
- For an OTOCO order list, the symbol code of orders must be the same for all orders in the list (placing orders in different order books is not supported).
620623
621624
ORDER_TYPE restrictions:
622625
- For an AON order list, orders must be ORDER_TYPE.LIMIT or ORDER_TYPE.Market
623626
- For an OCO order list, orders must be ORDER_TYPE.LIMIT, ORDER_TYPE.STOP_LIMIT, ORDER_TYPE.STOP_MARKET, ORDER_TYPE.TAKE_PROFIT_LIMIT or ORDER_TYPE.TAKE_PROFIT_MARKET.
624627
- An OCO order list cannot include more than one limit order (the same
625628
applies to secondary orders in an OTOCO order list).
629+
- For an OTO order list, there are no order type resctrictions.
626630
- For an OTOCO order list, the first order must be ORDER_TYPE.LIMIT, ORDER_TYPE.MARKET, ORDER_TYPE.STOP_LIMIT, ORDER_TYPE.STOP_MARKET, ORDER_TYPE.TAKE_PROFIT_LIMIT or ORDER_TYPE.TAKE_PROFIT_MARKET.
627631
- For an OTOCO order list, the secondary orders have the same restrictions as an OCO order
628632
- Default is ORDER_TYPE.Limit

0 commit comments

Comments
 (0)