Class: Rubyists::Kalshi::Market::Orderbook

Inherits:
Endpoint
  • Object
show all
Defined in:
lib/kalshi/market/orderbook.rb

Overview

Orderbook API endpoint

Instance Attribute Summary

Attributes inherited from Endpoint

#client

Instance Method Summary collapse

Methods inherited from Endpoint

#initialize, kalshi_path

Constructor Details

This class inherits a constructor from Rubyists::Kalshi::Endpoint

Instance Method Details

#fetch(ticker, depth: nil) ⇒ Object



8
9
10
11
12
# File 'lib/kalshi/market/orderbook.rb', line 8

def fetch(ticker, depth: nil)
  params = {}
  params[:depth] = depth if depth
  client.get("markets/#{ticker}/orderbook", params: params)
end