Method: Bitmex::Client#funding

Defined in:
lib/bitmex/client.rb

#funding(filters = {}) {|Hash| ... } ⇒ Array

Get funding history

Parameters:

  • filters (Hash) (defaults to: {})

    the filters to apply to mostly REST API requests with a few exceptions

Options Hash (filters):

  • :symbol (String)

    the instrument symbol, this filter works in both REST and Websocket APIs

  • :filter (String)

    generic table filter, send key/value pairs Timestamp Filters

  • :columns (String)

    array of column names to fetch; if omitted, will return all columns.

  • :count (Double) — default: 100

    number of results to fetch.

  • :start (Double)

    Starting point for results.

  • :reverse (Boolean) — default: false

    if true, will sort results newest first.

  • :startTime (Datetime, String)

    Starting date filter for results.

  • :endTime (Datetime, String)

    Ending date filter for results

Yields:

  • (Hash)

    the funding data

Returns:

  • (Array)

    the history

[View source]

48
49
50
51
52
53
54
# File 'lib/bitmex/client.rb', line 48

def funding(filters = {}, &ablock)
  if block_given?
    websocket.listen funding: nil, &ablock
  else
    rest.get :funding, params: filters
  end
end