Polymarket.Schemas.SendOrderResponse (Polymarket v0.1.1)

Copy Markdown View Source

A successful (200) response from the CLOB's POST /order.

status is "live" (resting on the book), "matched" (filled immediately, with transactions_hashes/trade_ids populated) or "delayed". error_msg is empty on success. Amounts are fixed-point strings with 6 decimals.

Summary

Functions

Builds a SendOrderResponse from the raw (JSON-decoded) POST /order body.

Types

t()

@type t() :: %Polymarket.Schemas.SendOrderResponse{
  error_msg: String.t(),
  making_amount: String.t() | nil,
  order_id: String.t() | nil,
  status: String.t() | nil,
  success: boolean(),
  taking_amount: String.t() | nil,
  trade_ids: [String.t()],
  transactions_hashes: [String.t()]
}

Functions

from_attrs(attrs)

@spec from_attrs(map()) :: t()

Builds a SendOrderResponse from the raw (JSON-decoded) POST /order body.

Reads the API's camelCase keys (atom or string) leniently, filling defaults for anything absent.