-
Notifications
You must be signed in to change notification settings - Fork 0
chore: bump version #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,6 +47,8 @@ Access Polymarket endpoints via the `polymarket` namespace. | |
|
|
||
| ==== Markets | ||
|
|
||
| [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-markets) | ||
|
|
||
| List markets with optional filtering: | ||
|
|
||
| [source,ruby] | ||
|
|
@@ -55,14 +57,7 @@ List markets with optional filtering: | |
| markets = client.polymarket.markets.list | ||
|
|
||
| # List markets with custom filter | ||
| filter = Rubyists::Domeapi::Polymarket::MarketFilter.new( | ||
| Rubyists::Domeapi::Polymarket::MarketFilter::Properties.new( | ||
| limit: 10, | ||
| offset: 0, | ||
| status: 'open' | ||
| ) | ||
| ) | ||
| markets = client.polymarket.markets.list(filter) | ||
| markets = client.polymarket.markets.list(limit: 10, offset: 0, status: 'open') | ||
| ---- | ||
|
|
||
| Get market price: | ||
|
|
@@ -72,50 +67,104 @@ Get market price: | |
| price = client.polymarket.markets.price(token_id: 'token_id') | ||
| ---- | ||
|
|
||
| ==== Candlesticks | ||
|
|
||
| [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-candlesticks) | ||
|
||
|
|
||
| Get candlesticks: | ||
|
|
||
| [source,ruby] | ||
| ---- | ||
| filter = Rubyists::Domeapi::Polymarket::Candlesticks::Filter.new( | ||
| Rubyists::Domeapi::Polymarket::Candlesticks::Filter::Properties.new( | ||
| condition_id: 'condition_id', | ||
| start_time: 1625097600, | ||
| end_time: 1625184000, | ||
| interval: 60 | ||
| ) | ||
| candlesticks = client.polymarket.candlesticks.list( | ||
| condition_id: 'condition_id', | ||
| start_time: 1625097600, | ||
| end_time: 1625184000, | ||
| interval: 60 | ||
| ) | ||
| candlesticks = client.polymarket.candlesticks.list(filter) | ||
| ---- | ||
|
|
||
| ==== Trade History | ||
|
|
||
| [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-trade-history) | ||
|
||
|
|
||
| Get trade history: | ||
|
|
||
| [source,ruby] | ||
| ---- | ||
| filter = Rubyists::Domeapi::Polymarket::TradeHistory::Filter.new( | ||
| Rubyists::Domeapi::Polymarket::TradeHistory::Filter::Properties.new( | ||
| market_slug: 'market_slug', | ||
| limit: 10 | ||
| ) | ||
| trades = client.polymarket.trade_history.list( | ||
| market_slug: 'market_slug', | ||
| limit: 10 | ||
| ) | ||
| trades = client.polymarket.trade_history.list(filter) | ||
| ---- | ||
|
|
||
| ==== Orderbook | ||
|
|
||
| [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-orderbook-history) | ||
|
||
|
|
||
| Get orderbook history: | ||
|
|
||
| [source,ruby] | ||
| ---- | ||
| filter = Rubyists::Domeapi::Polymarket::Orderbook::Filter.new( | ||
| Rubyists::Domeapi::Polymarket::Orderbook::Filter::Properties.new( | ||
| token_id: 'token_id', | ||
| start_time: 1625097600000, | ||
| end_time: 1625184000000 | ||
| ) | ||
| snapshots = client.polymarket.orderbook.list( | ||
| token_id: 'token_id', | ||
| start_time: 1625097600000, | ||
| end_time: 1625184000000 | ||
| ) | ||
| ---- | ||
|
|
||
| ==== Activity | ||
|
|
||
| [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-activity) | ||
|
||
|
|
||
| Get activity: | ||
|
|
||
| [source,ruby] | ||
| ---- | ||
| activity = client.polymarket.activity.list( | ||
| user: '0x...', | ||
| limit: 10 | ||
| ) | ||
| ---- | ||
|
|
||
| ==== Market Price | ||
|
|
||
| [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-market-price) | ||
|
||
|
|
||
| Get market price history: | ||
|
|
||
| [source,ruby] | ||
| ---- | ||
| prices = client.polymarket.market_price.list( | ||
| token_id: 'token_id', | ||
| at_time: 1625097600 | ||
| ) | ||
| ---- | ||
|
|
||
| ==== Wallet | ||
|
|
||
| [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-wallet) | ||
|
||
|
|
||
| Get wallet information: | ||
|
|
||
| [source,ruby] | ||
| ---- | ||
| wallet = client.polymarket.wallet.list( | ||
| eoa: '0x...' | ||
| ) | ||
| ---- | ||
|
|
||
| ==== Wallet Profit and Loss | ||
|
|
||
| [API Reference](https://docs.domeapi.io/api-reference/endpoint/get-wallet-pnl) | ||
|
||
|
|
||
| Get wallet profit and loss: | ||
|
|
||
| [source,ruby] | ||
| ---- | ||
| pnl = client.polymarket.wallet_profit_and_loss.list( | ||
| wallet_address: '0x...', | ||
| granularity: 'day' | ||
| ) | ||
| snapshots = client.polymarket.orderbook.list(filter) | ||
| ---- | ||
|
|
||
| == Development | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API Reference links are using Markdown syntax instead of AsciiDoc syntax. In AsciiDoc files, links should use the format
link:url[text]or justhttps://url[text]instead of[text](url). This Markdown syntax won't render correctly in AsciiDoc.