OBJECT

Subscription

Subscriptions allow a caller to receive new information as it is available from the VEGA platform.

link GraphQL Schema definition

1 type Subscription {
2
3 # Subscribe to the candles updates
4 #
5 # Arguments
6 # marketId: ID of the market we want to listen candles for
7 # interval: Interval of the candles we want to listen for
8 candles(marketId: ID!, interval: Interval!): Candle!
9
10 # Subscribe to orders updates
11 #
12 # Arguments
13 # marketId: ID of the market from which we want orders updates
14 # partyId: ID of the party from which we want orders updates
15 orders(marketId: ID, partyId: ID): [Order!]
16
17 # Subscribe to the trades updates
18 #
19 # Arguments
20 # marketId: ID of the market from which we want trades updates
21 # partyId: ID of the party from which we want trades updates
22 trades(marketId: ID, partyId: ID): [Trade!]
23
24 # Subscribe to the positions updates
25 #
26 # Arguments
27 # partyId: ID of the party from we want updates for
28 # marketId: ID of the market from which we want position updates
29 positions(partyId: ID, marketId: ID): Position!
30
31 # Subscribe to the market depths update
32 #
33 # Arguments
34 # marketId: ID of the market we want to receive market depth
35 # updates for
36 marketDepth(marketId: ID!): MarketDepth!
37
38 # Subscribe to price level market depth updates
39 #
40 # Arguments
41 # marketId: ID of the market we want to receive market depth
42 # pricelevel updates for
43 marketDepthUpdate(marketId: ID!): MarketDepthUpdate!
44
45 # Subscribe to the accounts updates
46 #
47 # Arguments
48 # marketId: ID of the market from which we want accounts updates
49 # partyId: ID of the party from which we want accounts updates
50 # asset: Asset code
51 # type: Type of the account
52 accounts(marketId: ID, partyId: ID, asset: String, type: AccountType): Account!
53
54 # Subscribe to the mark price changes
55 #
56 # Arguments
57 # marketId: id of the market we want to subscribe to the market
58 # data changes
59 marketData(marketId: ID): MarketData!
60
61 # Subscribe to the margin changes
62 #
63 # Arguments
64 # partyId: id of the trader we want to subscribe for margin
65 # updates
66 # marketId: market we want to listen to margin updates (nil if we
67 # want updates for all markets)
68 margins(partyId: ID!, marketId: ID): MarginLevels!
69
70 # Subscribe to proposals. Leave out all arguments to receive all proposals
71 #
72 # Arguments
73 # partyId: Optional party id whose proposals are to be streamed
74 proposals(partyId: ID): Proposal!
75
76 # Subscribe to votes, either by proposal id or pary id
77 #
78 # Arguments
79 # proposalId: Optional proposal id which votes are to be streamed
80 # partyId: Optional party id whose votes are to be streamed
81 votes(proposalId: ID, partyId: ID): ProposalVote!
82
83 # Subscribe to event data from the event bus
84 #
85 # Arguments
86 # types: the types to subscribe to has to be an array
87 # marketId: optional filter by market ID
88 # partyId: optional filter by party ID
89 # batchSize: Specifies the size that the client will receive
90 # events in. Using 0 results in a variable batch size being sent. The stream will
91 # be closed if the client fails to read a batch within 5 seconds
92 busEvents(types: [BusEventType!]!, marketId: ID, partyId: ID, batchSize: Int!): [BusEvent!]
93
94 }

link Required by

This element is not required by anyone