lastPriceToBestOrders: Match last trades data with best bids and best asks

View source: R/liquidity_cryptowat.R

lastPriceToBestOrdersR Documentation

Match last trades data with best bids and best asks

Description

This function matches last trades data with best bids and best asks

Usage

lastPriceToBestOrders(market, pair, sourceDirectory)

Arguments

market

is the required exchange

pair

is the required exchange rate pair

sourceDirectory

is the directory path best_orders.csv and trades.csv files are located (and where the matched.csv file will be saved)

Details

This function matches last trades data (from trades.csv) with best bids and best asks (from best_orders.csv) and save the matched data in the matched.csv file

Examples

## Not run: 
data_file<-system.file("extdata", package = "bitcoinFinance")
prepareTradesFromDirectory("coinbase","btcusd",data_file,data_file)
prepareOrders("coinbase","btcusd",data_file,data_file)
prepareBestOrders ("coinbase","btcusd",data_file )
lastPriceToBestOrders ("coinbase","btcusd",data_file )

## End(Not run)

deanfantazzini/bitcoinFinance documentation built on June 12, 2024, 4:10 p.m.