{"id":7025,"date":"2025-08-28T22:11:59","date_gmt":"2025-08-29T03:11:59","guid":{"rendered":"https:\/\/librarytestdev.wpenginepowered.com\/?post_type=doc&#038;p=7025"},"modified":"2025-09-04T17:17:24","modified_gmt":"2025-09-04T22:17:24","slug":"downloading-fills-2","status":"publish","type":"doc","link":"https:\/\/library-staging.tradingtechnologies.com\/apis\/tt-core-sdk\/working-with-orders-and-fills\/downloading-fills-2\/","title":{"rendered":"Downloading Fills"},"content":{"rendered":"\n<p>\n  For efficiency reasons, TT Core SDK does not hold fills in\n  memory. If you need to access past fills, you:\n<\/p>\n\n<ul>\n  <li>\n    Create a class that is derived from\n    ttsdk::IFillDownloadCallbackHandlerPtr and defines your\n    event handler. You must provide implementations for:\n    <ul>\n      <li>\n        virtual void OnDownloadComplete(const DownloadResult\n        code, HistoricalFillCollectionPtr orders, const char*\n        message) = 0;\n        <ul>\n          <li>\n            Callback fired when the fill download is completed\n          <\/li>\n        <\/ul>\n      <\/li>\n    <\/ul>\n  <\/li>\n  <li>\n    Call the DownloadFills() function passing your event handler\n    instance variable and other query parameters.\n  <\/li>\n<\/ul>\n\n<p>\n  The following code snippet demonstrates an example of this\n  process.\n<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\">\n  <div class=\"highlight\">\n    <pre class=\"highlight\"><code>\n\nclass FillObserver : public ttsdk::IFillDownloadCallbackHandlerPtr\n{\n  public:\n    \tFillObserver() {}\n\n    \tvirtual void OnDownloadComplete(const DownloadResult code,\n                      HistoricalFillCollectionPtr fills, const char* message)\n\t    {\n\t\t          if (code == DownloadResult.SUCCESS)\n              {\n                    for (size_t i = 0; i GetCount(); i++)\n                    {\n                            FillPtr fill = fills-&gt;GetFill(i);\n                            ExecutionReportPtr er = fill-&gt;GetExecutionReport();\n                            std::cout GetOrderId()\n                                  GetCumQty()\n                                  <\/code><\/pre>\n                  <\/div>\n                <\/div>\n","protected":false},"excerpt":{"rendered":"<p>For efficiency reasons, TT Core SDK does not hold fills in memory. If you need to access past fills, you: Crea [&hellip;]<\/p>\n","protected":false},"author":2,"template":"wp-custom-template-single-doc-tt-core-sdk","meta":{"_acf_changed":false,"footnotes":""},"docs-category":[448],"class_list":["post-7025","doc","type-doc","status-publish","hentry","docs-category-working-with-orders-and-fills"],"acf":[],"_links":{"self":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/7025","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":0,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/7025\/revisions"}],"wp:attachment":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/media?parent=7025"}],"wp:term":[{"taxonomy":"docs-category","embeddable":true,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/docs-category?post=7025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}