In this tutorial, we’ll create a DCA bot that will invest weekly in the top 10 crypto coins, so that you can walk away, and invest without the stress.

Remember, investing in cryptocurrencies carries a risk, so be sure to do your own research and only invest what you can afford to lose.

ui in main browser {
    ui html snippet("<style>
  body \{
    background-color: #060606;
  \}
  .log-view \{
    background-color: #282c34!important;
    color: white;
  \}
</style> 
<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/atom-one-dark.min.css\" integrity=\"sha512-Jk4AqjWsdSzSWCSuQTfYRIF84Rq/eV0G2+tu07byYwHcbTGfdmLrHjUSwvzp5HvbiqK4ibmNwdcG49Y5RGYPTg==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\" />

")
    ui log view("Log")
}
define purchase crypto {
    config coinbase("","","")
    set list(%coins,$list from object($get top x coins(10)),"Local")
    with each(%coins,#coin) {
        set(#symbol,$change text casing($object entity(#coin,"symbol"),"Upper Case"),"Local")
        if($is eligable(#symbol)) {
            then {
                set(#exchange,"{#symbol}-USD","Local")
                log("Purchasing: {#symbol}")
                exchange crypto on coinbase(16.67,#exchange,"Buy",#txinfo)
                log(#txinfo)
                wait(1)
            }
            else {
            }
        }
    }
}
define $is eligable(#coin name) {
    return($not($contains("USDT,USDC,BUSD,BNB",#coin name)))
}
purchase crypto()

Published by Seth Turin

Leave a Reply

Your email address will not be published. Required fields are marked *

news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news news