@@ -47,6 +47,8 @@ Access Polymarket endpoints via the `polymarket` namespace.
4747
4848==== Markets
4949
50+ [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-markets)
51+
5052List markets with optional filtering:
5153
5254[source,ruby]
@@ -55,14 +57,7 @@ List markets with optional filtering:
5557markets = client.polymarket.markets.list
5658
5759# List markets with custom filter
58- filter = Rubyists::Domeapi::Polymarket::MarketFilter.new(
59- Rubyists::Domeapi::Polymarket::MarketFilter::Properties.new(
60- limit: 10,
61- offset: 0,
62- status: 'open'
63- )
64- )
65- markets = client.polymarket.markets.list(filter)
60+ markets = client.polymarket.markets.list(limit: 10, offset: 0, status: 'open')
6661----
6762
6863Get market price:
@@ -72,50 +67,104 @@ Get market price:
7267price = client.polymarket.markets.price(token_id: 'token_id')
7368----
7469
70+ ==== Candlesticks
71+
72+ [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-candlesticks)
73+
7574Get candlesticks:
7675
7776[source,ruby]
7877----
79- filter = Rubyists::Domeapi::Polymarket::Candlesticks::Filter.new(
80- Rubyists::Domeapi::Polymarket::Candlesticks::Filter::Properties.new(
81- condition_id: 'condition_id',
82- start_time: 1625097600,
83- end_time: 1625184000,
84- interval: 60
85- )
78+ candlesticks = client.polymarket.candlesticks.list(
79+ condition_id: 'condition_id',
80+ start_time: 1625097600,
81+ end_time: 1625184000,
82+ interval: 60
8683)
87- candlesticks = client.polymarket.candlesticks.list(filter)
8884----
8985
9086==== Trade History
9187
88+ [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-trade-history)
89+
9290Get trade history:
9391
9492[source,ruby]
9593----
96- filter = Rubyists::Domeapi::Polymarket::TradeHistory::Filter.new(
97- Rubyists::Domeapi::Polymarket::TradeHistory::Filter::Properties.new(
98- market_slug: 'market_slug',
99- limit: 10
100- )
94+ trades = client.polymarket.trade_history.list(
95+ market_slug: 'market_slug',
96+ limit: 10
10197)
102- trades = client.polymarket.trade_history.list(filter)
10398----
10499
105100==== Orderbook
106101
102+ [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-orderbook-history)
103+
107104Get orderbook history:
108105
109106[source,ruby]
110107----
111- filter = Rubyists::Domeapi::Polymarket::Orderbook::Filter.new(
112- Rubyists::Domeapi::Polymarket::Orderbook::Filter::Properties.new(
113- token_id: 'token_id',
114- start_time: 1625097600000,
115- end_time: 1625184000000
116- )
108+ snapshots = client.polymarket.orderbook.list(
109+ token_id: 'token_id',
110+ start_time: 1625097600000,
111+ end_time: 1625184000000
112+ )
113+ ----
114+
115+ ==== Activity
116+
117+ [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-activity)
118+
119+ Get activity:
120+
121+ [source,ruby]
122+ ----
123+ activity = client.polymarket.activity.list(
124+ user: '0x...',
125+ limit: 10
126+ )
127+ ----
128+
129+ ==== Market Price
130+
131+ [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-market-price)
132+
133+ Get market price history:
134+
135+ [source,ruby]
136+ ----
137+ prices = client.polymarket.market_price.list(
138+ token_id: 'token_id',
139+ at_time: 1625097600
140+ )
141+ ----
142+
143+ ==== Wallet
144+
145+ [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-wallet)
146+
147+ Get wallet information:
148+
149+ [source,ruby]
150+ ----
151+ wallet = client.polymarket.wallet.list(
152+ eoa: '0x...'
153+ )
154+ ----
155+
156+ ==== Wallet Profit and Loss
157+
158+ [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-wallet-pnl)
159+
160+ Get wallet profit and loss:
161+
162+ [source,ruby]
163+ ----
164+ pnl = client.polymarket.wallet_profit_and_loss.list(
165+ wallet_address: '0x...',
166+ granularity: 'day'
117167)
118- snapshots = client.polymarket.orderbook.list(filter)
119168----
120169
121170== Development
0 commit comments