Default error handlers attached to all algorithmic orders if no explicit handlers are supplied.
- Source:
Methods
(async, static) onErrorInsufficientBalance(instance, order, notification) → {Promise}
Called when an insufficient balance notification is received. Emits an
'exec:stop'
event and cancels all open orders after the teardown grace
period.
Mapped to the error:insufficient_balance
event.
Parameters:
Name | Type | Description |
---|---|---|
instance |
object | AO instance |
order |
object | order which is below the min size for its symbol |
notification |
object | incoming error notification |
Listens to Events:
Returns:
p - resolves on completion
- Type
- Promise
(async, static) onErrorMinimumSize(instance, order, notification) → {Promise}
Called when a minimum order size error is received. Emits an 'exec:stop'
event and cancels all orders after the teardown grace period.
Mapped to the error:minimum_size
event.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
instance |
object | AO instance |
||||||
order |
object | order which is below the min size for its symbol |
||||||
notification |
object | barebones notification object from BFX Properties
|
Listens to Events:
Returns:
p - resolves on completion
- Type
- Promise
(async, static) onOrdersOrderError(instance) → {Promise}
Called when a generic order error event is received. Emits an 'exec:stop'
event and cancels open orders after the teardown grace period.
Mapped to the orders:order_error
event.
Parameters:
Name | Type | Description |
---|---|---|
instance |
object | AO instance |
Listens to Events:
Returns:
p - resolves on completion
- Type
- Promise