All Projects → matbarofex → rRofex

matbarofex / rRofex

Licence: Unknown, MIT licenses found Licenses found Unknown LICENSE MIT LICENSE.md
R library to connect to Matba Rofex's Trading API. Functionality includes accessing account data and current holdings, retrieving investment quotes, placing and canceling orders, and getting reference data for instruments.

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to rRofex

Ta Rs
Technical analysis library for Rust language
Stars: ✭ 248 (+1080.95%)
Mutual labels:  finance, market-data
korbit-python
Korbit API wrapper for Python
Stars: ✭ 17 (-19.05%)
Mutual labels:  finance, trading-api
dados-financeiros
Repositório de Fontes de Dados Financeiros do Brasil
Stars: ✭ 119 (+466.67%)
Mutual labels:  finance, market-data
pinance
Python module(s) to get stock data, options data and news.
Stars: ✭ 70 (+233.33%)
Mutual labels:  finance, market-data
Mplfinance
Financial Markets Data Visualization using Matplotlib
Stars: ✭ 1,043 (+4866.67%)
Mutual labels:  finance, market-data
TraderBot
No description or website provided.
Stars: ✭ 39 (+85.71%)
Mutual labels:  finance, market-data
Order-Book-Matching-Engine
Order Book Matching Engine for Stock Exchanges (1us latency for matching)
Stars: ✭ 112 (+433.33%)
Mutual labels:  finance, trading-api
Sumzerotrading
A Java API for Developing Automated Trading Applications for the Equity, Futures, and Currency Markets
Stars: ✭ 128 (+509.52%)
Mutual labels:  trading-api, market-data
Iex Api Python
A python wrapper for the IEX API
Stars: ✭ 41 (+95.24%)
Mutual labels:  finance, market-data
Iex Api
The IEX API provides any individual or academic, public or private institution looking to develop applications that require stock market data to access near real-time quote and trade data for all stocks trading on IEX.
Stars: ✭ 683 (+3152.38%)
Mutual labels:  finance, market-data
rb3
A bunch of downloaders and parsers for data delivered from B3
Stars: ✭ 52 (+147.62%)
Mutual labels:  finance, market-data
Degiroapi
An unofficial API for the trading platform Degiro, with the ability to get real time data and historical data
Stars: ✭ 114 (+442.86%)
Mutual labels:  finance, trading-api
Coinapi Sdk
SDKs for CoinAPI
Stars: ✭ 238 (+1033.33%)
Mutual labels:  trading-api, market-data
Tosdatabridge
A collection of resources for pulling real-time streaming data off of TDAmeritrade's ThinkOrSwim(TOS) platform; providing C, C++, Java and Python interfaces.
Stars: ✭ 229 (+990.48%)
Mutual labels:  finance, market-data
Shioaji
Shioaji all new cross platform api for trading ( 跨平台證券交易API )
Stars: ✭ 203 (+866.67%)
Mutual labels:  trading-api, market-data
IEXSharp
IEX Cloud API for C# and other .net languages. Supports SSE streaming
Stars: ✭ 87 (+314.29%)
Mutual labels:  finance, market-data
ibkr
Interactive Brokers wrapper 🚩
Stars: ✭ 34 (+61.9%)
Mutual labels:  trading-api, market-data
Yahooquery
Python wrapper for an unofficial Yahoo Finance API
Stars: ✭ 288 (+1271.43%)
Mutual labels:  finance, market-data
Iextrading4j
IEX Cloud open source API wrapper
Stars: ✭ 112 (+433.33%)
Mutual labels:  finance, market-data
Trade Frame
c++ based application for testing options based automated trading ideas using DTN IQ real time data feed and Interactive Brokers (TWS API) for trade execution.
Stars: ✭ 187 (+790.48%)
Mutual labels:  finance, market-data

rRofex

Lifecycle: maturing Travis build status CRAN status CRAN RStudio mirror downloads

With this package, you will be able to execute API calls to the ‘Matba Rofex’ trading platform.

The main functionalites include:accessing account data and current holdings, retrieving investment quotes, placing and canceling orders, and getting reference data for instruments.

