rib: Helper Functions for TWS

ribR Documentation

Helper Functions for TWS

Description

Several convenience functions for connecting synchronously to the TWS.

Usage


executions(port = 7496, clientId = 1)
order_status(port = 7496, clientId = 1)

Arguments

port

integer

clientId

integer

Details

The functions follow the same pattern: connect to the TWS, send requests, receive and process results, and disconnect. Results are typically arranged as data frames.

Warning: these functions are very experimental, and returned results may change.

Value

A data.frame. If there are no executions, orders or positions, the functions return NULL invisibly.

Author(s)

Enrico Schumann

References

https://www.interactivebrokers.com/campus/ibkr-api-page/twsapi-doc/

See Also

ib_hist_data

Examples



  ## Functions require an account with Interactive Brokers
  ## and a running TWS.

  executions(port = 7496)

  ## fetch details for contract via ISIN + market
  contr <- rib::Contract
  contr$secIdType <- "ISIN"
  contr$secId <- "DE0005557508"
  contr$exchange <- "IBIS"
  contr <- contract_details(contr)


enricoschumann/IButils documentation built on Dec. 11, 2024, 3:03 p.m.