Class: StocksExchangeApiClient::PrivateApiV3

Inherits:
Object
  • Object
show all
Defined in:
lib/stocks_exchange_api_client/private_v3.rb

Class Method Summary collapse

Class Method Details

.add_trading_orders_by_pair(currency_pair_id, type, amount, price) ⇒ Object



98
99
100
101
102
103
104
105
106
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 98

def add_trading_orders_by_pair(currency_pair_id, type, amount, price)
  url = "/trading/orders/#{currency_pair_id}"
  params = {
      'type' => type,
      'amount' => amount,
      'price' => price
  }
  StocksExchangeApiClient.make_api_request_v3(url, params, :post)
end

.add_wallets_by_currency_id(currency_id) ⇒ Object



17
18
19
20
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 17

def add_wallets_by_currency_id(currency_id)
  url = "/profile/wallets/#{currency_id}"
  StocksExchangeApiClient.make_api_request_v3(url, {}, :post)
end

.add_withdrawal(currency_id, amount, address, additional_address) ⇒ Object



52
53
54
55
56
57
58
59
60
61
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 52

def add_withdrawal(currency_id, amount, address, additional_address)
  url = '/profile/withdraw'
  params = {
    'currency_id' => currency_id,
    'amount' => amount,
    'address' => address
  }
  params['additional_address_parameter'] = additional_address unless additional_address.nil?
  StocksExchangeApiClient.make_api_request_v3(url, params, :post)
end

.all_trading_ordersObject



78
79
80
81
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 78

def all_trading_orders
  url = '/trading/orders'
  StocksExchangeApiClient.make_api_request_v3(url, {})
end

.cancel_withdrawal_by_id(id) ⇒ Object



63
64
65
66
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 63

def cancel_withdrawal_by_id(id)
  url = "/profile/withdraw/#{id}"
  StocksExchangeApiClient.make_api_request_v3(url, {}, :delete)
end

.delete_all_trading_ordersObject



83
84
85
86
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 83

def delete_all_trading_orders
  url = '/trading/orders'
  StocksExchangeApiClient.make_api_request_v3(url, {}, :delete)
end

.delete_trading_order_by_id(order_id) ⇒ Object



113
114
115
116
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 113

def delete_trading_order_by_id(order_id)
  url = "/trading/order/#{order_id}"
  StocksExchangeApiClient.make_api_request_v3(url, {}, :delete)
end

.delete_trading_orders_by_pair(currency_pair_id) ⇒ Object



93
94
95
96
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 93

def delete_trading_orders_by_pair(currency_pair_id)
  url = "/trading/orders/#{currency_pair_id}"
  StocksExchangeApiClient.make_api_request_v3(url, {}, :delete)
end

.deposits(params) ⇒ Object



32
33
34
35
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 32

def deposits(params)
  url = '/profile/deposits'
  StocksExchangeApiClient.make_api_request_v3(url, params)
end

.deposits_by_id(id) ⇒ Object



37
38
39
40
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 37

def deposits_by_id(id)
  url = "/profile/deposits/#{id}"
  StocksExchangeApiClient.make_api_request_v3(url)
end

.get_wallets_address(wallet_id) ⇒ Object



22
23
24
25
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 22

def get_wallets_address(wallet_id)
  url = "/profile/wallets/address/#{wallet_id}"
  StocksExchangeApiClient.make_api_request_v3(url)
end

.new_wallets_address(wallet_id) ⇒ Object



27
28
29
30
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 27

def new_wallets_address(wallet_id)
  url = "/profile/wallets/address/#{wallet_id}"
  StocksExchangeApiClient.make_api_request_v3(url, {}, :post)
end

.profile_infoObject



4
5
6
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 4

def profile_info
  StocksExchangeApiClient.make_api_request_v3('/profile/info')
end

.reports_orders(params) ⇒ Object



68
69
70
71
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 68

def reports_orders(params)
  url = '/reports/orders'
  StocksExchangeApiClient.make_api_request_v3(url, params)
end

.reports_orders_by_id(order_id) ⇒ Object



73
74
75
76
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 73

def reports_orders_by_id(order_id)
  url = "/reports/orders/#{order_id}"
  StocksExchangeApiClient.make_api_request_v3(url, {})
end

.trading_order_by_id(order_id) ⇒ Object



108
109
110
111
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 108

def trading_order_by_id(order_id)
  url = "/trading/order/#{order_id}"
  StocksExchangeApiClient.make_api_request_v3(url, {})
end

.trading_orders_by_pair(currency_pair_id) ⇒ Object



88
89
90
91
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 88

def trading_orders_by_pair(currency_pair_id)
  url = "/trading/orders/#{currency_pair_id}"
  StocksExchangeApiClient.make_api_request_v3(url, {})
end

.walletsObject



8
9
10
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 8

def wallets
  StocksExchangeApiClient.make_api_request_v3('/profile/wallets')
end

.wallets_by_id(wallet_id) ⇒ Object



12
13
14
15
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 12

def wallets_by_id(wallet_id)
  url = "/profile/wallets/#{wallet_id}"
  StocksExchangeApiClient.make_api_request_v3(url)
end

.withdrawals(params) ⇒ Object



42
43
44
45
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 42

def withdrawals(params)
  url = '/profile/withdrawals'
  StocksExchangeApiClient.make_api_request_v3(url, params)
end

.withdrawals_by_id(id) ⇒ Object



47
48
49
50
# File 'lib/stocks_exchange_api_client/private_v3.rb', line 47

def withdrawals_by_id(id)
  url = "/profile/withdrawals/#{id}"
  StocksExchangeApiClient.make_api_request_v3(url)
end