Skip to content

Commit 972976d

Browse files
committed
docs: improve websocket spot order list docs
1 parent 749ceea commit 972976d

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

cryptomarket/websockets/trading_client.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -239,32 +239,36 @@ def create_spot_order_list(
239239
):
240240
"""creates a list of spot orders
241241
242-
Types or contingency:
243-
244-
- CONTINGENCY.ALL_OR_NONE (CONTINGENCY.AON)
245-
- CONTINGENCY.ONE_CANCEL_OTHER (CONTINGENCY.OCO)
246-
- CONTINGENCY.ONE_TRIGGER_ONE_CANCEL_OTHER (CONTINGENCY.OTOCO)
242+
Types or Contingency:
243+
- Contingency.ALL_OR_NONE (Contingency.AON)
244+
- Contingency.ONE_CANCEL_OTHER (Contingency.OCO)
245+
- Contingency.ONE_TRIGGER_ONE_CANCEL_OTHER (Contingency.OTOCO)
247246
248247
Restriction in the number of orders:
249-
250248
- An AON list must have 2 or 3 orders
251-
- An OCO list must have 2 or 3 orders
252-
- An OTOCO must have 3 or 4 orders
249+
- An OCO list must have 2 or 3 orders, and only one can be a limit order
250+
- An OTO list must have 2 or 3 orders
251+
- An OTOCO must have 3 or 4 orders, and for the secondary only one can be a limit order
253252
254253
Symbol restrictions:
255-
256254
- For an AON order list, the symbol code of orders must be unique for each order in the list.
257255
- For an OCO order list, there are no symbol code restrictions.
258256
- 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).
259257
260-
ORDER_TYPE restrictions:
261-
- For an AON order list, orders must be ORDER_TYPE.LIMIT or ORDER_TYPE.Market
262-
- 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.
258+
OrderType restrictions:
259+
- For an AON order list, orders must be OrderType.LIMIT or OrderType.Market
260+
- For an OCO order list, orders must be OrderType.LIMIT, OrderType.STOP_LIMIT, OrderType.STOP_MARKET, OrderType.TAKE_PROFIT_LIMIT or OrderType.TAKE_PROFIT_MARKET.
263261
- An OCO order list cannot include more than one limit order (the same
264262
applies to secondary orders in an OTOCO order list).
265-
- 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.
263+
- For an OTOCO order list, the first order must be OrderType.LIMIT, OrderType.MARKET, OrderType.STOP_LIMIT, OrderType.STOP_MARKET, OrderType.TAKE_PROFIT_LIMIT or OrderType.TAKE_PROFIT_MARKET.
266264
- For an OTOCO order list, the secondary orders have the same restrictions as an OCO order
267-
- Default is ORDER_TYPE.Limit
265+
- Default is OrderType.Limit
266+
267+
TimeInForce restrictions:
268+
- For an AON order list, required and must be FOK
269+
- For an OCO order list is optional, orders can be GTC, IOC (except limit orders), FOK (except limit orders), DAY or GTD
270+
- For an OTOCO order list, the first order can be GTC, IOC, FOK, DAY, GTD
271+
- For an OTOCO order list is optional, the secondary orders can be orders must be GTC, IOC (except limit orders), FOK (except limit orders), DAY or GTD
268272
269273
https://api.exchange.cryptomkt.com/#create-new-spot-order-list-2
270274

0 commit comments

Comments
 (0)