Basic Long Position Example
Complete example of opening a long position with stop loss and take profit.
Simple Market Order
{
"strategy_key": "your_encrypted_strategy_key_here",
"exchange": "BINANCE",
"ticker": "BTCUSDT.P",
"position_side": "LONG",
"action": "BUY",
"entry_order_type": "MARKET",
"stop_loss_price": 48000,
"take_profit_price": 55000,
"leverage": 10
}
Limit Order with Specific Entry
{
"strategy_key": "your_encrypted_strategy_key_here",
"exchange": "BINANCE",
"ticker": "BTCUSDT.P",
"position_side": "LONG",
"action": "BUY",
"entry_price": 50000,
"entry_order_type": "LIMIT",
"stop_loss_price": 48000,
"take_profit_price": 55000,
"leverage": 10,
"trade_id": "BTC_LONG_001"
}
With Trailing Stop
{
"strategy_key": "your_encrypted_strategy_key_here",
"exchange": "BINANCE",
"ticker": "BTCUSDT.P",
"position_side": "LONG",
"action": "BUY",
"entry_price": 50000,
"stop_loss_price": 48000,
"take_profit_price": 53000,
"is_trailing_stop_enabled": true,
"callback_rate": 1.0,
"leverage": 10
}
Conservative Entry (Low Leverage)
{
"strategy_key": "your_encrypted_strategy_key_here",
"exchange": "BINANCE",
"ticker": "BTCUSDT.P",
"position_side": "LONG",
"action": "BUY",
"entry_price": 50000,
"stop_loss_price": 49000,
"take_profit_price": 52000,
"leverage": 3,
"margin_mode": "isolated"
}