~~Title: Binance Spot & Margin~~
{{tag>guides}}
==== Example Syntax for Binance Spot ====
It is always recommended to use testnet/sandbox first!
# ~~codedoc:clean:either buy ETC using 10% of your BTC balance (side=buy) or sell 10% of your ETC balance for BTC (side=sell)~~
ex=binance symbol=ETCBTC
[side]=10% type=market
# ~~codedoc:clean:place TP & SL market stop orders on the opposite side (as OCO - one cancels other)~~
# ~~codedoc:clean:note: beware of how quantity works here as its based on the opposite spot balance!~~
delay=2s
[!side]=100% sl=[-]2% tp=[+]2% type=market
**Note:** Make sure to use "buy" and "sell" in the PV alert name and when using the manual run/test buttons press the Alt key so the [side] placeholder uses buy/sell instead of long/short!
''Quantity, stoploss and takeprofit have to be adjusted to your strategy / personal needs!''
\\
==== Balance Transfers ====
# ~~codedoc:clean:transfer 10 ETC from your *spot balance* to your *cross margin* balance~~
transfer=ETC quantity=10 y=spot
# ~~codedoc:clean:transfer ALL of your ETC from your ETCBTC *isolated margin* balance to your *spot balance*~~
transfer=ETC quantity=100% symbol=ETCBTC iso=1 yield=margin
# ~~codedoc:clean:transfer one quarter (25%) of your ETC from your *spot balance* to your ETCBTC *isolated margin* balance~~
transfer=ETC quantity=25% symbol=ETCBTC iso=1 yield=spot
==== Margin Loan/Borrow ====
# ~~codedoc:clean:apply for the maximum margin loan (100% of borrowable) for your ETC *cross margin* balance~~
loan=ETC quantity=100%
# ~~codedoc:clean:apply for the maximum margin loan (100% of borrowable) for the ETC part of your ETCBTC *isolated margin* balance~~
loan=ETC quantity=100% symbol=ETCBTC iso=1
==== Spot Margin Trades (Auto-Borrow) ====
# ~~codedoc:clean:place a *cross margin* limit buy order in the ETCBTC market and *auto-borrow* the maximum margin loan (100% of borrowable)~~
long=100% symbol=ETCBTC mt=borrow
# ~~codedoc:clean:place a *isolated margin* limit buy order in the ETCBTC market and *auto-borrow* the maximum margin loan (100% of borrowable)~~
long=100% symbol=ETCBTC mt=borrow iso=1
=== Attention ===
Always double check that you are using the right syntax/alert!