@@ -2251,6 +2251,78 @@ Json::Value Client<T>::SubAccount::enable_leverage_token_subaccount(const Params
2251
2251
}
2252
2252
};
2253
2253
2254
+ /* *
2255
+ Deposit assets into the managed sub-account(For Investor Master Account)
2256
+
2257
+ @param params_ptr - a pointer to the request Params object
2258
+ @return the json returned by the request
2259
+ */
2260
+ template <typename T>
2261
+ Json::Value Client<T>::SubAccount::deposit_asset_subaccount(const Params* params_ptr)
2262
+ {
2263
+ try
2264
+ {
2265
+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/managed-subaccount/deposit" ;
2266
+ std::string query = user_client->_generate_query (params_ptr, 1 );
2267
+ Json::Value response = (user_client->_rest_client )->_postreq (full_path + query);
2268
+
2269
+ return response;
2270
+ }
2271
+ catch (ClientException e)
2272
+ {
2273
+ e.append_to_traceback (std::string (__FUNCTION__));
2274
+ throw (e);
2275
+ }
2276
+ };
2277
+
2278
+ /* *
2279
+ Query managed sub-account asset details(For Investor Master Account)
2280
+
2281
+ @param params_ptr - a pointer to the request Params object
2282
+ @return the json returned by the request
2283
+ */
2284
+ template <typename T>
2285
+ Json::Value Client<T>::SubAccount::query_asset_subaccount(const Params* params_ptr)
2286
+ {
2287
+ try
2288
+ {
2289
+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/managed-subaccount/asset" ;
2290
+ std::string query = user_client->_generate_query (params_ptr, 1 );
2291
+ Json::Value response = (user_client->_rest_client )->_getreq (full_path + query);
2292
+
2293
+ return response;
2294
+ }
2295
+ catch (ClientException e)
2296
+ {
2297
+ e.append_to_traceback (std::string (__FUNCTION__));
2298
+ throw (e);
2299
+ }
2300
+ };
2301
+
2302
+ /* *
2303
+ Withdrawal (assets) from the managed sub-account(For Investor Master Account
2304
+
2305
+ @param params_ptr - a pointer to the request Params object
2306
+ @return the json returned by the request
2307
+ */
2308
+ template <typename T>
2309
+ Json::Value Client<T>::SubAccount::withdraw_asset_subaccount(const Params* params_ptr)
2310
+ {
2311
+ try
2312
+ {
2313
+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/managed-subaccount/withdraw" ;
2314
+ std::string query = user_client->_generate_query (params_ptr, 1 );
2315
+ Json::Value response = (user_client->_rest_client )->_postreq (full_path + query);
2316
+
2317
+ return response;
2318
+ }
2319
+ catch (ClientException e)
2320
+ {
2321
+ e.append_to_traceback (std::string (__FUNCTION__));
2322
+ throw (e);
2323
+ }
2324
+ };
2325
+
2254
2326
// ------------------------------ End | Client SubAccount - User SubAccount Endpoints
2255
2327
2256
2328
// ***************************************************************************
0 commit comments