Sha256: a84d645ba3690e8f9b735f5f9d2c0047b40e333339762ceb9be1cb3579dc95e0

Contents?: true

Size: 614 Bytes

Versions: 1

Compression:

Stored size: 614 Bytes

Contents

module HexTokenBot
  module ChannelClient
    class BterClient
      attr_accessor :client

      def initialize(options = {})
        @client = HexTokenBot::ChannelApi::Bter::Public.new
      end


      def get_market_order_book(market_code, asks_limit = nil , bids_limit = nil)
        rep = @client.order_book(market_code)
        rep
      end

      def get_order_newest(market_code)
        rep = @client.trade_history(market_code)
        if !rep.empty? and !rep[:data].nil?
          count = rep[:data].size
          rep[:data][count - 1]
        else
          []
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hex_token_bot-0.1.0 lib/hex_token_bot/channel_client/bter_client.rb