Class: Rubyists::Domeapi::Polymarket::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/domeapi/polymarket/client.rb

Overview

Polymarket API Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client = Rubyists::Domeapi::Client.new) ⇒ Client

Returns a new instance of Client.



10
11
12
13
# File 'lib/domeapi/polymarket/client.rb', line 10

def initialize(client = Rubyists::Domeapi::Client.new)
  @client = client
  client.prefix = 'polymarket'
end

Instance Attribute Details

#client ⇒ Object (readonly)

Returns the value of attribute client.



8
9
10
# File 'lib/domeapi/polymarket/client.rb', line 8

def client
  @client
end

Instance Method Details

#activity ⇒ Object



35
36
37
# File 'lib/domeapi/polymarket/client.rb', line 35

def activity
  @activity ||= Activity.new(client)
end

#candlesticks ⇒ Object



23
24
25
# File 'lib/domeapi/polymarket/client.rb', line 23

def candlesticks
  @candlesticks ||= Candlesticks.new(client)
end

#get ⇒ Object



15
16
17
# File 'lib/domeapi/polymarket/client.rb', line 15

def get(...)
  client.get(...)
end

#market_price ⇒ Object



39
40
41
# File 'lib/domeapi/polymarket/client.rb', line 39

def market_price
  @market_price ||= MarketPrice.new(client)
end

#markets ⇒ Object



19
20
21
# File 'lib/domeapi/polymarket/client.rb', line 19

def markets
  @markets ||= Markets.new(client)
end

#orderbook ⇒ Object



31
32
33
# File 'lib/domeapi/polymarket/client.rb', line 31

def orderbook
  @orderbook ||= Orderbook.new(client)
end

#trade_history ⇒ Object



27
28
29
# File 'lib/domeapi/polymarket/client.rb', line 27

def trade_history
  @trade_history ||= TradeHistory.new(client)
end

#wallet ⇒ Object



43
44
45
# File 'lib/domeapi/polymarket/client.rb', line 43

def wallet
  @wallet ||= Wallet.new(client)
end

#wallet_profit_and_loss ⇒ Object



47
48
49
# File 'lib/domeapi/polymarket/client.rb', line 47

def wallet_profit_and_loss
  @wallet_profit_and_loss ||= WalletProfitAndLoss.new(client)
end