Simplified trade options for high-level API.
Provides an easy-to-use interface for common trading parameters without dealing with the low-level scaled price representations.
const options: TradeOptions = { stopLoss: 2.50, // Stop at $2.50 takeProfit: 3.00, // Take profit at $3.00 trailingStop: 10 // 10-pip trailing stop};await client.buy('AAPL.US', 100, options); Copy
const options: TradeOptions = { stopLoss: 2.50, // Stop at $2.50 takeProfit: 3.00, // Take profit at $3.00 trailingStop: 10 // 10-pip trailing stop};await client.buy('AAPL.US', 100, options);
Optional
Trade amount in currency (alternative to volume)
Stop loss price (as decimal number)
Take profit price (as decimal number)
Trailing stop distance in pips
Simplified trade options for high-level API.
Provides an easy-to-use interface for common trading parameters without dealing with the low-level scaled price representations.
Example