You can find the complete documentation under https://apihub.primary.com.ar/

Installation

# To install the package you just need to use the command:
install.packages("rRofex")

# Then load it with
library(rRofex)

Development version

You can use the development version to try new features or bug fixes directly from GitHub.

# 1. In R install the package `devtools`.
install.packages("devtools")

# 2. Once `devtools` is installed, install `rRofex`
library(devtools)
devtools::install_github("matbarofex/rRofex")

# 3. Then load it with
library(rRofex)

References

At the present we provide two libraries for ingesting data from Matba Rofex:

  • rRofex: methods for trading.
  • acyRsa: methods for accessing Back Office data from ACyRSA

Summary of actions for trading

These are the currently available actions within the library:

  • Authentication
  • Reference data request
  • Real-time and historical market data request
  • Orders placement
  • Orders management
  • Account information request
  • Websocket methods

Environments:

  • Demo Environment: go to reMarkets to get free credentials.
  • Production: for credentials please contact: [email protected] for more information.
  • Production - xOMS: please contact your broker for credentials.

Connection Protocols

There are currently three standard protocols that are being used to connecting to the market::

  1. REST. Inside this library most methods use this protocol internaly.
  2. Websocket. The methods have the suffix ‘ws’ inside it’s name.
  3. FIX. We don’t have any short term plans to develop this wrapper.

Examples

1. Authentication

There are different environment on which one can connect to.

For paper trading exists reMarkets. If you go there, you will be able to get free credentials to start trading with a demo account.

If you already have a live trading account with a broker, you should ask them what kind of order management system (OMS) do they use. If they have the suite of Primary, then you will have to ask them for the user, password and base_url.

# Using `trading_login()` you will be able to connect. 
# You will need to use this object in each request made. You can have multiple connections simultaneously.
conn <- trading_login(
  username = XXX, 
  password = XXX, 
  base_url ='https://api.remarkets.primary.com.ar'
  )

# The connection is valid only for the day, you can get your log in information with `login_date_time()`
login_date_time(conn)

2. Reference Data

There are many types of request that you can make in order to get reference data. The basic one is to ask for a detailed list of every listed instrument.

# You can get a complete Reference Data list with details
trading_instruments(
  connection = conn, 
  request = "securities", 
  sec_detailed = T
  )

# If you are interested only in the front month of each contract of features, you can try
trading_instruments_fronts(connection = conn)

# If you only want equities
trading_instruments(
  connection = conn, 
  request = "by_type", 
  sec_type = "E"
  )

3. Market Data

You can access real time market data and historical market data. There is a version with Websocket being developed.

# Real Time Prices using the REST protocol
trading_md(
  connection = conn, 
  symbol = "DODic20"
  )

# Historical Trades
trading_mdh(
  connection = conn, 
  symbol = "DOJul20", 
  date_from = "2020-02-06", 
  date_to = "2020-03-06"
  )

4. Order Placement

With the method trading_new_order() you will be able to trade on the market. The basic order type is as follows:

trading_new_order(
  connection = conn, 
  account = "XXX", 
  symbol = "DOEne21", 
  side = "Buy", 
  quantity = 10, 
  price = 92.14
  )

5. Order Management

If you want to know the status of your arder, you will need ths method:

trading_orders(
  connection = conn, 
  account = "XXX"
  )

6. Account Information

With trading_account() and trading_account_report() you will be able to obtain information about your current position in terms of instruments and in terms of cash and settlement dates.

# With trading account you can get the information about your basket
trading_account(
  connection = conn, 
  account = "XXX"
  )

# With trading account report you can have your cash, margins, etc.
trading_account_report(
  connection = conn, 
  account = "XXX"
  )

7. Websocket Methods

Instead of requesting information using REST protocol, you could get it through Websocket. This means, that you can listen to an object and be notified every time that a change has been made.

The methods available in Websocket protool are:

  • Listen to Market Data with trading_ws_md()
  • Listen to Order status with trading_ws_orders()
  • Close Websocket connections with trading_ws_close()

Acknowledgments

Development of this software was driven by Primary as part of an Open Source initiative of Matba Rofex.

Author/Maintainer

Internal Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].