|
3 | 3 | using namespace bittrex::api;
|
4 | 4 |
|
5 | 5 | balance_list_t Account::get_balances() {
|
6 |
| - auto res = api_request<balance_list_t, balance_t>("account/getbalances?", bittrex::api::Type::ACCOUNT, ""); |
7 |
| - return res; |
| 6 | + return api_request<balance_list_t, balance_t>("account/getbalances?", bittrex::api::Type::ACCOUNT, ""); |
8 | 7 | }
|
9 | 8 |
|
10 | 9 |
|
11 | 10 | balance_t Account::get_balance(const std::string ¤cy) {
|
12 |
| - auto res = api_request<balance_t, balance_t>("account/getbalance?", bittrex::api::Type::ACCOUNT, "currency=", |
13 |
| - currency); |
14 |
| - return res; |
15 |
| - |
| 11 | + return api_request<balance_t, balance_t>("account/getbalance?", bittrex::api::Type::ACCOUNT, "currency=", currency); |
16 | 12 | }
|
17 | 13 |
|
18 | 14 |
|
19 | 15 | deposit_address_t Account::get_deposit_address(const std::string ¤cy) {
|
20 |
| - auto res = api_request<deposit_address_t, deposit_address_t>("account/getdepositaddress?", bittrex::api::Type::ACCOUNT, |
21 |
| - "currency=", currency); |
22 |
| - return res; |
| 16 | + return api_request<deposit_address_t, deposit_address_t>( |
| 17 | + "account/getdepositaddress?", bittrex::api::Type::ACCOUNT, "currency=", currency); |
23 | 18 |
|
24 | 19 | }
|
25 | 20 |
|
26 | 21 |
|
27 |
| -btx_uuid_t Account::withdraw(const std::string ¤cy, const float &quantity, |
28 |
| - const std::string &address, const int &payment_id) { |
29 |
| - |
30 |
| - auto res = api_request<btx_uuid_t, btx_uuid_t>( "account/withdraw?", bittrex::api::Type::ACCOUNT, |
31 |
| - "currency=", currency, "quantity=", quantity, |
32 |
| - "address=", address, "paymentid=", payment_id); |
33 |
| - return res; |
| 22 | +btx_uuid_t Account::withdraw( |
| 23 | + const std::string ¤cy, const float &quantity, const std::string &address, const int &payment_id) { |
| 24 | + return api_request<btx_uuid_t, btx_uuid_t>( |
| 25 | + "account/withdraw?", bittrex::api::Type::ACCOUNT, |
| 26 | + "currency=", currency, "quantity=", quantity, "address=", address, "paymentid=", payment_id); |
34 | 27 | }
|
35 | 28 |
|
36 | 29 |
|
37 | 30 | order_t Account::get_order(const std::string &uuid) {
|
38 |
| - auto res = api_request<order_t, order_t>("account/getorder?", bittrex::api::Type::ACCOUNT, "uuid=", uuid); |
39 |
| - return res; |
| 31 | + return api_request<order_t, order_t>("account/getorder?", bittrex::api::Type::ACCOUNT, "uuid=", uuid); |
40 | 32 | }
|
41 | 33 |
|
42 | 34 |
|
43 | 35 | order_history_ent_list_t Account::get_order_history(const std::string &market) {
|
44 |
| - // json res = (!market.empty()) ? |
45 |
| -// _api_call->dispatch("account/getorderhistory?", bittrex::api::Type::ACCOUNT, "market=", market): |
46 |
| -// _api_call->dispatch("account/getorderhistory?", bittrex::api::Type::ACCOUNT, ""); |
47 |
| - |
48 |
| - auto res = api_request<order_history_ent_list_t, order_history_ent_t>("account/getorderhistory?", |
49 |
| - bittrex::api::Type::ACCOUNT, "market=", |
50 |
| - market); |
51 |
| - return res; |
| 36 | + return api_request<order_history_ent_list_t, order_history_ent_t>( |
| 37 | + "account/getorderhistory?", bittrex::api::Type::ACCOUNT, "market=", market); |
52 | 38 | }
|
53 | 39 |
|
54 | 40 |
|
55 | 41 | withdrawal_history_ent_list_t Account::get_withdrawal_history(const std::string ¤cy) {
|
56 |
| - auto res = api_request<withdrawal_history_ent_list_t, withdrawal_history_ent_t>( |
57 |
| - "account/getwithdrawalhistory?", bittrex::api::Type::ACCOUNT, "currency=", currency); |
58 |
| - return res; |
| 42 | + return api_request<withdrawal_history_ent_list_t, withdrawal_history_ent_t>( |
| 43 | + "account/getwithdrawalhistory?", bittrex::api::Type::ACCOUNT, "currency=", currency); |
59 | 44 | }
|
60 | 45 |
|
61 | 46 |
|
0 commit comments