Skip to content

Commit

Permalink
Added time_in_force IOC and FOK
Browse files Browse the repository at this point in the history
  • Loading branch information
augustohassel committed Jun 27, 2019
1 parent d62c513 commit 48f24b1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rRofex
Type: Package
Title: Interface to ROFEX APIs
Version: 0.0.0.9006
Version: 0.0.0.9007
Authors@R: c(
person("Augusto", "Hassel", role = c("aut", "cre"), email = "[email protected]"))
Description: Provides a convenient wrapper for consuming data from ROFEX APIs: Trading API, Risk API and BackOffice API.
Expand Down
6 changes: 3 additions & 3 deletions R/primary_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ trading_mdh <- function(market_id='ROFX', symbol, date, date_from, date_to) {
#'@param time_in_force String. Specifies how long the order remains in effect. Absence of this field is interpreted as 'Day':
#'\itemize{
#'\item Day. Day or session.
#'\item IOC. Immediate or Cancel. (Not Available)
#'\item FOK. Fill or Kill. (Not Available)
#'\item IOC. Immediate or Cancel.
#'\item FOK. Fill or Kill.
#'\item GTD. Good Till Date. (Not Available)
#'}
#'@param account String. Account Number / Account ID.
Expand All @@ -284,7 +284,7 @@ trading_new_order <- function(symbol, side, quantity, price, order_type='Limit',
if (!order_type %in% c("Limit", "MLL")) stop("Invalid 'order_type' parameter")

if (!time_in_force %in% c("Day", "IOC", "FOK", "GTD")) stop("Invalid 'time_in_force' parameter")
if (time_in_force %in% c("IOC", "FOK", "GTD")) stop("Parameter 'time_in_force' not yet available.")
if (time_in_force %in% c("GTD")) stop("Parameter 'time_in_force' not yet available.")

if (missing(account)) stop("You should pick a 'account' to move forward.")

Expand Down
4 changes: 2 additions & 2 deletions man/trading_new_order.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 48f24b1

Please sign in to comment.