dot-rp_make_ord_payload: Build Single-Leg Order Payload (Internal)

.rp_make_ord_payloadR Documentation

Build Single-Leg Order Payload (Internal)

Description

Build Single-Leg Order Payload (Internal)

Usage

.rp_make_ord_payload(
  ticker,
  symType,
  orderId = NULL,
  side = NULL,
  ordType = NULL,
  timeInForce = NULL,
  expirationTime = NULL,
  qty = NULL,
  amt = NULL,
  lmtPrc = NULL,
  stopPrc = NULL,
  openCloseIndicator = NULL
)

Arguments

ticker

= (string) Ticker symbol: ex. 'SPY'

symType

= (string) Symbol type: ex. 'EQUITY'

orderId

= (string) The order ID

side

= (string) The Order Side BUY/SELL. For Options also include the openCloseIndicator

ordType

= (string) The Type of order: 'MARKET', 'LIMIT', 'STOP', 'STOP_LIMIT'

timeInForce

= (string) The time in for the order: 'DAY' or 'GTD"

expirationTime

= (string) The expiration date. Only used when timeInForce is GTD, cannot be more than 90 days in the future

qty

= (string) The order quantity. Used when buying/selling whole shares and when selling fractional. Mutually exclusive with amount

amt

= (string) The order amount. Used when buying/selling shares for a specific notional value

lmtPrc

= (string) The limit price. Used when orderType = LIMIT or orderType = STOP_LIMIT

stopPrc

= (string) The stop price. Used when orderType = STOP or orderType = STOP_LIMIT

openCloseIndicator

= (string) Used for options only. Indicates if this is BUY to OPEN/CLOSE

Value

Returns an appropriate payload list for a single-leg order

Examples

## Not run: 
  # Return the proper order payload for single-leg orders
  .rp_make_ord_payload(under_sym="IWM", symType = "EQUITY", orderId = rp_getOrderId(), 
                       side="BUY", orderType="LIMIT", timeInForce="GTD", 
                       expirationTime ="2023-11-07T05:31:56Z", qty=1.735, lmtPrc="200.00")

## End(Not run)

rPublic documentation built on Aug. 23, 2025, 1:12 a.m.