clarify porfolio_id / account
This commit is contained in:
1 parent
3f5ba37aca
commit
0d72bb47d4
2 files changed
+5
-4
No files matched your search
@@ -157,7 +157,7 @@ struct MarginServiceCore::PImpl
|
||||
trades_node = child.append_child("string");
|
||||
}
|
||||
|
||||
bool parse_margin_response(const CurlMsg& msg, std::string& account, std::string& calculation_id)
|
||||
bool parse_margin_response(const CurlMsg& msg, std::string& portfolio_id, std::string& calculation_id)
|
||||
{
|
||||
std::string str(msg.data.begin(), msg.data.end());
|
||||
pugi::xml_document doc;
|
||||
@@ -167,7 +167,7 @@ struct MarginServiceCore::PImpl
|
||||
child = child.child("margin");
|
||||
if(child)
|
||||
{
|
||||
account = child.attribute("portfolioId").as_string();
|
||||
portfolio_id = child.attribute("portfolioId").as_string();
|
||||
calculation_id = child.attribute("id").as_string();
|
||||
return true;
|
||||
}
|
||||
@@ -229,8 +229,8 @@ struct MarginServiceCore::PImpl
|
||||
{
|
||||
CurlMsg reply;
|
||||
post(post_margin_path, xml, reply);
|
||||
std::string account_resp, calcid_resp;
|
||||
if(parse_margin_response(reply, account_resp, calcid_resp))
|
||||
std::string portid_resp, calcid_resp;
|
||||
if(parse_margin_response(reply, portid_resp, calcid_resp))
|
||||
{
|
||||
CurlMsg reply2;
|
||||
if(get(get_margin_path + calcid_resp, reply2))
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
|
||||
//This is a blocking call to a WebAPI. Very Slow.
|
||||
bool query_margin(const orderman::AccountName&, MarginResult&);
|
||||
//This is a blocking call to a WebAPI. Very Slow.
|
||||
bool query_margin(const std::vector<Position>&, MarginResult&);
|
||||
|
||||
private:
|
||||
|
||||
Reference in new issue
Block a user