Private CLOB account endpoint wrappers.
These functions require a PolymarketClob.Client with complete L2 credentials and
are intentionally thin wrappers over PolymarketClob.HTTP.
Summary
Functions
Reports scoring (reward-eligibility) status for a list of order IDs.
Drops notifications via DELETE /notifications.
Lists API keys for the authenticated account.
Gets balance and allowance.
Gets closed-only ban status for the authenticated account.
Gets notifications for the authenticated account.
Gets open orders.
Gets a single order by order ID.
Gets pre-migration orders directly from the CLOB data endpoint.
Gets trade history.
Gets a single page of trade history.
Reports whether a single order is in the scoring (reward-eligible) set.
Updates balance and allowance via the official GET /balance-allowance/update endpoint.
Types
@type result() :: {:ok, term()} | {:error, PolymarketClob.Error.t()}
Functions
@spec are_orders_scoring(PolymarketClob.Client.t(), [String.t()], keyword()) :: result()
Reports scoring (reward-eligibility) status for a list of order IDs.
The body is a JSON array of order ID strings, matching the Python client's
are_orders_scoring(order_ids) shape.
@spec drop_notifications(PolymarketClob.Client.t(), keyword() | map(), keyword()) :: result()
Drops notifications via DELETE /notifications.
Accepted params mirror the Python client: :ids, a list of notification IDs joined
into the ids query parameter.
@spec get_api_keys( PolymarketClob.Client.t(), keyword() ) :: result()
Lists API keys for the authenticated account.
@spec get_balance_allowance(PolymarketClob.Client.t(), keyword(), keyword()) :: result()
Gets balance and allowance.
signature_type is always included, matching the official client. Optional params:
:asset_type and :token_id.
@spec get_closed_only_mode( PolymarketClob.Client.t(), keyword() ) :: result()
Gets closed-only ban status for the authenticated account.
@spec get_notifications( PolymarketClob.Client.t(), keyword() ) :: result()
Gets notifications for the authenticated account.
@spec get_open_orders(PolymarketClob.Client.t(), keyword(), keyword()) :: result()
Gets open orders.
Accepted params mirror the Python client: :market, :asset_id, :id,
and :next_cursor.
@spec get_order(PolymarketClob.Client.t(), String.t(), keyword()) :: result()
Gets a single order by order ID.
@spec get_pre_migration_orders(PolymarketClob.Client.t(), keyword(), keyword()) :: result()
Gets pre-migration orders directly from the CLOB data endpoint.
@spec get_trades(PolymarketClob.Client.t(), keyword(), keyword()) :: result()
Gets trade history.
Accepted params mirror the Python client: :market, :asset_id, :id, :after,
:before, :maker_address, and :next_cursor.
@spec get_trades_paginated(PolymarketClob.Client.t(), keyword(), keyword()) :: result()
Gets a single page of trade history.
Same path and signing scope as get_trades/3. This wrapper exposes the
Python get_trades_paginated name for callers that want the explicit page
shape (%{"trades" => [...], "next_cursor" => ..., "limit" => ..., "count" => ...}).
Both wrappers are direct-page calls; auto-pagination is intentionally not
provided here (see ENDPOINT_COVERAGE.md § Pagination Policy).
@spec is_order_scoring(PolymarketClob.Client.t(), keyword(), keyword()) :: result()
Reports whether a single order is in the scoring (reward-eligible) set.
Accepts an optional :order_id query param. With no params, the endpoint
returns scoring status for the authenticated account using whatever default
the CLOB applies; mirror Python by passing [order_id: id] for an exact
query.
@spec update_balance_allowance(PolymarketClob.Client.t(), keyword(), keyword()) :: result()
Updates balance and allowance via the official GET /balance-allowance/update endpoint.
The current Python client models this write as an L2-authenticated GET with query params.
signature_type is always included. Optional params: :asset_type and :token_id.