Create algo order

POST

Open a new algo order

TWAP

TWAP orders break a large trade into smaller ones over time to reduce market impact:

  • Sub-orders are placed every 30 seconds.
  • Order duration is between 30 and 86,400 seconds, in multiples of 30.
  • Supported sub order type: MARKET

Request

This endpoint expects an object.
algo_typestringRequired

Algo type, required for algo orders creation

duration_secondsintegerRequired

Duration in seconds for which the algo order will be running, required for algo orders creation

marketstringRequired

Market for which order is created

side"BUY" or "SELL"Required
Allowed values: BUYSELL

Algo order side

signaturestringRequired

Order Payload signed with STARK Private Key

signature_timestampintegerRequired

Timestamp of order creation, used for signature verification

sizestringRequired

Size of the algo order

typeenumRequired

Algo order type, only MARKET is supported

Response

Created

accountstringOptional

Account identifier (user’s account address)

algo_type"" or "TWAP"Optional
Allowed values: TWAP

Algo type

avg_fill_pricestringOptional

Average fill price of the order

cancel_reasonstringOptional

Reason for algo cancellation if it was closed by cancel

created_atintegerOptional

Algo creation time

end_atintegerOptional

Algo end time

idstringOptional

Unique algo identifier

last_updated_atintegerOptional

Algo last update time. No changes once status=CLOSED

marketstringOptional

Market to which algo belongs

remaining_sizestringOptional

Remaining size of the algo

side"BUY" or "SELL"Optional
Allowed values: BUYSELL

Algo side

sizestringOptional

Algo size

statusenumOptional
Allowed values: NEWUNTRIGGEREDOPENCLOSED

Algo status

Errors