Parameters
- typestringREQUIRED
Request type identifier. Set this value to 'twapHistory'
- userstringREQUIRED
The 42-character hexadecimal address of the user whose TWAP history to retrieve
Returns
- arrayarray
Array of historical TWAP order records. The array is empty when the user has no TWAP history.
- timeinteger
Creation time of the history record as a Unix timestamp in seconds
- stateobject
Execution state of the TWAP order
- coinstring
Asset symbol for the TWAP order
- executedNtlstring
Notional value executed so far, returned as a decimal string
- executedSzstring
Order size executed so far, returned as a decimal string
- minutesinteger
Configured TWAP duration in minutes
- randomizeboolean
Indicates whether execution timing is randomized
- reduceOnlyboolean
Indicates whether the TWAP can only reduce an existing position
- sidestring
Order side: 'B' for bid or buy, and 'A' for ask or sell
- stopPxstring | null
Price at which the order stops, or null when no stop price is configured
- szstring
Original TWAP order size, returned as a decimal string
- timestampinteger
TWAP start time as a Unix timestamp in milliseconds
- triggerobject | null
Trigger condition for the TWAP, or null when no trigger is configured
- pxstring
Trigger price, returned as a decimal string
- aboveboolean
When true, activates above the trigger price; when false, activates below it
- userstring
The 42-character hexadecimal address that placed the TWAP order
- statusobject
Current or final status of the TWAP order
- statusstring
Status value: 'finished', 'activated', 'terminated', 'waitingForTrigger', 'stopped', or 'error'
- descriptionstring
Error description. Present only when status is 'error'
- twapIdinteger
Optional unique identifier of the TWAP order