@@ -1555,6 +1555,126 @@ Json::Value Client<T>::FuturesWallet::collateral_liquidation_history(const Param
15551555 }
15561556}
15571557
1558+ /* *
1559+ Check the maximum and minimum limit when repay with collateral
1560+ @param params_ptr - a pointer to the request Params object
1561+ @return the json returned by the request
1562+ */
1563+ template <typename T>
1564+ Json::Value Client<T>::FuturesWallet::collateral_check_repay_limit(const Params* params_ptr)
1565+ {
1566+ try
1567+ {
1568+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/futures/loan/collateralRepayLimit" ;
1569+ std::string query = this ->user_client ->_generate_query (params_ptr, 1 );
1570+ Json::Value response = (this ->user_client ->_rest_client )->_getreq (full_path + query);
1571+
1572+ return response;
1573+ }
1574+ catch (ClientException e)
1575+ {
1576+ e.append_to_traceback (std::string (__FUNCTION__));
1577+ throw (e);
1578+ }
1579+ }
1580+
1581+ /* *
1582+ Get Collateral Repay Quote
1583+ * the quote will be valid within 25 seconds
1584+
1585+ @param params_ptr - a pointer to the request Params object
1586+ @return the json returned by the request
1587+ */
1588+ template <typename T>
1589+ Json::Value Client<T>::FuturesWallet::collateral_get_repay_quote(const Params* params_ptr)
1590+ {
1591+ try
1592+ {
1593+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/futures/loan/collateralRepay" ;
1594+ std::string query = this ->user_client ->_generate_query (params_ptr, 1 );
1595+ Json::Value response = (this ->user_client ->_rest_client )->_getreq (full_path + query);
1596+
1597+ return response;
1598+ }
1599+ catch (ClientException e)
1600+ {
1601+ e.append_to_traceback (std::string (__FUNCTION__));
1602+ throw (e);
1603+ }
1604+ }
1605+
1606+ /* *
1607+ Repay with Collateral
1608+
1609+ @param params_ptr - a pointer to the request Params object
1610+ @return the json returned by the request
1611+ */
1612+ template <typename T>
1613+ Json::Value Client<T>::FuturesWallet::collateral_repay(const Params* params_ptr)
1614+ {
1615+ try
1616+ {
1617+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/futures/loan/collateralRepay" ;
1618+ std::string query = this ->user_client ->_generate_query (params_ptr, 1 );
1619+ Json::Value response = (this ->user_client ->_rest_client )->_postreq (full_path + query);
1620+
1621+ return response;
1622+ }
1623+ catch (ClientException e)
1624+ {
1625+ e.append_to_traceback (std::string (__FUNCTION__));
1626+ throw (e);
1627+ }
1628+ }
1629+
1630+ /* *
1631+ Check collateral repayment result
1632+
1633+ @param params_ptr - a pointer to the request Params object
1634+ @return the json returned by the request
1635+ */
1636+ template <typename T>
1637+ Json::Value Client<T>::FuturesWallet::collateral_repay_result(const Params* params_ptr)
1638+ {
1639+ try
1640+ {
1641+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/futures/loan/collateralRepayResult" ;
1642+ std::string query = this ->user_client ->_generate_query (params_ptr, 1 );
1643+ Json::Value response = (this ->user_client ->_rest_client )->_getreq (full_path + query);
1644+
1645+ return response;
1646+ }
1647+ catch (ClientException e)
1648+ {
1649+ e.append_to_traceback (std::string (__FUNCTION__));
1650+ throw (e);
1651+ }
1652+ }
1653+
1654+ /* *
1655+ Cross-Collateral Interest History
1656+
1657+ @param params_ptr - a pointer to the request Params object
1658+ @return the json returned by the request
1659+ */
1660+ template <typename T>
1661+ Json::Value Client<T>::FuturesWallet::collateral_cross_interest_history(const Params* params_ptr)
1662+ {
1663+ try
1664+ {
1665+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/futures/loan/interestHistory" ;
1666+ std::string query = this ->user_client ->_generate_query (params_ptr, 1 );
1667+ Json::Value response = (this ->user_client ->_rest_client )->_getreq (full_path + query);
1668+
1669+ return response;
1670+ }
1671+ catch (ClientException e)
1672+ {
1673+ e.append_to_traceback (std::string (__FUNCTION__));
1674+ throw (e);
1675+ }
1676+ }
1677+
15581678// ------------------------------ End | Client FuturesWallet - User FuturesWallet Endpoints
15591679
15601680
@@ -3347,6 +3467,29 @@ Json::Value Client<T>::Savings::get_interest_history(const Params* params_ptr)
33473467 }
33483468};
33493469
3470+ /* *
3471+ Change Fixed/Activity Position to Daily Position
3472+ @param params_ptr - a pointer to the request Params object
3473+ @return json returned by the request
3474+ */
3475+ template <typename T>
3476+ Json::Value Client<T>::Savings::change_fixed_pos_to_daily_pos(const Params* params_ptr)
3477+ {
3478+ try
3479+ {
3480+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/lending/positionChanged" ;
3481+ std::string query = user_client->_generate_query (params_ptr, 1 );
3482+ Json::Value response = (user_client->_rest_client )->_getreq (full_path + query);
3483+
3484+ return response;
3485+ }
3486+ catch (ClientException e)
3487+ {
3488+ e.append_to_traceback (std::string (__FUNCTION__));
3489+ throw (e);
3490+ }
3491+ };
3492+
33503493// ------------------------------ End | Client Savings - User Savings Endpoints
33513494
33523495
0 commit comments