You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ int main() {
109
109
return 0;
110
110
}
111
111
```
112
-
To run this program, replace `$YOUR_API_KEY` with an actual API key.
112
+
To run this program, set the `DATABENTO_API_KEY` environment variable with an actual API key.
113
113
114
114
### Historical
115
115
@@ -123,7 +123,7 @@ Here is a simple program that fetches 10 minutes worth of historical trades for
123
123
usingnamespacedatabento;
124
124
125
125
intmain() {
126
-
auto client = HistoricalBuilder{}.SetKey("$YOUR_API_KEY").Build();
126
+
auto client = HistoricalBuilder{}.SetKeyFromEnv().Build();
127
127
auto print_trades = [](const Record& record) {
128
128
const auto& trade_msg = record.Get<TradeMsg>();
129
129
std::cout << trade_msg << '\n';
@@ -136,7 +136,7 @@ int main() {
136
136
}
137
137
```
138
138
139
-
To run this program, replace `$YOUR_API_KEY` with an actual API key.
139
+
To run this program, set the `DATABENTO_API_KEY` environment variable with an actual API key.
140
140
141
141
Additional example standalone executables are provided in the [examples](./examples) directory.
142
142
These examples can be compiled by enabling the cmake option `DATABENTO_ENABLE_EXAMPLES` with `-DDATABENTO_ENABLE_EXAMPLES=1` during the configure step.
0 commit comments