Class: Binance::Api::Account
- Inherits:
-
Object
- Object
- Binance::Api::Account
- Defined in:
- lib/binance/api/account.rb
Class Method Summary collapse
- .info!(recvWindow: 5000) ⇒ Object
- .trades!(fromId: nil, limit: 500, recvWindow: 5000, symbol: nil) ⇒ Object
Class Method Details
.info!(recvWindow: 5000) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/binance/api/account.rb', line 5 def info!(recvWindow: 5000) = Configuration. params = { recvWindow: recvWindow, timestamp: } Request.send!(api_key_type: :read_info, path: "/api/v3/account", params: params.delete_if { |key, value| value.nil? }, security_type: :user_data) end |
.trades!(fromId: nil, limit: 500, recvWindow: 5000, symbol: nil) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/binance/api/account.rb', line 13 def trades!(fromId: nil, limit: 500, recvWindow: 5000, symbol: nil) raise Error.new(message: "max limit is 500") unless limit <= 500 raise Error.new(message: "symbol is required") if symbol.nil? = Configuration. params = { fromId: fromId, limit: limit, recvWindow: recvWindow, symbol: symbol, timestamp: } Request.send!(api_key_type: :read_info, path: "/api/v3/myTrades", params: params.delete_if { |key, value| value.nil? }, security_type: :user_data) end |