Packages

An Elixir client for the Polymarket API.

Current section

Files

Jump to
ex_polymarket lib schemas price_change.ex
Raw

lib/schemas/price_change.ex

defmodule Polymarket.Schemas.PriceChange do
@moduledoc """
Price change struct. Part of a PriceChangeEvent.
"""
use TypedEctoSchema
@primary_key false
@derive Jason.Encoder
typed_embedded_schema do
field(:asset_id, :string)
field(:price, :float)
field(:size, :float)
field(:side, :string)
field(:hash, :string)
field(:best_bid, :float)
field(:best_ask, :float)
end
end