tests/testthat/test-fx-quote.R

test_that("can get a fx quote", {
  skip_if_no_token()

  x <- riingo_fx_quote(c("audusd", "jpyusd"))

  cols <- c(
    "index", "quoteTimestamp", "bidPrice", "bidSize",
    "askPrice", "askSize", "midPrice"
  )

  expect_true(all(cols %in% names(x)))
})

Try the riingo package in your browser

Any scripts or data that you put into this service are public.

riingo documentation built on Sept. 13, 2020, 5:15 p.m.