public Task <TTTrade> CreateTradeAsync(TTTradeCreate request) { return(PrivateHttpPostAsync <TTTrade, TTTradeCreate>("api/v1/trade", request)); }
/// <summary> /// Create new trade /// </summary> /// <remarks> /// New trade request is described by the filling following fields: /// - **ClientId** (optional) - Client trade Id /// - **Type** (required) - Type of trade. Possible values: `"Market"`, `"Limit"`, `"Stop"` /// - **Side** (required) - Side of trade. Possible values: `"Buy"`, `"Sell"` /// - **Symbol** (required) - Trade symbol (e.g. `"EURUSD"`) /// - **Price** (optional) - Price of the `"Limit"` / `"Stop"` trades (for `Market` trades price field is ignored) /// - **Amount** (required) - Trade amount /// - **StopLoss** (optional) - Stop loss price /// - **TakeProfit** (optional) - Take profit price /// - **ExpiredTimestamp** (optional) - Expiration date and time for pending trades (`"Limit"`, `"Stop"`) /// - **ImmediateOrCancel** (optional) - "Immediate or cancel" flag (works only for `"Limit"` trades) /// - **Comment** (optional) - Client comment /// </remarks> /// <param name="request">Create trade request</param> /// <returns>Created trade</returns> public TTTrade CreateTrade(TTTradeCreate request) { return(ConvertToSync(() => CreateTradeAsync(request).Result)); }