Gdex v0.1.2 Gdex.Order View Source

Link to this section Summary

Functions

Cancel a previously placed order

Cancell all open orders

Cancell all open orders for the specified product

Get a single order by id

List the currently open orders

Place order on the exchange

Link to this section Types

Link to this type cancel_after() View Source
cancel_after() :: :min | :hour | :day
Link to this type list_opt() View Source
list_opt() :: {:status, order_status()} | {:product_id, binary()}
Link to this type order_opt() View Source
order_opt() ::
  {:client_oid, binary()}
  | {:type, order_type()}
  | {:stp, self_trade_prevention()}
  | {:price, Gdex.amount()}
  | {:size, Gdex.amount()}
  | {:time_in_force, time_in_force()}
  | {:cancel_after, cancel_after()}
  | {:post_only, boolean()}
  | {:funds, Gdex.amount()}
Link to this type order_side() View Source
order_side() :: :buy | :sell
Link to this type order_status() View Source
order_status() :: :open | :pending | :active
Link to this type order_type() View Source
order_type() :: :limit | :market | :stop
Link to this type self_trade_prevention() View Source
self_trade_prevention() ::
  :dc
  | :decrease_and_cancel
  | :co
  | :cancel_oldest
  | :cn
  | :cancel_newest
  | :cb
  | :cancel_both
Link to this type time_in_force() View Source
time_in_force() ::
  :gtc
  | :good_till_canceled
  | :gtt
  | :good_till_time
  | :ioc
  | :immediate_or_cancel
  | :fok
  | :fill_or_kill

Link to this section Functions

Cancel a previously placed order.

Cancell all open orders.

Cancell all open orders for the specified product.

Get a single order by id.

List the currently open orders.

Can be streamed.

Link to this function place(product_id, side, opts \\ []) View Source
place(binary(), order_side(), [order_opt()]) :: Gdex.Request.t()

Place order on the exchange.