Skip to content

Commit 6743e85

Browse files
committed
fix str
1 parent 5aa682c commit 6743e85

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

include/tigerapi/trade_client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace TIGER_API {
2424
* @param base_currency 币种
2525
* @return
2626
*/
27-
value get_prime_asset(const utility::string_t & account = U(""), const string& base_currency = U("USD"));
27+
value get_prime_asset(const utility::string_t & account = U(""), const utility::string_t & base_currency = U("USD"));
2828

2929
value get_prime_asset(const utility::string_t &account, Currency base_currency = Currency::USD);
3030

src/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,26 +276,26 @@ class TestQuoteClient {
276276

277277

278278
static void test_get_option_brief(std::shared_ptr<QuoteClient> quote_client) {
279-
value result = quote_client->get_option_brief(U("AAPL 220923C000155000"));
279+
value result = quote_client->get_option_brief(U("AAPL 230317C000135000"));
280280
cout << U("result: ") << result << endl;
281281
}
282282

283283
static void test_get_option_kline(std::shared_ptr<QuoteClient> quote_client) {
284284
value identifiers = value::array();
285-
identifiers[0] = value::string(U("AAPL 220923C000155000"));
285+
identifiers[0] = value::string(U("AAPL 230317C000135000"));
286286
value result = quote_client->get_option_kline(identifiers);
287287
cout << U("result: ") << result << endl;
288288
}
289289

290290
static void test_get_option_trade_tick(std::shared_ptr<QuoteClient> quote_client) {
291291
value identifiers = value::array();
292-
identifiers[0] = value::string(U("AAPL 230923C000155000"));
292+
identifiers[0] = value::string(U("AAPL 230317C000135000"));
293293
value result = quote_client->get_option_trade_tick(identifiers);
294294
cout << U("result: ") << result << endl;
295295
}
296296

297297
static void test_quote(const std::shared_ptr<QuoteClient> quote_client) {
298-
TestQuoteClient::test_grab_quote_permission(quote_client);
298+
TestQuoteClient::test_get_option_brief(quote_client);
299299
}
300300
};
301301

src/utils.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ std::tuple<std::string, std::string, std::string, double> extract_option_info(co
288288
if (!identifier.empty()) {
289289
std::regex pattern(R"((\w+)\s*(\d{6})([CP])(\d+))");
290290
std::smatch matches;
291-
292291
if (std::regex_search(identifier, matches, pattern) && matches.size() == 5) {
293292
utility::string_t underlying_symbol = matches[1];
294293
utility::string_t expiry = U("20") + matches[2].str();

0 commit comments

Comments
 (0)