Skip to main content

GammaMarket

Struct GammaMarket 

Source
pub struct GammaMarket {
Show 40 fields pub id: String, pub condition_id: String, pub question_id: Option<String>, pub clob_token_ids: String, pub outcomes: String, pub question: String, pub description: Option<String>, pub start_date: Option<String>, pub end_date: Option<String>, pub active: Option<bool>, pub closed: Option<bool>, pub accepting_orders: Option<bool>, pub enable_order_book: Option<bool>, pub order_price_min_tick_size: Option<f64>, pub order_min_size: Option<f64>, pub maker_base_fee: Option<i64>, pub taker_base_fee: Option<i64>, pub market_slug: Option<String>, pub neg_risk: Option<bool>, pub liquidity_num: Option<f64>, pub volume_num: Option<f64>, pub volume_24hr: Option<f64>, pub outcome_prices: Option<String>, pub best_bid: Option<f64>, pub best_ask: Option<f64>, pub spread: Option<f64>, pub last_trade_price: Option<f64>, pub one_day_price_change: Option<f64>, pub one_week_price_change: Option<f64>, pub volume_1wk: Option<f64>, pub volume_1mo: Option<f64>, pub volume_1yr: Option<f64>, pub rewards_min_size: Option<f64>, pub rewards_max_spread: Option<f64>, pub competitive: Option<f64>, pub category: Option<String>, pub neg_risk_market_id: Option<String>, pub fee_schedule: Option<FeeSchedule>, pub game_id: Option<u64>, pub events: Option<Vec<GammaEvent>>,
}
Expand description

A market response from the Gamma API GET /markets.

References: https://docs.polymarket.com/developers/gamma-markets-api/get-markets

Fields§

§id: String

Internal Gamma market ID.

§condition_id: String

On-chain condition ID for the CTF contracts.

§question_id: Option<String>

Hash used for resolution.

§clob_token_ids: String

JSON-encoded array of two CLOB token IDs (Yes, No).

§outcomes: String

JSON-encoded outcome labels (e.g. ["Yes", "No"]).

§question: String

Market question/title.

§description: Option<String>

Detailed description.

§start_date: Option<String>

Market start date (ISO 8601).

§end_date: Option<String>

Market end date (ISO 8601).

§active: Option<bool>

Whether market is active.

§closed: Option<bool>

Whether market is closed.

§accepting_orders: Option<bool>

Whether CLOB is accepting orders.

§enable_order_book: Option<bool>

Whether order book trading is enabled.

§order_price_min_tick_size: Option<f64>

Minimum price increment.

§order_min_size: Option<f64>

Minimum order size.

§maker_base_fee: Option<i64>

Maker fee in basis points.

§taker_base_fee: Option<i64>

Taker fee in basis points.

§market_slug: Option<String>

URL slug.

§neg_risk: Option<bool>

Whether the market uses neg-risk CTF exchange.

§liquidity_num: Option<f64>

Numeric liquidity value for sorting.

§volume_num: Option<f64>

Numeric volume value for sorting.

§volume_24hr: Option<f64>

24-hour trading volume.

§outcome_prices: Option<String>

JSON-encoded outcome prices (e.g. ["0.60", "0.40"]).

§best_bid: Option<f64>

Best bid price.

§best_ask: Option<f64>

Best ask price.

§spread: Option<f64>

Bid-ask spread.

§last_trade_price: Option<f64>

Last trade price.

§one_day_price_change: Option<f64>

1-day price change.

§one_week_price_change: Option<f64>

1-week price change.

§volume_1wk: Option<f64>

1-week volume.

§volume_1mo: Option<f64>

1-month volume.

§volume_1yr: Option<f64>

1-year volume.

§rewards_min_size: Option<f64>

Minimum size for rewards eligibility.

§rewards_max_spread: Option<f64>

Maximum spread for rewards eligibility.

§competitive: Option<f64>

Competitiveness score.

§category: Option<String>

Market category.

§neg_risk_market_id: Option<String>

Neg-risk market ID for CTF exchange interaction.

§fee_schedule: Option<FeeSchedule>

Fee schedule for this market.

§game_id: Option<u64>

Game ID for sport markets. null and -1 both mean “no game” and surface as None. Reference shape: https://github.com/Polymarket/rs-clob-client/blob/main/src/gamma/types/response.rs.

§events: Option<Vec<GammaEvent>>

Events linked to this gamma market.

Trait Implementations§

Source§

impl Clone for GammaMarket

Source§

fn clone(&self) -> GammaMarket

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GammaMarket

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for GammaMarket

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<'de, T> RpcBorrow<'de> for T
where T: Deserialize<'de> + Debug + Send + Sync + Unpin,

§

impl<T> RpcRecv for T
where T: DeserializeOwned + Debug + Send + Sync + Unpin + 'static,

§

impl<T> Ungil for T
where T: Send,