~~Title: Spot Market Snippets~~
{{tag>guides}}
==== Double Buy in (DCA) ====
It is always recommended to use testnet/sandbox first!
ex=ftx sym=lunausd
#~~codedoc:clean: first we do a "fake" sell of all luna (base currency) to save the current total balance in the "lastqty" variable...~~
sell=100% disabled save
buy=lastqty@ type=limit
#~~codedoc:clean: ... then we place a limit buy using the absolute quantity we just saved, effectively doubling our balance (spot "position")~~
=== Attention ===
Always double check that you are using the right syntax/alert!