Class: Honeymaker::Clients::BinanceUs

Inherits:
Binance show all
Defined in:
lib/honeymaker/clients/binance_us.rb

Constant Summary collapse

URL =
"https://api.binance.us"

Constants inherited from Binance

Honeymaker::Clients::Binance::RATE_LIMITS

Constants inherited from Honeymaker::Client

Honeymaker::Client::OPTIONS, Honeymaker::Client::RATE_LIMITS

Instance Attribute Summary

Attributes inherited from Honeymaker::Client

#api_key, #api_secret

Instance Method Summary collapse

Methods inherited from Binance

#account_information, #account_trade_list, #all_orders, #api_description, #asset_dividend, #cancel_order, #candlestick_data, #coin_futures_income_history, #convert_trade_flow, #deposit_history, #dust_log, #exchange_information, #fiat_orders, #fiat_payments, #futures_income_history, #get_all_coins_information, #get_balances, #get_withdraw_addresses, #margin_borrow_repay_history, #margin_force_liquidation, #margin_interest_history, #new_order, #query_order, #simple_earn_flexible_redemptions, #simple_earn_flexible_rewards, #simple_earn_flexible_subscriptions, #simple_earn_locked_redemptions, #simple_earn_locked_rewards, #simple_earn_locked_subscriptions, #symbol_order_book_ticker, #symbol_price_ticker, #test_new_order, #universal_transfer_history, #withdraw, #withdraw_history

Methods inherited from Honeymaker::Client

#get_balances, #initialize, rate_limits, #validate

Constructor Details

This class inherits a constructor from Honeymaker::Client

Instance Method Details

#staking_history(staking_type: nil, asset: nil, start_time: nil, end_time: nil, page: nil, limit: nil) ⇒ Object

— Staking —



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/honeymaker/clients/binance_us.rb', line 10

def staking_history(staking_type: nil, asset: nil, start_time: nil, end_time: nil, page: nil, limit: nil)
  with_rescue do
    response = connection.get do |req|
      req.url "/staking/v1/history"
      req.headers = headers
      req.params = {
        stakingType: staking_type, asset: asset,
        startTime: start_time, endTime: end_time,
        page: page, limit: limit, timestamp: timestamp_ms
      }.compact
      req.params[:signature] = sign_params(req.params)
    end
    response.body
  end
end

#staking_rewards_history(asset: nil, start_time: nil, end_time: nil, page: nil, limit: nil) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/honeymaker/clients/binance_us.rb', line 26

def staking_rewards_history(asset: nil, start_time: nil, end_time: nil, page: nil, limit: nil)
  with_rescue do
    response = connection.get do |req|
      req.url "/staking/v1/rewardsHistory"
      req.headers = headers
      req.params = {
        asset: asset, startTime: start_time, endTime: end_time,
        page: page, limit: limit, timestamp: timestamp_ms
      }.compact
      req.params[:signature] = sign_params(req.params)
    end
    response.body
  end
end