Skip to content

Commit f1b64de

Browse files
committed
moving using json into alpaca namespace to avoid global conflict
1 parent f2388d5 commit f1b64de

22 files changed

Lines changed: 44 additions & 43 deletions

‎core/include/alpaca/data/auction.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
#include <alpaca/data/bar.hpp>
1414
#include <alpaca/utils.hpp>
1515

16-
using json = nlohmann::json;
17-
1816
namespace alpaca {
1917

18+
using json = nlohmann::json;
19+
2020
/// One opening or closing auction print.
2121
struct auction_entry {
2222
uint64_t timestamp = 0; ///< `t` — nanoseconds since the Unix epoch

‎core/include/alpaca/data/corporate_action.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#include <alpaca/common.hpp>
1515
#include <alpaca/utils.hpp>
1616

17-
using json = nlohmann::json;
18-
1917
namespace alpaca {
2018

19+
using json = nlohmann::json;
20+
2121
#define ALPACA_CORPORATE_ACTION_TYPE(X, N) \
2222
X(N, reverse_split, "reverse_split") \
2323
X(N, forward_split, "forward_split") \

‎core/include/alpaca/data/fixed_income.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
#include <alpaca/data/bar.hpp>
1212
#include <alpaca/utils.hpp>
1313

14-
using json = nlohmann::json;
15-
1614
namespace alpaca {
1715

16+
using json = nlohmann::json;
17+
1818
/// A bond price. `GET /v1beta1/fixed_income/latest/prices`.
1919
struct fixed_income_price {
2020
uint64_t timestamp = 0; ///< `t` — nanoseconds since the Unix epoch

‎core/include/alpaca/data/forex.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
#include <alpaca/data/bar.hpp>
1616
#include <alpaca/utils.hpp>
1717

18-
using json = nlohmann::json;
19-
2018
namespace alpaca {
2119

20+
using json = nlohmann::json;
21+
2222
/// A currency-pair rate. `GET /v1beta1/forex/rates` and `/v1beta1/forex/latest/rates`.
2323
struct forex_rate {
2424
uint64_t timestamp = 0; ///< `t` — nanoseconds since the Unix epoch

‎core/include/alpaca/data/news.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#include <alpaca/common.hpp>
1515
#include <alpaca/utils.hpp>
1616

17-
using json = nlohmann::json;
18-
1917
namespace alpaca {
2018

19+
using json = nlohmann::json;
20+
2121
/// An image attached to a news article, in one of three sizes.
2222
struct news_image {
2323
std::string size; ///< "thumb", "small" or "large"

‎core/include/alpaca/data/orderbook.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
#include <alpaca/data/bar.hpp>
1313
#include <alpaca/utils.hpp>
1414

15-
using json = nlohmann::json;
16-
1715
namespace alpaca {
1816

17+
using json = nlohmann::json;
18+
1919
/// One price level of a crypto order book.
2020
struct orderbook_level {
2121
double price = 0.; ///< `p`

‎core/include/alpaca/data/quote.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
#include <alpaca/data/bar.hpp>
1414
#include <alpaca/utils.hpp>
1515

16-
using json = nlohmann::json;
17-
1816
namespace alpaca {
1917

18+
using json = nlohmann::json;
19+
2020
/// A top-of-book bid/ask pair. Shared by stocks, crypto and options; options send a single
2121
/// condition string where stocks send an array, and both are accepted.
2222
struct quote {

‎core/include/alpaca/data/screener.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
#include <alpaca/utils.hpp>
1414

15-
using json = nlohmann::json;
16-
1715
namespace alpaca {
1816

17+
using json = nlohmann::json;
18+
1919
/// One entry of `GET /v1beta1/screener/stocks/most-actives`.
2020
struct most_active {
2121
std::string symbol;

‎core/include/alpaca/data/snapshot.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
#include <alpaca/data/trade.hpp>
1414
#include <alpaca/utils.hpp>
1515

16-
using json = nlohmann::json;
17-
1816
namespace alpaca {
1917

18+
using json = nlohmann::json;
19+
2020
/// Everything currently known about a symbol in one response.
2121
/// `GET /v2/stocks/snapshots` and the crypto equivalent.
2222
struct snapshot {

‎core/include/alpaca/data/trade.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
#include <alpaca/data/bar.hpp>
1414
#include <alpaca/utils.hpp>
1515

16-
using json = nlohmann::json;
17-
1816
namespace alpaca {
1917

18+
using json = nlohmann::json;
19+
2020
/// A single execution.
2121
///
2222
/// One struct covers stocks, crypto and options even though the three differ slightly on

0 commit comments

Comments
 (0)