Module: Bitfinex::RESTv1Trades

Included in:
RESTv1
Defined in:
lib/rest/v1/trades.rb

Instance Method Summary collapse

Instance Method Details

#trades(symbol = "btcusd", params = {}) ⇒ Array

Get a list of the most recent trades for the given symbol.

@example:

client.trades

Parameters:

  • symbol (string) (defaults to: "btcusd")

    the name of the symbol

  • params (defaults to: {})

    :timestamp [time] Only show trades at or after this timestamp.

  • params (defaults to: {})

    :limit_trades [int] Limit the number of trades returned. Must be >= 1.

Returns:

  • (Array)


11
12
13
14
# File 'lib/rest/v1/trades.rb', line 11

def trades(symbol="btcusd", params={})
  check_params(params, %i{timestamp limit_trades})
  get("trades/#{symbol}", params).body
end