Roboqo Studio
  • Roboqo Studio
  • OVERVIEW
    • Quickstart
    • Fees and Tokens
  • Basics
    • Roboqo Scripts
    • Transactions
    • UI Elements
    • Helper Functions
  • Global Objects
    • Solana Object
    • Positions Object
    • Jito Object
    • Raydium Object
    • Jupiter Object
    • Pumpfun Object
    • Rugcheck Object
    • Warp Object
    • Memes Object
    • Script / CLI
    • Storage Object
  • Instances
    • Solana Transaction
    • Solana Bundle
    • Jito Bundle
    • Solana Position
    • Solana Aggregate Position
Powered by GitBook
On this page
  • SolanaAggregatePosition Object Documentation
  • Methods
  1. Instances

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

Description Registers a callback to be executed when the aggregated realized profit reaches a specified value.

Signature

public onAggregatedRealizedProfit(
  value: number,
  callback: (aggregate: AggregatePosition<BigNumber>) => void,
  persistent?: boolean
): void

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

Description Registers a callback to be executed when the aggregated realized loss reaches a specified value.

Signature

public onAggregatedRealizedLoss(
  value: number,
  callback: (aggregate: AggregatePosition<BigNumber>) => void,
  persistent?: boolean
): void

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

Description Registers a callback to be executed when the aggregated unrealized profit reaches a specified value.

Signature

public onAggregatedUnrealizedProfit(
  value: number,
  callback: (aggregate: AggregatePosition<BigNumber>) => void,
  persistent?: boolean
): void

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

Description Registers a callback to be executed when the aggregated unrealized loss reaches a specified value.

Signature

public onAggregatedUnrealizedLoss(
  value: number,
  callback: (aggregate: AggregatePosition<BigNumber>) => void,
  persistent?: boolean
): void

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

Description Registers a callback to be executed when the aggregated realized profit percentage reaches a specified value.

Signature

public onAggregatedRealizedProfitPercentage(
  value: number,
  callback: (aggregate: AggregatePosition<BigNumber>) => void,
  persistent?: boolean
): void

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

Description Registers a callback to be executed when the aggregated realized loss percentage reaches a specified value.

Signature

public onAggregatedRealizedLossPercentage(
  value: number,
  callback: (aggregate: AggregatePosition<BigNumber>) => void,
  persistent?: boolean
): void

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

Description Registers a callback to be executed when the aggregated unrealized profit percentage reaches a specified value.

Signature

public onAggregatedUnrealizedProfitPercentage(
  value: number,
  callback: (aggregate: AggregatePosition<BigNumber>) => void,
  persistent?: boolean
): void

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

Description Registers a callback to be executed when the aggregated unrealized loss percentage reaches a specified value.

Signature

public onAggregatedUnrealizedLossPercentage(
  value: number,
  callback: (aggregate: AggregatePosition<BigNumber>) => void,
  persistent?: boolean
): void

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

PreviousSolana Position

Last updated 4 months ago