@@ -1093,6 +1093,52 @@ Json::Value Client<T>::Wallet::query_user_transfer_universal(const Params* param
1093
1093
}
1094
1094
};
1095
1095
1096
+ /* *
1097
+ Funding Wallet
1098
+ @param params_ptr - a pointer to the request Params object
1099
+ @return the json returned by the request
1100
+ */
1101
+ template <typename T>
1102
+ Json::Value Client<T>::Wallet::funding_wallet(const Params* params_ptr)
1103
+ {
1104
+ try
1105
+ {
1106
+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/asset/get-funding-asset" ;
1107
+ std::string query = user_client->_generate_query (params_ptr, 1 );
1108
+ Json::Value response = (user_client->_rest_client )->_postreq (full_path + query);
1109
+
1110
+ return response;
1111
+ }
1112
+ catch (ClientException e)
1113
+ {
1114
+ e.append_to_traceback (std::string (__FUNCTION__));
1115
+ throw (e);
1116
+ }
1117
+ };
1118
+
1119
+ /* *
1120
+ Get API Key Permission
1121
+ @param params_ptr - a pointer to the request Params object
1122
+ @return the json returned by the request
1123
+ */
1124
+ template <typename T>
1125
+ Json::Value Client<T>::Wallet::get_api_key_permission(const Params* params_ptr)
1126
+ {
1127
+ try
1128
+ {
1129
+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/account/apiRestrictions" ;
1130
+ std::string query = user_client->_generate_query (params_ptr, 1 );
1131
+ Json::Value response = (user_client->_rest_client )->_getreq (full_path + query);
1132
+
1133
+ return response;
1134
+ }
1135
+ catch (ClientException e)
1136
+ {
1137
+ e.append_to_traceback (std::string (__FUNCTION__));
1138
+ throw (e);
1139
+ }
1140
+ };
1141
+
1096
1142
// ------------------------------ End | Client Wallet - User Wallet Endpoints
1097
1143
1098
1144
// ***************************************************************************
@@ -4406,7 +4452,155 @@ Json::Value Client<T>::BSwap::get_swap_history(const Params* params_ptr)
4406
4452
}
4407
4453
};
4408
4454
4409
- // ------------------------------ End | Client BLVT - User Mining Endpoints
4455
+ // ------------------------------ End | Client BSwap - User Mining Endpoints
4456
+
4457
+
4458
+ // ------------------------------ Start | Client Fiat - User Mining Endpoints
4459
+
4460
+
4461
+ /* *
4462
+ A constructor - called directly by the user
4463
+ @param client_obj - the exchange client object
4464
+ */
4465
+ template <typename T>
4466
+ Client<T>::Fiat::Fiat(Client<T>& client_obj)
4467
+ : user_client{ &client_obj }
4468
+ {
4469
+ if (user_client->_public_client )
4470
+ {
4471
+ MissingCredentials e{};
4472
+ e.append_to_traceback (std::string (__FUNCTION__));
4473
+ throw (e);
4474
+ };
4475
+ }
4476
+
4477
+ /* *
4478
+ A constructor - called directly by the user
4479
+ @param client_obj - the exchange client object (constant)
4480
+ */
4481
+ template <typename T>
4482
+ Client<T>::Fiat::Fiat(const Client<T>& client_obj)
4483
+ : user_client{ &client_obj } // snatching pointer and releasing later on to avoid deleting this reference
4484
+ {
4485
+ if (user_client->_public_client )
4486
+ {
4487
+ MissingCredentials e{};
4488
+ e.append_to_traceback (std::string (__FUNCTION__));
4489
+ throw (e);
4490
+ };
4491
+ }
4492
+
4493
+ /* *
4494
+ Destructor
4495
+ set 'user_client' as nullptr to avoid deleting the exchange client
4496
+ object passed from outside the class (reference)
4497
+ */
4498
+ template <typename T>
4499
+ Client<T>::Fiat::~Fiat ()
4500
+ {
4501
+ user_client = nullptr ;
4502
+ }
4503
+
4504
+ // ------ Endpoint methods
4505
+
4506
+ /* *
4507
+ Get Fiat Deposit/Withdraw History
4508
+ @param params_ptr - a pointer to the request Params object
4509
+ @return json returned by the request
4510
+ */
4511
+ template <typename T>
4512
+ Json::Value Client<T>::Fiat::get_fiat_deposit_withdrawal_history(const Params* params_ptr)
4513
+ {
4514
+ try
4515
+ {
4516
+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/fiat/order" ;
4517
+ std::string query = user_client->_generate_query (params_ptr, 1 );
4518
+ Json::Value response = (user_client->_rest_client )->_getreq (full_path + query);
4519
+
4520
+ return response;
4521
+ }
4522
+ catch (ClientException e)
4523
+ {
4524
+ e.append_to_traceback (std::string (__FUNCTION__));
4525
+ throw (e);
4526
+ }
4527
+ };
4528
+
4529
+ // ------------------------------ End | Client Fiat - User Mining Endpoints
4530
+
4531
+
4532
+ // ------------------------------ Start | Client C2C - User Mining Endpoints
4533
+
4534
+
4535
+ /* *
4536
+ A constructor - called directly by the user
4537
+ @param client_obj - the exchange client object
4538
+ */
4539
+ template <typename T>
4540
+ Client<T>::C2C::C2C(Client<T>& client_obj)
4541
+ : user_client{ &client_obj }
4542
+ {
4543
+ if (user_client->_public_client )
4544
+ {
4545
+ MissingCredentials e{};
4546
+ e.append_to_traceback (std::string (__FUNCTION__));
4547
+ throw (e);
4548
+ };
4549
+ }
4550
+
4551
+ /* *
4552
+ A constructor - called directly by the user
4553
+ @param client_obj - the exchange client object (constant)
4554
+ */
4555
+ template <typename T>
4556
+ Client<T>::C2C::C2C(const Client<T>& client_obj)
4557
+ : user_client{ &client_obj } // snatching pointer and releasing later on to avoid deleting this reference
4558
+ {
4559
+ if (user_client->_public_client )
4560
+ {
4561
+ MissingCredentials e{};
4562
+ e.append_to_traceback (std::string (__FUNCTION__));
4563
+ throw (e);
4564
+ };
4565
+ }
4566
+
4567
+ /* *
4568
+ Destructor
4569
+ set 'user_client' as nullptr to avoid deleting the exchange client
4570
+ object passed from outside the class (reference)
4571
+ */
4572
+ template <typename T>
4573
+ Client<T>::C2C::~C2C ()
4574
+ {
4575
+ user_client = nullptr ;
4576
+ }
4577
+
4578
+ // ------ Endpoint methods
4579
+
4580
+ /* *
4581
+ Get C2C Trade History
4582
+ @param params_ptr - a pointer to the request Params object
4583
+ @return json returned by the request
4584
+ */
4585
+ template <typename T>
4586
+ Json::Value Client<T>::C2C::get_c2c_trades_history(const Params* params_ptr)
4587
+ {
4588
+ try
4589
+ {
4590
+ std::string full_path = _BASE_REST_SPOT + " /sapi/v1/c2c/orderMatch/listUserOrderHistory" ;
4591
+ std::string query = user_client->_generate_query (params_ptr, 1 );
4592
+ Json::Value response = (user_client->_rest_client )->_getreq (full_path + query);
4593
+
4594
+ return response;
4595
+ }
4596
+ catch (ClientException e)
4597
+ {
4598
+ e.append_to_traceback (std::string (__FUNCTION__));
4599
+ throw (e);
4600
+ }
4601
+ };
4602
+
4603
+ // ------------------------------ End | Client C2C - User Mining Endpoints
4410
4604
4411
4605
4412
4606
// =======================================================================================================
0 commit comments