Triggers
Triggers are events that activate you Bot and set them in motion.
Last updated
Triggers are events that activate you Bot and set them in motion.
Last updated
First, the user selects an exchange to obtain market data that will trigger the bot. Then, they choose the type of trigger, asset pair, and relationship (price greater than, less than, equal to, etc.). Finally, they set the gas fee that can be used by this bot.
This settings screen will be used until it is replaced by a prompt in the future.
Price of an asset crosses a certain value
Price of an asset moves by a certain percentage in any direction
TVL crosses a certain value
The MarketCap of an asset moves by a certain value
100-200 EMA Crossover on 4h timeframe, and many more technical analysis triggers
The following triggers can be used in DEX/AMM. Please check the development status as well. For more details, please contact the team.
period_exc()
period, unit, n
Triggers to be executed periodically
period_exc(1,hour,2) means buy btc 2 times per hour
price()
marketName, minutes(optional)
Takes a market name as an argument and returns the final price of the asset. When user input n, it returns the price n minute before the asset.
price("ETH/USD",7) returns the price 7 minute before ETH/USD.
last_trade_price()
marketName
Returns the last traded price of the asset.
last_trade_price("LINKBULL/USD") Returns the last trade price for that asset.
free_collateral
-
Returns the amount of collateral not required in U.S. dollars in the Wallet.
free_collateral>500. This rule is triggered when the collateral-free amount in the wallet exceeds $500.
total_position_size
-
Returns the total account position size (in USD) for all futures.
total_position_size<2*total_collateral This rule is triggered when the total position is less than twice the collateral in the account.
position()
marketName
Returns the size of the asset position. Returns a positive value or 0.
position("BTC-USDC") returns the size of the BTC position in spot.
position_side()
marketName
Returns 1 if the position is long, -1 if the position is short, or 0 if the position is neither.
position_side("ETH-USDC")Returns 1 if ETH bought.
abs()
x
Takes a numeric value as an argument and returns its absolute value.
In the case of abs(-2), 2 is returned.
max()
x,y
The two numbers are taken as arguments and return the greater of x and y.
max(3.2, 10) returns 10
min()
x,y
The two numbers are taken as arguments and return the smaller of x and y.
min(1, 5), 1 is returned.
sqrt()
x
Takes a positive number and returns its square root.
sqrt(25) returns 5.
floor()
x
Takes a numeric argument and returns the largest integer less than or equal to x.
floor(2.5) returns 2.
ceil()
x
Takes a numeric argument and returns the smallest integer greater than or equal to x.
ceil(2.5) returns 3.
sign()
x
It takes a numeric argument and returns 1 for positive values and 0 for negative values.
sign(10) returns 1 and sign(-5) returns 0.
get_variable()
name
It takes a variable name as an argument and returns the value stored in this variable.
When you store 10 in the variable named myVariable. In that case, get_variable('myVariable') returns 10.
time
Returns the current UNIX time.
minute
Returns only the minute of the current time.
hour
Returns only the current Universal Standard Time.
period_exc()
period, unit, n
Triggers to be executed periodically
period_exc(1,hour,2) means buy btc 2 times per hour
price()
marketName, minutes(optional)
Takes a market name as an argument and returns the final price of the asset. When user input n, it returns the price n minute before the asset.
price("ETH-PERP",7) returns the price 7 minute before ETH/USD.
bid_price()
marketName
Returns the highest bid price for the asset.
bid_price("ETH-PERP") returns the highest bid price for ETH/USD.
offer_price()
marketName
Returns the highest offer price for the asset.
offer_price("XRP-PERP") returns the highest offer price for XRP-PERP.
bid_volume()
marketName
Returns the highest bid volume for the asset.
bid_price("ETH-PERP") returns the highest bid volume for ETH/USD.
offer_volume()
marketName
Returns the highest offer volume for the asset.
offer_price("XRP-PERP") returns the highest offer volume for XRP-PERP.
last_trade_price()
marketName
Returns the last traded price of the asset.
last_trade_price("LINKBULL/USD") Returns the last trade price for that asset.
index_price()
marketName, minutes(optional)
Returns the index price "n" minutes ago for that asset.
index_price("LINK-PERP", 33) returns the index price 33 minutes before LINK-PERP.
premium()
marketName
Returns the asset's futures premium (mark price divided by index price).
premium("ETH-PERP") returns the ETH-PERP premium.
collateral
-
Returns the total amount of collateral in U.S. dollars in the wallet.
collateral>500 This rule is triggered when the total amount of collateral in the wallet exceeds $500.
free_collateral
-
Returns the amount of collateral not required in U.S. dollars in the Wallet.
free_collateral>500. This rule is triggered when the collateral-free amount in the wallet exceeds $500.
total_position_size
-
Returns the total account position size (in USD) for all futures.
total_position_size<2*total_collateral This rule is triggered when the total position is less than twice the collateral in the account.
margin_fraction
-
Returns the account margin ratio, i.e., the ratio of the total position size in the account to the collateral.
margin_fraction>1
open_margin_fraction
-
Returns the margin percentage including open orders.
open_margin_fraction>1
leverage
-
Returns the approximate account leverage multiplier, which is the rate of collateral and total position size for the course.
leverage<10 This rule is triggered when leverage is below 10x.
initial_mfr
-
Returns the initial margin requirement.
-
Maintenance_mfr
-
Returns the account maintenance margin percentage requirement.
-
Liquidation_distance:
-
Returns the approximate status of how close your account is to liquidation.
-
position()
marketName,side
Returns the size of the asset position. Returns a positive value or 0.
position("ALGO-PERP". buy") returns the size of the ALGO-PERP long.
position_side()
marketName
Returns 1 if the position is long, -1 if the position is short, or 0 if the position is neither.
position_side("ETH-PERP")Returns 1 if ETH bought.
position_net()
marketName
Returns the net size of the position. Positive for long, negative for short.
position_net("BTC-PERP") returns the net size of BTC-PERP.
position_leverage()
marketName
Returns the approximate leverage of the position.
position_leverage("EOS-PERP") returns the approximate leverage of an EOS-PERP position.
position_notional()
marketName
Return the notional amount of the position in U.S. dollars for risk.
position_notional("ALT-PERP") returns the notional principal of the ALT-PERP position.
abs()
x
Takes a numeric value as an argument and returns its absolute value.
In the case of abs(-2), 2 is returned.
max()
x,y
The two numbers are taken as arguments and return the greater of x and y.
max(3.2, 10) returns 10
min()
x,y
The two numbers are taken as arguments and return the smaller of x and y.
min(1, 5), 1 is returned.
sqrt()
x
Takes a positive number and returns its square root.
sqrt(25) returns 5.
floor()
x
Takes a numeric argument and returns the largest integer less than or equal to x.
floor(2.5) returns 2.
ceil()
x
Takes a numeric argument and returns the smallest integer greater than or equal to x.
ceil(2.5) returns 3.
sign()
x
It takes a numeric argument and returns 1 for positive values and 0 for negative values.
sign(10) returns 1 and sign(-5) returns 0.
get_variable()
name
It takes a variable name as an argument and returns the value stored in this variable.
When you store 10 in the variable named myVariable. In that case, get_variable('myVariable') returns 10.
perpetual()
coin
Takes a coin name as an argument and returns the name of the indefinite futures market associated with this coin.
Since perpetual('ETH') returns ETH-PERP, price(perpetual('ETH')) returns the price of ETH-PERP.
time
Returns the current UNIX time.
minute
Returns only the minute of the current time.
hour
Returns only the current Universal Standard Time.