Longbridge OpenAPI C++ SDK
asset_context.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "async_result.hpp"
4 #include "callback.hpp"
5 #include "config.hpp"
6 #include "types.hpp"
7 
9 
10 namespace longbridge {
11 namespace asset {
12 
15 {
17  int32_t dt;
19  std::string file_key;
20 };
21 
24 {
26  std::string url;
27 };
28 
31 {
32 private:
33  const lb_asset_context_t* ctx_;
34 
35 public:
41 
43 
44  static AssetContext create(const Config& config);
45 
47  void statements(
48  int32_t statement_type,
49  int32_t start_date,
50  int32_t limit,
51  AsyncCallback<AssetContext, std::vector<StatementItem>> callback) const;
52 
55  const std::string& file_key,
57  const;
58 };
59 
60 } // namespace asset
61 } // namespace longbridge
struct lb_asset_context_t lb_asset_context_t
Definition: asset_context.hpp:8
Definition: config.hpp:16
Asset context.
Definition: asset_context.hpp:31
AssetContext & operator=(const AssetContext &ctx)
AssetContext(const AssetContext &ctx)
void statements(int32_t statement_type, int32_t start_date, int32_t limit, AsyncCallback< AssetContext, std::vector< StatementItem >> callback) const
Get statement data list.
void statement_download_url(const std::string &file_key, AsyncCallback< AssetContext, StatementDownloadUrlResponse > callback) const
Get statement data download URL.
AssetContext(AssetContext &&ctx)
AssetContext(const lb_asset_context_t *ctx)
static AssetContext create(const Config &config)
Definition: alert_context.hpp:9
std::function< void(AsyncResult< Ctx, T >)> AsyncCallback
Definition: async_result.hpp:48
Statement download URL response.
Definition: asset_context.hpp:24
std::string url
Presigned download URL.
Definition: asset_context.hpp:26
Statement item.
Definition: asset_context.hpp:15
std::string file_key
File key.
Definition: asset_context.hpp:19
int32_t dt
Statement date (integer, e.g. 20250301)
Definition: asset_context.hpp:17