Skip to main content
Version: mainnet (v0.71)

Order

An order in Vega, if active it will be on the order book for the market

type Order {
id: ID!
price: String!
timeInForce: OrderTimeInForce!
side: Side!
market: Market!
size: String!
remaining: String!
party: Party!
createdAt: Timestamp!
expiresAt: Timestamp
status: OrderStatus!
reference: String!
tradesConnection(
dateRange: DateRange
pagination: Pagination
): TradeConnection
type: OrderType
rejectionReason: OrderRejectionReason
version: String!
updatedAt: Timestamp
peggedOrder: PeggedOrder
liquidityProvision: LiquidityProvision
postOnly: Boolean
reduceOnly: Boolean
}

Fields

Order.id ● ID! non-null scalar

Hash of the order data

Order.price ● String! non-null scalar

The worst price the order will trade at (e.g. buy for price or less, sell for price or more) (uint64)

Order.timeInForce ● OrderTimeInForce! non-null enum

The timeInForce of order (determines how and if it executes, and whether it persists on the book)

Order.side ● Side! non-null enum

Whether the order is to buy or sell

Order.market ● Market! non-null object

The market the order is trading on (probably stored internally as a hash of the market details)

Order.size ● String! non-null scalar

Total number of units that may be bought or sold (immutable) (uint64)

Order.remaining ● String! non-null scalar

Number of units remaining of the total that have not yet been bought or sold (uint64)

Order.party ● Party! non-null object

The party that placed the order (probably stored internally as the party's public key)

Order.createdAt ● Timestamp! non-null scalar

RFC3339Nano formatted date and time for when the order was created (timestamp)

Order.expiresAt ● Timestamp scalar

Expiration time of this order (ISO-8601 RFC3339+Nano formatted date)

Order.status ● OrderStatus! non-null enum

The status of an order, for example 'Active'

Order.reference ● String! non-null scalar

The external reference (if available) for the order

Order.tradesConnection ● TradeConnection object

Trades relating to this order

Order.tradesConnection.dateRange ● DateRange input

Date range to retrieve trades from/to. Start and end time should be expressed as an integer value of nano-seconds past the Unix epoch

Order.tradesConnection.pagination ● Pagination input

Order.type ● OrderType enum

The order type

Order.rejectionReason ● OrderRejectionReason enum

Why the order was rejected

Order.version ● String! non-null scalar

Version of this order, counts the number of amends

Order.updatedAt ● Timestamp scalar

RFC3339Nano time the order was altered

Order.peggedOrder ● PeggedOrder object

PeggedOrder contains the details about a pegged order

Order.liquidityProvision ● LiquidityProvision object

The liquidity provision this order was created from

Order.postOnly ● Boolean scalar

Is this a post only order

Order.reduceOnly ● Boolean scalar

Is this a reduce only order

Returned by

orderByID query ● orderByReference query

Member of

Entities object ● LiquidityOrderReference object ● OrderEdge object