Parameters
Here we will cover some of the Parameters that we will be using to set up some basic trades for Gate using Autoview.
Exchange [e=]
Used for pinpointing what exchange you are trading on. In this case you have 2 options.
Gate [Spot trading] and Gate futures [Futures trading]
e=gate
e=gatefutures
Symbol [s=]
"s=" is used whenever you are referencing an asset you want to trade. This symbol can be copied from the website to ensure you are getting the proper asset you want.
s=BTCUSDT
s=ETHUSDT
Book [b=]
Standard Buy, Sell, Long and Short options.
b=buy (Spot Trading)
b=sell (Spot Trading)
b=long (Margin Trading)
b=short (Margin Trading)
Price [p=]
The amount to undercut (negative) or overcut (positive) is the top order of the book.
When using this, enter the appropriate amount for the asset you are trading.
In some cases, you may see a negative input [Ex: p=-1%]. It is only relevant to your take profit, as a negative, when closing a short position.
p=20% (Price based on a percentage)
p=120 (Price based on a number)
b=buy p=-1% (Place buy 1% below the current price)
b=sell p=20 (Place sell $20 above the current price)
Quantity [q=]
The portion of your wallet balance or position you would like to affect.
q=10% (Price based on a percentage)
q=50 (Price based on a number)
Order Type [t=]
There are various order types that can be used within your command to select what type of trade you want.
Gate.io API does not support the standard t=market parameter. Instead, you would use t=fok or t=ioc
t=limit (Limit: Order will be placed in the books to await being filled)
t=fok (FOK: Fill Or Kill orders will either completely fill or be aborted)
t=ioc (IOC Immediate Or Cancel orders can be partially or completely filled, but any remaining portion is cancelled.
Trigger Price [px=]
px= sets the trigger price for the stop-limit you place. You can use a percentage value or a set number value.
In some cases you will want to use px to take profit, for this you would use minus symbol (-).
Example: px=-1% (One percent representing the take profit price you would want)
px=10%
px=120
px=-1% (Sets the take profit price)
Fixed Trailed Stop [fts=]
Used to set a fixed trailing stop in your market order.
fts=2048.04 (Sets your fixed price)
Order Examples
Below will be a set of examples using some of the parameters mentioned above.
We will be stringing some of them together to form different types of orders.
These examples should help you start opening basic and/or advanced orders in Gateio with Autoview/TradingView.
We will be using gate for the exchange type in these examples.
Basic buy order
e=gate b=buy s=SHIB_USDT q=1.5
Open a long/short limit
e=gate s=btcusdt b=long q=10% p=10%
e=gate s=btcusdt b=short q=10% p=-10%
Open a long/short market
e=gate s=btcusdt b=long q=1 t=market
e=gate s=btcusdt b=short q=1 t=market
Open a long with a stop-limit/market
e=gate s=btcusdt b=long q=10% px=10% p=20%
e=gate s=btcusdt b=long q=10% px=10% t=market
Open a short with a stop-limit/market
e=gate s=btcusdt b=short q=10% px=-10% p=-20%
e=gate s=btcusdt b=short q=10% px=-10% t=market
Close position with a stop-loss
e=gate s=btcusdt b=long c=position px=-10% sl=-20%
e=gate s=btcusdt b=long c=position px=-10% t=market
e=gate s=btcusdt b=short c=position px=10% sl=20%
e=gate s=btcusdt b=short c=position px=10% t=market
Close position with take profit
e=gate s=btcusdt b=long c=position p=4%
e=gate s=btcusdt b=short c=position p=-4%
One Cancels the Other [oco=]
Unfortunately, Gate.io API doesn't support oco.
You can replicate an OCO order by using Reduce only.
Reduce Only [ro=1]
e=gate s=ethusdt b=long q=1 tp=10% ro=1 t=ioc
Close Position and reverse your order
This example below shows us how to tell Autoview to close the previous position before opening the opposite (reversed)
Long Position
e=gate s=ethusdt b=short c=position t=market
e=gate s=ethusdt b=long q=1 t=market
Reversed Short Position
e=gate s=ethusdt b=long c=position t=market
e=gate s=ethusdt b=short q=1 t=market
Order Examples
Below will be a set of examples using some of the parameters mentioned above.
We will be stringing some of them together to form different types of orders.
These examples should help you get started with opening basic and or advanced orders in Gate.io with Autoview/TradingView.
If you wish to trade using the Live markets use e=gate
Open a long/short limit
e=gate s=btcusdt b=long q=10% p=10%
e=gate s=btcusdt b=short q=10% p=-10%
Open a long/short market
e=gate s=btcusdt b=long q=1 t=market
e=gate s=btcusdt b=short q=1 t=market
Open a long with a stop-limit/market
e=gate s=btcusdt b=long q=10% px=10% p=20%
e=gate s=btcusdt b=long q=10% px=10% t=market
Open a short with a stop-limit/market
e=gate s=btcusdt b=short q=10% px=-10% p=-20%
e=gate s=btcusdt b=short q=10% px=-10% t=market
Close position with a stop-loss
e=gate s=btcusdt b=long c=position px=-10% sl=-20%
e=gate s=btcusdt b=long c=position px=-10% t=market
e=gate s=btcusdt b=short c=position px=10% sl=20%
e=gate s=btcusdt b=short c=position px=10% t=market
Close position with take profit
e=gate s=btcusdt b=long c=position p=4%
e=gate s=btcusdt b=short c=position p=-4%
Open a new order with OCO [RO]
e=gate s=btcusdt b=long q=1 ro=1 sl=-2% p=2%
e=gate s=btcusdt b=short q=1 ro=1 sl=2% p=-2%
Close Position with OCO [RO]
e=gate s=btcusdt b=long c=position ro=1 sl=-2% tp=3%
e=gate s=btcusdt b=short c=position ro=1 sl=10% tp=-10%
Open a new order with OSO
b=long oso=1 p=-1% px=-2% sl=-2% tp=3%
p= sets the entry price
px= sets stop loss trigger
sl= sets stop loss price
tp= sets take profit price
You can also use it with just tp or just sl.
b=long oso=1 p=-1% px=-2% sl=-2%
Or
b=long oso=1 p=-1% tp=3%
e=gate s=btcusdt b=long oso=1 p=-1% px=-2% t=market
Close Position and reverse your order
This example below shows us how to tell Autoview to close the previous position before opening the opposite (reversed)
Long Position
e=gate s=btcusdt b=short c=position t=market
e=gate s=btcusdt b=long q=1 t=market
Reversed Short Position
e=gate s=btcusdt b=long c=position t=market
e=gate s=btcusdt b=short q=1 t=market
Comments
0 comments
Please sign in to leave a comment.