Software Alternatives & Reviews

You call it I code it - tell me how your ideal crypto trading bot would work and I may code it and share with the community

RStudio CLEO.one
  1. RStudio™ is a new integrated development environment (IDE) for R.
    # A Sample Bot for Ethereum written in R programming language # (www.r-project.org). Code can be deployed in Rstudio (https://rstudio.com/) #________ # Purpose: check the current ETH-USD price and if it's within a set range, buy # or sell accordingly #________ # Set Variables---- Target.eth.price.usd <- 1800 #Set target ETH price in USD Target.usd.plus_minus <- 5 #Sets a range of $ETH +/- (i.e. $1800 +/- $5.00 = $1,750-$1,850) Terminate.bot.after.minutes <- 60 #Set how long the bot will run in minutes Seconds.between.api.calls <- 15 #Set how long the bot will pause each loop in seconds Eth.api.url <- "https://api.coinbase.com/v2/prices/ETH-USD/buy" #url for ETH-USD api call to Coinbase # Function to Call Current ETH-USD Price from Coinbase---- Get.eth_price <- function(url = eth.api.url) { require(magrittr) require(jsonlite) current.eth_price <- url %>% fromJSON() %>% .$data %>% .$amount %>% as.numeric(.) return(current.eth_price) } # Some Calculations---- End.time <- Sys.time() + (60 * terminate.bot.after.minutes) # The Bot Guts---- While(Sys.time() < end.time){ cat("\f") # Clears the console # Get the current price cur.prc <- get.eth_price() # Print the current price print(paste("Current Price: $", round(cur.prc,2), sep = "", collapse = "")) # Figure out if ETH-USD price is within target range if(cur.prc >= (target.eth.price.usd - target.usd.plus_minus) & cur.prc <= (target.eth.price.usd + target.usd.plus_minus) & cur.prc != target.eth.price.usd){ # if ETH-USD == your target then you wouldn't buy or sell # Figure out if you need to sell or buy if(cur.prc > target.eth.price.usd){ print("Sell the ETH you big dummy") }else{ print("Buy the ETH you big dummy") } }else{ print("HODL and stack eth") } # Wait until you call the api again Sys.sleep(seconds.between.api.calls) } # After the Bot Ends... Print("Nice!").

    #Text Editors #IDE #Software Development 5 social mentions

  2. Make time, save money. Trading today goes hand in hand with programming.
    That strategy is not that great on most timeframes. I tested it on cleo.one where you can build it in 3 mins and it does not bea holding most of the time.

    #Trading #Cryptocurrencies #Finance 1 social mentions

Discuss: You call it I code it - tell me how your ideal crypto trading bot would work and I may code it and share with the community

Log in or Post with