Solana Aggregate Position
SolanaAggregatePosition Object Documentation
The SolanaAggregatePosition
class represents an aggregate trading position on Solana within the Roboqo platform. It extends the EventEmitter
class to allow event-driven interactions and provides methods for monitoring profit/loss conditions on an aggregated level.
Methods
onAggregatedRealizedProfit
onAggregatedRealizedProfit
Description Registers a callback to be executed when the aggregated realized profit reaches a specified value.
Signature
Parameters
value
(number
): The profit threshold to trigger the callback.callback
((aggregate: AggregatePosition<BigNumber>) => void
): The function to execute when the condition is met.persistent
(boolean
, optional): Whether the callback should persist after being triggered.
Returns
void
onAggregatedRealizedLoss
onAggregatedRealizedLoss
Description Registers a callback to be executed when the aggregated realized loss reaches a specified value.
Signature
Parameters
value
(number
): The loss threshold to trigger the callback.callback
((aggregate: AggregatePosition<BigNumber>) => void
): The function to execute when the condition is met.persistent
(boolean
, optional): Whether the callback should persist after being triggered.
Returns
void
onAggregatedUnrealizedProfit
onAggregatedUnrealizedProfit
Description Registers a callback to be executed when the aggregated unrealized profit reaches a specified value.
Signature
Parameters
value
(number
): The profit threshold to trigger the callback.callback
((aggregate: AggregatePosition<BigNumber>) => void
): The function to execute when the condition is met.persistent
(boolean
, optional): Whether the callback should persist after being triggered.
Returns
void
onAggregatedUnrealizedLoss
onAggregatedUnrealizedLoss
Description Registers a callback to be executed when the aggregated unrealized loss reaches a specified value.
Signature
Parameters
value
(number
): The loss threshold to trigger the callback.callback
((aggregate: AggregatePosition<BigNumber>) => void
): The function to execute when the condition is met.persistent
(boolean
, optional): Whether the callback should persist after being triggered.
Returns
void
onAggregatedRealizedProfitPercentage
onAggregatedRealizedProfitPercentage
Description Registers a callback to be executed when the aggregated realized profit percentage reaches a specified value.
Signature
Parameters
value
(number
): The profit percentage threshold to trigger the callback.callback
((aggregate: AggregatePosition<BigNumber>) => void
): The function to execute when the condition is met.persistent
(boolean
, optional): Whether the callback should persist after being triggered.
Returns
void
onAggregatedRealizedLossPercentage
onAggregatedRealizedLossPercentage
Description Registers a callback to be executed when the aggregated realized loss percentage reaches a specified value.
Signature
Parameters
value
(number
): The loss percentage threshold to trigger the callback.callback
((aggregate: AggregatePosition<BigNumber>) => void
): The function to execute when the condition is met.persistent
(boolean
, optional): Whether the callback should persist after being triggered.
Returns
void
onAggregatedUnrealizedProfitPercentage
onAggregatedUnrealizedProfitPercentage
Description Registers a callback to be executed when the aggregated unrealized profit percentage reaches a specified value.
Signature
Parameters
value
(number
): The profit percentage threshold to trigger the callback.callback
((aggregate: AggregatePosition<BigNumber>) => void
): The function to execute when the condition is met.persistent
(boolean
, optional): Whether the callback should persist after being triggered.
Returns
void
onAggregatedUnrealizedLossPercentage
onAggregatedUnrealizedLossPercentage
Description Registers a callback to be executed when the aggregated unrealized loss percentage reaches a specified value.
Signature
Parameters
value
(number
): The loss percentage threshold to trigger the callback.callback
((aggregate: AggregatePosition<BigNumber>) => void
): The function to execute when the condition is met.persistent
(boolean
, optional): Whether the callback should persist after being triggered.
Returns
void
Last updated