How to solve an "atomic vector" problem when getting data through an API ?

Hi, and welcome!

First off, English is a world language, which is wonderful because it enables many to communicate directly. But it's not one language, it's many, and there's no one, true way to use it. In my country, where most of English speakers are monolingual, there are regional differences in pronunciation and word usage that are sometimes difficult to overcome!

Second, it's not necessary for this problem, but keep in mind the benefits of a reproducible example, called a reprex to attract more and better answers.

An atomic vector is a vector with just one element. When a function is doing something like a binary operator, such as taking a difference, it complains about that.

Here, it looks like the Euro/US$ bid ask spread is zero, which might be the cause.

Can you try when the markets are more active to see if you get the same result? Just eyeballing your csv file, there's a spread always.