Skip to content

Commit f14de0c

Browse files
committed
new endpoints
1 parent 62986c2 commit f14de0c

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

include/Exchange_Client.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ class Client
214214
Json::Value transfer_master_history(const Params* params_ptr);
215215
Json::Value transfer_master_to_subaccount(const Params* params_ptr);
216216

217+
Json::Value futures_transfer_master_history(const Params* params_ptr);
218+
Json::Value futures_transfer_master_to_subaccount(const Params* params_ptr);
219+
217220
Json::Value get_subaccount_balances(const Params* params_ptr);
221+
Json::Value get_subaccount_balances_summary(const Params* params_ptr);
218222
Json::Value get_subaccount_deposit_address(const Params* params_ptr);
219223
Json::Value get_subaccount_deposit_history(const Params* params_ptr);
220224
Json::Value get_subaccount_future_margin_status(const Params* params_ptr = nullptr);

src/Binance_Client.cpp

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,24 @@ Json::Value Client<T>::SubAccount::transfer_master_to_subaccount(const Params* p
12861286
{
12871287
std::string full_path = _BASE_REST_SPOT + "/wapi/v3/sub-account/transfer.html";
12881288
std::string query = user_client->_generate_query(params_ptr, 1);
1289+
Json::Value response = (user_client->_rest_client)->_postreq(full_path + query);
1290+
1291+
return response;
1292+
}
1293+
catch (ClientException e)
1294+
{
1295+
e.append_to_traceback(std::string(__FUNCTION__));
1296+
throw(e);
1297+
}
1298+
};
1299+
1300+
template <typename T>
1301+
Json::Value Client<T>::SubAccount::futures_transfer_master_history(const Params* params_ptr)
1302+
{
1303+
try
1304+
{
1305+
std::string full_path = _BASE_REST_SPOT + "/sapi/v1/sub-account/futures/internalTransfer";
1306+
std::string query = user_client->_generate_query(params_ptr, 1);
12891307
Json::Value response = (user_client->_rest_client)->_getreq(full_path + query);
12901308

12911309
return response;
@@ -1297,6 +1315,24 @@ Json::Value Client<T>::SubAccount::transfer_master_to_subaccount(const Params* p
12971315
}
12981316
};
12991317

1318+
template <typename T>
1319+
Json::Value Client<T>::SubAccount::futures_transfer_master_to_subaccount(const Params* params_ptr)
1320+
{
1321+
try
1322+
{
1323+
std::string full_path = _BASE_REST_SPOT + "/sapi/v1/sub-account/futures/internalTransfer";
1324+
std::string query = user_client->_generate_query(params_ptr, 1);
1325+
Json::Value response = (user_client->_rest_client)->_postreq(full_path + query);
1326+
1327+
return response;
1328+
}
1329+
catch (ClientException e)
1330+
{
1331+
e.append_to_traceback(std::string(__FUNCTION__));
1332+
throw(e);
1333+
}
1334+
};
1335+
13001336
template <typename T>
13011337
Json::Value Client<T>::SubAccount::get_subaccount_balances(const Params* params_ptr)
13021338
{
@@ -1315,6 +1351,24 @@ Json::Value Client<T>::SubAccount::get_subaccount_balances(const Params* params_
13151351
}
13161352
};
13171353

1354+
template <typename T>
1355+
Json::Value Client<T>::SubAccount::get_subaccount_balances_summary(const Params* params_ptr)
1356+
{
1357+
try
1358+
{
1359+
std::string full_path = _BASE_REST_SPOT + "/sapi/v1/sub-account/spotSummary";
1360+
std::string query = user_client->_generate_query(params_ptr, 1);
1361+
Json::Value response = (user_client->_rest_client)->_getreq(full_path + query);
1362+
1363+
return response;
1364+
}
1365+
catch (ClientException e)
1366+
{
1367+
e.append_to_traceback(std::string(__FUNCTION__));
1368+
throw(e);
1369+
}
1370+
};
1371+
13181372
template <typename T>
13191373
Json::Value Client<T>::SubAccount::get_subaccount_deposit_address(const Params* params_ptr)
13201374
{

0 commit comments

Comments
 (0)