Skip to content

Commit b9079c6

Browse files
committed
missing method
1 parent 4b05d93 commit b9079c6

File tree

3 files changed

+27
-57
lines changed

3 files changed

+27
-57
lines changed

examples/custom_ws_stream.cpp

Lines changed: 0 additions & 53 deletions
This file was deleted.

include/Exchange_Client.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ class Client
190190
Json::Value futures_transfer_history(const Params* params_ptr);
191191
Json::Value collateral_borrow(const Params* params_ptr);
192192
Json::Value collateral_borrow_history(const Params* params_ptr = nullptr);
193-
Json::Value collateral_repay(const Params* params_ptr);
193+
Json::Value collateral_cross_repay(const Params* params_ptr);
194194
Json::Value collateral_repay_history(const Params* params_ptr = nullptr);
195195
Json::Value collateral_wallet(const Params* params_ptr = nullptr);
196196
Json::Value collateral_info(const Params* params_ptr = nullptr);
@@ -242,7 +242,7 @@ class Client
242242
Json::Value transfer_to_subaccount_margin(const Params* params_ptr);
243243
Json::Value transfer_subaccount_to_subaccount(const Params* params_ptr);
244244
Json::Value transfer_subaccount_to_master(const Params* params_ptr);
245-
Json::Value transfer_subaccount_history(const Params* params_ptr);
245+
Json::Value transfer_subaccount_history(const Params* params_ptr = nullptr);
246246

247247
Json::Value make_universal_transfer(const Params* params_ptr);
248248
Json::Value get_universal_transfer_history(const Params* params_ptr = nullptr);

src/Binance_Client.cpp

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ Json::Value Client<T>::FuturesWallet::collateral_borrow_history(const Params* pa
13531353
@return the json returned by the request
13541354
*/
13551355
template <typename T>
1356-
Json::Value Client<T>::FuturesWallet::collateral_repay(const Params* params_ptr)
1356+
Json::Value Client<T>::FuturesWallet::collateral_cross_repay(const Params* params_ptr)
13571357
{
13581358
try
13591359
{
@@ -2238,6 +2238,29 @@ Json::Value Client<T>::SubAccount::transfer_subaccount_to_master(const Params* p
22382238
}
22392239
};
22402240

2241+
/**
2242+
Sub-account Transfer History (For Sub-account)
2243+
@param params_ptr - a pointer to the request Params object
2244+
@return the json returned by the request
2245+
*/
2246+
template <typename T>
2247+
Json::Value Client<T>::SubAccount::transfer_subaccount_history(const Params* params_ptr)
2248+
{
2249+
try
2250+
{
2251+
std::string full_path = _BASE_REST_SPOT + "/sapi/v1/sub-account/transfer/subUserHistory";
2252+
std::string query = user_client->_generate_query(params_ptr, 1);
2253+
Json::Value response = (user_client->_rest_client)->_getreq(full_path + query);
2254+
2255+
return response;
2256+
}
2257+
catch (ClientException e)
2258+
{
2259+
e.append_to_traceback(std::string(__FUNCTION__));
2260+
throw(e);
2261+
}
2262+
};
2263+
22412264
/**
22422265
Universal Transfer (For Master Account)
22432266
@param params_ptr - a pointer to the request Params object
@@ -4120,7 +4143,7 @@ Json::Value Client<T>::BSwap::get_all_swap_pools()
41204143
try
41214144
{
41224145
std::string full_path = _BASE_REST_SPOT + "/sapi/v1/bswap/pools";
4123-
Json::Value response = (user_client->_rest_client)->_getreq(full_path + query);
4146+
Json::Value response = (user_client->_rest_client)->_getreq(full_path);
41244147

41254148
return response;
41264149
}

0 commit comments

Comments
 (0)