# Polymarket v0.1.1 - Table of Contents

> An Elixir client for the Polymarket API.

## Pages

- [Polymarket](readme.md)

## Modules

- [Polymarket](Polymarket.md): Elixir client for the Polymarket APIs.
- [Polymarket.Clob](Polymarket.Clob.md): Client for the Polymarket CLOB REST API (https://clob.polymarket.com).
- [Polymarket.Clob.ClobAuth](Polymarket.Clob.ClobAuth.md): EIP-712 **L1** authentication for the Polymarket CLOB.
- [Polymarket.Clob.Contracts](Polymarket.Clob.Contracts.md): On-chain contract addresses for the Polymarket CTF Exchange, keyed by chain and
by whether the market is a *negative-risk* market.
- [Polymarket.Clob.DepositWallet](Polymarket.Clob.DepositWallet.md): Derives a wallet's **deposit-wallet** address — the contract wallet Polymarket
trades through on a user's behalf.
- [Polymarket.Clob.HmacAuth](Polymarket.Clob.HmacAuth.md): Polymarket CLOB **L2** (HMAC) authentication.
- [Polymarket.Clob.OrderPayload](Polymarket.Clob.OrderPayload.md): Serialises signed `Polymarket.Schemas.Order`s into the JSON wire body the CLOB
expects — a single `SendOrder` object for `POST /order`, or a JSON array of them
for the batch `POST /orders`.
- [Polymarket.Clob.OrderSigner](Polymarket.Clob.OrderSigner.md): EIP-712 signing for Polymarket CLOB **V2** orders.
- [Polymarket.Crypto](Polymarket.Crypto.md): Low-level Ethereum cryptographic primitives used to sign Polymarket orders.
- [Polymarket.Crypto.Eip712](Polymarket.Crypto.Eip712.md): Minimal EIP-712 typed-data hashing, tailored to Polymarket orders.
- [Polymarket.Gamma](Polymarket.Gamma.md): Client for the Polymarket Gamma REST API (https://gamma-api.polymarket.com).

- [Polymarket.Geoblock](Polymarket.Geoblock.md): Client for Polymarket's geoblock check (https://polymarket.com/api/geoblock).
- [Polymarket.Http](Polymarket.Http.md): Shared `Req`-based HTTP plumbing for the Polymarket API clients
(`Polymarket.Gamma`, `Polymarket.Clob`).
- [Polymarket.JsonUtil](Polymarket.JsonUtil.md): Helpers for massaging raw JSON (as decoded from an external API) into the
shapes our schemas expect.

- [Polymarket.Schemas.Ask](Polymarket.Schemas.Ask.md): A single ask price level in an order book. Part of a BookEvent.

- [Polymarket.Schemas.BestBidAskEvent](Polymarket.Schemas.BestBidAskEvent.md): Best bid/ask event.

- [Polymarket.Schemas.Bid](Polymarket.Schemas.Bid.md): A single bid price level in an order book. Part of a BookEvent.

- [Polymarket.Schemas.BookEvent](Polymarket.Schemas.BookEvent.md): Book event. A full order book snapshot for an asset.

- [Polymarket.Schemas.ClobError](Polymarket.Schemas.ClobError.md): A non-`200` error from a CLOB request, pairing the HTTP `status` with the
server's message.
- [Polymarket.Schemas.ClobReward](Polymarket.Schemas.ClobReward.md): A CLOB liquidity-reward configuration attached to a `Polymarket.Schemas.Market`.
- [Polymarket.Schemas.Coerce](Polymarket.Schemas.Coerce.md): Helpers for building schema structs directly from a decoded message, without
the overhead of `Ecto.Changeset` casting.
- [Polymarket.Schemas.Credentials](Polymarket.Schemas.Credentials.md): Polymarket CLOB **API credentials**: the `api_key`, `secret` and `passphrase`
returned by `GET /auth/derive-api-key` and `POST /auth/api-key`, plus the
`address` of the EOA that owns them.
- [Polymarket.Schemas.Event](Polymarket.Schemas.Event.md): An event returned by the Gamma REST API (e.g. `GET /events/keyset`).
- [Polymarket.Schemas.EventMessage](Polymarket.Schemas.EventMessage.md): Event message describing the parent event of a market. Part of a NewMarketEvent.

- [Polymarket.Schemas.EventMetadata](Polymarket.Schemas.EventMetadata.md): Internal metadata attached to an `Event` returned by the Gamma API.

- [Polymarket.Schemas.FeeSchedule](Polymarket.Schemas.FeeSchedule.md): Fee schedule for a market. Part of a NewMarketEvent.

- [Polymarket.Schemas.Geoblock](Polymarket.Schemas.Geoblock.md): The geoblock status for the caller, as returned by `GET /api/geoblock` on the
Polymarket site (https://polymarket.com).
- [Polymarket.Schemas.LastTradePriceEvent](Polymarket.Schemas.LastTradePriceEvent.md): Last trade price event. Reports the price, size and side of the most recent
trade executed against an asset.

- [Polymarket.Schemas.Market](Polymarket.Schemas.Market.md): A market returned by the Gamma REST API (e.g. `GET /markets/:id`).
- [Polymarket.Schemas.MarketByToken](Polymarket.Schemas.MarketByToken.md): The parent market for a given token ID, as returned by the CLOB API
`GET /markets-by-token/:token_id`.
- [Polymarket.Schemas.MarketMetadata](Polymarket.Schemas.MarketMetadata.md): Sports metadata for a market. Part of a `Market` returned by the Gamma API.
- [Polymarket.Schemas.MarketResolvedEvent](Polymarket.Schemas.MarketResolvedEvent.md): Market resolved event. Announces that a market has settled, naming the
winning asset and its outcome.

- [Polymarket.Schemas.NewMarketEvent](Polymarket.Schemas.NewMarketEvent.md): New market event. Announces a freshly created market on the websocket feed.

- [Polymarket.Schemas.Order](Polymarket.Schemas.Order.md): A Polymarket CLOB **V2** order — the value that gets EIP-712 signed and posted
to `POST /order`.
- [Polymarket.Schemas.PriceChange](Polymarket.Schemas.PriceChange.md): Price change struct. Part of a PriceChangeEvent.

- [Polymarket.Schemas.PriceChangeEvent](Polymarket.Schemas.PriceChangeEvent.md): Price change event.

- [Polymarket.Schemas.SendOrder](Polymarket.Schemas.SendOrder.md): The exact `POST /order` request payload — a signed order plus its routing
metadata — mirroring the CLOB `SendOrder` object.
- [Polymarket.Schemas.SendOrderResponse](Polymarket.Schemas.SendOrderResponse.md): A successful (`200`) response from the CLOB's `POST /order`.
- [Polymarket.Schemas.Series](Polymarket.Schemas.Series.md): A series an `Event` belongs to, as returned by the Gamma API (e.g. nested in
`GET /events/keyset`).
- [Polymarket.Schemas.Tag](Polymarket.Schemas.Tag.md): A tag attached to a `Market` returned by the Gamma API.

- [Polymarket.Schemas.TickSizeChangeEvent](Polymarket.Schemas.TickSizeChangeEvent.md): Tick size change event. Announces that the minimum price increment for an
asset has changed.

- [Polymarket.Supervisor](Polymarket.Supervisor.md): Supervisor for the processes to communicate with Polymarket.

- [Polymarket.WebSocket](Polymarket.WebSocket.md): A WebSocket client for the Polymarket CLOB market feed.
- [Polymarket.WebSocket.Handler](Polymarket.WebSocket.Handler.md): Behaviour for modules that handle decoded Polymarket websocket events.
- [Polymarket.WebSocket.Handlers.Noop](Polymarket.WebSocket.Handlers.Noop.md): Default no-op websocket handler.
- [Polymarket.WebSocket.MessageHandler](Polymarket.WebSocket.MessageHandler.md): Pure functions to handle messages coming from the Polymarket websocket.

- [Polymarket.WebSocket.SocketSupervisor](Polymarket.WebSocket.SocketSupervisor.md): Dynamic supervisor for all websocket connections to polymarket.

