code.vegaprotocol.io/vega@v0.79.0/datanode/gateway/graphql/schema.graphql (about) 1 # VEGA - GraphQL schema 2 3 schema { 4 query: Query 5 subscription: Subscription 6 } 7 8 "Generic structure holding a key/value pair." 9 type Metadata { 10 "Key of the metadata." 11 key: String! 12 "Value of the metadata." 13 value: String! 14 } 15 16 "The result from processing a transaction" 17 type TransactionResult { 18 "The party which submitted this transaction" 19 partyId: String! 20 "The hash of the transaction" 21 hash: String! 22 "Was the transaction successful or not?" 23 status: Boolean! 24 "The error emitted by the transaction, will be null if the transaction succeeded" 25 error: String 26 } 27 28 "Create an order linked to an index rather than a price" 29 type PeggedOrder { 30 "Index to link this order to" 31 reference: PeggedReference! 32 "Price offset from the peg" 33 offset: String! 34 } 35 36 "Details of the iceberg order" 37 type IcebergOrder { 38 "Size of the order that will be made visible if the iceberg order is replenished after trading" 39 peakSize: String! 40 "If the visible size of the order falls below this value, it will be replenished back to the peak size using the reserved amount" 41 minimumVisibleSize: String! 42 "Size of the order that is reserved and used to restore the iceberg's peak when it is refreshed" 43 reservedRemaining: String! 44 } 45 46 "Subscriptions allow a caller to receive new information as it is available from the Vega network." 47 type Subscription { 48 "Subscribe to the accounts updates" 49 accounts( 50 "ID of the market from which to receive accounts updates for" 51 marketId: ID 52 "ID of the party from which to receive accounts updates for" 53 partyId: ID 54 "Asset code" 55 assetId: ID 56 "Type of the account" 57 type: AccountType 58 "Whether to return all derived parties from AMMs for the given party. If used, party ID is required" 59 includeDerivedParties: Boolean 60 ): [AccountUpdate!]! 61 62 "Subscribe to event data from the event bus" 63 busEvents( 64 "The types to subscribe to has to be an array" 65 types: [BusEventType!]! 66 "Optional filter by market ID" 67 marketId: ID 68 "Optional filter by party ID" 69 partyId: ID 70 "Specifies the size that the client will receive events in. Using 0 results in a variable batch size being sent. The stream will be closed if the client fails to read a batch within 5 seconds" 71 batchSize: Int! 72 ): [BusEvent!] 73 74 "Subscribe to the candles updates" 75 candles( 76 "ID of the market to listen to for candles" 77 marketId: ID! 78 "Interval of the candles to listen for" 79 interval: Interval! 80 ): Candle! 81 82 "Subscribe to liquidity provisioning data" 83 liquidityProvisions( 84 "The party ID to subscribe for, empty if all" 85 partyId: ID 86 "The market ID to subscribe for, empty if all" 87 marketId: ID 88 ): [LiquidityProvisionUpdate!] 89 90 "Subscribe to the margin changes" 91 margins( 92 "ID of the party you want to subscribe to for margin updates" 93 partyId: ID! 94 "ID of the market you want to listen to for margin updates (nil if you want updates for all markets)" 95 marketId: ID 96 ): MarginLevelsUpdate! 97 98 "Subscribe to the mark price changes" 99 marketsData( 100 "ID of the market for which you want to subscribe to the market data changes" 101 marketIds: [ID!]! 102 ): [ObservableMarketData!]! 103 104 "Subscribe to the market depths update" 105 marketsDepth( 106 "ID of the market you want to receive market depth updates for" 107 marketIds: [ID!]! 108 ): [ObservableMarketDepth!]! 109 110 "Subscribe to price level market depth updates" 111 marketsDepthUpdate( 112 "ID of the market you want to receive market depth price level updates for" 113 marketIds: [ID!]! 114 ): [ObservableMarketDepthUpdate!]! 115 116 "Subscribe to orders updates" 117 orders("Filter orders" filter: OrderByMarketAndPartyIdsFilter): [OrderUpdate!] 118 119 "Subscribe to the positions updates" 120 positions( 121 "ID of the party from you want updates for" 122 partyId: ID 123 "ID of the market from which you want position updates" 124 marketId: ID 125 "Whether to return all derived parties from AMMs for the given party. If used, party ID is required" 126 includeDerivedParties: Boolean 127 ): [PositionUpdate!]! 128 129 "Subscribe to proposals. Leave out all arguments to receive all proposals" 130 proposals( 131 "Optional party ID whose proposals are to be streamed" 132 partyId: ID 133 ): Proposal! 134 135 "Subscribe to the trades updates" 136 trades( 137 "ID of the market from which you want trades updates" 138 marketId: ID 139 "ID of the party from which you want trades updates" 140 partyId: ID 141 ): [TradeUpdate!] 142 @deprecated( 143 reason: "Use tradesStream instead as it allows for filtering multiple markets and/or parties at once" 144 ) 145 146 "Subscribe to the trades updates" 147 tradesStream( 148 "Filter to apply to trades" 149 filter: TradesSubscriptionFilter! 150 ): [TradeUpdate!] 151 152 "Subscribe to votes, either by proposal ID or party ID" 153 votes( 154 "Optional proposal ID which votes are to be streamed" 155 proposalId: ID 156 "Optional party ID whose votes are to be streamed" 157 partyId: ID 158 ): ProposalVote! 159 } 160 161 "Margins for a given a party" 162 type MarginLevels { 163 "Market in which the margin is required for this party" 164 market: Market! 165 "Asset for the current margins" 166 asset: Asset! 167 "The party for this margin" 168 party: Party! 169 "Minimal margin for the position to be maintained in the network (unsigned integer)" 170 maintenanceLevel: String! 171 "If the margin is between maintenance and search, the network will initiate a collateral search, expressed as unsigned integer" 172 searchLevel: String! 173 "This is the minimum margin required for a party to place a new order on the network, expressed as unsigned integer" 174 initialLevel: String! 175 "When in isolated margin, the required order margin level, otherwise, 0" 176 orderMarginLevel: String! 177 """ 178 If the margin of the party is greater than this level, then collateral will be released from the margin account into 179 the general account of the party for the given asset. 180 """ 181 collateralReleaseLevel: String! 182 "RFC3339Nano time from at which this margin level was relevant" 183 timestamp: Timestamp! 184 185 "Margin mode of the party, cross margin or isolated margin" 186 marginMode: MarginMode! 187 188 "Margin factor, only relevant for isolated margin mode, else 0" 189 marginFactor: String! 190 } 191 192 "Margins for a hypothetical position not related to any existing party" 193 type AbstractMarginLevels { 194 "Market in which the margin is required for this party" 195 market: Market! 196 "Asset for the current margins" 197 asset: Asset! 198 "Minimal margin for the position to be maintained in the network (unsigned integer)" 199 maintenanceLevel: String! 200 "If the margin is between maintenance and search, the network will initiate a collateral search, expressed as unsigned integer" 201 searchLevel: String! 202 "This is the minimum margin required for a party to place a new order on the network, expressed as unsigned integer" 203 initialLevel: String! 204 "When in isolated margin, the required order margin level, otherwise, 0" 205 orderMarginLevel: String! 206 """ 207 If the margin of the party is greater than this level, then collateral will be released from the margin account into 208 the general account of the party for the given asset. 209 """ 210 collateralReleaseLevel: String! 211 "Margin mode of the party, cross margin or isolated margin" 212 marginMode: MarginMode! 213 "Margin factor, only relevant for isolated margin mode, else 0" 214 marginFactor: String! 215 } 216 217 enum MarginMode { 218 "Margin mode is not specified." 219 MARGIN_MODE_UNSPECIFIED 220 "Party is in cross margin mode" 221 MARGIN_MODE_CROSS_MARGIN 222 "Party is in isolated margin mode" 223 MARGIN_MODE_ISOLATED_MARGIN 224 } 225 226 "Margins for a given a party" 227 type MarginLevelsUpdate { 228 "Market in which the margin is required for this party" 229 marketId: ID! 230 "Asset for the current margins" 231 asset: ID! 232 "The party for this margin" 233 partyId: ID! 234 "Minimal margin for the position to be maintained in the network (unsigned integer)" 235 maintenanceLevel: String! 236 "If the margin is between maintenance and search, the network will initiate a collateral search (unsigned integer)" 237 searchLevel: String! 238 "This is the minimum margin required for a party to place a new order on the network (unsigned integer)" 239 initialLevel: String! 240 "When in isolated margin, the required order margin level, otherwise, 0" 241 orderMarginLevel: String! 242 """ 243 If the margin of the party is greater than this level, then collateral will be released from the margin account into 244 the general account of the party for the given asset. 245 """ 246 collateralReleaseLevel: String! 247 "RFC3339Nano time from at which this margin level was relevant" 248 timestamp: Timestamp! 249 250 "Margin mode of the party, cross margin or isolated margin" 251 marginMode: MarginMode! 252 253 "Margin factor, only relevant for isolated margin mode, else 0" 254 marginFactor: String! 255 } 256 257 "Details of a perpetual product." 258 type PerpetualData { 259 "Funding payment for this period as the difference between the time-weighted average price of the external and internal data point." 260 fundingPayment: String 261 "Percentage difference between the time-weighted average price of the external and internal data point." 262 fundingRate: String 263 "Time-weighted average price calculated from data points for this period from the external data source." 264 externalTwap: String 265 "Time-weighted average price calculated from data points for this period from the internal data source." 266 internalTwap: String 267 "Funding period sequence number" 268 seqNum: Int! 269 "Time at which the funding period started" 270 startTime: Timestamp! 271 "Internal composite price used as input to the internal VWAP" 272 internalCompositePrice: String! 273 "The methodology used to calculated internal composite price for perpetual markets" 274 internalCompositePriceType: CompositePriceType! 275 "RFC3339Nano time indicating the next time internal composite price will be calculated for perpetual markets, where applicable" 276 nextInternalCompositePriceCalc: String! 277 "The last value from the external oracle" 278 underlyingIndexPrice: String! 279 "The internal state of the underlying internal composite price" 280 internalCompositePriceState: CompositePriceState 281 } 282 283 type CompositePriceSource { 284 "The current value of the composite source price" 285 price: String! 286 "The last time the price source was updated in RFC3339Nano" 287 lastUpdated: Timestamp! 288 "The source of the price" 289 PriceSource: String! 290 } 291 292 type CompositePriceState { 293 "Underlying state of the composite price" 294 priceSources: [CompositePriceSource!] 295 } 296 297 union ProductData = PerpetualData 298 299 enum CompositePriceType { 300 "Composite price is calculated as a weighted average of the underlying price sources" 301 COMPOSITE_PRICE_TYPE_WEIGHTED 302 "Composite price is calculated as a median of the underlying price sources" 303 COMPOSITE_PRICE_TYPE_MEDIAN 304 "Composite price is set to the last trade (legacy)" 305 COMPOSITE_PRICE_TYPE_LAST_TRADE 306 } 307 308 "Live data of a Market" 309 type MarketData { 310 "Market of the associated mark price" 311 market: Market! 312 "The mark price (an unsigned integer)" 313 markPrice: String! 314 "The methodology used for the calculation of the mark price" 315 markPriceType: CompositePriceType! 316 "The highest price level on an order book for buy orders." 317 bestBidPrice: String! 318 "The aggregated volume being bid at the best bid price." 319 bestBidVolume: String! 320 "The lowest price level on an order book for offer orders." 321 bestOfferPrice: String! 322 "The aggregated volume being offered at the best offer price." 323 bestOfferVolume: String! 324 "The highest price level on an order book for buy orders not including pegged orders." 325 bestStaticBidPrice: String! 326 "The aggregated volume being offered at the best static bid price, excluding pegged orders" 327 bestStaticBidVolume: String! 328 "The lowest price level on an order book for offer orders not including pegged orders." 329 bestStaticOfferPrice: String! 330 "The aggregated volume being offered at the best static offer price, excluding pegged orders." 331 bestStaticOfferVolume: String! 332 "The arithmetic average of the best bid price and best offer price." 333 midPrice: String! 334 "The arithmetic average of the best static bid price and best static offer price" 335 staticMidPrice: String! 336 "RFC3339Nano time at which this market price was relevant" 337 timestamp: Timestamp! 338 "The sum of the size of all positions greater than 0." 339 openInterest: String! 340 "RFC3339Nano time at which the auction will stop (null if not in auction mode)" 341 auctionEnd: String 342 "RFC3339Nano time at which the next auction will start (null if none is scheduled)" 343 auctionStart: String 344 "Indicative price if the auction ended now, 0 if not in auction mode" 345 indicativePrice: String! 346 "Indicative volume if the auction ended now, 0 if not in auction mode" 347 indicativeVolume: String! 348 "What mode the market is in (auction, continuous, etc)" 349 marketTradingMode: MarketTradingMode! 350 "Current state of the market" 351 marketState: MarketState! 352 "What triggered an auction (if an auction was started)" 353 trigger: AuctionTrigger! 354 "What extended the ongoing auction (if an auction was extended)" 355 extensionTrigger: AuctionTrigger! 356 "The amount of stake targeted for this market" 357 targetStake: String 358 "The supplied stake for the market" 359 suppliedStake: String 360 "The liquidity commitments for a given market" 361 commitments: MarketDataCommitments! 362 "A list of valid price ranges per associated trigger" 363 priceMonitoringBounds: [PriceMonitoringBounds!] 364 "The market value proxy" 365 marketValueProxy: String! 366 "The equity-like share of liquidity fee for each liquidity provider" 367 liquidityProviderFeeShare: [LiquidityProviderFeeShare!] 368 "SLA performance statistics" 369 liquidityProviderSla: [LiquidityProviderSLA!] 370 "RFC3339Nano time indicating the next time positions will be marked to market" 371 nextMarkToMarket: String! 372 "The market growth factor for the last market time window" 373 marketGrowth: String! 374 "The last traded price (an unsigned integer)" 375 lastTradedPrice: String! 376 "The current funding rate. This applies only to a perpetual market" 377 productData: ProductData 378 "RFC3339Nano time indicating the next time the network will attempt to close part of its position" 379 nextNetworkCloseout: String! 380 "State of the underlying internal composite price" 381 markPriceState: CompositePriceState 382 "State of the active protocol automated purchase for the market if available (spot market only)" 383 activeProtocolAutomatedPurchase: ProtocolAutomatedPurchaseState 384 } 385 386 type ProtocolAutomatedPurchaseState { 387 "The ID of the active protocol automated purchase" 388 id: String! 389 "The order ID of the active order placed on behalf of the active protocol automated purchase" 390 orderId: String 391 } 392 393 "Live data of a Market" 394 type ObservableMarketData { 395 "Market ID of the associated mark price" 396 marketId: ID! 397 "The mark price (an unsigned integer)" 398 markPrice: String! 399 "The highest price level on an order book for buy orders." 400 bestBidPrice: String! 401 "The aggregated volume being bid at the best bid price." 402 bestBidVolume: String! 403 "The lowest price level on an order book for offer orders." 404 bestOfferPrice: String! 405 "The aggregated volume being offered at the best offer price." 406 bestOfferVolume: String! 407 "The highest price level on an order book for buy orders not including pegged orders." 408 bestStaticBidPrice: String! 409 "The aggregated volume being offered at the best static bid price, excluding pegged orders" 410 bestStaticBidVolume: String! 411 "The lowest price level on an order book for offer orders not including pegged orders" 412 bestStaticOfferPrice: String! 413 "The aggregated volume being offered at the best static offer price, excluding pegged orders" 414 bestStaticOfferVolume: String! 415 "The arithmetic average of the best bid price and best offer price" 416 midPrice: String! 417 "The arithmetic average of the best static bid price and best static offer price" 418 staticMidPrice: String! 419 "RFC3339Nano time at which this market price was relevant" 420 timestamp: Timestamp! 421 "The sum of the size of all positions greater than 0" 422 openInterest: String! 423 "RFC3339Nano time at which the auction will stop (null if not in auction mode)" 424 auctionEnd: String 425 "RFC3339Nano time at which the next auction will start (null if none is scheduled)" 426 auctionStart: String 427 "Indicative price if the auction ended now, 0 if not in auction mode" 428 indicativePrice: String! 429 "Indicative volume if the auction ended now, 0 if not in auction mode" 430 indicativeVolume: String! 431 "What mode the market is in (auction, continuous etc)" 432 marketTradingMode: MarketTradingMode! 433 "Current state of the market" 434 marketState: MarketState! 435 "What triggered an auction (if an auction was started)" 436 trigger: AuctionTrigger! 437 "What extended the ongoing auction (if an auction was extended)" 438 extensionTrigger: AuctionTrigger! 439 "The amount of stake targeted for this market" 440 targetStake: String 441 "The supplied stake for the market" 442 suppliedStake: String 443 "A list of valid price ranges per associated trigger" 444 priceMonitoringBounds: [PriceMonitoringBounds!] 445 "The market value proxy" 446 marketValueProxy: String! 447 "The equity-like share of liquidity fee for each liquidity provider" 448 liquidityProviderFeeShare: [ObservableLiquidityProviderFeeShare!] 449 "SLA performance statistics" 450 liquidityProviderSla: [ObservableLiquidityProviderSLA!] 451 "RFC3339Nano time indicating the next time positions will be marked to market" 452 nextMarkToMarket: String! 453 "The market growth factor for the last market time window" 454 marketGrowth: String! 455 "The last traded price (an unsigned integer)" 456 lastTradedPrice: String! 457 "The current funding rate. This applies only to a perpetual market" 458 productData: ProductData 459 "The methodology used to calculated mark price" 460 markPriceType: CompositePriceType! 461 "State of the underlying internal composite price" 462 markPriceState: CompositePriceState 463 "State of the active protocol automated purchase for the market if available (spot market only)" 464 activeProtocolAutomatedPurchase: ProtocolAutomatedPurchaseState 465 } 466 467 "Timestamps for when the market changes state" 468 type MarketTimestamps { 469 "RFC3339Nano time when the market is first proposed" 470 proposed: Timestamp 471 "RFC3339Nano time when the market has been voted in and waiting to be created" 472 pending: Timestamp! 473 "RFC3339Nano time when the market is open and ready to accept trades" 474 open: Timestamp! 475 "RFC3339Nano time when the market is closed" 476 close: Timestamp! 477 } 478 479 "The equity-like share of liquidity fee for each liquidity provider" 480 type LiquidityProviderFeeShare { 481 "The liquidity provider party ID" 482 party: Party! 483 "The share owned by this liquidity provider" 484 equityLikeShare: String! 485 "The average entry valuation of the liquidity provider for the market" 486 averageEntryValuation: String! 487 "The average liquidity score" 488 averageScore: String! 489 "The virtual stake for this liquidity provider" 490 virtualStake: String! 491 } 492 493 "The equity-like share of liquidity fee for each liquidity provider" 494 type ObservableLiquidityProviderFeeShare { 495 "The liquidity provider party ID" 496 partyId: ID! 497 "The share owned by this liquidity provider (float)" 498 equityLikeShare: String! 499 "The average entry valuation of the liquidity provider for the market" 500 averageEntryValuation: String! 501 "The average liquidity score" 502 averageScore: String! 503 } 504 505 "The SLA statistics for each liquidity provider" 506 type LiquidityProviderSLA { 507 "The liquidity provider party ID" 508 party: Party! 509 "Indicates how often LP meets the commitment during the current epoch." 510 currentEpochFractionOfTimeOnBook: String! 511 "Indicates how often LP met the commitment in the previous epoch." 512 lastEpochFractionOfTimeOnBook: String! 513 "Indicates the fee penalty amount applied in the previous epoch." 514 lastEpochFeePenalty: String! 515 "Indicates the bond penalty amount applied in the previous epoch." 516 lastEpochBondPenalty: String! 517 "Determines how the fee penalties from past epochs affect future fee revenue." 518 hysteresisPeriodFeePenalties: [String!] 519 "Represents the total amount of funds LP must supply. The amount to be supplied is in the market’s settlement currency, spread on both buy and sell sides of the order book within a defined range." 520 requiredLiquidity: String! 521 "Notional volume of orders within the range provided on the buy side of the book." 522 notionalVolumeBuys: String! 523 "Notional volume of orders within the range provided on the sell side of the book." 524 notionalVolumeSells: String! 525 } 526 527 "The SLA statistics for each liquidity provider" 528 type ObservableLiquidityProviderSLA { 529 "The liquidity provider party ID" 530 party: ID! 531 "Indicates how often LP meets the commitment during the current epoch." 532 currentEpochFractionOfTimeOnBook: String! 533 "Indicates how often LP meets the commitment during last epoch." 534 lastEpochFractionOfTimeOnBook: String! 535 "Indicates the fee penalty amount applied in the previous epoch." 536 lastEpochFeePenalty: String! 537 "Indicates the bond penalty amount applied in the previous epoch." 538 lastEpochBondPenalty: String! 539 "Determines how the fee penalties from past epochs affect future fee revenue." 540 hysteresisPeriodFeePenalties: [String!] 541 "Represents the total amount of funds LP must supply. The amount to be supplied is in the market’s settlement currency, spread on both buy and sell sides of the order book within a defined range." 542 requiredLiquidity: String! 543 "Notional volume of orders within the range provided on the buy side of the book." 544 notionalVolumeBuys: String! 545 "Notional volume of orders within the range provided on the sell side of the book." 546 notionalVolumeSells: String! 547 } 548 549 "The liquidity commitments for this market" 550 type MarketDataCommitments { 551 "A set of liquidity sell orders to meet the liquidity provision obligation." 552 sells: [LiquidityOrderReference!] 553 "A set of liquidity buy orders to meet the liquidity provision obligation." 554 buys: [LiquidityOrderReference!] 555 } 556 557 type TransactionSubmitted { 558 success: Boolean! 559 } 560 561 "Filter input for historical balance queries" 562 input AccountFilter { 563 "Restrict accounts to those holding balances in this asset ID." 564 assetId: ID 565 "Restrict accounts to those owned by the parties in this list. Pass an empty list for no filter." 566 partyIds: [ID!] 567 "Restrict accounts to those connected to the markets in this list. Pass an empty list for no filter." 568 marketIds: [ID!] 569 "Restrict accounts to those connected to any of the types in this list. Pass an empty list for no filter." 570 accountTypes: [AccountType!] 571 } 572 573 "Filter for historical entry ledger queries, you must provide at least one party in FromAccountFilter, or ToAccountFilter" 574 input LedgerEntryFilter { 575 """ 576 Determines whether an entry must have accounts matching both the account_from_filter 577 and the account_to_filter. If set to 'true', entries must have matches in both filters. 578 If set to `false`, entries matching only the account_from_filter or the account_to_filter will also be included. 579 """ 580 CloseOnAccountFilters: Boolean 581 "Used to set values for filtering sender accounts. Party must be provided in this filter or to_account_filter, or both." 582 FromAccountFilter: AccountFilter 583 "Used to set values for filtering receiver accounts. Party must be provided in this filter or from_account_filter, or both." 584 ToAccountFilter: AccountFilter 585 "List of transfer types that is used for filtering sender and receiver accounts." 586 TransferTypes: [TransferType] 587 "Optional transfer ID to filter by. If provided, all other filters are ignored." 588 TransferId: ID 589 } 590 591 "Filter for historical reward summary queries" 592 input RewardSummaryFilter { 593 assetIds: [ID!] 594 marketIds: [ID!] 595 fromEpoch: Int 596 toEpoch: Int 597 } 598 599 "Queries allow a caller to read data and filter data via GraphQL." 600 type Query { 601 amms( 602 "AMM ID to filter for. Party ID and Market ID filters must not be set if used." 603 id: ID 604 "Party ID to filter for. If provided any other filters will be ignored." 605 partyId: ID 606 "Market ID to filter for. Must be provided as the only filter if used." 607 marketId: ID 608 609 """ 610 Party's underlying AMM sub-account to filter for. A party will only ever have one AMM sub-account regardless of how many AMMs they have created. 611 This filter is ignored if party ID, market ID, or AMM ID is set. 612 """ 613 ammPartyId: ID 614 "AMM status to filter for. This filter is ignored if any of the other filters are set." 615 status: AMMStatus 616 "Restrict AMMs to those that are actively trading. If not set, it is treated as being false." 617 liveOnly: Boolean 618 "Optional pagination information" 619 pagination: Pagination 620 ): AMMConnection! 621 622 "An asset which is used in the vega network" 623 asset("ID of the asset" id: ID!): Asset 624 625 "The list of all assets in use in the Vega network or the specified asset if ID is provided" 626 assetsConnection(id: ID, pagination: Pagination): AssetsConnection 627 628 "Get historical balances for an account within the given date range" 629 balanceChanges( 630 "Optional filter to restrict queried accounts to those of a specific asset, party, market or type" 631 filter: AccountFilter 632 """ 633 Date range to retrieve historical balances from/to. 634 Start and end time should be expressed as an integer value of Unix nanoseconds. 635 If a cursor is not provided in the pagination controls, 636 the date range must be provided with a start or end date, or both. 637 The date range is inclusive of the start date and exclusive of the end date. 638 The date range must be no more than 1 year in duration. 639 Dates before 2020-01-01 will not be accepted. 640 """ 641 dateRange: DateRange 642 "Optional pagination information" 643 pagination: Pagination 644 ): AggregatedBalanceConnection! 645 646 "Get the current referral program" 647 currentReferralProgram: CurrentReferralProgram 648 649 "Get the current volume discount program" 650 currentVolumeDiscountProgram: VolumeDiscountProgram 651 652 "Get the current volume rebate program" 653 currentVolumeRebateProgram: VolumeRebateProgram 654 655 "List core snapshots" 656 coreSnapshots(pagination: Pagination): CoreSnapshotConnection 657 658 "Find a deposit using its ID" 659 deposit("ID of the Deposit" id: ID!): Deposit 660 661 "Fetch all deposits" 662 deposits( 663 "Date range to fetch deposits between" 664 dateRange: DateRange 665 "Pagination options" 666 pagination: Pagination 667 ): DepositsConnection 668 669 "Fetch all entities for a given transaction hash" 670 entities(txHash: String!): Entities! 671 672 "Get data for a specific epoch, if ID omitted it gets the current epoch. If the string is 'next', fetch the next epoch" 673 epoch(id: ID, block: String): Epoch! 674 675 "List reward summary per epoch by asset, market, reward type" 676 epochRewardSummaries( 677 filter: RewardSummaryFilter 678 pagination: Pagination 679 ): EpochRewardSummaryConnection 680 681 "Get the signatures bundle to allowlist an ERC20 token in the collateral bridge" 682 erc20ListAssetBundle("ID of the asset" assetId: ID!): Erc20ListAssetBundle 683 684 "Get the signature bundle to add a particular validator to the signer list of the multisig contract" 685 erc20MultiSigSignerAddedBundles( 686 "The node ID of the validator of which a signature bundle is required" 687 nodeId: ID! 688 "The ethereum address of the submitter" 689 submitter: String 690 "The epoch that generated the bundle i.e the epoch in which the node was promoted to tendermint validator" 691 epochSeq: String 692 "Filter signature bundles to those related to the contract on the given chain ID" 693 chainID: String 694 "Pagination" 695 pagination: Pagination 696 ): ERC20MultiSigSignerAddedConnection! 697 698 "Get the signatures bundle to remove a particular validator from signer list of the multisig contract" 699 erc20MultiSigSignerRemovedBundles( 700 "The node ID of the validator of which a signature bundle is required" 701 nodeId: ID! 702 "The ethereum address of the validator that will submit the bundle" 703 submitter: String 704 "The epoch that generated the bundle i.e the epoch in which the node was demoted from a tendermint validator" 705 epochSeq: String 706 "Filter signature bundles to those related to the contract on the given chain ID" 707 chainID: String 708 "Pagination" 709 pagination: Pagination 710 ): ERC20MultiSigSignerRemovedConnection! 711 712 "Get the signature bundle to update the token limits (maxLifetimeDeposit and withdrawThreshold) for a given ERC20 token (already allowlisted) in the collateral bridge" 713 erc20SetAssetLimitsBundle( 714 "ID of the proposal to update an asset" 715 proposalId: ID! 716 ): ERC20SetAssetLimitsBundle! 717 718 "Find an erc20 withdrawal approval using its withdrawal ID" 719 erc20WithdrawalApproval( 720 "ID of the withdrawal" 721 withdrawalId: ID! 722 ): Erc20WithdrawalApproval 723 724 "Return an estimation of the potential cost for a new order" 725 estimateOrder( 726 "ID of the market to place the order" 727 marketId: ID! 728 "ID of the party placing the order" 729 partyId: ID! 730 "Price of the asset" 731 price: String 732 "Size of the order" 733 size: String! 734 "Side of the order (Buy or Sell)" 735 side: Side! 736 "TimeInForce of the order" 737 timeInForce: OrderTimeInForce! 738 "RFC3339Nano expiration time of the order" 739 expiration: Timestamp 740 "Type of the order" 741 type: OrderType! 742 ): OrderEstimate! 743 @deprecated(reason: "Use estimateFees and estimatePosition instead") 744 745 "Return an estimation of the potential cost for a new order" 746 estimateFees( 747 "ID of the market to place the order on" 748 marketId: ID! 749 "ID of the party placing the order" 750 partyId: ID! 751 "Price of the asset" 752 price: String 753 "Size of the order" 754 size: String! 755 "Side of the order (buy or sell)" 756 side: Side! 757 "Time in force of the order" 758 timeInForce: OrderTimeInForce! 759 "RFC3339Nano expiration time of the order" 760 expiration: Timestamp 761 "Type of the order" 762 type: OrderType! 763 ): FeeEstimate! 764 765 "Return a margin range for the specified position and liquidation price range if available collateral is supplied" 766 estimatePosition( 767 "ID of the market to place the order on" 768 marketId: ID! 769 "Open volume - negative for short position (int64)" 770 openVolume: String! 771 "Average entry price corresponding to the open volume. The price is an unsigned integer. For example `123456` is a correctly formatted price of `1.23456` assuming market configured to 5 decimal places" 772 averageEntryPrice: String! 773 "Open and/or hypothetical orders" 774 orders: [OrderInfo!] 775 "Margin account balance. Needs to be provided scaled to asset decimal places" 776 marginAccountBalance: String! 777 "General account balance. Needs to be provided scaled to asset decimal places" 778 generalAccountBalance: String! 779 "Order margin account balance. Needs to be provided scaled to asset decimal places" 780 orderMarginAccountBalance: String! 781 "Margin mode for the party, cross margin or isolated margin" 782 marginMode: MarginMode! 783 "Margin factor to be used along with isolated margin mode" 784 marginFactor: String 785 "Optional argument specifying if the estimated position margin increase should be included in available collateral for liquidation price calculation in isolated margin mode." 786 includeRequiredPositionMarginInAvailableCollateral: Boolean 787 "Optional argument specifying if liquidation price estimates should be scaled to market decimal places, returned in asset decimal places by default" 788 scaleLiquidationPriceToMarketDecimals: Boolean 789 ): PositionEstimate 790 791 "Estimate bounds for an AMM pool." 792 estimateAMMBounds( 793 """ 794 Base price of the AMM pool, the price is an integer, for example `123456` is a correctly 795 formatted price of `1.23456` assuming market configured to 5 decimal places. 796 """ 797 basePrice:String! 798 """ 799 Upper price of the AMM pool, the price is an integer, for example `123456` is a correctly 800 formatted price of `1.23456` assuming market configured to 5 decimal places. 801 """ 802 upperPrice: String 803 """ 804 Lower price of the AMM pool, the price is an integer, for example `123456` is a correctly 805 formatted price of `1.23456` assuming market configured to 5 decimal places. 806 """ 807 lowerPrice: String 808 "Leverage at the upper price of the AMM pool." 809 leverageAtUpperPrice: String 810 "Leverage at the lower price of the AMM pool." 811 leverageAtLowerPrice: String 812 "Amount of the asset that the party is willing to commit to the AMM pool." 813 commitmentAmount: String! 814 "Market ID to estimate the AMM for." 815 marketId: ID! 816 ): EstimatedAMMBounds 817 818 "Query for historic ethereum key rotations" 819 ethereumKeyRotations(nodeId: ID): EthereumKeyRotationsConnection! 820 821 "Estimate transfer fee" 822 estimateTransferFee( 823 "Sender's public key." 824 fromAccount: ID! 825 "Type of account sent from." 826 fromAccountType: AccountType! 827 "Receiver's public key." 828 toAccount: ID! 829 "Amount to be transferred." 830 amount: String! 831 "Asset ID for the asset used in the transaction." 832 assetId: String! 833 ): EstimatedTransferFee 834 835 "Get fees statistics" 836 feesStats( 837 "Optional market ID to filter for. If omitted, asset ID must be provided." 838 marketId: ID 839 "Optional asset ID to filter for. If omitted, market ID must be provided." 840 assetId: ID 841 "Optional epoch to filter for. If omitted, the most recent epoch's data is returned." 842 epoch: Int 843 "Optional party ID to filter for" 844 partyId: ID 845 "Optional epoch to filter from (included). If omitted, the last epoch will be used." 846 epochFrom: Int 847 "Optional epoch to filter to (included). If omitted, the last epoch will be used." 848 epochTo: Int 849 ): FeesStats 850 851 "Get fees statistics for a given party" 852 feesStatsForParty( 853 "Party ID to filter for" 854 partyId: ID! 855 "Optional asset ID to filter for. If omitted, statistics for each asset are returned." 856 assetId: ID 857 "Optional epoch to filter from (included). If omitted, its value defaults to `toEpoch` minus 29." 858 fromEpoch: Int 859 "Optional epoch to filter to (included). If omitted, the range goes from `fromEpoch` to `fromEpoch` plus 29. If both `fromEpoch` and `toEpoch` are omitted, `toEpoch` defaults to the last epoch." 860 toEpoch: Int 861 ): [FeesStatsForParty] 862 863 """ 864 Funding payment for perpetual markets. 865 """ 866 fundingPayments( 867 "ID of the party" 868 partyId: ID! 869 "ID of the perpetual market to get funding periods for" 870 marketId: ID 871 "Pagination control" 872 pagination: Pagination 873 ): FundingPaymentConnection! 874 875 "Funding periods for perpetual markets" 876 fundingPeriods( 877 "ID of the perpetual market to get funding periods for" 878 marketId: ID! 879 """ 880 Optional: Date range to retrieve funding periods from/to. 881 The funding period start time will be used to determine whether to include the funding period in the results. 882 Start and end time should be expressed as an integer value of Unix nanoseconds. 883 """ 884 dateRange: DateRange 885 "Pagination control" 886 pagination: Pagination 887 ): FundingPeriodConnection! 888 889 """ 890 Funding period data points for a perpetual market. The data points within a funding period are used to calculate the 891 time-weighted average price (TWAP), funding rate and funding payments for each funding period. 892 """ 893 fundingPeriodDataPoints( 894 "ID of the perpetual market to get funding periods for" 895 marketId: ID! 896 """ 897 Optional date range to filter funding period data points from/to. 898 The funding period's start date will be used to determine if the funding period's data points should be included in the results. 899 Start and end time should be expressed as an integer value of Unix nanoseconds. 900 """ 901 dateRange: DateRange 902 "Optional filter to only return data points from a specific data source. If omitted, no filtering is applied." 903 source: FundingPeriodDataPointSource 904 "Pagination control" 905 pagination: Pagination 906 ): FundingPeriodDataPointConnection! 907 908 "Get a list of games and their metrics." 909 games( 910 "Optional game ID to filter for" 911 gameId: ID 912 "Start epoch to return the results from (inclusive), if not provided the most recent epoch will be used." 913 epochFrom: Int 914 "End epoch to return the results to (inclusive), if not provided the most recent epoch will be used." 915 epochTo: Int 916 "Entity scope to filter for, i.e. individual or team. If not provided games for both individuals and teams will be returned." 917 entityScope: EntityScope 918 "Team ID to filter for. This filter will only be applied if entity scope is not specified in the request, or the entity scope is set to teams." 919 teamId: ID 920 "Party ID to filter for. This filter will apply regardless of the entity scope. If the entity scope filter is teams, then the party ID filter will apply to team members." 921 partyId: ID 922 "Pagination control" 923 pagination: Pagination 924 ): GamesConnection! 925 926 "Get market data history for a specific market. If no dates are given, the latest snapshot will be returned. If only the start date is provided all history from the given date will be provided, and if only the end date is provided, all history from the start up to and including the end date will be provided." 927 getMarketDataHistoryConnectionByID( 928 id: ID! 929 """ 930 Optional RFC3339Nano start date time for the historic data query. 931 If both the start and end date is not provided, only the latest snapshot will be returned. 932 If only the start date is provided, all market data for the market from the start date forward will be returned. 933 """ 934 start: Timestamp 935 """ 936 Optional RFC3339Nano end date time for the historic data query. 937 If both the start and end date is not provided, only the latest snapshot will be returned. 938 If only the end date is provided, all market data for the market up to and including the end date will be returned. 939 """ 940 end: Timestamp 941 "Optional Pagination" 942 pagination: Pagination 943 ): MarketDataConnection 944 945 "Query for historic key rotations" 946 keyRotationsConnection(id: ID, pagination: Pagination): KeyRotationConnection! 947 948 """ 949 Get a list of ledger entries within the given date range. The date range is restricted to a maximum of 5 days. 950 This query requests and sums the number of ledger entries from a given subset of accounts, specified via the 'filter' argument. 951 It returns a time series - implemented as a list of AggregateLedgerEntry structs - with a row for every time 952 the summed ledger entries of the set of specified accounts changes. 953 Each account filter must contain no more than one party ID. 954 At least one party ID must be specified in the from or to account filter. 955 956 Entries can be filtered by: 957 - the sending account (market ID, asset ID, account type) 958 - receiving account (market ID, asset ID, account type) 959 - sending AND receiving account 960 - transfer type either in addition to the above filters or as a standalone option 961 962 Note: The date range is restricted to any 5 days. 963 If no start or end date is provided, only ledger entries from the last 5 days will be returned. 964 If a start and end date are provided, but the end date is more than 5 days after the start date, only data up to 5 days after the start date will be returned. 965 If a start date is provided but no end date, the end date will be set to 5 days after the start date. 966 If no start date is provided, but the end date is, the start date will be set to 5 days before the end date. 967 """ 968 ledgerEntries( 969 "Filter to apply when querying the ledger. At least one party in the 'from' account filter, or 'to' account filter must be provided." 970 filter: LedgerEntryFilter 971 """ 972 Date range filter to apply to the ledger entries. 973 """ 974 dateRange: DateRange 975 "Optional pagination control" 976 pagination: Pagination 977 ): AggregatedLedgerEntriesConnection! 978 979 "List all active liquidity providers for a specific market" 980 liquidityProviders( 981 "Party ID of the liquidity provider" 982 partyId: ID 983 "Market ID to retrieve liquidity providers for" 984 marketId: ID 985 "Optional Pagination" 986 pagination: Pagination 987 ): LiquidityProviderConnection 988 989 "The last block process by the blockchain" 990 lastBlockHeight: String! 991 992 "An instrument that is trading on the Vega network" 993 market("Optional ID of a market" id: ID!): Market 994 995 "One or more instruments that are trading on the Vega network" 996 marketsConnection( 997 "Optional ID of a market" 998 id: ID 999 "Optional pagination information" 1000 pagination: Pagination 1001 "Whether to include markets that have settled (defaults to true)" 1002 includeSettled: Boolean 1003 ): MarketConnection 1004 1005 "The most recent history segment" 1006 mostRecentHistorySegment: HistorySegment! 1007 1008 "Current network limits" 1009 networkLimits: NetworkLimits 1010 1011 "Return a single network parameter" 1012 networkParameter( 1013 "key of the network parameter" 1014 key: String! 1015 ): NetworkParameter 1016 1017 "Return the full list of network parameters" 1018 networkParametersConnection( 1019 pagination: Pagination 1020 ): NetworkParametersConnection! 1021 1022 "Specific node in network" 1023 node("required ID of node" id: ID!): Node 1024 1025 "Returns information about nodes" 1026 nodeData: NodeData 1027 1028 "All known network nodes" 1029 nodesConnection(pagination: Pagination): NodesConnection! 1030 1031 "Return a list of aggregated node signature for a given resource ID" 1032 nodeSignaturesConnection( 1033 resourceId: ID! 1034 pagination: Pagination 1035 ): NodeSignaturesConnection 1036 1037 "All oracle data for a given oracle spec ID" 1038 oracleDataBySpecConnection( 1039 "ID for an oracle spec" 1040 oracleSpecId: ID! 1041 "Pagination" 1042 pagination: Pagination 1043 ): OracleDataConnection 1044 1045 "All registered oracle specs" 1046 oracleDataConnection( 1047 "Pagination" 1048 pagination: Pagination 1049 ): OracleDataConnection 1050 1051 "An oracle spec for a given oracle spec ID" 1052 oracleSpec("ID for an oracle spec" oracleSpecId: ID!): OracleSpec 1053 1054 "All registered oracle specs" 1055 oracleSpecsConnection( 1056 "Pagination" 1057 pagination: Pagination 1058 ): OracleSpecsConnection 1059 1060 "An order in the Vega network found by orderID" 1061 orderByID( 1062 "ID for an order" 1063 id: ID! 1064 1065 "Order version number, starting at 1 for the original order and incrementing by 1 for each successful amendment; omitted for the most recent version." 1066 version: Int 1067 ): Order! 1068 1069 "An order in the Vega network found by referenceID" 1070 orderByReference("Reference for an order" reference: String!): Order! 1071 1072 "Order versions (created via amendments if any) found by orderID" 1073 orderVersionsConnection( 1074 "ID for an order" 1075 orderId: ID 1076 "Pagination information" 1077 pagination: Pagination 1078 ): OrderConnection 1079 1080 "List statistics about paid liquidity fees" 1081 paidLiquidityFees( 1082 "Optional market ID to filter for." 1083 marketId: ID 1084 "Optional asset ID to filter for." 1085 assetId: ID 1086 "Optional epoch to filter for. If no epoch filters are provided, the most recent epoch's data is returned." 1087 epoch: Int 1088 "Optional party IDs to filter for" 1089 partyIDs: [String!] 1090 "Whether to return all derived parties from AMMs for the given party. If used, party ID is required" 1091 includeDerivedParties: Boolean 1092 "Start epoch to return the results from (inclusive), if no epoch filters are provided, the most recent epoch's data is returned." 1093 epochFrom: Int 1094 "End epoch to return the results to (inclusive), if no epoch filters are provided, the most recent epoch's data is returned." 1095 epochTo: Int 1096 ): PaidLiquidityFeesConnection 1097 1098 "One or more entities that are trading on the Vega network" 1099 partiesConnection( 1100 "Optional ID of a party to retrieve" 1101 id: ID 1102 "Optional pagination information" 1103 pagination: Pagination 1104 ): PartyConnection 1105 1106 "List parties' profiles by their IDs. If no ID is set, all profiles are returned." 1107 partiesProfilesConnection( 1108 "Restrict the returned parties' profiles to only the given party IDs. If not set, all profiles will be returned." 1109 ids: [ID!] 1110 "Optional pagination information" 1111 pagination: Pagination 1112 ): PartiesProfilesConnection 1113 1114 "An entity that is trading on the Vega network" 1115 party("ID of a party" id: ID!): Party 1116 1117 "Fetch all positions" 1118 positions(filter: PositionsFilter, pagination: Pagination): PositionConnection 1119 1120 "A governance proposal located by either its ID or reference. If both are set, ID is used." 1121 proposal( 1122 "Optionally, locate proposal by its ID" 1123 id: ID 1124 "Optionally, locate proposal by its reference. If ID is set, this parameter is ignored." 1125 reference: String 1126 ): ProposalNode 1127 1128 "All governance proposals in the Vega network" 1129 proposalsConnection( 1130 "Optional type of proposal to retrieve data for" 1131 proposalType: ProposalType 1132 "Returns only proposals in the specified state. Leave out to get all proposals" 1133 inState: ProposalState 1134 "Optional Pagination information" 1135 pagination: Pagination 1136 ): ProposalsConnection 1137 1138 "Flag indicating whether the data-node is ready to begin the protocol upgrade" 1139 protocolUpgradeStatus: ProtocolUpgradeStatus 1140 1141 "List protocol upgrade proposals, optionally filtering on status or approver" 1142 protocolUpgradeProposals( 1143 inState: ProtocolUpgradeProposalStatus 1144 approvedBy: String 1145 pagination: Pagination 1146 ): ProtocolUpgradeProposalConnection 1147 1148 "List referral sets" 1149 referralSets( 1150 "Optional referral set ID to fetch information for" 1151 id: ID 1152 "Optional referrer party ID to filter for. If referral set ID is provided, this parameter is ignored." 1153 referrer: ID 1154 "Optional referee party ID to filter for. If referral set ID, or referrer is provided, this parameter is ignored." 1155 referee: ID 1156 "Optional pagination information" 1157 pagination: Pagination 1158 ): ReferralSetConnection! 1159 1160 referralSetReferees( 1161 "Optional referral set ID to fetch referees for" 1162 id: ID 1163 "Optional referrer party ID to filter for. If referral set ID is provided, this parameter is ignored." 1164 referrer: ID 1165 "Optional referee party ID to filter for. If referral set ID, or referrer is provided, this parameter is ignored." 1166 referee: ID 1167 "Optional pagination information" 1168 pagination: Pagination 1169 "Optional number of epochs to aggregate referee volume and reward statistics for. If omitted, the default is 30 epochs." 1170 aggregationEpochs: Int 1171 ): ReferralSetRefereeConnection! 1172 1173 "Get referral set statistics" 1174 referralSetStats( 1175 "Optional referral set ID to fetch stats for" 1176 setId: ID 1177 "Optional epoch to get statistics from. If not provided, the latest statistics are returned" 1178 epoch: Int 1179 "Optional party ID. If not provided all parties for the epoch are returned" 1180 partyId: ID 1181 "Optional pagination information" 1182 pagination: Pagination 1183 ): ReferralSetStatsConnection! 1184 1185 "Get statistics about the Vega node" 1186 statistics: Statistics! 1187 1188 "Get stop order by ID" 1189 stopOrder(id: ID!): StopOrder 1190 1191 "Get a list of stop orders. If provided, the filter will be applied to the list of stop orders to restrict the results." 1192 stopOrders( 1193 "Optional filter to restrict the results of the list." 1194 filter: StopOrderFilter 1195 "Optional pagination information" 1196 pagination: Pagination 1197 ): StopOrderConnection 1198 1199 "Get a list of current game team scores. If provided, the filter will be applied to the list of games/teams to restrict the results." 1200 gameTeamScores( 1201 "Optional filter to restrict the results of the list." 1202 filter: GameTeamScoreFilter 1203 "Optional pagination information" 1204 pagination: Pagination 1205 ): GameTeamScoreConnection 1206 1207 "Get a list of current game party scores. If provided, the filter will be applied to the list of games/parties to restrict the results." 1208 gamePartyScores( 1209 "Optional filter to restrict the results of the list." 1210 filter: GamePartyScoreFilter 1211 "Optional pagination information" 1212 pagination: Pagination 1213 ): GamePartyScoreConnection 1214 1215 "List markets in a succession line" 1216 successorMarkets( 1217 "Market ID of any market in the succession line" 1218 marketId: ID! 1219 """ 1220 Flag indicating whether to include the full succession line or not. 1221 If not specified, the default is false. 1222 When false, only the requested market and its children are returned. 1223 """ 1224 fullHistory: Boolean 1225 "Optional pagination information" 1226 pagination: Pagination 1227 ): SuccessorMarketConnection 1228 1229 """ 1230 List information about all teams or filter for a specific team ID or referrer, or referee's party ID 1231 If no filter is provided all teams will be listed. 1232 If a team ID is provided, only the team with that ID will be returned 1233 If a party ID is provided, the team whose referrer party ID or a referee's party ID matches will be return 1234 If both team ID and party ID is provided, only the team ID will be used. 1235 """ 1236 teams( 1237 "Optional team ID to filter for" 1238 teamId: ID 1239 "Optional referrer, or team referee to filter for" 1240 partyId: ID 1241 "Optional pagination information" 1242 pagination: Pagination 1243 ): TeamConnection 1244 1245 """ 1246 List teams statistics 1247 Get the statistics of all teams, or for a specific team by using team ID, over a number of epochs. 1248 If a team does not have at least the number of epochs worth of data, it is ignored. 1249 """ 1250 teamsStatistics( 1251 "Optional team ID to filter for" 1252 teamId: ID 1253 "Optional number of epochs to aggregate referee volume and reward statistics for. If omitted, the default is 10 epochs." 1254 aggregationEpochs: Int 1255 "Optional pagination information" 1256 pagination: Pagination 1257 ): TeamsStatisticsConnection 1258 1259 """ 1260 List team members' statistics for a given team 1261 Get the statistics of all team members for a given team ID, or for a specific member by using party ID, over a number of epochs. 1262 If a team does not have at least the number of epochs worth of data, it is ignored. 1263 """ 1264 teamMembersStatistics( 1265 "Team ID to filter for" 1266 teamId: ID! 1267 "Optional party ID to filter for" 1268 partyId: ID 1269 "Optional number of epochs to aggregate referee volume and reward statistics for. If omitted, the default is 10 epochs." 1270 aggregationEpochs: Int 1271 "Optional pagination information" 1272 pagination: Pagination 1273 ): TeamMembersStatisticsConnection 1274 1275 "List all referees for a team" 1276 teamReferees( 1277 "ID of the team to list referees for" 1278 teamId: ID! 1279 "Optional pagination information" 1280 pagination: Pagination 1281 ): TeamRefereeConnection 1282 1283 "List a referee's team history" 1284 teamRefereeHistory( 1285 "ID of the referee to list team history for" 1286 referee: ID! 1287 "Optional pagination information" 1288 pagination: Pagination 1289 ): TeamRefereeHistoryConnection 1290 1291 "Time weighted notional position is a metric used to determine if a reward should be paid to a party" 1292 timeWeightedNotionalPosition( 1293 "Settlement asset for the position" 1294 assetId: ID! 1295 "Party holding the position" 1296 partyId: ID! 1297 "Game to filter for" 1298 gameId: ID! 1299 "Optional epoch to filter for. If no epoch is specified, the time weighted notional position from the end of the most recently completed epoch is returned." 1300 epochSeq: Int 1301 ): TimeWeightedNotionalPosition 1302 1303 "Get total transfer fee discount available" 1304 totalTransferFeeDiscount( 1305 "ID of party eligible for the discount." 1306 partyId: String! 1307 "ID of the asset that the discount relates to." 1308 assetId: String! 1309 ): TotalTransferFeeDiscount 1310 1311 "Get a list of all trades and apply any given filters to the results" 1312 trades( 1313 filter: TradesFilter 1314 "Optional Pagination information" 1315 pagination: Pagination 1316 "Date range to fetch trades between" 1317 dateRange: DateRange 1318 ): TradeConnection 1319 1320 "Get a list of all transfers for a public key" 1321 transfersConnection( 1322 "The public key to look for" 1323 partyId: ID 1324 "Direction of the transfer with respect to the public key" 1325 direction: TransferDirection 1326 "Pagination information" 1327 pagination: Pagination 1328 "Filter for reward transfers only. Direction must be 'From' if a public key is used" 1329 isReward: Boolean 1330 "Optional epoch to filter from (included). If omitted, the range goes from the oldest epoch to the `to epoch`." 1331 fromEpoch: Int 1332 "Optional epoch to filter to (included). If omitted, the range goes from `from epoch` to the most recent epoch." 1333 toEpoch: Int 1334 "Optional status to filter on." 1335 status: TransferStatus 1336 "Optional dispatch strategy's scope to filter for." 1337 scope: TransferScope 1338 "Optional game ID to filter for" 1339 gameId: ID 1340 "Optional from account type to filter for" 1341 fromAccountType: AccountType 1342 "Optional to account type to filter for" 1343 toAccountType: AccountType 1344 ): TransferConnection 1345 1346 "Find a transfer using its ID" 1347 transfer("ID of the transfer" id: ID!): TransferNode 1348 1349 "Get volume rebate statistics" 1350 volumeRebateStats( 1351 "Optional epoch to get statistics from. If not provided, the latest statistics are returned" 1352 epoch: Int 1353 "Optional party ID" 1354 partyId: ID 1355 "Optional pagination information" 1356 pagination: Pagination 1357 ): VolumeRebateStatsConnection! 1358 1359 1360 "Get volume discount statistics" 1361 volumeDiscountStats( 1362 "Optional epoch to get statistics from. If not provided, the latest statistics are returned" 1363 epoch: Int 1364 "Optional party ID" 1365 partyId: ID 1366 "Optional pagination information" 1367 pagination: Pagination 1368 ): VolumeDiscountStatsConnection! 1369 1370 "Find a withdrawal using its ID" 1371 withdrawal("ID of the withdrawal" id: ID!): Withdrawal 1372 1373 "Fetch all withdrawals" 1374 withdrawals( 1375 "Date range to fetch withdrawals between" 1376 dateRange: DateRange 1377 "Pagination options" 1378 pagination: Pagination 1379 ): WithdrawalsConnection 1380 1381 """ 1382 List margin modes per party per market 1383 1384 Get a list of all margin modes, or for a specific market ID, or party ID. 1385 """ 1386 partyMarginModes( 1387 "Optional team ID to filter for" 1388 marketId: ID 1389 "Optional referrer, or team referee to filter for" 1390 partyId: ID 1391 "Optional pagination information" 1392 pagination: Pagination 1393 ): PartyMarginModesConnection 1394 1395 """ 1396 Get the reward and discount fees for a given party and the fees and rebates applied per market. 1397 """ 1398 partyDiscountStats( 1399 "Party ID" 1400 partyId: ID! 1401 "Market IDs" 1402 marketIds: [ID!] 1403 ): PartyDiscountStats 1404 } 1405 1406 enum EstimatedAMMError { 1407 AMM_ERROR_UNSPECIFIED 1408 "Commitment is below the global limit set by the network parameter `market.amm.minCommitmentQuantum`." 1409 AMM_ERROR_COMMITMENT_BELOW_MINIMUM 1410 "AMM's lower price is too far from the base price for the given commitment resulting in zero volume between price levels." 1411 AMM_ERROR_LOWER_BOUND_TOO_WIDE 1412 "AMM's upper price is too far from the base price for the given commitment resulting in zero volume between price levels." 1413 AMM_ERROR_UPPER_BOUND_TOO_WIDE 1414 "AMM bounds are too wide for the given commitment resulting in zero volume between price levels." 1415 AMM_ERROR_BOTH_BOUNDS_TOO_WIDE 1416 } 1417 1418 type EstimatedAMMBounds { 1419 "Theoretical volume at the top of the upper bound." 1420 positionSizeAtUpper: String 1421 "Theoretical volume at the top of the lower bound." 1422 positionSizeAtLower: String 1423 "Loss of commitment at the upper bound." 1424 lossOnCommitmentAtUpper: String 1425 "Loss of commitment at the lower bound." 1426 lossOnCommitmentAtLower: String 1427 "Estimated price above upper bound at which the commitment will be lost." 1428 liquidationPriceAtUpper: String 1429 "Estimated price below the lower bound at which the commitment will be lost." 1430 liquidationPriceAtLower: String 1431 "If populated the bounds could be calculated but the AMM is invalid for other reasons." 1432 ammError: EstimatedAMMError 1433 1434 } 1435 1436 "Defines the types of a dispatch strategy's scope the API can filter on." 1437 enum TransferScope { 1438 "Matches transfers that have dispatch strategy scope of individual set." 1439 SCOPE_INDIVIDUAL 1440 "Matches transfers that have dispatch strategy scope of team set." 1441 SCOPE_TEAM 1442 } 1443 1444 "All the states a transfer can transition between" 1445 enum TransferStatus { 1446 "Indicates a transfer still being processed" 1447 STATUS_PENDING 1448 "Indicates a transfer accepted by the Vega network" 1449 STATUS_DONE 1450 "Indicates a transfer rejected by the Vega network" 1451 STATUS_REJECTED 1452 """ 1453 Indicates a transfer stopped by the Vega network 1454 e.g: no funds left to cover the transfer 1455 """ 1456 STATUS_STOPPED 1457 "Indication of a transfer cancelled by the user" 1458 STATUS_CANCELLED 1459 } 1460 1461 "A user initiated transfer" 1462 type Transfer { 1463 "ID of this transfer" 1464 id: ID! 1465 1466 "The public key of the sender in this transfer" 1467 from: String! 1468 1469 "The account type from which funds have been sent" 1470 fromAccountType: AccountType! 1471 1472 "The public key of the recipient of the funds" 1473 to: String! 1474 1475 "The account type that has received the funds" 1476 toAccountType: AccountType! 1477 1478 "The asset" 1479 asset: Asset 1480 1481 "The amount sent" 1482 amount: String! 1483 1484 "An optional reference" 1485 reference: String 1486 1487 "The status of this transfer" 1488 status: TransferStatus! 1489 1490 "The RFC3339Nano time at which the transfer was submitted" 1491 timestamp: Timestamp! 1492 1493 "The type of transfer being made, i.e. a one-off or recurring transfer" 1494 kind: TransferKind! 1495 1496 "An optional reason explaining the status of the transfer" 1497 reason: String 1498 1499 "An optional game ID to filter for transfers that are made for rewarding participation in games" 1500 gameId: ID 1501 } 1502 1503 union TransferKind = 1504 OneOffTransfer 1505 | RecurringTransfer 1506 | OneOffGovernanceTransfer 1507 | RecurringGovernanceTransfer 1508 1509 "The specific details for a one-off governance transfer" 1510 type OneOffGovernanceTransfer { 1511 "An optional RFC3339Nano time when the transfer should be delivered" 1512 deliverOn: Timestamp 1513 } 1514 1515 "The specific details for a recurring governance transfer" 1516 type RecurringGovernanceTransfer { 1517 "The epoch at which this recurring transfer will start" 1518 startEpoch: Int! 1519 "An optional epoch at which this transfer will stop" 1520 endEpoch: Int 1521 "An optional dispatch strategy for the recurring transfer" 1522 dispatchStrategy: DispatchStrategy 1523 "The factor of the initial amount to be distributed" 1524 factor: String 1525 } 1526 1527 "The specific details for a one-off transfer" 1528 type OneOffTransfer { 1529 "An optional RFC3339Nano time when the transfer should be delivered" 1530 deliverOn: Timestamp 1531 } 1532 1533 "The specific details for a recurring transfer" 1534 type RecurringTransfer { 1535 "The epoch at which this recurring transfer will start" 1536 startEpoch: Int! 1537 "An optional epoch at which this transfer will stop" 1538 endEpoch: Int 1539 "The factor of the initial amount to be distributed" 1540 factor: String! 1541 "An optional dispatch strategy for the recurring transfer" 1542 dispatchStrategy: DispatchStrategy 1543 } 1544 1545 "The type of metric to use for a reward dispatch strategy" 1546 enum DispatchMetric { 1547 "Dispatch metric that uses the total maker fees paid in the market" 1548 DISPATCH_METRIC_MAKER_FEES_PAID 1549 "Dispatch metric that uses the total maker fees received in the market" 1550 DISPATCH_METRIC_MAKER_FEES_RECEIVED 1551 "Dispatch metric that uses the total LP fees received in the market" 1552 DISPATCH_METRIC_LP_FEES_RECEIVED 1553 "Dispatch metric that uses the total value of the market if above the required threshold and not paid given proposer bonus yet" 1554 DISPATCH_METRIC_MARKET_VALUE 1555 "Dispatch metric that uses the time weighted position of the party in the market" 1556 DISPATCH_METRIC_AVERAGE_POSITION @deprecated 1557 "Dispatch metric that uses the time weighted notional of the party in the market" 1558 DISPATCH_METRIC_AVERAGE_NOTIONAL 1559 "Dispatch metric that uses the relative PNL of the party in the market" 1560 DISPATCH_METRIC_RELATIVE_RETURN 1561 "Dispatch metric that uses return volatility of the party in the market" 1562 DISPATCH_METRIC_RETURN_VOLATILITY 1563 "Dispatch metric that uses the validator ranking of the validator as metric" 1564 DISPATCH_METRIC_VALIDATOR_RANKING 1565 "Dispatch metric that uses the realised return of the party in the market" 1566 DISPATCH_METRIC_REALISED_RETURN 1567 "Dispatch metric that uses the eligibility of entities" 1568 DISPATCH_METRIC_ELIGIBLE_ENTITIES 1569 } 1570 1571 enum EntityScope { 1572 "Rewards must be distributed directly to eligible parties" 1573 ENTITY_SCOPE_INDIVIDUALS 1574 "Rewards must be distributed directly to eligible teams, and then amongst team members" 1575 ENTITY_SCOPE_TEAMS 1576 } 1577 1578 enum IndividualScope { 1579 "All parties on the network are within the scope of this reward" 1580 INDIVIDUAL_SCOPE_ALL 1581 "All parties that are part of a team are within the scope of this reward" 1582 INDIVIDUAL_SCOPE_IN_TEAM 1583 "All parties that are not part of a team are within the scope of this reward" 1584 INDIVIDUAL_SCOPE_NOT_IN_TEAM 1585 "All keys representing AMMs are within the scope of this reward" 1586 INDIVIDUAL_SCOPE_AMM 1587 } 1588 1589 enum DistributionStrategy { 1590 "Rewards funded using the pro-rata strategy should be distributed pro-rata by each entity's reward metric scaled by any active multipliers that party has" 1591 DISTRIBUTION_STRATEGY_PRO_RATA 1592 "Rewards funded using the rank strategy" 1593 DISTRIBUTION_STRATEGY_RANK 1594 "Rewards funded using the rank lottery strategy" 1595 DISTRIBUTION_STRATEGY_RANK_LOTTERY 1596 1597 } 1598 1599 "Dispatch strategy for a recurring transfer" 1600 type DispatchStrategy { 1601 "Defines the data that will be used to compare markets so as to distribute rewards appropriately" 1602 dispatchMetric: DispatchMetric! 1603 1604 "The asset to use for measuring contribution to the metric" 1605 dispatchMetricAssetId: ID! 1606 1607 "Scope the dispatch to this market only under the metric asset" 1608 marketIdsInScope: [ID!] 1609 1610 "The type of entities eligible for this strategy" 1611 entityScope: EntityScope! 1612 1613 "If entity scope is individuals then this defines the scope for individuals" 1614 individualScope: IndividualScope 1615 1616 "The teams in scope for the reward, if the entity is teams" 1617 teamScope: [ID] 1618 1619 "The proportion of the top performers in the team for a given metric to be averaged for the metric calculation if scope is team" 1620 nTopPerformers: String 1621 1622 "Minimum number of governance tokens, e.g. VEGA, staked for a party to be considered eligible" 1623 stakingRequirement: String! 1624 1625 "Minimum notional time-weighted averaged position required for a party to be considered eligible" 1626 notionalTimeWeightedAveragePositionRequirement: String! 1627 1628 "Number of epochs to evaluate the metric on" 1629 windowLength: Int! 1630 1631 "Number of epochs after distribution to delay vesting of rewards by" 1632 lockPeriod: Int! 1633 1634 "Controls how the reward is distributed between qualifying parties" 1635 distributionStrategy: DistributionStrategy! 1636 1637 "Ascending order list of start rank and corresponding share ratio" 1638 rankTable: [RankTable] 1639 1640 "Optional multiplier on taker fees used to cap the rewards a party may receive in an epoch" 1641 capRewardFeeMultiple: String 1642 1643 "Interval for the distribution of the transfer" 1644 transferInterval: Int 1645 1646 "A list of party keys that are in scope for the reward" 1647 eligibleKeys: [String!] 1648 1649 "The target notional factor used to scale the amount to be taken from the source account" 1650 targetNotionalVolume: String 1651 } 1652 1653 type RankTable { 1654 startRank: Int! 1655 shareRatio: Int! 1656 } 1657 1658 "Validating status of a node, i.e. validator or non-validator" 1659 enum NodeStatus { 1660 "The node is non-validating" 1661 NODE_STATUS_NON_VALIDATOR 1662 1663 "The node is validating" 1664 NODE_STATUS_VALIDATOR 1665 } 1666 1667 "Describes in both human readable and block time when an epoch spans." 1668 type EpochTimestamps { 1669 "RFC3339 timestamp - Vega time of epoch start, null if not started" 1670 start: Timestamp 1671 "RFC3339 timestamp - Vega time of epoch expiry" 1672 expiry: Timestamp 1673 "RFC3339 timestamp - Vega time of epoch end, null if not ended" 1674 end: Timestamp 1675 "Height of first block in the epoch, null if not started" 1676 firstBlock: String! 1677 "Height of last block in the epoch, null if not ended" 1678 lastBlock: String 1679 } 1680 1681 "A node's key rotation event" 1682 type KeyRotation { 1683 "ID of node where rotation took place" 1684 nodeId: ID! 1685 "Old public key rotated from" 1686 oldPubKey: String! 1687 "New public key rotated to" 1688 newPubKey: String! 1689 "Block height when the rotation took place" 1690 blockHeight: String! 1691 } 1692 1693 "An Ethereum key rotation record that is returned in a paginated Ethereum key rotation connection" 1694 type EthereumKeyRotationEdge { 1695 node: EthereumKeyRotation! 1696 cursor: String 1697 } 1698 1699 "A paginated type for returning Ethereum key rotation records" 1700 type EthereumKeyRotationsConnection { 1701 "The ethereum key rotations in this connection" 1702 edges: [EthereumKeyRotationEdge!]! 1703 "The pagination information" 1704 pageInfo: PageInfo 1705 } 1706 1707 "Describes the ethereum key rotations of nodes on the vega network" 1708 type EthereumKeyRotation { 1709 "ID of node where rotation took place" 1710 nodeId: ID! 1711 "Old ethereum address" 1712 oldAddress: String! 1713 "New ethereum address" 1714 newAddress: String! 1715 "Block height when the rotation took place" 1716 blockHeight: String! 1717 } 1718 1719 "Epoch describes a specific period of time in the Vega network" 1720 type Epoch { 1721 "Numeric sequence number used to identify the epoch" 1722 id: ID! 1723 1724 "Timestamps for start and end of epochs" 1725 timestamps: EpochTimestamps! 1726 1727 "Validators that participated in this epoch" 1728 validatorsConnection(pagination: Pagination): NodesConnection 1729 1730 "Delegations data for this epoch" 1731 delegationsConnection( 1732 "Optional party ID to filter on" 1733 partyId: ID 1734 "Optional node ID to filter on" 1735 nodeId: ID 1736 "Pagination information" 1737 pagination: Pagination 1738 ): DelegationsConnection 1739 } 1740 1741 "Details on the collection of nodes for particular validator status" 1742 type NodeSet { 1743 "Total number of nodes in the node set" 1744 total: Int! 1745 1746 "Number of nodes in the node set that had a performance score of 0 at the end of the last epoch" 1747 inactive: Int! 1748 1749 "IDs of the nodes that were promoted into this node set at the start of the epoch" 1750 promoted: [String!] 1751 1752 "IDs of the nodes that were demoted into this node set at the start of the epoch" 1753 demoted: [String!] 1754 1755 "Total number of nodes allowed in the node set" 1756 maximum: Int 1757 } 1758 1759 "Summary of data across all nodes" 1760 type NodeData { 1761 "Total staked amount across all nodes" 1762 stakedTotal: String! 1763 1764 "Total number of nodes across all node sets" 1765 totalNodes: Int! 1766 1767 "Total number of nodes that had a performance score of 0 at the end of the last epoch" 1768 inactiveNodes: Int! 1769 1770 "Details on the set of consensus nodes in the network" 1771 tendermintNodes: NodeSet! 1772 1773 "Details on the set of ersatz (standby) nodes in the network" 1774 ersatzNodes: NodeSet 1775 1776 "Details on the set of pending nodes in the network" 1777 pendingNodes: NodeSet 1778 1779 # @TODO allow to query based on number of epochs uptime(epochs: Int) 1780 "Total uptime for all epochs across all nodes. Or specify a number of epochs" 1781 uptime: Float! 1782 } 1783 1784 "Summary of a node's rewards for a given epoch" 1785 type EpochParticipation { 1786 epoch: Epoch 1787 1788 "RFC3339 timestamp" 1789 offline: Timestamp 1790 1791 "RFC3339 timestamp" 1792 online: Timestamp 1793 1794 "Total amount rewarded for participation in the given epoch" 1795 totalRewards: Float 1796 } 1797 1798 "Summary of all epochs for a node" 1799 type EpochData { 1800 "Total number of epochs since node was created" 1801 total: Int! 1802 1803 "Total number of offline epochs since node was created" 1804 offline: Int! 1805 1806 "Total number of online epochs since node was created" 1807 online: Int! 1808 } 1809 1810 "Information available for a node" 1811 type Node { 1812 "The node URL eg n01.vega.xyz" 1813 id: ID! 1814 1815 "Public key of the node operator" 1816 pubkey: String! 1817 1818 "Tendermint public key of the node" 1819 tmPubkey: String! 1820 1821 "Ethereum public key of the node" 1822 ethereumAddress: String! 1823 1824 "URL from which you can get more info about the node." 1825 infoUrl: String! 1826 1827 "Country code for the location of the node" 1828 location: String! 1829 1830 "The amount of stake the node has put up themselves" 1831 stakedByOperator: String! 1832 1833 "The amount of stake that has been delegated by token holders" 1834 stakedByDelegates: String! 1835 1836 "Total amount staked on node" 1837 stakedTotal: String! 1838 1839 # "Max amount of (wanted) stake, is this a network param or a node param" 1840 # @TODO - add this field 1841 # maxIntendedStake: String! 1842 1843 "Amount of stake on the next epoch" 1844 pendingStake: String! 1845 1846 "Summary of epoch data across all nodes" 1847 epochData: EpochData 1848 1849 # @TODO implement this filter 1850 # epochs(last: Int, since: String): [EpochParticipation!]! 1851 1852 "Validator status of the node" 1853 status: NodeStatus! 1854 1855 "All delegation for a node by a given party if specified, or all delegations." 1856 delegationsConnection( 1857 partyId: ID 1858 pagination: Pagination 1859 ): DelegationsConnection 1860 1861 "Reward scores for the current epoch for the validator" 1862 rewardScore: RewardScore 1863 1864 "Ranking scores and status for the validator for the current epoch" 1865 rankingScore: RankingScore! 1866 # The name of the node 1867 name: String! 1868 1869 # The URL of an avatar 1870 avatarUrl: String 1871 } 1872 1873 type NodeBasic { 1874 "The node URL, for example n01.vega.xyz" 1875 id: ID! 1876 "Public key of the node operator" 1877 pubkey: String! 1878 "Tendermint public key of the node" 1879 tmPubkey: String! 1880 "Ethereum public key of the node" 1881 ethereumAddress: String! 1882 "URL that provides more information about the node" 1883 infoUrl: String! 1884 "Country code for the location of the node" 1885 location: String! 1886 "Validator status of the node" 1887 status: NodeStatus! 1888 "The name of the node operator" 1889 name: String! 1890 "The URL of an avatar" 1891 avatarUrl: String 1892 } 1893 1894 type RewardScore { 1895 "The stake based validator score with anti-whaling" 1896 rawValidatorScore: String! 1897 "The performance score of the validator" 1898 performanceScore: String! 1899 "The multisig score of the validator" 1900 multisigScore: String! 1901 "The composite score of the validator" 1902 validatorScore: String! 1903 "The normalised score of the validator" 1904 normalisedScore: String! 1905 "The status of the validator for this score" 1906 validatorStatus: ValidatorStatus! 1907 } 1908 1909 type RankingScore { 1910 "The current validation status of the validator" 1911 status: ValidatorStatus! 1912 "The former validation status of the validator" 1913 previousStatus: ValidatorStatus! 1914 "The ranking score of the validator" 1915 rankingScore: String! 1916 "The stake based score of the validator (no anti-whaling)" 1917 stakeScore: String! 1918 "The performance score of the validator" 1919 performanceScore: String! 1920 "The Tendermint voting power of the validator (uint32)" 1921 votingPower: String! 1922 } 1923 1924 "Status of a validator node" 1925 enum ValidatorStatus { 1926 "The node is taking part in Tendermint consensus" 1927 VALIDATOR_NODE_STATUS_TENDERMINT 1928 "The node is a candidate to become a Tendermint validator if a slot is made available" 1929 VALIDATOR_NODE_STATUS_ERSATZ 1930 "The node is pending promotion to ersatz (standby), if a slot is available and if the node fulfils the requirements" 1931 VALIDATOR_NODE_STATUS_PENDING 1932 } 1933 1934 type Delegation { 1935 "Amount delegated" 1936 amount: String! 1937 1938 "Party that is delegating" 1939 party: Party! 1940 1941 "URL of node you are delegating to" 1942 node: Node! 1943 1944 "Epoch of delegation" 1945 epoch: Int! 1946 } 1947 1948 "Status of an asset that has been proposed to be added to the network" 1949 enum AssetStatus { 1950 "Asset is proposed to be added to the network" 1951 STATUS_PROPOSED 1952 "Asset has been rejected" 1953 STATUS_REJECTED 1954 "Asset is pending listing on the ethereum bridge" 1955 STATUS_PENDING_LISTING 1956 "Asset can be used on the Vega network" 1957 STATUS_ENABLED 1958 } 1959 1960 "Represents an asset in Vega" 1961 type Asset { 1962 "The ID of the asset" 1963 id: ID! 1964 1965 "The full name of the asset (e.g: Great British Pound)" 1966 name: String! 1967 1968 "The symbol of the asset (e.g: GBP)" 1969 symbol: String! 1970 1971 "The precision of the asset. Should match the decimal precision of the asset on its native chain, e.g: for ERC20 assets, it is often 18" 1972 decimals: Int! 1973 1974 "The minimum economically meaningful amount in the asset" 1975 quantum: String! 1976 1977 "The origin source of the asset (e.g: an ERC20 asset)" 1978 source: AssetSource! 1979 1980 "The status of the asset in the Vega network" 1981 status: AssetStatus! 1982 1983 "The infrastructure fee account for this asset" 1984 infrastructureFeeAccount: AccountBalance 1985 1986 "The staking reward pool account for this asset" 1987 globalRewardPoolAccount: AccountBalance 1988 1989 "The global insurance account for this asset" 1990 globalInsuranceAccount: AccountBalance 1991 "The network treasury account for this asset" 1992 networkTreasuryAccount: AccountBalance 1993 "The taker fee reward account for this asset" 1994 takerFeeRewardAccount: AccountBalance 1995 "The maker fee reward account for this asset" 1996 makerFeeRewardAccount: AccountBalance 1997 "The liquidity provision reward account for this asset" 1998 lpFeeRewardAccount: AccountBalance 1999 "The market proposer reward account for this asset" 2000 marketProposerRewardAccount: AccountBalance 2001 } 2002 2003 "One of the possible asset sources" 2004 union AssetSource = BuiltinAsset | ERC20 2005 2006 "One of the possible asset sources for update assets proposals" 2007 union UpdateAssetSource = UpdateERC20 2008 2009 "An asset originated from an Ethereum ERC20 Token" 2010 type ERC20 { 2011 "The address of the ERC20 contract" 2012 contractAddress: String! 2013 """ 2014 The lifetime limits deposit per address 2015 Note: this is a temporary measure that can be changed by governance 2016 """ 2017 lifetimeLimit: String! 2018 """ 2019 The maximum you can withdraw instantly. All withdrawals over the threshold will be delayed by the withdrawal delay. 2020 There is no limit on the size of a withdrawal 2021 Note: this is a temporary measure that can be changed by governance 2022 """ 2023 withdrawThreshold: String! 2024 "The chain ID the asset originates from." 2025 chainId: String! 2026 } 2027 2028 "An asset originated from an Ethereum ERC20 Token" 2029 type UpdateERC20 { 2030 """ 2031 The lifetime limits deposit per address 2032 Note: this is a temporary measure that can be changed by governance 2033 """ 2034 lifetimeLimit: String! 2035 """ 2036 The maximum you can withdraw instantly. All withdrawals over the threshold will be delayed by the withdrawal delay. 2037 There is no limit on the size of a withdrawal 2038 Note: this is a temporary measure that can be changed by governance 2039 """ 2040 withdrawThreshold: String! 2041 } 2042 2043 "A Vega builtin asset, mostly for testing purpose" 2044 type BuiltinAsset { 2045 "Maximum amount that can be requested by a party through the built-in asset faucet at a time" 2046 maxFaucetAmountMint: String! 2047 } 2048 2049 "Represents a signature for the approval of a resource from a validator" 2050 type NodeSignature { 2051 "The ID of the resource being signed for" 2052 id: ID! 2053 2054 "The signature, as base64 encoding" 2055 signature: String 2056 2057 "The kind of signature this is (e.g: withdrawal, new asset, etc)" 2058 kind: NodeSignatureKind 2059 } 2060 2061 "Represents the type of signature provided by a node" 2062 enum NodeSignatureKind { 2063 "A signature for proposing a new asset into the network" 2064 NODE_SIGNATURE_KIND_ASSET_NEW 2065 2066 "A signature for allowing funds withdrawal" 2067 NODE_SIGNATURE_KIND_ASSET_WITHDRAWAL 2068 2069 "A signature to add a new validator to the ERC20 bridge" 2070 NODE_SIGNATURE_KIND_ERC20_MULTISIG_SIGNER_ADDED 2071 2072 "A signature to remove a validator from the ERC20 bridge" 2073 NODE_SIGNATURE_KIND_ERC20_MULTISIG_SIGNER_REMOVED 2074 2075 "A signature to update limits of an ERC20 asset" 2076 NODE_SIGNATURE_KIND_ASSET_UPDATE 2077 } 2078 2079 "Statistics about the node" 2080 type Statistics { 2081 "Current block number" 2082 blockHeight: String! 2083 2084 "Current block hash" 2085 blockHash: String! 2086 2087 "Number of items in the backlog" 2088 backlogLength: String! 2089 2090 "Total number of peers on the Vega network" 2091 totalPeers: String! 2092 2093 "RFC3339Nano genesis time of the chain" 2094 genesisTime: Timestamp! 2095 2096 "RFC3339Nano current time (real)" 2097 currentTime: Timestamp! 2098 2099 "RFC3339Nano uptime of the node" 2100 upTime: String! 2101 2102 "RFC3339Nano current time of the chain (decided through consensus)" 2103 vegaTime: Timestamp! 2104 2105 "Status of the Vega application connection with the chain" 2106 status: String! 2107 2108 "Number of transaction processed per block" 2109 txPerBlock: String! 2110 2111 "Average size of the transactions" 2112 averageTxBytes: String! 2113 2114 "Average number of orders added per blocks" 2115 averageOrdersPerBlock: String! 2116 2117 "Number of the trades per seconds" 2118 tradesPerSecond: String! 2119 2120 "Number of orders per seconds" 2121 ordersPerSecond: String! 2122 2123 "Total number of markets" 2124 totalMarkets: String! 2125 2126 "Total number of amended orders" 2127 totalAmendOrder: String! 2128 2129 "Total number of cancelled orders" 2130 totalCancelOrder: String! 2131 2132 "Total number of orders created" 2133 totalCreateOrder: String! 2134 2135 "Total number of orders" 2136 totalOrders: String! 2137 2138 "Total number of trades" 2139 totalTrades: String! 2140 2141 "Total number of events on the last block" 2142 eventCount: String! 2143 2144 "The number of events per second on the last block" 2145 eventsPerSecond: String! 2146 2147 "Version commit hash of the Vega node" 2148 appVersionHash: String! 2149 2150 "Version of the Vega node (semver)" 2151 appVersion: String! 2152 2153 "Version of the chain (semver)" 2154 chainVersion: String! 2155 2156 "Duration of the last block, in nanoseconds" 2157 blockDuration: String! 2158 2159 "Current chain ID" 2160 chainId: ID! 2161 } 2162 2163 "A mode where Vega tries to execute orders as soon as they are received" 2164 type ContinuousTrading { 2165 "Size of an increment in price in terms of the quote currency" 2166 tickSize: String! 2167 } 2168 2169 "Frequent batch auctions trading mode" 2170 type DiscreteTrading { 2171 "Duration of the discrete trading batch in nanoseconds. Maximum 1 month." 2172 duration: Int! 2173 "Size of an increment in price in terms of the quote currency" 2174 tickSize: String! 2175 } 2176 2177 "Parameters for the log normal risk model" 2178 type LogNormalModelParams { 2179 "Mu parameter, annualised growth rate of the underlying asset" 2180 mu: Float! 2181 "R parameter, annualised growth rate of the risk-free asset, used for discounting of future cash flows, can be any real number" 2182 r: Float! 2183 "Sigma parameter, annualised volatility of the underlying asset, must be a strictly non-negative real number" 2184 sigma: Float! 2185 } 2186 2187 "Parameters for the simple risk model" 2188 type SimpleRiskModelParams { 2189 "Risk factor for long" 2190 factorLong: Float! 2191 "Risk factor for short" 2192 factorShort: Float! 2193 } 2194 2195 "A type of risk model for futures trading" 2196 type LogNormalRiskModel { 2197 "Lambda parameter of the risk model, probability confidence level used in expected shortfall calculation when obtaining the maintenance margin level, must be strictly greater than 0 and strictly smaller than 1" 2198 riskAversionParameter: Float! 2199 "Tau parameter of the risk model, projection horizon measured as a year fraction used in the expected shortfall calculation to obtain the maintenance margin, must be a strictly non-negative real number" 2200 tau: Float! 2201 "Parameters for the log normal risk model" 2202 params: LogNormalModelParams! 2203 "An optional override for the risk factor calculated by the risk model." 2204 riskFactorOverride: RiskFactorOverride 2205 } 2206 2207 "Risk factor override to control stable leverage" 2208 type RiskFactorOverride { 2209 "Short Risk factor value" 2210 short: String! 2211 "Long Risk factor value" 2212 long: String! 2213 } 2214 2215 "A type of simple/dummy risk model where you can specify the risk factor long and short in params" 2216 type SimpleRiskModel { 2217 "Params for the simple risk model" 2218 params: SimpleRiskModelParams! 2219 } 2220 2221 union RiskModel = LogNormalRiskModel | SimpleRiskModel 2222 2223 "A set of metadata to associate to an instrument" 2224 type InstrumentMetadata { 2225 "An arbitrary list of tags to associated to associate to the Instrument (string list)" 2226 tags: [String!] 2227 } 2228 2229 "An Ethereum data source" 2230 type EthereumEvent { 2231 "The ID of the ethereum contract to use (string)" 2232 contractId: ID! 2233 2234 "Name of the Ethereum event to listen to. (string)" 2235 event: String! 2236 } 2237 2238 union Oracle = EthereumEvent 2239 2240 "Capped future configuration" 2241 type FutureCap { 2242 "The max price cap for a future" 2243 maxPrice: String! 2244 "True for options market" 2245 binarySettlement: Boolean 2246 "True if parties are fully collateralised on this market" 2247 fullyCollateralised: Boolean 2248 } 2249 2250 "A Future product" 2251 type Future { 2252 "The name of the asset (string)" 2253 settlementAsset: Asset! 2254 2255 "String representing the quote (e.g. BTCUSD -> USD is quote)" 2256 quoteName: String! 2257 2258 "The data source specification that describes the data of interest for settlement." 2259 dataSourceSpecForSettlementData: DataSourceSpec! 2260 2261 "The data source specification that describes the data-source data of interest for trading termination." 2262 dataSourceSpecForTradingTermination: DataSourceSpec! 2263 2264 "The binding between the data source specification and the settlement data" 2265 dataSourceSpecBinding: DataSourceSpecToFutureBinding! 2266 2267 "If set, the market is a capped future" 2268 cap: FutureCap 2269 } 2270 2271 "Spot FX product" 2272 type Spot { 2273 "Underlying base asset for the spot product" 2274 baseAsset: Asset! 2275 "Underlying quote asset for the spot product" 2276 quoteAsset: Asset! 2277 } 2278 2279 "Perpetual future product" 2280 type Perpetual { 2281 "Underlying asset for the perpetual instrument" 2282 settlementAsset: Asset! 2283 "Quote name of the instrument" 2284 quoteName: String! 2285 "Controls how much the upcoming funding payment liability contributes to party's margin, in the range [0, 1]" 2286 marginFundingFactor: String! 2287 "Continuously compounded interest rate used in funding rate calculation, in the range [-1, 1]" 2288 interestRate: String! 2289 "Lower bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1]" 2290 clampLowerBound: String! 2291 "Upper bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1]" 2292 clampUpperBound: String! 2293 "Data source specification describing the data source for settlement schedule" 2294 dataSourceSpecForSettlementSchedule: DataSourceSpec! 2295 "Data source specification describing the data source for settlement" 2296 dataSourceSpecForSettlementData: DataSourceSpec! 2297 "Binding between the data source spec and the settlement data" 2298 dataSourceSpecBinding: DataSourceSpecPerpetualBinding! 2299 "Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments" 2300 fundingRateScalingFactor: String 2301 "Lower bound for the funding-rate such that the funding-rate will never be lower than this value" 2302 fundingRateLowerBound: String 2303 "Upper bound for the funding-rate such that the funding-rate will never be higher than this value" 2304 fundingRateUpperBound: String 2305 "Optional configuration driving the internal composite price calculation for perpetual product" 2306 internalCompositePriceConfig: CompositePriceConfiguration 2307 } 2308 2309 """ 2310 Bindings to describe which property of the data source data is to be used as settlement data 2311 and which is to be used as the trading termination trigger. 2312 """ 2313 type DataSourceSpecPerpetualBinding { 2314 """ 2315 Name of the property in the source data that should be used as settlement data. 2316 For example, if it is set to "prices.BTC.value", then the perpetual market will use the value of this property 2317 as settlement data. 2318 """ 2319 settlementDataProperty: String! 2320 """ 2321 Name of the property in the source data that should be used as settlement schedule. 2322 For example, if it is set to "prices.BTC.timestamp", then the perpetual market will use the value of this property 2323 """ 2324 settlementScheduleProperty: String! 2325 } 2326 2327 """ 2328 Describes which property of the data source data should be 2329 used as composite price source. 2330 """ 2331 type SpecBindingForCompositePrice { 2332 priceSourceProperty: String! 2333 } 2334 2335 """ 2336 DataSourceSpecToFutureBinding tells on which property data source data should be 2337 used as settlement data and trading termination. 2338 """ 2339 type DataSourceSpecToFutureBinding { 2340 settlementDataProperty: String! 2341 tradingTerminationProperty: String! 2342 } 2343 2344 """ 2345 An data source specification describes the data source data that a product (or a risk model) 2346 wants to get from the oracle engine. 2347 """ 2348 type DataSourceSpec { 2349 "ID is a hash generated from the DataSourceSpec data." 2350 id: ID! 2351 "RFC3339Nano creation date time" 2352 createdAt: Timestamp! 2353 "RFC3339Nano last updated timestamp" 2354 updatedAt: Timestamp 2355 2356 data: DataSourceDefinition! 2357 2358 "Status describes the status of the data source spec" 2359 status: DataSourceSpecStatus! 2360 } 2361 2362 """ 2363 externalDataSourceSpec is the type that wraps the DataSourceSpec type in order to be further used/extended 2364 by the OracleSpec 2365 """ 2366 type ExternalDataSourceSpec { 2367 spec: DataSourceSpec! 2368 } 2369 2370 type OracleSpec { 2371 dataSourceSpec: ExternalDataSourceSpec! 2372 "Data lists all the oracle data broadcast to this spec" 2373 dataConnection(pagination: Pagination): OracleDataConnection! 2374 } 2375 2376 "Describes the status of the data spec" 2377 enum DataSourceSpecStatus { 2378 "Describes an active data spec" 2379 STATUS_ACTIVE 2380 """ 2381 Describes a data spec that is not listening to data 2382 anymore 2383 """ 2384 STATUS_DEACTIVATED 2385 } 2386 2387 """ 2388 Signer is the authorized signature used for the data. 2389 """ 2390 type Signer { 2391 signer: SignerKind! 2392 } 2393 2394 union SignerKind = ETHAddress | PubKey 2395 2396 type ETHAddress { 2397 address: String 2398 } 2399 2400 type PubKey { 2401 key: String 2402 } 2403 2404 """ 2405 Filter describes the conditions under which oracle data is considered of 2406 interest or not. 2407 """ 2408 type Filter { 2409 "key is the data source data property key targeted by the filter." 2410 key: PropertyKey! 2411 """ 2412 The conditions that should be matched by the data to be 2413 considered of interest. 2414 """ 2415 conditions: [Condition!] 2416 } 2417 2418 "PropertyKey describes the property key contained in a source data." 2419 type PropertyKey { 2420 "The name of the property." 2421 name: String 2422 "The type of the property." 2423 type: PropertyKeyType! 2424 """ 2425 An optional decimal place to be applied on the provided value. 2426 Valid only for PropertyType of type DECIMAL, INTEGER. 2427 """ 2428 numberDecimalPlaces: Int 2429 } 2430 2431 """ 2432 Type describes the type of properties that are supported by the data source 2433 engine. 2434 """ 2435 enum PropertyKeyType { 2436 "Any type." 2437 TYPE_EMPTY 2438 "Integer type." 2439 TYPE_INTEGER 2440 "String type." 2441 TYPE_STRING 2442 "Boolean type." 2443 TYPE_BOOLEAN 2444 "Any floating point decimal type." 2445 TYPE_DECIMAL 2446 "Timestamp date type." 2447 TYPE_TIMESTAMP 2448 } 2449 2450 """ 2451 Condition describes the condition that must be validated by the data source engine 2452 """ 2453 type Condition { 2454 "The type of comparison to make on the value." 2455 operator: ConditionOperator! 2456 "The value to compare against." 2457 value: String 2458 } 2459 2460 "Comparator describes the type of comparison." 2461 enum ConditionOperator { 2462 "Verify if the property values are strictly equal or not." 2463 OPERATOR_EQUALS 2464 "Verify if the data source data value is greater than the Condition value." 2465 OPERATOR_GREATER_THAN 2466 """ 2467 Verify if the data source data value is greater than or equal to the Condition 2468 value. 2469 """ 2470 OPERATOR_GREATER_THAN_OR_EQUAL 2471 " Verify if the data source data value is less than the Condition value." 2472 OPERATOR_LESS_THAN 2473 """ 2474 Verify if the oracle data value is less or equal to than the Condition 2475 value. 2476 """ 2477 OPERATOR_LESS_THAN_OR_EQUAL 2478 } 2479 2480 "A data source contains the data sent by a data source" 2481 type Data { 2482 "signers is the list of public keys/ETH addresses that signed the data" 2483 signers: [Signer!] 2484 "properties contains all the properties sent by a data source" 2485 data: [Property!] 2486 2487 metaData: [Property] 2488 2489 """ 2490 List of all the data specs that matched this source data. 2491 When the array is empty, it means no data spec matched this source data. 2492 """ 2493 matchedSpecIds: [ID!] 2494 """ 2495 RFC3339Nano formatted date and time for when the data was broadcast to the markets 2496 with a matching data spec. 2497 It has no value when the source data does not match any data spec. 2498 """ 2499 broadcastAt: Timestamp! 2500 } 2501 2502 type ExternalData { 2503 data: Data! 2504 } 2505 2506 "An oracle data contains the data sent by an oracle" 2507 type OracleData { 2508 externalData: ExternalData! 2509 } 2510 2511 "A property associates a name to a value" 2512 type Property { 2513 "Name of the property" 2514 name: String! 2515 "Value of the property" 2516 value: String! 2517 } 2518 2519 union Product = Future | Spot | Perpetual 2520 2521 "Describes something that can be traded on Vega" 2522 type Instrument { 2523 "Uniquely identifies an instrument across all instruments available on Vega (string)" 2524 id: ID! 2525 2526 "A short non necessarily unique code used to easily describe the instrument (e.g: FX:BTCUSD/DEC18) (string)" 2527 code: String! 2528 2529 "Full and fairly descriptive name for the instrument" 2530 name: String! 2531 2532 "Metadata for this instrument" 2533 metadata: InstrumentMetadata! 2534 2535 "A reference to or instance of a fully specified product, including all required product parameters for that product (Product union)" 2536 product: Product! 2537 } 2538 2539 type MarginCalculator { 2540 "The scaling factors that will be used for margin calculation" 2541 scalingFactors: ScalingFactors! 2542 "If set to true on a capped future, all positions must be fully collateralised" 2543 fullyCollateralised: Boolean 2544 } 2545 2546 type ScalingFactors { 2547 "The scaling factor that determines the margin level at which Vega has to search for more money" 2548 searchLevel: Float! 2549 2550 "The scaling factor that determines the optimal margin level" 2551 initialMargin: Float! 2552 2553 "The scaling factor that determines the overflow margin level" 2554 collateralRelease: Float! 2555 } 2556 2557 "A tradable instrument is a combination of an instrument and a risk model" 2558 type TradableInstrument { 2559 "An instance of, or reference to, a fully specified instrument." 2560 instrument: Instrument! 2561 2562 "A reference to a risk model that is valid for the instrument" 2563 riskModel: RiskModel! 2564 2565 "Margin calculation info, currently only the scaling factors (search, initial, release) for this tradable instrument" 2566 marginCalculator: MarginCalculator 2567 } 2568 2569 "The factors applied to calculate the fees" 2570 type FeeFactors { 2571 "The factor applied to calculate MakerFees, a non-negative float" 2572 makerFee: String! 2573 "The factor applied to calculate InfrastructureFees, a non-negative float" 2574 infrastructureFee: String! 2575 "The factor applied to calculate LiquidityFees, a non-negative float" 2576 liquidityFee: String! 2577 "The fee used to purchase governance tokens via regular auctions (network wide)" 2578 buyBackFee: String! 2579 "The fee sent to the network treasury for later use based on governance actions (network wide)." 2580 treasuryFee: String! 2581 } 2582 2583 enum LiquidityFeeMethod { 2584 METHOD_UNSPECIFIED 2585 "Fee is smallest value of all bids, such that liquidity providers with nominated fees less than or equal to this value still have sufficient commitment to fulfil the market's target stake." 2586 METHOD_MARGINAL_COST 2587 "Fee is the weighted average of all liquidity providers' nominated fees, weighted by their commitment" 2588 METHOD_WEIGHTED_AVERAGE 2589 "Fee is set by the market to a constant value irrespective of any liquidity provider's nominated fee" 2590 METHOD_CONSTANT 2591 } 2592 2593 "Market settings that describe how the liquidity fee is calculated" 2594 type LiquidityFeeSettings { 2595 "Method used to calculate the market's liquidity fee" 2596 method: LiquidityFeeMethod! 2597 "Constant liquidity fee used when using the constant fee method" 2598 feeConstant: String 2599 } 2600 2601 "The fees applicable to a market" 2602 type Fees { 2603 "The factors used to calculate the different fees" 2604 factors: FeeFactors! 2605 "Liquidity fee settings for the market describing how the fee was calculated" 2606 liquidityFeeSettings: LiquidityFeeSettings 2607 } 2608 2609 """ 2610 An auction duration is used to configure 3 auction periods: 2611 1. `duration > 0`, `volume == 0`: 2612 The auction will last for at least N seconds. 2613 2. `duration == 0`, `volume > 0`: 2614 The auction will end once the given volume will match at uncrossing. 2615 3. `duration > 0`, `volume > 0`: 2616 The auction will take at least N seconds, but can end sooner if the market can trade a certain volume. 2617 """ 2618 type AuctionDuration { 2619 "Duration of the auction in seconds" 2620 durationSecs: Int! 2621 "Target uncrossing trading volume" 2622 volume: Int! 2623 } 2624 2625 """ 2626 PriceMonitoringParameters holds a list of triggers 2627 """ 2628 type PriceMonitoringParameters { 2629 "The list of triggers for this price monitoring" 2630 triggers: [PriceMonitoringTrigger!] 2631 } 2632 2633 """ 2634 PriceMonitoringTrigger holds together price projection horizon τ, probability level p, and auction extension duration 2635 """ 2636 type PriceMonitoringTrigger { 2637 "Price monitoring projection horizon τ in seconds (> 0)." 2638 horizonSecs: Int! 2639 "Price monitoring probability level p. (>0 and < 1)" 2640 probability: Float! 2641 """ 2642 Price monitoring auction extension duration in seconds should the price 2643 breach its theoretical level over the specified horizon at the specified 2644 probability level (> 0) 2645 """ 2646 auctionExtensionSecs: Int! 2647 } 2648 2649 "Configuration of a market price monitoring auctions triggers" 2650 type PriceMonitoringSettings { 2651 "Specified a set of PriceMonitoringParameters to be use for price monitoring purposes" 2652 parameters: PriceMonitoringParameters 2653 } 2654 2655 "Range of valid prices and the associated price monitoring trigger" 2656 type PriceMonitoringBounds { 2657 "Minimum price that isn't currently breaching the specified price monitoring trigger" 2658 minValidPrice: String! 2659 "Maximum price that isn't currently breaching the specified price monitoring trigger" 2660 maxValidPrice: String! 2661 "Price monitoring trigger associated with the bounds" 2662 trigger: PriceMonitoringTrigger! 2663 "Reference price used to calculate the valid price range" 2664 referencePrice: String! 2665 "Has this bound been triggered yet or is it still active" 2666 active: Boolean 2667 } 2668 2669 "TargetStakeParameters contains parameters used in target stake calculation" 2670 type TargetStakeParameters { 2671 "Specifies length of time window expressed in seconds for target stake calculation" 2672 timeWindow: Int! 2673 2674 "Specifies scaling factors used in target stake calculation" 2675 scalingFactor: Float! 2676 } 2677 2678 "Configuration of a market liquidity monitoring parameters" 2679 type LiquidityMonitoringParameters { 2680 "Specifies parameters related to target stake calculation" 2681 targetStakeParameters: TargetStakeParameters! 2682 } 2683 2684 "Represents a product & associated parameters that can be traded on Vega, has an associated OrderBook and Trade history" 2685 type Market { 2686 "Market ID" 2687 id: ID! 2688 2689 "Fees related data" 2690 fees: Fees! 2691 2692 "An instance of, or reference to, a tradable instrument." 2693 tradableInstrument: TradableInstrument! 2694 2695 """ 2696 The number of decimal places that an integer must be shifted by in order to get a correct 2697 number denominated in the currency of the market. On spot markets, also called price decimal places. (uint64) 2698 2699 Examples: 2700 Currency Balance decimalPlaces Real Balance 2701 GBP 100 0 GBP 100 2702 GBP 100 2 GBP 1.00 2703 GBP 100 4 GBP 0.01 2704 GBP 1 4 GBP 0.0001 ( 0.01p ) 2705 2706 GBX (pence) 100 0 GBP 1.00 (100p ) 2707 GBX (pence) 100 2 GBP 0.01 ( 1p ) 2708 GBX (pence) 100 4 GBP 0.0001 ( 0.01p ) 2709 GBX (pence) 1 4 GBP 0.000001 ( 0.0001p) 2710 """ 2711 decimalPlaces: Int! 2712 2713 """ 2714 The number of decimal places that an integer must be shifted in order to get a correct size (uint64). 2715 i.e. 0 means there are no fractional orders for the market, and order sizes are always whole sizes. 2716 2 means sizes given as 10^2 * desired size, e.g. a desired size of 1.23 is represented as 123 in this market. 2717 This sets how big the smallest order / position on the market can be. On spot markets, used for order size 2718 and also known as size decimal places. 2719 """ 2720 positionDecimalPlaces: Int! 2721 2722 """ 2723 Auction duration specifies how long the opening auction will run (minimum 2724 duration and optionally a minimum traded volume). 2725 """ 2726 openingAuction: AuctionDuration! 2727 2728 "Price monitoring settings for the market" 2729 priceMonitoringSettings: PriceMonitoringSettings! 2730 2731 "Liquidity monitoring parameters for the market" 2732 liquidityMonitoringParameters: LiquidityMonitoringParameters! 2733 2734 "Current mode of execution of the market" 2735 tradingMode: MarketTradingMode! 2736 2737 "Current state of the market" 2738 state: MarketState! 2739 2740 "The proposal that initiated this market" 2741 proposal: Proposal @deprecated(reason: "Use marketProposal") 2742 2743 "The proposal that initiated this market" 2744 marketProposal: ProposalNode 2745 2746 "Orders on a market" 2747 ordersConnection( 2748 "Pagination information" 2749 pagination: Pagination 2750 "Filter orders" 2751 filter: OrderByPartyIdsFilter 2752 ): OrderConnection 2753 2754 "Get account for a party or market" 2755 accountsConnection( 2756 "ID of the party to get the margin account for" 2757 partyId: ID 2758 "Pagination information" 2759 pagination: Pagination 2760 "Whether to return all derived parties from AMMs for the given party. If used, party ID is required" 2761 includeDerivedParties: Boolean 2762 ): AccountsConnection 2763 2764 tradesConnection( 2765 "Date range to retrieve trades from/to. Start and end time should be expressed as an integer value of Unix nanoseconds" 2766 dateRange: DateRange 2767 "Pagination information" 2768 pagination: Pagination 2769 ): TradeConnection 2770 @deprecated( 2771 reason: "Simplify and consolidate trades query and remove nesting. Use trades query instead" 2772 ) 2773 2774 "Current depth on the order book for this market" 2775 depth( 2776 "Maximum market order book depth (returns whole order book if omitted)" 2777 maxDepth: Int 2778 ): MarketDepth! 2779 2780 "Candles on a market, for the 'last' n candles, at 'interval' seconds as specified by parameters using cursor based pagination" 2781 candlesConnection( 2782 "RFC3339Nano encoded time to get candles from" 2783 since: String! 2784 "Optional: RFC3339Nano encoded time to get candles to" 2785 to: String 2786 "Interval of the candles" 2787 interval: Interval! 2788 "Pagination information" 2789 pagination: Pagination 2790 ): CandleDataConnection 2791 2792 "marketData for the given market" 2793 data: MarketData 2794 2795 "The list of the liquidity provision commitments for this market" 2796 liquidityProvisions( 2797 "An optional party ID" 2798 partyId: ID 2799 "An optional live flag to determine whether to list only live LPs or not" 2800 live: Boolean 2801 "Pagination information" 2802 pagination: Pagination 2803 ): LiquidityProvisionsWithPendingConnection 2804 2805 "The list of the liquidity provision commitments for this market" 2806 liquidityProvisionsConnection( 2807 "An optional party ID" 2808 partyId: ID 2809 "An optional live flag to determine whether to list only live LPs or not" 2810 live: Boolean 2811 "Pagination information" 2812 pagination: Pagination 2813 ): LiquidityProvisionsConnection 2814 @deprecated(reason: "Use liquidityProvisions instead") 2815 2816 "Timestamps for state changes in the market" 2817 marketTimestamps: MarketTimestamps! 2818 2819 "Risk factors for the market" 2820 riskFactors: RiskFactor 2821 2822 "Linear slippage factor is used to cap the slippage component of maintainence margin - it is applied to the slippage volume" 2823 linearSlippageFactor: String! 2824 2825 "Quadratic slippage factor is used to cap the slippage component of maintainence margin - it is applied to the square of the slippage volume" 2826 quadraticSlippageFactor: String! 2827 @deprecated(reason: "This field will be removed in a future release") 2828 2829 """ 2830 Optional: Parent market ID. A market can be a successor to another market. If this market is a successor to a previous market, 2831 this field will be populated with the ID of the previous market. 2832 """ 2833 parentMarketID: ID 2834 2835 """ 2836 Optional: When a successor market is created, a fraction of the parent market's insurance pool can be transferred to the successor market 2837 """ 2838 insurancePoolFraction: String 2839 2840 "Optional: Market ID of the successor to this market if one exists" 2841 successorMarketID: ID 2842 2843 "Optional: Liquidity SLA parameters for the market" 2844 liquiditySLAParameters: LiquiditySLAParameters 2845 2846 "Optional: Liquidation strategy for the market" 2847 liquidationStrategy: LiquidationStrategy 2848 2849 "Configuration driving the mark price for the market" 2850 markPriceConfiguration: CompositePriceConfiguration! 2851 2852 "The market minimum tick size" 2853 tickSize: String! 2854 2855 "If enabled aggressive orders sent to the market will be delayed by the configured number of blocks" 2856 enableTxReordering: Boolean! 2857 2858 "Number of allowed price levels between an AMM's fair price and its quote prices. An AMM definition that exceeds this will be rejected at submission" 2859 allowedEmptyAMMLevels: Int! 2860 2861 "A list of keys allowed to place sell orders on the market" 2862 allowedSellers: [String!] 2863 } 2864 2865 """ 2866 Market Depth is a measure of the number of open buy and sell orders for a security or currency at different prices. 2867 The depth of market measure provides an indication of the liquidity and depth for the instrument. 2868 """ 2869 type MarketDepth { 2870 "Market" 2871 market: Market! 2872 2873 "Buy side price levels (if available)" 2874 buy: [PriceLevel!] 2875 2876 "Sell side price levels (if available)" 2877 sell: [PriceLevel!] 2878 2879 "Last trade for the given market (if available)" 2880 lastTrade: Trade 2881 2882 "Sequence number for the current snapshot of the market depth" 2883 sequenceNumber: String! 2884 } 2885 2886 """ 2887 Market Depth is a measure of the number of open buy and sell orders for a security or currency at different prices. 2888 The depth of market measure provides an indication of the liquidity and depth for the instrument. 2889 """ 2890 type ObservableMarketDepth { 2891 "Market ID" 2892 marketId: ID! 2893 2894 "Buy side price levels (if available)" 2895 buy: [PriceLevel!] 2896 2897 "Sell side price levels (if available)" 2898 sell: [PriceLevel!] 2899 2900 "Last trade for the given market (if available)" 2901 lastTrade: MarketDepthTrade! 2902 2903 "Sequence number for the current snapshot of the market depth" 2904 sequenceNumber: String! 2905 } 2906 2907 type MarketDepthTrade { 2908 "ID of the trade for the given market (if available)" 2909 id: ID! 2910 2911 "Price of the trade" 2912 price: String! 2913 2914 "Size of the trade" 2915 size: String! 2916 } 2917 2918 """ 2919 Market Depth Update is a delta to the current market depth which can be used to update the 2920 market depth structure to keep it correct 2921 """ 2922 type MarketDepthUpdate { 2923 "Market" 2924 market: Market! 2925 2926 "Buy side price levels (if available)" 2927 buy: [PriceLevel!] 2928 2929 "Sell side price levels (if available)" 2930 sell: [PriceLevel!] 2931 2932 "Sequence number for the current snapshot of the market depth. It is always increasing but not monotonic." 2933 sequenceNumber: String! 2934 2935 "Sequence number of the last update sent; useful for checking that no updates were missed." 2936 previousSequenceNumber: String! 2937 } 2938 2939 """ 2940 Market Depth Update is a delta to the current market depth which can be used to update the 2941 market depth structure to keep it correct 2942 """ 2943 type ObservableMarketDepthUpdate { 2944 "Market ID" 2945 marketId: ID! 2946 2947 "Buy side price levels (if available)" 2948 buy: [PriceLevel!] 2949 2950 "Sell side price levels (if available)" 2951 sell: [PriceLevel!] 2952 2953 "Sequence number for the current snapshot of the market depth. It is always increasing but not monotonic." 2954 sequenceNumber: String! 2955 2956 "Sequence number of the last update sent; useful for checking that no updates were missed." 2957 previousSequenceNumber: String! 2958 } 2959 2960 "Represents a price on either the buy or sell side and all the orders at that price" 2961 type PriceLevel { 2962 "The price of all the orders at this level (uint64)" 2963 price: String! 2964 2965 "The total remaining size of all orders at this level (uint64)" 2966 volume: String! 2967 2968 "The total volume of all AMM's at this level (uint64)" 2969 ammVolume: String! 2970 2971 "The total estimated volume of all AMM's at this level (uint64)" 2972 ammVolumeEstimated: String! 2973 2974 "The number of orders at this price level (uint64)" 2975 numberOfOrders: String! 2976 } 2977 2978 "Candle stick representation of trading" 2979 type Candle { 2980 "RFC3339Nano formatted date and time for the candle start time" 2981 periodStart: Timestamp! 2982 2983 "RFC3339Nano formatted date and time for the candle end time, or last updated time if the candle is still open" 2984 lastUpdateInPeriod: Timestamp! 2985 2986 "High price (uint64)" 2987 high: String! 2988 2989 "Low price (uint64)" 2990 low: String! 2991 2992 "Open price (uint64)" 2993 open: String! 2994 2995 "Close price (uint64)" 2996 close: String! 2997 2998 "Volume price (uint64)" 2999 volume: String! 3000 3001 "Total notional value of trades. This value is determined by multiplying price, using market decimal places, by size, using position decimal places. The number of decimal places needed to convert this value to a decimal is market decimal places plus position decimal places. (uint64)" 3002 notional: String! 3003 } 3004 3005 "Represents a party on Vega, could be an ethereum wallet address in the future" 3006 type Party { 3007 "Party identifier" 3008 id: ID! 3009 3010 "Orders relating to a party" 3011 ordersConnection( 3012 "Pagination information" 3013 pagination: Pagination 3014 "Filter orders" 3015 filter: OrderByMarketIdsFilter 3016 ): OrderConnection 3017 3018 tradesConnection( 3019 "ID of the market you want to get trades for" 3020 marketId: ID 3021 "Date range to retrieve trades from/to. Start and end time should be expressed as an integer value of Unix nanoseconds" 3022 dataRange: DateRange 3023 "Pagination information" 3024 pagination: Pagination 3025 ): TradeConnection 3026 @deprecated( 3027 reason: "Simplify and consolidate trades query and remove nesting. Use trades query instead" 3028 ) 3029 3030 "Collateral accounts relating to a party" 3031 accountsConnection( 3032 "Market ID - specify what market accounts for the party to return" 3033 marketId: ID 3034 "Asset ID" 3035 assetId: ID 3036 "Filter accounts by type (General account, margin account, etc...)" 3037 type: AccountType 3038 "Cursor pagination information" 3039 pagination: Pagination 3040 "Whether to return all derived parties from AMMs for the given party. If used, party ID is required" 3041 includeDerivedParties: Boolean 3042 ): AccountsConnection 3043 3044 "Trading positions relating to a party" 3045 positionsConnection(market: ID, pagination: Pagination): PositionConnection 3046 @deprecated(reason: "Use root positions query instead of sub-query") 3047 3048 "Margin levels for a market" 3049 marginsConnection( 3050 "market ID for the requested margin levels, nil if all markets" 3051 marketId: ID 3052 "Optional Pagination information" 3053 pagination: Pagination 3054 ): MarginConnection 3055 3056 "All governance proposals in the Vega network" 3057 proposalsConnection( 3058 "Optional type of proposal to retrieve data for" 3059 proposalType: ProposalType 3060 "Returns only proposals in the specified state. Leave out to get all proposals" 3061 inState: ProposalState 3062 "Optional Pagination information" 3063 pagination: Pagination 3064 ): ProposalsConnection 3065 3066 "All votes on proposals in the Vega network by the given party" 3067 votesConnection( 3068 "Optional Pagination information" 3069 pagination: Pagination 3070 ): ProposalVoteConnection 3071 3072 "The list of all withdrawals initiated by the party" 3073 withdrawalsConnection( 3074 "Date range to retrieve withdrawals from/to. Start and end time should be expressed as an integer value of Unix nanoseconds" 3075 dateRange: DateRange 3076 "Optional Pagination information" 3077 pagination: Pagination 3078 ): WithdrawalsConnection 3079 3080 "The list of all deposits for a party by the party" 3081 depositsConnection( 3082 "Date range to retrieve deposits from/to. Start and end time should be expressed as an integer value Unix nanoseconds" 3083 dateRange: DateRange 3084 "Optional Pagination information" 3085 pagination: Pagination 3086 ): DepositsConnection 3087 3088 "The list of the liquidity provision commitments for this party" 3089 liquidityProvisions( 3090 "An optional market ID" 3091 marketId: ID 3092 "An optional reference" 3093 reference: String 3094 "An optional live flag to determine whether to list only live LPs or not" 3095 live: Boolean 3096 "Optional Pagination information" 3097 pagination: Pagination 3098 ): LiquidityProvisionsWithPendingConnection 3099 3100 "The list of the liquidity provision commitment for this party" 3101 liquidityProvisionsConnection( 3102 "An optional market ID" 3103 marketId: ID 3104 "An optional reference" 3105 reference: String 3106 "An optional live flag to determine whether to list only live LPs or not" 3107 live: Boolean 3108 "Optional Pagination information" 3109 pagination: Pagination 3110 ): LiquidityProvisionsConnection 3111 @deprecated(reason: "Use liquidityProvisions instead") 3112 3113 # All delegations for a party to a given node if node is specified, or all delegations if not 3114 delegationsConnection( 3115 "Optional node ID" 3116 nodeId: ID 3117 "Pagination information" 3118 pagination: Pagination 3119 ): DelegationsConnection 3120 3121 "The staking information for this Party" 3122 stakingSummary(pagination: Pagination): StakingSummary! 3123 3124 "Rewards information for the party" 3125 rewardsConnection( 3126 "An asset ID (optional)" 3127 assetId: ID 3128 "Optional pagination information" 3129 pagination: Pagination 3130 "Optionally only return rewards >= this epoch" 3131 fromEpoch: Int 3132 "Optionally only return rewards <= this epoch" 3133 toEpoch: Int 3134 "Optionally filter for rewards earned by the party for team participation." 3135 teamId: ID 3136 "Optionally filter for rewards earned for the given game ID" 3137 gameId: ID 3138 "Whether to return rewards for all derived parties from AMMs for the given party. If used, party ID is required" 3139 includeDerivedParties: Boolean 3140 "Optionally filter for rewards by market ID" 3141 marketId: ID 3142 ): RewardsConnection 3143 3144 "Return net reward information" 3145 rewardSummaries( 3146 "Restrict the reward summary to rewards paid in the given assets." 3147 assetId: ID 3148 "Whether to return rewards for all derived parties from AMMs for the given party. If used, party ID is required" 3149 includeDerivedParties: Boolean 3150 ): [RewardSummary] 3151 3152 "All transfers for a public key" 3153 transfersConnection( 3154 "direction of the transfer with respect to the public key" 3155 direction: TransferDirection 3156 "Pagination information" 3157 pagination: Pagination 3158 "Filter for reward transfers only. Direction must be 'From'" 3159 isReward: Boolean 3160 "Optional epoch to filter from (included). If omitted, the range goes from the oldest epoch to the `to epoch`." 3161 fromEpoch: Int 3162 "Optional epoch to filter to (included). If omitted, the range goes from `from epoch` to the most recent epoch." 3163 toEpoch: Int 3164 "Optional status to filter on." 3165 status: TransferStatus 3166 "Optional dispatch strategy's scope to filter for." 3167 scope: TransferScope 3168 "Optional game ID to filter for" 3169 gameId: ID 3170 "Optional from account type to filter for" 3171 fromAccountType: AccountType 3172 "Optional to account type to filter for" 3173 toAccountType: AccountType 3174 ): TransferConnection 3175 3176 "The activity streak" 3177 activityStreak("An optional epoch" epoch: Int): PartyActivityStreak 3178 3179 "The current reward vesting summary of the party for the last epoch" 3180 vestingBalancesSummary( 3181 "An optional asset ID" 3182 assetId: ID 3183 ): PartyVestingBalancesSummary! 3184 3185 "The current statistics about a party's vesting rewards for the last epoch" 3186 vestingStats: PartyVestingStats 3187 } 3188 3189 """ 3190 Statistics about a party's vesting rewards 3191 """ 3192 type PartyVestingStats { 3193 "Epoch for which the statistics are valid" 3194 epochSeq: Int! 3195 "The reward bonus multiplier" 3196 rewardBonusMultiplier: String! 3197 "The balance of the party, in quantum." 3198 quantumBalance: String! 3199 "Bonus multiplier applied on the reward, summed across all derived accounts." 3200 summedRewardBonusMultiplier: String 3201 "The balance of the party and derived keys, in quantum." 3202 summedQuantumBalance: String 3203 } 3204 3205 """ 3206 A party reward locked balance. 3207 """ 3208 type PartyLockedBalance { 3209 "The asset locked" 3210 asset: Asset! 3211 "The amount locked" 3212 balance: String! 3213 "Epoch in which the funds will be moved to the vesting balance" 3214 untilEpoch: Int! 3215 } 3216 3217 """ 3218 A party's reward vesting balance. 3219 """ 3220 type PartyVestingBalance { 3221 "The asset being vested" 3222 asset: Asset! 3223 "The amount locked" 3224 balance: String! 3225 } 3226 3227 """ 3228 Summary of a party's reward vesting balances. 3229 """ 3230 type PartyVestingBalancesSummary { 3231 "The epoch for which this summary is valid" 3232 epoch: Int 3233 "The party vesting balances" 3234 vestingBalances: [PartyVestingBalance!] 3235 "The party's vesting balances" 3236 lockedBalances: [PartyLockedBalance!] 3237 } 3238 3239 """ 3240 The activity streak for a party. 3241 """ 3242 type PartyActivityStreak { 3243 "The number of epochs the party has been active in a row" 3244 activeFor: Int! 3245 "The number of epochs the party has been inactive in a row" 3246 inactiveFor: Int! 3247 "If the party is considered as active, and thus eligible for rewards multipliers" 3248 isActive: Boolean! 3249 "The rewards distribution multiplier for the party" 3250 rewardDistributionMultiplier: String! 3251 "The rewards vesting multiplier for the party" 3252 rewardVestingMultiplier: String! 3253 "The epoch for which this information is relevant" 3254 epoch: Int! 3255 "The traded volume for that party in the given epoch" 3256 tradedVolume: String! 3257 "The open volume for the party in the given epoch" 3258 openVolume: String! 3259 } 3260 3261 """ 3262 All staking information related to a Party. 3263 Contains the current recognised balance by the network and 3264 all the StakeLink/Unlink seen by the network 3265 """ 3266 type PartyStake { 3267 "The stake currently available for the party" 3268 currentStakeAvailable: String! 3269 "The list of all stake link/unlink for the party" 3270 linkings: [StakeLinking!] 3271 } 3272 3273 """ 3274 All staking information related to a Party. 3275 Contains the current recognised balance by the network and 3276 all the StakeLink/Unlink seen by the network 3277 """ 3278 type StakingSummary { 3279 "The stake currently available for the party" 3280 currentStakeAvailable: String! 3281 "The list of all stake link/unlink for the party" 3282 linkings(pagination: Pagination): StakesConnection! 3283 } 3284 3285 "The type of stake linking" 3286 enum StakeLinkingType { 3287 "The stake is being linked (deposited) to a Vega stake account" 3288 TYPE_LINK 3289 "The stake is being unlinked (removed) from a Vega stake account" 3290 TYPE_UNLINK 3291 } 3292 3293 "The status of the stake linking" 3294 enum StakeLinkingStatus { 3295 """ 3296 The stake linking is pending in the Vega network. This means that 3297 the Vega network have seen a stake linking, but is still to confirm 3298 it's valid on the ethereum chain and accepted by all nodes of the network 3299 """ 3300 STATUS_PENDING 3301 "The stake linking has been accepted and processed fully (balance updated) by the network" 3302 STATUS_ACCEPTED 3303 "The Vega network has rejected this stake linking" 3304 STATUS_REJECTED 3305 } 3306 3307 "A stake linking represent the intent from a party to deposit / remove stake on their account" 3308 type StakeLinking { 3309 id: ID! 3310 "Type of linking: link|unlink" 3311 type: StakeLinkingType! 3312 "The RFC3339Nano time at which the request happened on ethereum" 3313 timestamp: Timestamp! 3314 "The party initiating the stake linking" 3315 party: Party! 3316 "The amount linked or unlinked" 3317 amount: String! 3318 "The status of the linking" 3319 status: StakeLinkingStatus! 3320 "The RFC3339Nano time at which the stake linking was fully processed by the Vega network, null until defined" 3321 finalizedAt: Timestamp 3322 "The transaction hash (ethereum) which initiated the link/unlink" 3323 txHash: String! 3324 "The (ethereum) block height of the link/unlink" 3325 blockHeight: String! 3326 } 3327 3328 "Position status can change if a position is distressed" 3329 enum PositionStatus { 3330 "The position is either healthy, or if closed out, was closed out normally" 3331 POSITION_STATUS_UNSPECIFIED 3332 "The position was distressed, but removing open orders from the book brought the margin level back to a point where the open position could be maintained" 3333 POSITION_STATUS_ORDERS_CLOSED 3334 "The position was distressed, and had to be closed out entirely - orders were removed from the book, and the open volume was closed out by the network" 3335 POSITION_STATUS_CLOSED_OUT 3336 "The position was distressed, but could not be closed out - orders were removed from the book, and the open volume will be closed out once there is sufficient volume on the book" 3337 POSITION_STATUS_DISTRESSED 3338 } 3339 3340 """ 3341 An individual party at any point in time is considered net long or net short. This refers to their Open Volume, 3342 calculated using FIFO. This volume is signed as either negative for LONG positions and positive for SHORT positions. A 3343 single trade may end up "splitting" with some of its volume matched into closed volume and some of its volume 3344 remaining as open volume. This is why we don't refer to positions being comprised of trades, rather of volume. 3345 """ 3346 type Position { 3347 "Market relating to this position" 3348 market: Market! 3349 3350 "The party holding this position" 3351 party: Party! 3352 3353 "Open volume (int64)" 3354 openVolume: String! 3355 3356 "Realised Profit and Loss (int64)" 3357 realisedPNL: String! 3358 3359 "Unrealised Profit and Loss (int64)" 3360 unrealisedPNL: String! 3361 3362 "Average entry price for this position" 3363 averageEntryPrice: String! 3364 3365 "The total amount of profit and loss that was not transferred due to loss socialisation" 3366 lossSocializationAmount: String! 3367 3368 "Enum set if the position was closed out or orders were removed because party was distressed" 3369 positionStatus: PositionStatus! 3370 3371 "Margins of the party for the given position" 3372 marginsConnection(pagination: Pagination): MarginConnection 3373 3374 "RFC3339Nano time the position was updated" 3375 updatedAt: Timestamp 3376 3377 "The total amount paid in taker fees" 3378 takerFeesPaid: String! 3379 "The total amount in maker fees received" 3380 makerFeesReceived: String! 3381 "The total amount in fees paid (liquidity, infrastructure, treasury, buy-back, and high volume maker fees)" 3382 feesPaid: String! 3383 "Taker fees paid since opening the current long/short position. Gets reset when opening a position or changing between long and short." 3384 takerFeesPaidSince: String! 3385 "Maker fees received since opening the current long/short position." 3386 makerFeesReceivedSince: String! 3387 "Fees paid since opening the current long/short positions." 3388 feesPaidSince: String! 3389 "The total amount received or paid in funding payments" 3390 fundingPaymentAmount: String! 3391 "The amount paid or received in funding payments since opening the current position" 3392 fundingPaymentAmountSince: String! 3393 } 3394 3395 """ 3396 An individual party at any point in time is considered net long or net short. This refers to their Open Volume, 3397 calculated using FIFO. This volume is signed as either negative for LONG positions and positive for SHORT positions. A 3398 single trade may end up "splitting" with some of its volume matched into closed volume and some of its volume 3399 remaining as open volume. This is why we don't refer to positions being comprised of trades, rather of volume. 3400 """ 3401 type PositionUpdate { 3402 "Market relating to this position" 3403 marketId: ID! 3404 3405 "The party holding this position" 3406 partyId: ID! 3407 3408 "Open volume (int64)" 3409 openVolume: String! 3410 3411 "Realised Profit and Loss (int64)" 3412 realisedPNL: String! 3413 3414 "Unrealised Profit and Loss (int64)" 3415 unrealisedPNL: String! 3416 3417 "Average entry price for this position" 3418 averageEntryPrice: String! 3419 3420 "RFC3339Nano time the position was updated" 3421 updatedAt: Timestamp 3422 3423 "The total amount of profit and loss that was not transferred due to loss socialisation" 3424 lossSocializationAmount: String! 3425 3426 "Enum set if the position was closed out or orders were removed because party was distressed" 3427 positionStatus: PositionStatus! 3428 } 3429 3430 "Basic description of an order" 3431 input OrderInfo { 3432 "Whether the order is to buy or sell" 3433 side: Side! 3434 "Price for the order" 3435 price: String! 3436 "Number of units remaining of the total that have not yet been bought or sold (uint64)" 3437 remaining: String! 3438 "Boolean indicating a market order" 3439 isMarketOrder: Boolean! 3440 } 3441 3442 "An order in Vega, if active it will be on the order book for the market" 3443 type Order { 3444 "Hash of the order data" 3445 id: ID! 3446 3447 "The worst price the order will trade at (e.g. buy for price or less, sell for price or more) (uint64)" 3448 price: String! 3449 3450 "The timeInForce of order (determines how and if it executes, and whether it persists on the book)" 3451 timeInForce: OrderTimeInForce! 3452 3453 "Whether the order is to buy or sell" 3454 side: Side! 3455 3456 "The market the order is trading on (probably stored internally as a hash of the market details)" 3457 market: Market! 3458 3459 "Total number of units that may be bought or sold (immutable) (uint64)" 3460 size: String! 3461 3462 "Number of units remaining of the total that have not yet been bought or sold (uint64)" 3463 remaining: String! 3464 3465 "The party that placed the order (probably stored internally as the party's public key)" 3466 party: Party! 3467 3468 "RFC3339Nano formatted date and time for when the order was created (timestamp)" 3469 createdAt: Timestamp! 3470 3471 "RFC3339Nano expiration time of this order" 3472 expiresAt: Timestamp 3473 3474 "The status of an order, for example 'Active'" 3475 status: OrderStatus! 3476 3477 "The external reference (if available) for the order" 3478 reference: String! 3479 3480 "Trades relating to this order" 3481 tradesConnection( 3482 "Date range to retrieve trades from/to. Start and end time should be expressed as an integer value Unix nanoseconds" 3483 dateRange: DateRange 3484 pagination: Pagination 3485 ): TradeConnection 3486 @deprecated( 3487 reason: "Simplify and consolidate trades query and remove nesting. Use trades query instead" 3488 ) 3489 3490 "The order type" 3491 type: OrderType 3492 3493 "Why the order was rejected" 3494 rejectionReason: OrderRejectionReason 3495 3496 "Version of this order, counts the number of amends" 3497 version: String! 3498 3499 "RFC3339Nano time the order was altered" 3500 updatedAt: Timestamp 3501 3502 "PeggedOrder contains the details about a pegged order" 3503 peggedOrder: PeggedOrder 3504 3505 "The liquidity provision this order was created from" 3506 liquidityProvision: LiquidityProvision 3507 3508 "Is this a post only order" 3509 postOnly: Boolean 3510 3511 "Is this a reduce only order" 3512 reduceOnly: Boolean 3513 3514 "Details of an iceberg order" 3515 icebergOrder: IcebergOrder 3516 } 3517 3518 union StopOrderTrigger = StopOrderPrice | StopOrderTrailingPercentOffset 3519 3520 "Price at which a stop order will trigger" 3521 type StopOrderPrice { 3522 price: String! 3523 } 3524 3525 "Percentage movement in the price at which a stop order will trigger." 3526 type StopOrderTrailingPercentOffset { 3527 trailingPercentOffset: String! 3528 } 3529 3530 "Why the order was rejected by the core node" 3531 enum StopOrderRejectionReason { 3532 "Trading is not allowed yet" 3533 REJECTION_REASON_TRADING_NOT_ALLOWED 3534 "Expiry of the stop order is in the past" 3535 REJECTION_REASON_EXPIRY_IN_THE_PAST 3536 "Stop orders submission must be reduce only" 3537 REJECTION_REASON_MUST_BE_REDUCE_ONLY 3538 "Party has reached the maximum stop orders allowed for this market" 3539 REJECTION_REASON_MAX_STOP_ORDERS_PER_PARTY_REACHED 3540 "Stop orders are not allowed without a position" 3541 REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_WITHOUT_A_POSITION 3542 "This stop order does not close the position" 3543 REJECTION_REASON_STOP_ORDER_NOT_CLOSING_THE_POSITION 3544 "The percentage value for the linked stop order is invalid" 3545 REJECTION_REASON_STOP_ORDER_LINKED_PERCENTAGE_INVALID 3546 "Stop orders are not allowed during the opening auction" 3547 REJECTION_REASON_STOP_ORDER_NOT_ALLOWED_DURING_OPENING_AUCTION 3548 "Stop order cannot have matching OCO expiry times" 3549 REJECTION_REASON_STOP_ORDER_CANNOT_MATCH_OCO_EXPIRY_TIMES 3550 "Stop orders on spot markets cannot have a position size override" 3551 REJECTION_REASON_STOP_ORDER_SIZE_OVERRIDE_UNSUPPORTED_FOR_SPOT 3552 "Sell order not allowed on this market" 3553 REJECTION_REASON_SELL_ORDER_NOT_ALLOWED 3554 } 3555 3556 "Stop order size override settings" 3557 enum StopOrderSizeOverrideSetting { 3558 "The size override has not been specified, this should never happen!" 3559 SIZE_OVERRIDE_SETTING_UNSPECIFIED 3560 "No size override, the size within the contained normal order submission will be used" 3561 SIZE_OVERRIDE_SETTING_NONE 3562 "Use the total position of the trader" 3563 SIZE_OVERRIDE_SETTING_POSITION 3564 } 3565 3566 "A stop order in Vega" 3567 type StopOrder { 3568 "Hash of the stop order data" 3569 id: ID! 3570 "If OCO (one-cancels-other) order, the ID of the associated order." 3571 ocoLinkId: ID 3572 "RFC3339Nano time at which the order will expire if an expiry time is set." 3573 expiresAt: Timestamp 3574 "If an expiry is set, what should the stop order do when it expires." 3575 expiryStrategy: StopOrderExpiryStrategy 3576 "Direction the price is moving to trigger the stop order." 3577 triggerDirection: StopOrderTriggerDirection! 3578 "Status of the stop order" 3579 status: StopOrderStatus! 3580 "RFC3339Nano time the stop order was created." 3581 createdAt: Timestamp! 3582 "RFC3339Nano time the stop order was last updated." 3583 updatedAt: Timestamp 3584 "Party that submitted the stop order." 3585 partyId: ID! 3586 "Market the stop order is for." 3587 marketId: ID! 3588 "Price movement that will trigger the stop order" 3589 trigger: StopOrderTrigger! 3590 "Order to submit when the stop order is triggered." 3591 submission: OrderSubmission! 3592 "The order that was created when triggered." 3593 order: Order 3594 "Optional rejection reason for an order" 3595 rejectionReason: StopOrderRejectionReason 3596 "Size override setting" 3597 sizeOverrideSetting: StopOrderSizeOverrideSetting! 3598 "Size override value" 3599 sizeOverrideValue: String 3600 } 3601 3602 "Details of the order that will be submitted when the stop order is triggered." 3603 type OrderSubmission { 3604 "Market the order is for." 3605 marketId: ID! 3606 "The worst price the order will trade at (e.g. buy for price or less, sell for price or more) (uint64)" 3607 price: String! 3608 "Total number of units that may be bought or sold (immutable) (uint64)" 3609 size: String! 3610 "Whether the order is to buy or sell" 3611 side: Side! 3612 "The timeInForce of order (determines how and if it executes, and whether it persists on the book)" 3613 timeInForce: OrderTimeInForce! 3614 "RFC3339Nano expiration time of this order" 3615 expiresAt: Timestamp! 3616 "The order type" 3617 type: OrderType! 3618 "The external reference (if available) for the order" 3619 reference: String 3620 "PeggedOrder contains the details about a pegged order" 3621 peggedOrder: PeggedOrder 3622 "Is this a post only order" 3623 postOnly: Boolean 3624 "Is this a reduce only order" 3625 reduceOnly: Boolean 3626 "Details of an iceberg order" 3627 icebergOrder: IcebergOrder 3628 } 3629 3630 "An order update in Vega, if active it will be on the order book for the market" 3631 type OrderUpdate { 3632 "Hash of the order data" 3633 id: ID! 3634 3635 "The worst price the order will trade at (e.g. buy for price or less, sell for price or more) (uint64)" 3636 price: String! 3637 3638 "The timeInForce of order (determines how and if it executes, and whether it persists on the book)" 3639 timeInForce: OrderTimeInForce! 3640 3641 "Whether the order is to buy or sell" 3642 side: Side! 3643 3644 "The market the order is trading on (probably stored internally as a hash of the market details)" 3645 marketId: ID! 3646 3647 "Total number of units that may be bought or sold (immutable) (uint64)" 3648 size: String! 3649 3650 "Number of units remaining of the total that have not yet been bought or sold (uint64)" 3651 remaining: String! 3652 3653 "The party that placed the order (probably stored internally as the party's public key)" 3654 partyId: ID! 3655 3656 "RFC3339Nano formatted date and time for when the order was created (timestamp)" 3657 createdAt: Timestamp! 3658 3659 "RFC3339Nano expiration time of this order" 3660 expiresAt: Timestamp 3661 3662 "The status of an order, for example 'Active'" 3663 status: OrderStatus! 3664 3665 "The external reference (if available) for the order" 3666 reference: String! 3667 3668 "The order type" 3669 type: OrderType 3670 3671 "Why the order was rejected" 3672 rejectionReason: OrderRejectionReason 3673 3674 "Version of this order, counts the number of amends" 3675 version: String! 3676 3677 "RFC3339Nano time the order was altered" 3678 updatedAt: Timestamp 3679 3680 "PeggedOrder contains the details about a pegged order" 3681 peggedOrder: PeggedOrder 3682 3683 "The liquidity provision this order was created from" 3684 liquidityProvisionId: ID 3685 3686 "Details of an iceberg order" 3687 icebergOrder: IcebergOrder 3688 } 3689 3690 "Response for the estimate of the margin level and, if available, collateral was provided in the request, liquidation price for the specified position" 3691 type PositionEstimate { 3692 "Margin level range estimate for the specified position" 3693 margin: MarginEstimate! 3694 "Estimated margin account balance increase" 3695 collateralIncreaseEstimate: CollateralIncreaseEstimate! 3696 "Liquidation price range estimate for the specified position. Only populated if available collateral was specified in the request" 3697 liquidation: LiquidationEstimate 3698 } 3699 3700 "Margin level estimate for both worst and best case possible" 3701 type MarginEstimate { 3702 "Margin level estimate assuming slippage cap is applied" 3703 worstCase: AbstractMarginLevels! 3704 "Margin level estimate assuming no slippage" 3705 bestCase: AbstractMarginLevels! 3706 } 3707 3708 "Collateral increase estimate for the additional funds needed to support the specified position" 3709 type CollateralIncreaseEstimate { 3710 "Estimate assuming slippage cap is applied" 3711 worstCase: String! 3712 "Estimate assuming no slippage" 3713 bestCase: String! 3714 } 3715 3716 "Liquidation estimate for both worst and best case possible" 3717 type LiquidationEstimate { 3718 "Liquidation price estimate assuming slippage cap is applied" 3719 worstCase: LiquidationPrice! 3720 "Liquidation price estimate assuming no slippage" 3721 bestCase: LiquidationPrice! 3722 } 3723 3724 "Liquidation price estimate for either only the current open volume and position given some or all buy orders get filled, or position given some or all sell orders get filled" 3725 type LiquidationPrice { 3726 "Liquidation price for current open volume ignoring any active orders" 3727 open_volume_only: String! 3728 "Liquidation price assuming buy orders start getting filled" 3729 including_buy_orders: String! 3730 "Liquidation price assuming sell orders start getting filled" 3731 including_sell_orders: String! 3732 } 3733 3734 "An estimate of the fee to be paid by the order" 3735 type OrderEstimate { 3736 "The estimated fee if the order was to trade" 3737 fee: TradeFee! 3738 3739 "The total estimated amount of fee if the order was to trade" 3740 totalFeeAmount: String! 3741 3742 "The margin requirement for this order" 3743 marginLevels: MarginLevels! 3744 } 3745 3746 "An estimate of the fee to be paid for the order" 3747 type FeeEstimate { 3748 "The estimated fees if the order was to trade" 3749 fees: TradeFee! 3750 3751 "The total estimated amount of fees if the order was to trade" 3752 totalFeeAmount: String! 3753 } 3754 3755 "A trade on Vega, the result of two orders being 'matched' in the market" 3756 type Trade { 3757 "The hash of the trade data" 3758 id: ID! 3759 3760 "The market the trade occurred on" 3761 market: Market! 3762 3763 "The order that bought" 3764 buyOrder: String! 3765 3766 "The order that sold" 3767 sellOrder: String! 3768 3769 "The party that bought" 3770 buyer: Party! 3771 3772 "The party that sold" 3773 seller: Party! 3774 3775 "The aggressor indicates whether this trade was related to a BUY or SELL" 3776 aggressor: Side! 3777 3778 "The price of the trade (probably initially the passive order price, other determination algorithms are possible though) (uint64)" 3779 price: String! 3780 3781 "The number of units traded, will always be <= the remaining size of both orders immediately before the trade (uint64)" 3782 size: String! 3783 3784 "RFC3339Nano time for when the trade occurred" 3785 createdAt: Timestamp! 3786 3787 "The type of trade" 3788 type: TradeType! 3789 3790 "The fee paid by the buyer side of the trade" 3791 buyerFee: TradeFee! 3792 3793 "The fee paid by the seller side of the trade" 3794 sellerFee: TradeFee! 3795 3796 "The batch in which the buyer order was submitted (applies only for auction modes)" 3797 buyerAuctionBatch: Int 3798 3799 "The batch in which the seller order was submitted (applies only for auction modes)" 3800 sellerAuctionBatch: Int 3801 } 3802 3803 "A trade on Vega, the result of two orders being 'matched' in the market" 3804 type TradeUpdate { 3805 "The hash of the trade data" 3806 id: ID! 3807 3808 "The market the trade occurred on" 3809 marketId: ID! 3810 3811 "The order that bought" 3812 buyOrder: String! 3813 3814 "The order that sold" 3815 sellOrder: String! 3816 3817 "The party that bought" 3818 buyerId: ID! 3819 3820 "The party that sold" 3821 sellerId: ID! 3822 3823 "The aggressor indicates whether this trade was related to a BUY or SELL" 3824 aggressor: Side! 3825 3826 "The price of the trade (probably initially the passive order price, other determination algorithms are possible though) (uint64)" 3827 price: String! 3828 3829 "The number of units traded, will always be <= the remaining size of both orders immediately before the trade (uint64)" 3830 size: String! 3831 3832 "RFC3339Nano time for when the trade occurred" 3833 createdAt: Timestamp! 3834 3835 "The type of trade" 3836 type: TradeType! 3837 3838 "The fee paid by the buyer side of the trade" 3839 buyerFee: TradeFee! 3840 3841 "The fee paid by the seller side of the trade" 3842 sellerFee: TradeFee! 3843 3844 "The batch in which the buyer order was submitted (applies only for auction modes)" 3845 buyerAuctionBatch: Int 3846 3847 "The batch in which the seller order was submitted (applies only for auction modes)" 3848 sellerAuctionBatch: Int 3849 } 3850 3851 "The fee paid by the party when a trade occurs" 3852 type TradeFee { 3853 "The maker fee, paid by the aggressive party to the other party (the one who had an order in the book)" 3854 makerFee: String! 3855 3856 "The infrastructure fee, a fee paid to the validators to maintain the Vega network" 3857 infrastructureFee: String! 3858 3859 "The fee paid to the liquidity providers that committed liquidity to the market" 3860 liquidityFee: String! 3861 3862 "The fee paid into the protocol buy-back account" 3863 buyBackFee: String! 3864 3865 "The fee paid into the network treasury" 3866 treasuryFee: String! 3867 3868 "The fee paid to a high-volume maker as a rebate" 3869 highVolumeMakerFee: String! 3870 3871 "Referral discount on maker fees for the trade" 3872 makerFeeReferralDiscount: String 3873 3874 "Volume discount on maker fees for the trade" 3875 makerFeeVolumeDiscount: String 3876 3877 "Referral discount on infrastructure fees for the trade" 3878 infrastructureFeeReferralDiscount: String 3879 3880 "Volume discount on infrastructure fees for the trade" 3881 infrastructureFeeVolumeDiscount: String 3882 3883 "Referral discount on liquidity fees for the trade" 3884 liquidityFeeReferralDiscount: String 3885 3886 "Volume discount on liquidity fees for the trade" 3887 liquidityFeeVolumeDiscount: String 3888 } 3889 3890 "Valid trade types" 3891 enum TradeType { 3892 "Default trade type" 3893 TYPE_DEFAULT 3894 3895 "Network close-out - good" 3896 TYPE_NETWORK_CLOSE_OUT_BAD 3897 3898 "Network close-out - bad" 3899 TYPE_NETWORK_CLOSE_OUT_GOOD 3900 } 3901 3902 "An account record" 3903 type AccountBalance { 3904 "Balance as string - current account balance (approx. as balances can be updated several times per second)" 3905 balance: String! 3906 "Asset, the 'currency'" 3907 asset: Asset! 3908 "Account type (General, Margin, etc)" 3909 type: AccountType! 3910 "Market (only relevant to margin accounts)" 3911 market: Market 3912 "Owner of the account" 3913 party: Party 3914 "Parent party ID of the account. Used in cases where the account is derived from another party's account." 3915 parentPartyId: Party 3916 } 3917 3918 "An account record" 3919 type AccountEvent { 3920 "Balance as string - current account balance (approx. as balances can be updated several times per second)" 3921 balance: String! 3922 "Asset, the 'currency'" 3923 asset: Asset! 3924 "Account type (General, Margin, etc)" 3925 type: AccountType! 3926 "Market (only relevant to margin accounts)" 3927 market: Market 3928 "Owner of the account" 3929 party: Party 3930 } 3931 3932 "An account record" 3933 type AccountDetails { 3934 "Asset, the 'currency'" 3935 assetId: ID! 3936 "Account type (General, Margin, etc)" 3937 type: AccountType! 3938 "Market (only relevant to margin accounts)" 3939 marketId: ID 3940 "Owner of the account" 3941 partyId: ID 3942 } 3943 3944 "An account record used for subscriptions" 3945 type AccountUpdate { 3946 "Balance as string - current account balance (approx. as balances can be updated several times per second)" 3947 balance: String! 3948 "Asset id, the 'currency'" 3949 assetId: ID! 3950 "Account type (General, Margin, etc)" 3951 type: AccountType! 3952 "Market id (only relevant to margin accounts)" 3953 marketId: ID 3954 "The party owning the account" 3955 partyId: ID! 3956 } 3957 3958 "All the data related to the approval of a withdrawal from the network" 3959 type Erc20WithdrawalApproval { 3960 "The source asset on the bridged EVM chain" 3961 assetSource: String! 3962 "The amount to be withdrawn" 3963 amount: String! 3964 "The nonce to be used in the request" 3965 nonce: String! 3966 """ 3967 Signature aggregate from the nodes, in the following format: 3968 0x + sig1 + sig2 + ... + sigN 3969 """ 3970 signatures: String! 3971 "The target address that will receive the funds" 3972 targetAddress: String! 3973 "RFC3339Nano timestamp at which the withdrawal was created" 3974 creation: String! 3975 "The chain ID of the bridged EVM chain" 3976 sourceChainId: String! 3977 } 3978 3979 "Response for the signature bundle to add a particular validator to the signer list of the multisig contract" 3980 type ERC20MultiSigSignerAddedConnection { 3981 edges: [ERC20MultiSigSignerAddedBundleEdge] 3982 pageInfo: PageInfo 3983 } 3984 3985 type ERC20MultiSigSignerAddedBundleEdge { 3986 node: ERC20MultiSigSignerAddedBundle! 3987 cursor: String! 3988 } 3989 3990 type ERC20MultiSigSignerAddedBundle { 3991 "The ethereum address of the signer to be added" 3992 newSigner: String! 3993 "The ethereum address of the submitter" 3994 submitter: String! 3995 "The nonce used in the signing operation" 3996 nonce: String! 3997 "Unix-nano timestamp for when the validator was added" 3998 timestamp: String! 3999 "The bundle of signatures from current validators to sign in the new signer" 4000 signatures: String! 4001 "The epoch in which the validator was added" 4002 epochSeq: String! 4003 "The ID of the EVM chain this signature bundle is valid for" 4004 chainID: String! 4005 } 4006 4007 "Response for the signature bundle to remove a particular validator from the signer list of the multisig contract" 4008 type ERC20MultiSigSignerRemovedConnection { 4009 "The list of signer bundles for that validator" 4010 edges: [ERC20MultiSigSignerRemovedBundleEdge] 4011 "The pagination information" 4012 pageInfo: PageInfo 4013 } 4014 4015 type ERC20MultiSigSignerRemovedBundleEdge { 4016 node: ERC20MultiSigSignerRemovedBundle! 4017 cursor: String! 4018 } 4019 4020 type ERC20MultiSigSignerRemovedBundle { 4021 "The ethereum address of the signer to be removed" 4022 oldSigner: String! 4023 "The ethereum address of the submitter" 4024 submitter: String! 4025 "The nonce used in the signing operation" 4026 nonce: String! 4027 "Unix-nano timestamp for when the validator was added" 4028 timestamp: String! 4029 "The bundle of signatures from current validators to sign in the new signer" 4030 signatures: String! 4031 "The epoch in which the validator was removed" 4032 epochSeq: String! 4033 "The chain ID of the EVM blockchain this signature bundle is valid for" 4034 chainID: String! 4035 } 4036 4037 "Response for the signature bundle to allowlist an ERC20 token in the collateral bridge" 4038 type Erc20ListAssetBundle { 4039 "The source asset in the ethereum network" 4040 assetSource: String! 4041 "The ID of the vega asset" 4042 vegaAssetId: String! 4043 "The nonce to be used in the request" 4044 nonce: String! 4045 """ 4046 Signature aggregate from the nodes, in the following format: 4047 0x + sig1 + sig2 + ... + sigN 4048 """ 4049 signatures: String! 4050 } 4051 4052 "Response for the signature bundle to update the token limits (maxLifetimeDeposit and withdrawThreshold) for a given ERC20 token (already allowlisted) in the collateral bridge" 4053 type ERC20SetAssetLimitsBundle { 4054 "The address of the asset on ethereum" 4055 assetSource: String! 4056 "The ID of the vega asset" 4057 vegaAssetId: String! 4058 "The nonce, which is actually the internal reference for the proposal" 4059 nonce: String! 4060 "The lifetime limit deposit for this asset" 4061 lifetimeLimit: String! 4062 "The threshold withdraw for this asset" 4063 threshold: String! 4064 """ 4065 The signatures bundle as hex encoded data, forward by 0x 4066 e.g: 0x + sig1 + sig2 + ... + sixN 4067 """ 4068 signatures: String! 4069 } 4070 4071 "The details of a withdrawal processed by Vega" 4072 type Withdrawal { 4073 "The Vega internal ID of the withdrawal" 4074 id: ID! 4075 "The Party initiating the withdrawal" 4076 party: Party! 4077 "The amount to be withdrawn" 4078 amount: String! 4079 "The asset to be withdrawn" 4080 asset: Asset! 4081 "The current status of the withdrawal" 4082 status: WithdrawalStatus! 4083 "A reference the foreign chain can use to refer to when processing the withdrawal" 4084 ref: String! 4085 "RFC3339Nano time at which the withdrawal was created" 4086 createdTimestamp: Timestamp! 4087 "RFC3339Nano time at which the withdrawal was finalised" 4088 withdrawnTimestamp: Timestamp 4089 "Hash of the transaction on the foreign chain" 4090 txHash: String 4091 "Foreign chain specific details about the withdrawal" 4092 details: WithdrawalDetails 4093 } 4094 4095 union WithdrawalDetails = Erc20WithdrawalDetails 4096 4097 "Specific details for an erc20 withdrawal" 4098 type Erc20WithdrawalDetails { 4099 "The ethereum address of the receiver of the asset funds" 4100 receiverAddress: String! 4101 } 4102 4103 "The status of a withdrawal" 4104 enum WithdrawalStatus { 4105 "The withdrawal is open and being processed by the network" 4106 STATUS_OPEN 4107 "The withdrawal have been cancelled by the network, either because it expired, or something went wrong with the foreign chain" 4108 STATUS_REJECTED 4109 "The withdrawal was finalised, it was valid, the foreign chain has executed it and the network updated all accounts" 4110 STATUS_FINALIZED 4111 } 4112 4113 "The details of a deposit processed by Vega" 4114 type Deposit { 4115 "The Vega internal ID of the deposit" 4116 id: ID! 4117 "The Party initiating the deposit" 4118 party: Party! 4119 "The amount to be withdrawn" 4120 amount: String! 4121 "The asset to be withdrawn" 4122 asset: Asset! 4123 "The current status of the deposit" 4124 status: DepositStatus! 4125 "RFC3339Nano time at which the deposit was created" 4126 createdTimestamp: Timestamp! 4127 "RFC3339Nano time at which the deposit was finalised" 4128 creditedTimestamp: Timestamp 4129 "Hash of the transaction on the foreign chain" 4130 txHash: String 4131 } 4132 4133 "The status of a deposit" 4134 enum DepositStatus { 4135 "The deposit is open and being processed by the network" 4136 STATUS_OPEN 4137 "The deposit have been cancelled by the network, either because it expired, could not be verified, or something went wrong with the foreign chain" 4138 STATUS_CANCELLED 4139 "The deposit was finalised, it was valid, the foreign chain has executed it and the network updated all accounts" 4140 STATUS_FINALIZED 4141 "The deposit was rejected as a duplicate transaction" 4142 STATUS_DUPLICATE_REJECTED 4143 } 4144 4145 "Valid order types, these determine what happens when an order is added to the book" 4146 enum OrderTimeInForce { 4147 "Fill or Kill: The order either trades completely (remainingSize == 0 after adding) or not at all, does not remain on the book if it doesn't trade" 4148 TIME_IN_FORCE_FOK 4149 4150 "Immediate or Cancel: The order trades any amount and as much as possible but does not remain on the book (whether it trades or not)" 4151 TIME_IN_FORCE_IOC 4152 4153 "Good 'til Cancelled: This order trades any amount and as much as possible and remains on the book until it either trades completely or is cancelled" 4154 TIME_IN_FORCE_GTC 4155 4156 """ 4157 Good 'til Time: This order type trades any amount and as much as possible and remains on the book until they either trade completely, are cancelled, or expires at a set time 4158 NOTE: this may in future be multiple types or have sub types for orders that provide different ways of specifying expiry 4159 """ 4160 TIME_IN_FORCE_GTT 4161 4162 "Good for Auction: This order is only accepted during an auction period" 4163 TIME_IN_FORCE_GFA 4164 4165 "Good for Normal: This order is only accepted during normal trading (continuous trading or frequent batched auctions)" 4166 TIME_IN_FORCE_GFN 4167 } 4168 4169 "Valid references used for pegged orders." 4170 enum PeggedReference { 4171 "Peg the order against the mid price of the order book" 4172 PEGGED_REFERENCE_MID 4173 "Peg the order against the best bid price of the order book" 4174 PEGGED_REFERENCE_BEST_BID 4175 "Peg the order against the best ask price of the order book" 4176 PEGGED_REFERENCE_BEST_ASK 4177 } 4178 4179 "Valid order statuses, these determine several states for an order that cannot be expressed with other fields in Order." 4180 enum OrderStatus { 4181 """ 4182 The order is active and not cancelled or expired, it could be unfilled, partially filled or fully filled. 4183 Active does not necessarily mean it's still on the order book. 4184 """ 4185 STATUS_ACTIVE 4186 4187 "This order trades any amount and as much as possible and remains on the book until it either trades completely or expires." 4188 STATUS_EXPIRED 4189 4190 "The order is cancelled, the order could be partially filled or unfilled before it was cancelled. It is not possible to cancel an order with 0 remaining." 4191 STATUS_CANCELLED 4192 4193 "This order was of type IOC or FOK and could not be processed by the matching engine due to lack of liquidity." 4194 STATUS_STOPPED 4195 4196 "This order is fully filled with remaining equalling zero." 4197 STATUS_FILLED 4198 4199 "This order was rejected while being processed." 4200 STATUS_REJECTED 4201 4202 "This order was partially filled." 4203 STATUS_PARTIALLY_FILLED 4204 4205 "This order has been removed from the order book because the market is in auction, the reference price doesn't exist, or the order needs to be repriced and can't. Applies to pegged orders only" 4206 STATUS_PARKED 4207 } 4208 4209 "Valid stop order statuses, these determine several states for a stop order that cannot be expressed with other fields in StopOrder." 4210 enum StopOrderStatus { 4211 "Stop order has been submitted to the network but does not have a status yet" 4212 STATUS_UNSPECIFIED 4213 "Stop order is pending. This means the stop order has been accepted in the network, but the trigger conditions have not been met." 4214 STATUS_PENDING 4215 "Stop order has been cancelled. This could be by the trader or by the network." 4216 STATUS_CANCELLED 4217 "Stop order has been stopped. This means the trigger conditions have been met, but the stop order was not executed, and stopped." 4218 STATUS_STOPPED 4219 "Stop order has been triggered. This means the trigger conditions have been met, and the stop order was executed." 4220 STATUS_TRIGGERED 4221 "Stop order has expired. This means the trigger conditions have not been met and the stop order has expired." 4222 STATUS_EXPIRED 4223 "Stop order has been rejected. This means the stop order was not accepted by the network." 4224 STATUS_REJECTED 4225 } 4226 4227 "Valid stop order expiry strategies. The expiry strategy determines what happens to a stop order when it expires." 4228 enum StopOrderExpiryStrategy { 4229 "The stop order expiry strategy has not been specified by the trader." 4230 EXPIRY_STRATEGY_UNSPECIFIED 4231 "The stop order will be cancelled when it expires." 4232 EXPIRY_STRATEGY_CANCELS 4233 "The stop order will be submitted when the expiry time is reached." 4234 EXPIRY_STRATEGY_SUBMIT 4235 } 4236 4237 "Valid stop order trigger direction. The trigger direction determines whether the price should rise above or fall below the stop order trigger." 4238 enum StopOrderTriggerDirection { 4239 "The price should rise above the trigger." 4240 TRIGGER_DIRECTION_RISES_ABOVE 4241 "The price should fall below the trigger." 4242 TRIGGER_DIRECTION_FALLS_BELOW 4243 } 4244 4245 "Why the proposal was rejected by the core node" 4246 enum ProposalRejectionReason { 4247 "The specified close time is too early based on network parameters" 4248 PROPOSAL_ERROR_CLOSE_TIME_TOO_SOON 4249 "The specified close time is too late based on network parameters" 4250 PROPOSAL_ERROR_CLOSE_TIME_TOO_LATE 4251 "The specified enactment time is too early based on network parameters" 4252 PROPOSAL_ERROR_ENACT_TIME_TOO_SOON 4253 "The specified enactment time is too late based on network parameters" 4254 PROPOSAL_ERROR_ENACT_TIME_TOO_LATE 4255 "The proposer for this proposal has insufficient tokens" 4256 PROPOSAL_ERROR_INSUFFICIENT_TOKENS 4257 "The instrument quote name and base name were the same" 4258 PROPOSAL_ERROR_INVALID_INSTRUMENT_SECURITY 4259 "The proposal has no product specified" 4260 PROPOSAL_ERROR_NO_PRODUCT 4261 "The specified product is not supported" 4262 PROPOSAL_ERROR_UNSUPPORTED_PRODUCT 4263 "The proposal has no trading mode" 4264 PROPOSAL_ERROR_NO_TRADING_MODE 4265 "The proposal has an unsupported trading mode" 4266 PROPOSAL_ERROR_UNSUPPORTED_TRADING_MODE 4267 "The proposal failed node validation" 4268 PROPOSAL_ERROR_NODE_VALIDATION_FAILED 4269 "A builtin asset configuration is missing" 4270 PROPOSAL_ERROR_MISSING_BUILTIN_ASSET_FIELD 4271 "The ERC20 contract address is missing from an ERC20 asset proposal" 4272 PROPOSAL_ERROR_MISSING_ERC20_CONTRACT_ADDRESS 4273 "The specified asset for the market proposal is invalid" 4274 PROPOSAL_ERROR_INVALID_ASSET 4275 "Proposal terms timestamps are not compatible (Validation < Closing < Enactment)" 4276 PROPOSAL_ERROR_INCOMPATIBLE_TIMESTAMPS 4277 "Risk parameters are missing from the market proposal" 4278 PROPOSAL_ERROR_NO_RISK_PARAMETERS 4279 "Invalid key in update network parameter proposal" 4280 PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_KEY 4281 "Invalid value in update network parameter proposal" 4282 PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_VALUE 4283 "Validation failed for network parameter proposal" 4284 PROPOSAL_ERROR_NETWORK_PARAMETER_VALIDATION_FAILED 4285 "Opening auction duration is less than the network minimum opening auction time" 4286 PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_SMALL 4287 "Opening auction duration is more than the network minimum opening auction time" 4288 PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_LARGE 4289 "Market proposal is missing a liquidity commitment" 4290 PROPOSAL_ERROR_MARKET_MISSING_LIQUIDITY_COMMITMENT 4291 "Market could not be created" 4292 PROPOSAL_ERROR_COULD_NOT_INSTANTIATE_MARKET 4293 "Market proposal market contained invalid product definition" 4294 PROPOSAL_ERROR_INVALID_FUTURE_PRODUCT 4295 "Market proposal is missing commitment amount" 4296 PROPOSAL_ERROR_MISSING_COMMITMENT_AMOUNT 4297 "Market proposal has invalid fee amount" 4298 PROPOSAL_ERROR_INVALID_FEE_AMOUNT 4299 "Market proposal has one or more invalid liquidity shapes" 4300 PROPOSAL_ERROR_INVALID_SHAPE 4301 "Market proposal uses an invalid risk parameter" 4302 PROPOSAL_ERROR_INVALID_RISK_PARAMETER 4303 "Proposal declined because the majority threshold was not reached" 4304 PROPOSAL_ERROR_MAJORITY_THRESHOLD_NOT_REACHED 4305 "Proposal declined because the participation threshold was not reached" 4306 PROPOSAL_ERROR_PARTICIPATION_THRESHOLD_NOT_REACHED 4307 "Proposal declined because one of the sub proposals was rejected" 4308 PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED 4309 "Asset details are invalid" 4310 PROPOSAL_ERROR_INVALID_ASSET_DETAILS 4311 "Too many price monitoring triggers specified in market" 4312 PROPOSAL_ERROR_TOO_MANY_PRICE_MONITORING_TRIGGERS 4313 "Too many decimal places specified in market" 4314 PROPOSAL_ERROR_TOO_MANY_MARKET_DECIMAL_PLACES 4315 "The market is invalid" 4316 PROPOSAL_ERROR_INVALID_MARKET 4317 "The proposal is rejected because the party does not have enough equity-like share in the market" 4318 PROPOSAL_ERROR_INSUFFICIENT_EQUITY_LIKE_SHARE 4319 "Unknown proposal type" 4320 PROPOSAL_ERROR_UNKNOWN_TYPE 4321 "Unknown risk parameters" 4322 PROPOSAL_ERROR_UNKNOWN_RISK_PARAMETER_TYPE 4323 "Freeform proposal is invalid" 4324 PROPOSAL_ERROR_INVALID_FREEFORM 4325 "The ERC-20 address specified by this proposal is already in use by another asset" 4326 PROPOSAL_ERROR_ERC20_ADDRESS_ALREADY_IN_USE 4327 "The governance transfer proposal is invalid" 4328 PROPOSAL_ERROR_GOVERNANCE_TRANSFER_PROPOSAL_INVALID 4329 "The governance transfer proposal has failed" 4330 PROPOSAL_ERROR_GOVERNANCE_TRANSFER_PROPOSAL_FAILED 4331 "The proposal for cancellation of an active governance transfer has failed" 4332 PROPOSAL_ERROR_GOVERNANCE_CANCEL_TRANSFER_PROPOSAL_INVALID 4333 "Validation of spot market proposal failed" 4334 PROPOSAL_ERROR_INVALID_SPOT 4335 "Spot trading is disabled" 4336 PROPOSAL_ERROR_SPOT_PRODUCT_DISABLED 4337 "Validation of successor market has failed" 4338 PROPOSAL_ERROR_INVALID_SUCCESSOR_MARKET 4339 "Validation of market state update has failed" 4340 PROPOSAL_ERROR_INVALID_MARKET_STATE_UPDATE 4341 "Validation of liquidity provision SLA parameters has failed" 4342 PROPOSAL_ERROR_MISSING_SLA_PARAMS 4343 "Mandatory liquidity provision SLA parameters are missing from the proposal" 4344 PROPOSAL_ERROR_INVALID_SLA_PARAMS 4345 "Perpetual market proposal contained invalid product definition" 4346 PROPOSAL_ERROR_INVALID_PERPETUAL_PRODUCT 4347 "Spot market proposal contains too many size decimal places" 4348 PROPOSAL_ERROR_INVALID_SIZE_DECIMAL_PLACES 4349 "LP price range must be larger than 0" 4350 PROPOSAL_ERROR_LP_PRICE_RANGE_NONPOSITIVE 4351 "LP price range must not be larger than 100" 4352 PROPOSAL_ERROR_LP_PRICE_RANGE_TOO_LARGE 4353 "Linear slippage factor is out of range, either negative or too large" 4354 PROPOSAL_ERROR_LINEAR_SLIPPAGE_FACTOR_OUT_OF_RANGE 4355 "Quadratic slippage factor is out of range, either negative or too large" 4356 PROPOSAL_ERROR_QUADRATIC_SLIPPAGE_FACTOR_OUT_OF_RANGE 4357 "Referral program proposal is invalid" 4358 PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM 4359 "Volume discount program proposal is invalid" 4360 PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM 4361 "One or more proposals in a batch has been rejected" 4362 PROPOSAL_ERROR_PROPOSAL_IN_BATCH_REJECTED 4363 "One or more proposals in a batch has been declined" 4364 PROPOSAL_ERROR_PROPOSAL_IN_BATCH_DECLINED 4365 "Volume rebate program proposal is invalid" 4366 PROPOSAL_ERROR_INVALID_VOLUME_REBATE_PROGRAM 4367 "Invalid automated purchase proposal" 4368 PROPOSAL_ERROR_INVALID_PROTOCOL_AUTOMATED_PURCHASE 4369 } 4370 4371 "Why the order was rejected by the core node" 4372 enum OrderRejectionReason { 4373 "Market ID is invalid" 4374 ORDER_ERROR_INVALID_MARKET_ID 4375 4376 "Order ID is invalid" 4377 ORDER_ERROR_INVALID_ORDER_ID 4378 4379 "Order is out of sequence" 4380 ORDER_ERROR_OUT_OF_SEQUENCE 4381 4382 "Remaining size in the order is invalid" 4383 ORDER_ERROR_INVALID_REMAINING_SIZE 4384 4385 "Time has failed us" 4386 ORDER_ERROR_TIME_FAILURE 4387 4388 "Unable to remove the order" 4389 ORDER_ERROR_REMOVAL_FAILURE 4390 4391 "Expiration time is invalid" 4392 ORDER_ERROR_INVALID_EXPIRATION_DATETIME 4393 4394 "Order reference is invalid" 4395 ORDER_ERROR_INVALID_ORDER_REFERENCE 4396 4397 "Edit is not allowed" 4398 ORDER_ERROR_EDIT_NOT_ALLOWED 4399 4400 "Amending the order failed" 4401 ORDER_ERROR_AMEND_FAILURE 4402 4403 "Order does not exist" 4404 ORDER_ERROR_NOT_FOUND 4405 4406 "Party ID is invalid" 4407 ORDER_ERROR_INVALID_PARTY_ID 4408 4409 "Market is closed" 4410 ORDER_ERROR_MARKET_CLOSED 4411 4412 "Margin check failed - not enough available margin" 4413 ORDER_ERROR_MARGIN_CHECK_FAILED 4414 4415 "Order missing general account" 4416 ORDER_ERROR_MISSING_GENERAL_ACCOUNT 4417 4418 "An internal error happened" 4419 ORDER_ERROR_INTERNAL_ERROR 4420 4421 "Invalid size" 4422 ORDER_ERROR_INVALID_SIZE 4423 4424 "Invalid persistence" 4425 ORDER_ERROR_INVALID_PERSISTENCE 4426 4427 "Invalid type" 4428 ORDER_ERROR_INVALID_TYPE 4429 4430 "Order cannot be filled because it would require self trading" 4431 ORDER_ERROR_SELF_TRADING 4432 4433 "Insufficient funds to pay fees" 4434 ORDER_ERROR_INSUFFICIENT_FUNDS_TO_PAY_FEES 4435 4436 "Invalid Time In Force" 4437 ORDER_ERROR_INVALID_TIME_IN_FORCE 4438 4439 "Attempt to amend order to Good til Time without expiry time" 4440 ORDER_ERROR_CANNOT_AMEND_TO_GTT_WITHOUT_EXPIRYAT 4441 4442 "Attempt to amend expiry time to a value before time order was created" 4443 ORDER_ERROR_EXPIRYAT_BEFORE_CREATEDAT 4444 4445 "Attempt to amend to Good till Cancelled without an expiry time" 4446 ORDER_ERROR_CANNOT_HAVE_GTC_AND_EXPIRYAT 4447 4448 "Amending to Fill or Kill, or Immediate or Cancel is invalid" 4449 ORDER_ERROR_CANNOT_AMEND_TO_FOK_OR_IOC 4450 4451 "Amending to Good for Auction or Good for Normal is invalid" 4452 ORDER_ERROR_CANNOT_AMEND_TO_GFA_OR_GFN 4453 4454 "Amending from Good for Auction or Good for Normal is invalid" 4455 ORDER_ERROR_CANNOT_AMEND_FROM_GFA_OR_GFN 4456 4457 "Good for Normal order received during an auction" 4458 ORDER_ERROR_CANNOT_SEND_GFN_ORDER_DURING_AN_AUCTION 4459 4460 "Good for Auction order received during continuous trading" 4461 ORDER_ERROR_CANNOT_SEND_GFA_ORDER_DURING_CONTINUOUS_TRADING 4462 4463 "Cannot send IOC orders during an auction" 4464 ORDER_ERROR_CANNOT_SEND_IOC_ORDER_DURING_AUCTION 4465 4466 "Cannot send FOK orders during an auction" 4467 ORDER_ERROR_CANNOT_SEND_FOK_ORDER_DURING_AUCTION 4468 4469 "Pegged orders must be limit orders" 4470 ORDER_ERROR_MUST_BE_LIMIT_ORDER 4471 4472 "Pegged orders can only have a time in force of Good til Cancelled or Good til Time" 4473 ORDER_ERROR_MUST_BE_GTT_OR_GTC 4474 4475 "Pegged order must have a reference price" 4476 ORDER_ERROR_WITHOUT_REFERENCE_PRICE 4477 4478 "Buy pegged order cannot reference best ask price" 4479 ORDER_ERROR_BUY_CANNOT_REFERENCE_BEST_ASK_PRICE 4480 4481 "Pegged order offset must be >= 0" 4482 ORDER_ERROR_OFFSET_MUST_BE_GREATER_OR_EQUAL_TO_ZERO 4483 4484 "Sell pegged order cannot reference best bid price" 4485 ORDER_ERROR_SELL_CANNOT_REFERENCE_BEST_BID_PRICE 4486 4487 "Pegged order offset must be > zero" 4488 ORDER_ERROR_OFFSET_MUST_BE_GREATER_THAN_ZERO 4489 4490 "Insufficient balance to submit the order (no deposit made)" 4491 ORDER_ERROR_INSUFFICIENT_ASSET_BALANCE 4492 4493 "Cannot change pegged order fields on a non pegged order" 4494 ORDER_ERROR_CANNOT_AMEND_PEGGED_ORDER_DETAILS_ON_NON_PEGGED_ORDER 4495 4496 "Unable to reprice a pegged order" 4497 ORDER_ERROR_UNABLE_TO_REPRICE_PEGGED_ORDER 4498 4499 "Unable to amend pegged order price" 4500 ORDER_ERROR_UNABLE_TO_AMEND_PRICE_ON_PEGGED_ORDER 4501 4502 "Non-persistent order exceeds price bounds" 4503 ORDER_ERROR_NON_PERSISTENT_ORDER_OUT_OF_PRICE_BOUNDS 4504 4505 "Order was submitted with an incorrect or invalid market type" 4506 ORDER_ERROR_INCORRECT_MARKET_TYPE 4507 4508 "Unable to submit pegged order, temporarily too many pegged orders across all markets" 4509 ORDER_ERROR_TOO_MANY_PEGGED_ORDERS 4510 4511 "A reduce-ony order would not reduce the party's position and thus it has been rejected" 4512 ORDER_ERROR_REDUCE_ONLY_ORDER_WOULD_NOT_REDUCE 4513 4514 "A post-only order would produce an aggressive trade and thus it has been rejected" 4515 ORDER_ERROR_POST_ONLY_ORDER_WOULD_TRADE 4516 4517 "Party has insufficient funds to cover for the order margin for the new or amended order" 4518 ORDER_ERROR_ISOLATED_MARGIN_CHECK_FAILED 4519 4520 "Pegged orders are not allowed for a party in isolated margin mode" 4521 ORDER_ERROR_PEGGED_ORDERS_NOT_ALLOWED_IN_ISOLATED_MARGIN_MODE 4522 4523 "Order price exceeds the max price of the capped future market" 4524 ORDER_ERROR_PRICE_MUST_BE_LESS_THAN_OR_EQUAL_TO_MAX_PRICE 4525 4526 "Sell order not allowed on this market" 4527 ORDER_ERROR_SELL_ORDER_NOT_ALLOWED 4528 } 4529 4530 "Types of orders" 4531 enum OrderType { 4532 "An order to buy or sell at the market's current best available price" 4533 TYPE_MARKET 4534 4535 "Order that uses a pre-specified price to buy or sell" 4536 TYPE_LIMIT 4537 4538 """ 4539 Used for distressed parties, an order placed by the network to close out distressed parties 4540 similar to market order, only no party is attached to the order. 4541 """ 4542 TYPE_NETWORK 4543 } 4544 4545 "The current state of a market" 4546 enum MarketState { 4547 "The governance proposal valid and accepted" 4548 STATE_PROPOSED 4549 "Outcome of governance votes is to reject the market" 4550 STATE_REJECTED 4551 "Governance vote passes/wins" 4552 STATE_PENDING 4553 """ 4554 Market triggers cancellation condition or governance 4555 votes to close before market becomes Active 4556 """ 4557 STATE_CANCELLED 4558 "Enactment date reached and usual auction exit checks pass" 4559 STATE_ACTIVE 4560 "Price monitoring or liquidity monitoring trigger" 4561 STATE_SUSPENDED 4562 "Market suspended via governance" 4563 STATE_SUSPENDED_VIA_GOVERNANCE 4564 "Governance vote (to close)" 4565 STATE_CLOSED 4566 """ 4567 Defined by the product (i.e. from a product parameter, 4568 specified in market definition, giving close date/time) 4569 """ 4570 STATE_TRADING_TERMINATED 4571 "Settlement triggered and completed as defined by product" 4572 STATE_SETTLED 4573 } 4574 4575 "What market trading mode is the market in" 4576 enum MarketTradingMode { 4577 "Continuous trading where orders are processed and potentially matched on arrival" 4578 TRADING_MODE_CONTINUOUS 4579 4580 "Auction trading where orders are uncrossed at the end of the opening auction period" 4581 TRADING_MODE_OPENING_AUCTION 4582 4583 "Auction as normal trading mode for the market, where orders are uncrossed periodically" 4584 TRADING_MODE_BATCH_AUCTION 4585 4586 "Auction triggered by price/liquidity monitoring" 4587 TRADING_MODE_MONITORING_AUCTION 4588 4589 "No trading allowed" 4590 TRADING_MODE_NO_TRADING 4591 4592 "Special auction mode triggered via governance market suspension" 4593 TRADING_MODE_SUSPENDED_VIA_GOVERNANCE 4594 4595 "Auction triggered by a long block" 4596 TRADING_MODE_LONG_BLOCK_AUCTION 4597 4598 "Auction triggered by automated purchase" 4599 TRADING_MODE_PROTOCOL_AUTOMATED_PURCHASE_AUCTION 4600 } 4601 4602 "Whether the placer of an order is aiming to buy or sell on the market" 4603 enum Side { 4604 "Unspecified is only used for trades at the end of an auction, where neither party acts as the aggressor." 4605 SIDE_UNSPECIFIED 4606 "The placer of the order is aiming to buy" 4607 SIDE_BUY 4608 4609 "The placer of the order is aiming to sell" 4610 SIDE_SELL 4611 } 4612 4613 "The interval for trade candles when subscribing via Vega GraphQL, default is I15M" 4614 enum Interval { 4615 "The block interval is not a fixed amount of time, rather it used to indicate grouping of events that occur in a single block. It is usually about a second." 4616 INTERVAL_BLOCK 4617 "1 minute interval" 4618 INTERVAL_I1M 4619 "5 minute interval" 4620 INTERVAL_I5M 4621 "15 minute interval (default)" 4622 INTERVAL_I15M 4623 "30 minute interval" 4624 INTERVAL_I30M 4625 "1 hour interval" 4626 INTERVAL_I1H 4627 "4 hour interval" 4628 INTERVAL_I4H 4629 "6 hour interval" 4630 INTERVAL_I6H 4631 "8 hour interval" 4632 INTERVAL_I8H 4633 "12 hour interval" 4634 INTERVAL_I12H 4635 "1 day interval" 4636 INTERVAL_I1D 4637 "7 day interval" 4638 INTERVAL_I7D 4639 } 4640 4641 "The various account types in Vega (used by collateral)" 4642 enum AccountType { 4643 "Insurance pool account - only for 'system' party" 4644 ACCOUNT_TYPE_INSURANCE 4645 "Global insurance pool account for an asset" 4646 ACCOUNT_TYPE_GLOBAL_INSURANCE 4647 "Settlement - only for 'system' party" 4648 ACCOUNT_TYPE_SETTLEMENT 4649 """ 4650 Margin - The leverage account for parties, contains funds set aside for the margin needed to support 4651 a party's open positions. Each party will have a margin account for each market they have traded in. 4652 The required initial margin is allocated to each market from the general account, and it cannot be withdrawn 4653 or used as margin on another market until it's released back into the general account. 4654 The protocol uses an internal accounting system to segregate funds held as margin from other funds 4655 to ensure they are never lost or 'double spent' 4656 """ 4657 ACCOUNT_TYPE_MARGIN 4658 "General account - the account containing 'unused' collateral for parties" 4659 ACCOUNT_TYPE_GENERAL 4660 "Infrastructure fee account - the account where all infrastructure fees are collected" 4661 ACCOUNT_TYPE_FEES_INFRASTRUCTURE 4662 "Liquidity fee account - the account contains fees earned by providing liquidity" 4663 ACCOUNT_TYPE_FEES_LIQUIDITY 4664 "Market maker fee account - holds fees paid to the passive side when a trade matches" 4665 ACCOUNT_TYPE_FEES_MAKER 4666 "Bond - an account use to maintain liquidity commitments" 4667 ACCOUNT_TYPE_BOND 4668 "External - an account use to refer to external account" 4669 ACCOUNT_TYPE_EXTERNAL 4670 "GlobalReward - a global account for the reward pool" 4671 ACCOUNT_TYPE_GLOBAL_REWARD 4672 "PendingTransfers - a global account for the pending transfers pool" 4673 ACCOUNT_TYPE_PENDING_TRANSFERS 4674 "RewardMakerPaidFees - an account holding rewards for maker paid fees" 4675 ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES 4676 "RewardMakerReceivedFees - an account holding rewards for maker received fees" 4677 ACCOUNT_TYPE_REWARD_MAKER_RECEIVED_FEES 4678 "RewardLpReceivedFees - an account holding rewards for a liquidity provider's received fees" 4679 ACCOUNT_TYPE_REWARD_LP_RECEIVED_FEES 4680 "RewardMarketProposers - an account holding rewards for market proposers" 4681 ACCOUNT_TYPE_REWARD_MARKET_PROPOSERS 4682 "AccountTypeHolding - an account for holding funds covering for active unfilled orders" 4683 ACCOUNT_TYPE_HOLDING 4684 "Per liquidity provider, per market account for holding LPs' fees before distribution" 4685 ACCOUNT_TYPE_LP_LIQUIDITY_FEES 4686 "Network treasury, per-asset treasury controlled by the network" 4687 ACCOUNT_TYPE_NETWORK_TREASURY 4688 "Vesting reward account is a per party per asset account for locked reward funds waiting to be vested" 4689 ACCOUNT_TYPE_VESTING_REWARDS 4690 "Vested reward account is a per party per asset account for vested reward funds" 4691 ACCOUNT_TYPE_VESTED_REWARDS 4692 "Average position reward account is a per asset per market account for average position reward funds" 4693 ACCOUNT_TYPE_REWARD_AVERAGE_POSITION @deprecated 4694 "Relative return reward account is a per asset per market account for relative return reward funds" 4695 ACCOUNT_TYPE_REWARD_RELATIVE_RETURN 4696 "Return volatility reward account is a per asset per market account for return volatility reward funds" 4697 ACCOUNT_TYPE_REWARD_RETURN_VOLATILITY 4698 "Validator ranking reward account is a per asset account for validator ranking reward funds" 4699 ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING 4700 "Holds pending rewards to be paid to the referrer of a party out of fees paid by the taker" 4701 ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD 4702 "Per asset market account for party in isolated margin mode" 4703 ACCOUNT_TYPE_ORDER_MARGIN 4704 "Realised return reward account is per asset per reward scheme" 4705 ACCOUNT_TYPE_REWARD_REALISED_RETURN 4706 "Average notional reward account is a per asset per market account for average notional reward funds" 4707 ACCOUNT_TYPE_REWARD_AVERAGE_NOTIONAL 4708 "Reward account for the eligible entities metric" 4709 ACCOUNT_TYPE_REWARD_ELIGIBLE_ENTITIES 4710 "Account for assets that are locked for staking." 4711 ACCOUNT_TYPE_LOCKED_FOR_STAKING 4712 } 4713 4714 "Types that describe why a transfer has been made" 4715 enum TransferType { 4716 "Default value, always invalid" 4717 TRANSFER_TYPE_UNSPECIFIED 4718 "Funds deducted after final settlement loss" 4719 TRANSFER_TYPE_LOSS 4720 "Funds added to general account after final settlement gain" 4721 TRANSFER_TYPE_WIN 4722 "Funds deducted from margin account after mark to market loss" 4723 TRANSFER_TYPE_MTM_LOSS 4724 "Funds added to margin account after mark to market gain" 4725 TRANSFER_TYPE_MTM_WIN 4726 "Funds transferred from general account to meet margin requirement" 4727 TRANSFER_TYPE_MARGIN_LOW 4728 "Excess margin amount returned to general account" 4729 TRANSFER_TYPE_MARGIN_HIGH 4730 "Margin confiscated from margin account to fulfil closeout" 4731 TRANSFER_TYPE_MARGIN_CONFISCATED 4732 "Maker fee paid from general account" 4733 TRANSFER_TYPE_MAKER_FEE_PAY 4734 "Maker fee received into general account" 4735 TRANSFER_TYPE_MAKER_FEE_RECEIVE 4736 "Infrastructure fee paid from general account" 4737 TRANSFER_TYPE_INFRASTRUCTURE_FEE_PAY 4738 "Infrastructure fee received into general account" 4739 TRANSFER_TYPE_INFRASTRUCTURE_FEE_DISTRIBUTE 4740 "Liquidity fee paid from general account" 4741 TRANSFER_TYPE_LIQUIDITY_FEE_PAY 4742 "Liquidity fee received into general account" 4743 TRANSFER_TYPE_LIQUIDITY_FEE_DISTRIBUTE 4744 "Bond account funded from general account to meet required bond amount" 4745 TRANSFER_TYPE_BOND_LOW 4746 "Bond returned to general account after liquidity commitment was reduced" 4747 TRANSFER_TYPE_BOND_HIGH 4748 "Funds withdrawn from general account" 4749 TRANSFER_TYPE_WITHDRAW 4750 "Funds deposited to general account" 4751 TRANSFER_TYPE_DEPOSIT 4752 "Bond account penalised when liquidity commitment not met" 4753 TRANSFER_TYPE_BOND_SLASHING 4754 "Reward payout received" 4755 TRANSFER_TYPE_REWARD_PAYOUT 4756 "A network internal instruction for the collateral engine to move funds from a user's general account into the pending transfers pool" 4757 TRANSFER_TYPE_TRANSFER_FUNDS_SEND 4758 "A network internal instruction for the collateral engine to move funds from the pending transfers pool account into the destination account" 4759 TRANSFER_TYPE_TRANSFER_FUNDS_DISTRIBUTE 4760 "Market-related accounts emptied because market has closed" 4761 TRANSFER_TYPE_CLEAR_ACCOUNT 4762 "Balances are being restored to the user's account following a checkpoint restart of the network" 4763 TRANSFER_TYPE_CHECKPOINT_BALANCE_RESTORE 4764 "Spot trade delivery" 4765 TRANSFER_TYPE_SPOT 4766 "An internal instruction to transfer a quantity corresponding to an active spot order from a general account into a party holding account" 4767 TRANSFER_TYPE_HOLDING_LOCK 4768 "An internal instruction to transfer an excess quantity corresponding to an active spot order from a holding account into a party general account" 4769 TRANSFER_TYPE_HOLDING_RELEASE 4770 "Insurance pool fraction transfer from parent to successor market." 4771 TRANSFER_TYPE_SUCCESSOR_INSURANCE_FRACTION 4772 "Allocates liquidity fee earnings to each liquidity provider's network controlled liquidity fee account." 4773 TRANSFER_TYPE_LIQUIDITY_FEE_ALLOCATE 4774 "Distributes net fee earnings from liquidity provider's fee account to their general account." 4775 TRANSFER_TYPE_LIQUIDITY_FEE_NET_DISTRIBUTE 4776 "Applies SLA penalty by moving funds from party's bond account to market's insurance pool." 4777 TRANSFER_TYPE_SLA_PENALTY_BOND_APPLY 4778 "Applies SLA penalty by moving funds from the liquidity provider's fee account to market insurance pool." 4779 TRANSFER_TYPE_SLA_PENALTY_LP_FEE_APPLY 4780 "Collects penalties from the liquidity provider's fee account before the fee revenue is paid, and transfers it to the market's bonus distribution account." 4781 TRANSFER_TYPE_LIQUIDITY_FEE_UNPAID_COLLECT 4782 "Distributes performance bonus from market bonus to liquidity provider's general account." 4783 TRANSFER_TYPE_SLA_PERFORMANCE_BONUS_DISTRIBUTE 4784 "Funds deducted from margin account after a perpetuals funding loss." 4785 TRANSFER_TYPE_PERPETUALS_FUNDING_LOSS 4786 "Funds added to margin account after a perpetuals funding gain." 4787 TRANSFER_TYPE_PERPETUALS_FUNDING_WIN 4788 "Funds moved from the vesting account to the vested account once the vesting period is reached." 4789 TRANSFER_TYPE_REWARDS_VESTED 4790 "Funds moved from general account to order margin account." 4791 TRANSFER_TYPE_ORDER_MARGIN_LOW 4792 "Funds released from order margin account to general." 4793 TRANSFER_TYPE_ORDER_MARGIN_HIGH 4794 "Funds moved from order margin account to margin account." 4795 TRANSFER_TYPE_ISOLATED_MARGIN_LOW 4796 "Transfer from a party's general account to their AMM's general account." 4797 TRANSFER_TYPE_AMM_LOW 4798 "Transfer from an AMM's general account to their owner's general account." 4799 TRANSFER_TYPE_AMM_HIGH 4800 "Transfer releasing an AMM's general account upon closure." 4801 TRANSFER_TYPE_AMM_RELEASE 4802 } 4803 4804 union ProductConfiguration = FutureProduct | SpotProduct | PerpetualProduct 4805 4806 type FutureProduct { 4807 "Product asset" 4808 settlementAsset: Asset! 4809 "String representing the quote (e.g. BTCUSD -> USD is quote)" 4810 quoteName: String! 4811 """ 4812 Describes the data source data that an instrument wants to get from the data source engine for settlement data. 4813 """ 4814 dataSourceSpecForSettlementData: DataSourceDefinition! 4815 """ 4816 Describes the source data that an instrument wants to get from the data source engine for trading termination. 4817 """ 4818 dataSourceSpecForTradingTermination: DataSourceDefinition! 4819 """ 4820 DataSourceSpecToFutureBinding tells on which property source data should be 4821 used as settlement data. 4822 """ 4823 dataSourceSpecBinding: DataSourceSpecToFutureBinding! 4824 4825 "If set, the product belongs to a capped future" 4826 cap: FutureCap 4827 } 4828 4829 type SpotProduct { 4830 "Underlying base asset for the spot product" 4831 baseAsset: Asset! 4832 "Underlying quote asset for the spot product" 4833 quoteAsset: Asset! 4834 } 4835 4836 type PerpetualProduct { 4837 "Underlying asset for the perpetual instrument" 4838 settlementAsset: Asset! 4839 "Quote name of the instrument" 4840 quoteName: String! 4841 "Controls how much the upcoming funding payment liability contributes to party's margin, in the range [0, 1]" 4842 marginFundingFactor: String! 4843 "Continuously compounded interest rate used in funding rate calculation, in the range [-1, 1]" 4844 interestRate: String! 4845 "Lower bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1]" 4846 clampLowerBound: String! 4847 "Upper bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1]" 4848 clampUpperBound: String! 4849 "Data source specification describing the data source for settlement schedule" 4850 dataSourceSpecForSettlementSchedule: DataSourceDefinition! 4851 "Data source specification describing the data source for settlement" 4852 dataSourceSpecForSettlementData: DataSourceDefinition! 4853 "Binding between the data source spec and the settlement data" 4854 dataSourceSpecBinding: DataSourceSpecPerpetualBinding! 4855 "Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments." 4856 fundingRateScalingFactor: String 4857 "Lower bound for the funding-rate such that the funding-rate will never be lower than this value" 4858 fundingRateLowerBound: String 4859 "Upper bound for the funding-rate such that the funding-rate will never be higher than this value" 4860 fundingRateUpperBound: String 4861 } 4862 4863 """ 4864 DataSourceSpecConfiguration describes the source data that an instrument wants to get from the 4865 sourcing engine. 4866 """ 4867 type DataSourceSpecConfiguration { 4868 """ 4869 Signers is the list of authorized signatures that signed the data for this 4870 data source. All the public keys in the data should be contained in this 4871 list. 4872 """ 4873 signers: [Signer!] 4874 4875 """ 4876 Filters describes which source data are considered of interest or not for 4877 the product (or the risk model). 4878 """ 4879 filters: [Filter!] 4880 } 4881 4882 """ 4883 EthCallTrigger is the type of trigger used to make calls to Ethereum network. 4884 """ 4885 type EthCallTrigger { 4886 trigger: TriggerKind! 4887 } 4888 4889 union TriggerKind = EthTimeTrigger 4890 4891 """ 4892 Trigger for an Ethereum call based on the Ethereum block timestamp. Can be 4893 one-off or repeating. 4894 """ 4895 type EthTimeTrigger { 4896 "Trigger when the Ethereum time is greater or equal to this time, in Unix seconds." 4897 initial: Timestamp 4898 """ 4899 Repeat the call every n seconds after the initial call. If no time for 4900 initial call was specified, begin repeating immediately. 4901 """ 4902 every: Int 4903 """ 4904 If repeating, stop once Ethereum time is greater than this time, in Unix 4905 seconds. If not set, then repeat indefinitely. 4906 """ 4907 until: Timestamp 4908 } 4909 4910 """ 4911 Normaliser to convert the data returned from the contract method 4912 into a standard format. 4913 """ 4914 type Normaliser { 4915 name: String! 4916 expression: String! 4917 } 4918 4919 """ 4920 Specifies a data source that derives its content from calling a read method 4921 on an Ethereum contract. 4922 """ 4923 type EthCallSpec { 4924 "Ethereum address of the contract to call." 4925 address: String! 4926 "The ABI of that contract." 4927 abi: [String!] 4928 "Name of the method on the contract to call." 4929 method: String! 4930 """ 4931 List of arguments to pass to method call. 4932 Protobuf 'Value' wraps an arbitrary JSON type that is mapped to an Ethereum 4933 type according to the ABI. 4934 """ 4935 args: [String!] 4936 "Conditions for determining when to call the contract method." 4937 trigger: EthCallTrigger! 4938 "Number of confirmations required before the query is considered verified." 4939 requiredConfirmations: Int! 4940 """ 4941 Normalisers are used to convert the data returned from the contract method 4942 into a standard format. 4943 """ 4944 normalisers: [Normaliser!] 4945 "Filters the data returned from the contract method." 4946 filters: [Filter!] 4947 "The ID of the EVM based chain which is to be used to source the oracle data." 4948 sourceChainId: Int! 4949 } 4950 4951 type InstrumentConfiguration { 4952 "Full and fairly descriptive name for the instrument" 4953 name: String! 4954 "A short non necessarily unique code used to easily describe the instrument (e.g: FX:BTCUSD/DEC18)" 4955 code: String! 4956 "Future product specification" 4957 futureProduct: FutureProduct 4958 "Product specification" 4959 product: ProductConfiguration 4960 } 4961 4962 type NewMarket { 4963 "New market instrument configuration" 4964 instrument: InstrumentConfiguration! 4965 "Decimal places used for the new market, sets the smallest price increment on the book" 4966 decimalPlaces: Int! 4967 "New market risk configuration" 4968 riskParameters: RiskModel! 4969 "Metadata for this instrument, tags" 4970 metadata: [String!] 4971 "Price monitoring parameters" 4972 priceMonitoringParameters: PriceMonitoringParameters! 4973 "Liquidity monitoring parameters" 4974 liquidityMonitoringParameters: LiquidityMonitoringParameters! 4975 "Decimal places for order sizes, sets what size the smallest order / position on the market can be" 4976 positionDecimalPlaces: Int! 4977 "Linear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume" 4978 linearSlippageFactor: String! 4979 "Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume" 4980 quadraticSlippageFactor: String! 4981 @deprecated(reason: "This field will be removed in a future release") 4982 "Successor market configuration. If this proposed market is meant to succeed a given market, then this needs to be set." 4983 successorConfiguration: SuccessorConfiguration 4984 "Liquidity SLA Parameters" 4985 liquiditySLAParameters: LiquiditySLAParameters 4986 "Specifies how the liquidity fee for the market will be calculated" 4987 liquidityFeeSettings: LiquidityFeeSettings 4988 "Liquidation strategy for the market" 4989 liquidationStrategy: LiquidationStrategy 4990 "Configuration for mark price calculation for the market" 4991 markPriceConfiguration: CompositePriceConfiguration! 4992 "The market minimum tick size" 4993 tickSize: String! 4994 "If enabled aggressive orders sent to the market will be delayed by the configured number of blocks" 4995 enableTxReordering: Boolean! 4996 "Number of allowed price levels between an AMM's fair price and its quote prices. An AMM definition that exceeds this will be rejected at submission" 4997 allowedEmptyAMMLevels: Int 4998 } 4999 5000 type CompositePriceConfiguration { 5001 "Decay weight used in calculating time weight for a given trade" 5002 decayWeight: String! 5003 "Decay power used in calculating time weight for a given trade" 5004 decayPower: Int! 5005 "Cash amount used in calculating mark price from the order book" 5006 cashAmount: String! 5007 "Weights for each given price source, first entry is price from trade, then price from book, then first oracle, next oracle, etc. And last entry is for median price" 5008 SourceWeights: [String!] 5009 "Staleness tolerance duration for each given price sources in the order mentioned above" 5010 SourceStalenessTolerance: [String!]! 5011 "Composite price calculation methodology" 5012 CompositePriceType: CompositePriceType! 5013 "Oracle configuration for external composite price sources" 5014 dataSourcesSpec: [DataSourceDefinition] 5015 "Spec bindings for external composite price sources" 5016 dataSourcesSpecBinding: [SpecBindingForCompositePrice] 5017 } 5018 5019 type SuccessorConfiguration { 5020 "ID of the market this proposal will succeed" 5021 parentMarketId: String! 5022 "Decimal value between 0 and 1, specifying the fraction of the insurance pool balance is carried over from the parent market to the successor." 5023 insurancePoolFraction: String! 5024 } 5025 5026 """ 5027 Incomplete change definition for governance proposal terms 5028 TODO: complete the type 5029 """ 5030 type UpdateMarket { 5031 marketId: ID! 5032 updateMarketConfiguration: UpdateMarketConfiguration! 5033 } 5034 5035 type UpdateMarketConfiguration { 5036 "Updated futures market instrument configuration." 5037 instrument: UpdateInstrumentConfiguration! 5038 "Optional futures market metadata, tags." 5039 metadata: [String] 5040 "Price monitoring parameters." 5041 priceMonitoringParameters: PriceMonitoringParameters! 5042 "Liquidity monitoring parameters." 5043 liquidityMonitoringParameters: LiquidityMonitoringParameters! 5044 "Updated futures market risk model parameters." 5045 riskParameters: UpdateMarketRiskParameters! 5046 "Linear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume." 5047 linearSlippageFactor: String! 5048 "Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume." 5049 quadraticSlippageFactor: String! 5050 @deprecated(reason: "This field will be removed in a future release") 5051 "Liquidity SLA Parameters." 5052 liquiditySLAParameters: LiquiditySLAParameters 5053 "Specifies how the liquidity fee for the market will be calculated" 5054 liquidityFeeSettings: LiquidityFeeSettings 5055 "Liquidation strategy for the market" 5056 liquidationStrategy: LiquidationStrategy 5057 "Configuration for mark price calculation for the market" 5058 markPriceConfiguration: CompositePriceConfiguration 5059 "The market minimum tick size" 5060 tickSize: String! 5061 "If enabled aggressive orders sent to the market will be delayed by the configured number of blocks" 5062 enableTxReordering: Boolean! 5063 "Number of allowed price levels between an AMM's fair price and its quote prices. An AMM definition that exceeds this will be rejected at submission" 5064 allowedEmptyAMMLevels: Int 5065 } 5066 5067 type UpdateInstrumentConfiguration { 5068 code: String! 5069 name: String! 5070 product: UpdateProductConfiguration! 5071 } 5072 5073 union UpdateProductConfiguration = UpdateFutureProduct | UpdatePerpetualProduct 5074 5075 type UpdateFutureProduct { 5076 quoteName: String! 5077 dataSourceSpecForSettlementData: DataSourceDefinition! 5078 dataSourceSpecForTradingTermination: DataSourceDefinition! 5079 dataSourceSpecBinding: DataSourceSpecToFutureBinding! 5080 } 5081 5082 type UpdatePerpetualProduct { 5083 "Quote name of the instrument" 5084 quoteName: String! 5085 "Controls how much the upcoming funding payment liability contributes to party's margin, in the range [0, 1]" 5086 marginFundingFactor: String! 5087 "Continuously compounded interest rate used in funding rate calculation, in the range [-1, 1]" 5088 interestRate: String! 5089 "Lower bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1]" 5090 clampLowerBound: String! 5091 "Upper bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1]" 5092 clampUpperBound: String! 5093 "Data source specification describing the data source for settlement schedule" 5094 dataSourceSpecForSettlementSchedule: DataSourceDefinition! 5095 "Data source specification describing the data source for settlement" 5096 dataSourceSpecForSettlementData: DataSourceDefinition! 5097 "Binding between the data source spec and the settlement data" 5098 dataSourceSpecBinding: DataSourceSpecPerpetualBinding! 5099 "Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments." 5100 fundingRateScalingFactor: String 5101 "Lower bound for the funding-rate such that the funding-rate will never be lower than this value" 5102 fundingRateLowerBound: String 5103 "Upper bound for the funding-rate such that the funding-rate will never be higher than this value" 5104 fundingRateUpperBound: String 5105 } 5106 5107 union UpdateMarketRiskParameters = 5108 UpdateMarketSimpleRiskModel 5109 | UpdateMarketLogNormalRiskModel 5110 5111 type UpdateMarketSimpleRiskModel { 5112 simple: SimpleRiskModelParams 5113 } 5114 5115 type UpdateMarketLogNormalRiskModel { 5116 logNormal: LogNormalRiskModel 5117 } 5118 5119 "A new asset proposal change" 5120 type NewAsset { 5121 "The full name of the asset (e.g: Great British Pound)" 5122 name: String! 5123 5124 "The symbol of the asset (e.g: GBP)" 5125 symbol: String! 5126 5127 "The precision of the asset" 5128 decimals: Int! 5129 5130 "The minimum economically meaningful amount of this specific asset" 5131 quantum: String! 5132 5133 "The source of the new asset" 5134 source: AssetSource! 5135 } 5136 5137 "A proposal to update an asset's details" 5138 type UpdateAsset { 5139 "The minimum economically meaningful amount of this specific asset" 5140 quantum: String! 5141 5142 "The source of the updated asset" 5143 source: UpdateAssetSource! 5144 5145 "The asset to update" 5146 assetId: ID! 5147 } 5148 5149 """ 5150 A new freeform proposal change. It has no properties on purpose. Use proposal 5151 rationale, instead. 5152 """ 5153 type NewFreeform { 5154 "A placeholder to please graphQL" 5155 _doNotUse: Boolean 5156 } 5157 5158 enum GovernanceTransferType { 5159 "Default value, always invalid" 5160 GOVERNANCE_TRANSFER_TYPE_UNSPECIFIED 5161 "Transfers the specified amount or does not transfer anything" 5162 GOVERNANCE_TRANSFER_TYPE_ALL_OR_NOTHING 5163 "Transfers the specified amount or the max allowable amount if this is less than the specified amount" 5164 GOVERNANCE_TRANSFER_TYPE_BEST_EFFORT 5165 } 5166 5167 type NewTransfer { 5168 "The source account" 5169 source: String! 5170 "The type of source account" 5171 sourceType: AccountType! 5172 "The destination account" 5173 destination: String! 5174 "The type of destination account" 5175 destinationType: AccountType! 5176 "The asset to transfer" 5177 asset: Asset! 5178 "The fraction of the balance to be transferred" 5179 fraction_of_balance: String! 5180 "The maximum amount to be transferred" 5181 amount: String! 5182 "The type of the governance transfer" 5183 transferType: GovernanceTransferType! 5184 "The type of governance transfer being made, i.e. a one-off or recurring transfer" 5185 kind: GovernanceTransferKind! 5186 } 5187 5188 union GovernanceTransferKind = 5189 OneOffGovernanceTransfer 5190 | RecurringGovernanceTransfer 5191 5192 "Allows for cancellation of an existing governance transfer" 5193 type CancelTransfer { 5194 "The governance transfer to cancel" 5195 transferId: ID! 5196 } 5197 5198 "Allows submitting a proposal for changing network parameters" 5199 type UpdateNetworkParameter { 5200 networkParameter: NetworkParameter! 5201 } 5202 5203 enum MarketUpdateType { 5204 "Default value, always invalid" 5205 MARKET_STATE_UPDATE_TYPE_UNSPECIFIED 5206 "Terminate the market" 5207 MARKET_STATE_UPDATE_TYPE_TERMINATE 5208 "Suspend the market" 5209 MARKET_STATE_UPDATE_TYPE_SUSPEND 5210 "Resume a suspended market" 5211 MARKET_STATE_UPDATE_TYPE_RESUME 5212 } 5213 5214 type UpdateMarketState { 5215 "The market for which to update the state" 5216 market: Market! 5217 "The type of update" 5218 updateType: MarketUpdateType! 5219 "Optional settlement price for terminating and settling futures market. Must be empty for other types of updates and other types of markets" 5220 price: String 5221 } 5222 5223 type UpdateReferralProgram { 5224 "Defined tiers in increasing order. First element will give Tier 1, second element will give Tier 2, etc." 5225 benefitTiers: [BenefitTier!]! 5226 "Timestamp as Unix time in nanoseconds, after which when the current epoch ends, the program will end and benefits will be disabled." 5227 endOfProgramTimestamp: Timestamp! 5228 "Number of epochs over which to evaluate a referral set's running volume." 5229 windowLength: Int! 5230 """ 5231 Defined staking tiers in increasing order. First element will give Tier 1, 5232 second element will give Tier 2, and so on. Determines the level of 5233 benefit a party can expect based on their staking. 5234 """ 5235 stakingTiers: [StakingTier!]! 5236 } 5237 5238 type RewardFactors { 5239 "The proportion of the referee's taker infrastructure fees to be rewarded to the referrer" 5240 infrastructureFactor: String! 5241 "The proportion of the referee's taker maker fees to be rewarded to the referrer" 5242 makerFactor: String! 5243 "The proportion of the referee's taker liquidity fees to be rewarded to the referrer" 5244 liquidityFactor: String! 5245 } 5246 5247 type DiscountFactors { 5248 "The proportion of the referee's taker infrastructure fees to be discounted" 5249 infrastructureFactor: String! 5250 "The proportion of the referee's taker maker fees to be discounted" 5251 makerFactor: String! 5252 "The proportion of the referee's taker liquidity fees to be discounted" 5253 liquidityFactor: String! 5254 } 5255 5256 type BenefitTier { 5257 "The minimum number of epochs the party needs to be in the referral set to be eligible for the benefit" 5258 minimumEpochs: Int! 5259 "The minimum running notional for the given benefit tier" 5260 minimumRunningNotionalTakerVolume: String! 5261 "The proportion of the referee's taker fees to be discounted" 5262 referralDiscountFactor: String! @deprecated(reason: "Use referralDiscountFactors") 5263 "The proportion of the referee's taker fees to be discounted" 5264 referralDiscountFactors: DiscountFactors! 5265 "The proportion of the referee's taker fees to be rewarded to the referrer" 5266 referralRewardFactor: String! @deprecated(reason: "Use referralRewardFactors") 5267 "The proportion of the referee's taker fees to be rewarded to the referrer" 5268 referralRewardFactors: RewardFactors! 5269 "The tier number" 5270 tierNumber: Int 5271 } 5272 5273 type StakingTier { 5274 "Required number of governance tokens ($VEGA) a referrer must have staked to receive the multiplier" 5275 minimumStakedTokens: String! 5276 "Multiplier applied to the referral reward factor when calculating referral rewards due to the referrer" 5277 referralRewardMultiplier: String! 5278 } 5279 5280 type UpdateVolumeDiscountProgram { 5281 "The benefit tiers for the program" 5282 benefitTiers: [VolumeBenefitTier!]! 5283 "Timestamp as Unix time in nanoseconds, after which program ends." 5284 endOfProgramTimestamp: Timestamp! 5285 "The window length to consider for the volume discount program" 5286 windowLength: Int! 5287 } 5288 5289 type VolumeBenefitTier { 5290 "The minimum running notional for the given benefit tier" 5291 minimumRunningNotionalTakerVolume: String! 5292 "Discount given to those in this benefit tier" 5293 volumeDiscountFactor: String! @deprecated(reason: "Use volumeDiscountFactors") 5294 "Discount factors applied to to those in this benefit tier" 5295 volumeDiscountFactors: DiscountFactors! 5296 "The tier number" 5297 tierNumber: Int 5298 } 5299 5300 "Configuration for a new spot market on Vega" 5301 type NewSpotMarket { 5302 "New spot market instrument configuration" 5303 instrument: InstrumentConfiguration! 5304 "Decimal places used for the new market, sets the smallest price increment on the book" 5305 priceDecimalPlaces: Int! 5306 "Optional spot market metadata tags" 5307 metadata: [String!]! 5308 "Price monitoring parameters" 5309 priceMonitoringParameters: PriceMonitoringParameters! 5310 "Specifies parameters related to liquidity target stake calculation" 5311 targetStakeParameters: TargetStakeParameters! 5312 "New spot market risk model parameters" 5313 riskParameters: RiskModel 5314 "Decimal places for order sizes, sets what size the smallest order / position on the spot market can be" 5315 sizeDecimalPlaces: Int! 5316 "Specifies the liquidity provision SLA parameters" 5317 liquiditySLAParams: LiquiditySLAParameters! 5318 "Specifies how the liquidity fee for the market will be calculated" 5319 liquidityFeeSettings: LiquidityFeeSettings 5320 "The market minimum tick size" 5321 tickSize: String! 5322 "If enabled aggressive orders sent to the market will be delayed by the configured number of blocks" 5323 enableTxReordering: Boolean! 5324 "A list of keys allowed to place sell orders on the market" 5325 allowedSellers: [String!] 5326 } 5327 5328 "Update an existing spot market on Vega" 5329 type UpdateSpotMarket { 5330 "Market ID the update is for" 5331 marketId: ID! 5332 "Updated configuration of the spot market" 5333 updateSpotMarketConfiguration: UpdateSpotMarketConfiguration! 5334 } 5335 5336 type UpdateSpotInstrumentConfiguration { 5337 "Instrument code, human-readable shortcode used to describe the instrument." 5338 code: String! 5339 "Instrument name" 5340 name: String! 5341 } 5342 5343 type UpdateSpotMarketConfiguration { 5344 "Updated spot market instrument configuration." 5345 instrument: UpdateSpotInstrumentConfiguration! 5346 "Optional spot market metadata tags" 5347 metadata: [String!]! 5348 "Price monitoring parameters" 5349 priceMonitoringParameters: PriceMonitoringParameters! 5350 "Specifies parameters related to target stake calculation" 5351 targetStakeParameters: TargetStakeParameters! 5352 "Update spot market risk model parameters" 5353 riskParameters: RiskModel! 5354 "Specifies the liquidity provision SLA parameters" 5355 liquiditySLAParams: LiquiditySLAParameters! 5356 "Specifies how the liquidity fee for the market will be calculated" 5357 liquidityFeeSettings: LiquidityFeeSettings 5358 "The market minimum tick size" 5359 tickSize: String! 5360 "If enabled aggressive orders sent to the market will be delayed by the configured number of blocks" 5361 enableTxReordering: Boolean! 5362 "A list of keys allowed to place sell orders on the market" 5363 allowedSellers: [String!] 5364 } 5365 5366 type LiquiditySLAParameters { 5367 priceRange: String! 5368 "Specifies the minimum fraction of time LPs must spend 'on the book' providing their committed liquidity" 5369 commitmentMinTimeFraction: String! 5370 "Specifies the number of liquidity epochs over which past performance will continue to affect rewards" 5371 performanceHysteresisEpochs: Int! 5372 """ 5373 Specifies the maximum fraction of their accrued fees an LP that meets the SLA implied by market.liquidity.commitmentMinTimeFraction will 5374 lose to liquidity providers that achieved a higher SLA performance than them. 5375 """ 5376 slaCompetitionFactor: String! 5377 } 5378 5379 type LiquidationStrategy { 5380 "Specifies the interval, in seconds, at which point the network will try to unload its position." 5381 disposalTimeStep: Int! 5382 "Specifies the fraction of its position the network will try to reduce its position by in a single disposal attempt." 5383 disposalFraction: String! 5384 "Specifies the size of the position held by the network that it will try to dispose of in one attempt." 5385 fullDisposalSize: Int! 5386 "Specifies the maximum size by which the network can reduce its position as a fraction of the volume on the book." 5387 maxFractionConsumed: String! 5388 "Specifies the slippage relative to the mid prige within which the network will place orders to dispose of its position." 5389 disposalSlippageRange: String! 5390 } 5391 5392 "Representation of a network parameter" 5393 type NetworkParameter { 5394 "The name of the network parameter" 5395 key: String! 5396 "The value of the network parameter" 5397 value: String! 5398 } 5399 5400 union ProposalChange = 5401 NewMarket 5402 | UpdateMarket 5403 | UpdateNetworkParameter 5404 | NewAsset 5405 | UpdateAsset 5406 | NewFreeform 5407 | NewTransfer 5408 | CancelTransfer 5409 | UpdateMarketState 5410 | NewSpotMarket 5411 | UpdateSpotMarket 5412 | UpdateVolumeDiscountProgram 5413 | UpdateReferralProgram 5414 | UpdateVolumeRebateProgram 5415 | NewProtocolAutomatedPurchase 5416 5417 # there are no unions for input types as of today, see: https://github.com/graphql/graphql-spec/issues/488 5418 5419 type ProposalRationale { 5420 """ 5421 Description to show a short title / something in case the link goes offline. 5422 This is to be between 0 and 20k unicode characters. 5423 This is mandatory for all proposals. 5424 """ 5425 description: String! 5426 """ 5427 Title to be used to give a short description of the proposal in lists. 5428 This is to be between 0 and 100 unicode characters. 5429 This is mandatory for all proposals. 5430 """ 5431 title: String! 5432 } 5433 5434 "The rationale behind the proposal" 5435 type ProposalTerms { 5436 """ 5437 RFC3339Nano time and date when voting closes for this proposal. 5438 Constrained by "minClose" and "maxClose" network parameters. 5439 """ 5440 closingDatetime: Timestamp! 5441 """ 5442 RFC3339Nano time and date when this proposal is executed (if passed). Note that it has to be after closing date time. 5443 Constrained by "minEnactInSeconds" and "maxEnactInSeconds" network parameters. 5444 Note: Optional as free form proposals do not require it. 5445 """ 5446 enactmentDatetime: Timestamp 5447 5448 "RFC3339Nano time and when node validation of the proposal stops, accepted only with new asset proposals" 5449 validationDatetime: Timestamp 5450 5451 "Actual change being introduced by the proposal - action the proposal triggers if passed and enacted." 5452 change: ProposalChange! 5453 } 5454 5455 "Terms for a batch governance proposal" 5456 type BatchProposalTermsChange { 5457 """ 5458 RFC3339Nano time and date when this proposal will be executed, if it passes. 5459 Constrained by "minEnactInSeconds" and "maxEnactInSeconds" network parameters. 5460 """ 5461 enactmentDatetime: Timestamp 5462 """ 5463 RFC3339Nano time and date allocated to the validator to validate the proposal. 5464 """ 5465 validationDatetime: Timestamp 5466 5467 "Actual change being introduced by the proposal - action the proposal triggers if passed and enacted." 5468 change: ProposalChange! 5469 } 5470 5471 "The terms for the batch proposal" 5472 type BatchProposalTerms { 5473 """ 5474 RFC3339Nano time and date when voting closes for this proposal. 5475 Constrained by "minClose" and "maxClose" network parameters. 5476 """ 5477 closingDatetime: Timestamp! 5478 5479 "Actual changes being introduced by the batch proposal - actions the proposal triggers if passed and enacted." 5480 changes: [BatchProposalTermsChange]! 5481 } 5482 5483 """ 5484 Various proposal types that are supported by Vega 5485 """ 5486 enum ProposalType { 5487 "Propose a new market" 5488 TYPE_NEW_MARKET 5489 "Update an existing market" 5490 TYPE_UPDATE_MARKET 5491 "Proposal to change Vega network parameters" 5492 TYPE_NETWORK_PARAMETERS 5493 "Proposal to add a new asset" 5494 TYPE_NEW_ASSET 5495 "Proposal to create a new freeform proposal" 5496 TYPE_NEW_FREE_FORM 5497 "Proposal to update an existing asset" 5498 TYPE_UPDATE_ASSET 5499 "Propose a new spot market" 5500 TYPE_NEW_SPOT_MARKET 5501 "Update an existing spot market" 5502 TYPE_UPDATE_SPOT_MARKET 5503 "Propose a new transfer" 5504 TYPE_NEW_TRANSFER 5505 "Proposal to cancel a transfer" 5506 TYPE_CANCEL_TRANSFER 5507 "Proposal for updating the state of a market" 5508 TYPE_UPDATE_MARKET_STATE 5509 "Proposal to update the referral program" 5510 TYPE_UPDATE_REFERRAL_PROGRAM 5511 "Proposal to update the volume discount program" 5512 TYPE_UPDATE_VOLUME_DISCOUNT_PROGRAM 5513 } 5514 5515 """ 5516 Various states a proposal can transition through: 5517 Open -> 5518 - Passed -> Enacted. 5519 - Rejected. 5520 Proposal can enter Failed state from any other state. 5521 """ 5522 enum ProposalState { 5523 "Proposal became invalid and cannot be processed" 5524 STATE_FAILED 5525 "Proposal is open for voting" 5526 STATE_OPEN 5527 "Proposal has gained enough support to be executed" 5528 STATE_PASSED 5529 "Proposal didn't get enough votes" 5530 STATE_DECLINED 5531 "Proposal could not gain enough support to be executed" 5532 STATE_REJECTED 5533 "Proposal has been executed and the changes under this proposal have now been applied" 5534 STATE_ENACTED 5535 "Proposal is waiting for the node to run validation" 5536 STATE_WAITING_FOR_NODE_VOTE 5537 } 5538 5539 type Proposal { 5540 "Proposal ID that is filled by Vega once proposal reaches the network" 5541 id: ID 5542 "A UUID reference to aid tracking proposals on Vega" 5543 reference: String! 5544 "Party that prepared the proposal" 5545 party: Party! 5546 "State of the proposal" 5547 state: ProposalState! 5548 "RFC3339Nano time and date when the proposal reached Vega network" 5549 datetime: Timestamp! 5550 "Rationale behind the proposal" 5551 rationale: ProposalRationale! 5552 "Terms of the proposal" 5553 terms: ProposalTerms! 5554 "Votes cast for this proposal" 5555 votes: ProposalVotes! 5556 "Why the proposal was rejected by the core" 5557 rejectionReason: ProposalRejectionReason 5558 "Error details of the rejectionReason" 5559 errorDetails: String 5560 "Required majority for this proposal to succeed" 5561 requiredMajority: String! 5562 "Required participation for this proposal to succeed" 5563 requiredParticipation: String! 5564 "Equity-like share required for a market amendment proposal to be enacted (if not met, the proposal will not be enacted), represented as a fraction that can be converted to a percentage" 5565 requiredLpMajority: String 5566 "The market share of LPs' equity-like share that must take part in the market amendment vote for the proposal to pass. This means the votes of LPs that have submitted more liquidity to that market, or have been LPs from the start carry more weight. If it requires 50% of a market's equity-like share for a majority, and the proposal receives only YES votes but only LPs with 49% of the equity-like share voted, the proposal will not pass" 5567 requiredLpParticipation: String 5568 } 5569 5570 type BatchProposal { 5571 "Proposal ID that is provided by Vega once proposal reaches the network" 5572 id: ID 5573 "A UUID reference to aid tracking proposals on Vega" 5574 reference: String! 5575 "Party that prepared the proposal" 5576 party: Party! 5577 "State of the proposal" 5578 state: ProposalState! 5579 "RFC3339Nano time and date when the proposal reached the network" 5580 datetime: Timestamp! 5581 "Terms of all the proposals in the batch" 5582 batchTerms: BatchProposalTerms 5583 "Rationale behind the proposal" 5584 rationale: ProposalRationale! 5585 "Votes cast for this proposal" 5586 votes: ProposalVotes! 5587 "Reason the proposal was rejected" 5588 rejectionReason: ProposalRejectionReason 5589 "Details of the rejection reason" 5590 errorDetails: String 5591 "Required majority for this proposal to succeed" 5592 requiredMajority: String! 5593 "Required participation for this proposal to succeed" 5594 requiredParticipation: String! 5595 "Equity-like share required for a market amendment proposal to be enacted, represented as a fraction that can be converted to a percentage. If not met, the proposal will not be enacted" 5596 requiredLpMajority: String 5597 "The market share of LPs' equity-like share that must take part in a market amendment vote for the proposal to pass. This means the votes of LPs that have submitted more liquidity to that market, or have been LPs from the start carry more weight. If it requires 50% of a market's equity-like share for a majority, and the full batch of proposals receives all YES votes but only LPs with 49% of the equity-like share voted, the proposal will not pass" 5598 requiredLpParticipation: String 5599 "Proposals that are part of the batch" 5600 subProposals: [ProposalDetail] 5601 } 5602 5603 type ProposalDetail { 5604 "Proposal ID that is provided by Vega once proposal reaches the network" 5605 id: ID 5606 "Batch proposal ID that is provided by Vega once proposal reaches the network" 5607 batchId: ID 5608 "A UUID reference to aid tracking proposals on Vega" 5609 reference: String! 5610 "Party that prepared the proposal" 5611 party: Party! 5612 "State of the proposal" 5613 state: ProposalState! 5614 "RFC3339Nano time and date when the proposal reached the Vega network" 5615 datetime: Timestamp! 5616 "Terms of the proposal" 5617 terms: ProposalTerms 5618 "Terms of all the proposals in the batch" 5619 batchTerms: BatchProposalTerms 5620 "Rationale behind the proposal" 5621 rationale: ProposalRationale! 5622 "Why the proposal was rejected by the core" 5623 rejectionReason: ProposalRejectionReason 5624 "Error details of the rejectionReason" 5625 errorDetails: String 5626 "Required majority for this proposal to succeed" 5627 requiredMajority: String! 5628 "Required participation for this proposal to succeed" 5629 requiredParticipation: String! 5630 "Equity-like share required for a market amendment proposal to be enacted (if not met, the proposal will not be enacted), represented as a fraction that can be converted to a percentage" 5631 requiredLpMajority: String 5632 "The market share of LPs' equity-like share that must take part in the market amendment vote for the proposal to pass. This means the votes of LPs that have submitted more liquidity to that market, or have been LPs from the start carry more weight. If it requires 50% of a market's equity-like share for a majority, and the proposal receives only YES votes but only LPs with 49% of the equity-like share voted, the proposal will not pass" 5633 requiredLpParticipation: String 5634 } 5635 5636 type ProposalVotes { 5637 "Yes votes cast for this proposal" 5638 yes: ProposalVoteSide! 5639 "No votes cast for this proposal" 5640 no: ProposalVoteSide! 5641 } 5642 5643 type ProposalVoteSide { 5644 "All votes cast for this side" 5645 votes: [Vote!] 5646 "Total number of votes cast for this side" 5647 totalNumber: String! 5648 "Total weight of governance token from the votes cast for this side" 5649 totalWeight: String! 5650 "Total number of governance tokens from the votes cast for this side" 5651 totalTokens: String! 5652 "Total equity-like share weight for this side (only for UpdateMarket Proposals)" 5653 totalEquityLikeShareWeight: String! 5654 } 5655 5656 "Whether a governance vote is yes or no" 5657 enum VoteValue { 5658 "No votes against a proposal" 5659 VALUE_NO 5660 "Yes votes for a proposal" 5661 VALUE_YES 5662 } 5663 5664 type Vote { 5665 "The vote value cast" 5666 value: VoteValue! 5667 5668 "The party casting the vote" 5669 party: Party! 5670 5671 "RFC3339Nano time and date when the vote reached Vega network" 5672 datetime: Timestamp! 5673 5674 "The ID of the proposal this vote applies to" 5675 proposalId: ID! 5676 5677 "Total number of governance tokens for the party that cast the vote" 5678 governanceTokenBalance: String! 5679 5680 "The weight of this vote based on the total of governance token" 5681 governanceTokenWeight: String! 5682 5683 "The weight of this vote based on the total equity-like share" 5684 equityLikeShareWeight: String! 5685 5686 "The equity-like share weight per market (only for batch proposals)" 5687 equityLikeSharePerMarket: [EquityLikeShareWeightPerMarket] 5688 } 5689 5690 type EquityLikeShareWeightPerMarket { 5691 "The market ID" 5692 marketId: String! 5693 "The equity-like share weight for this market" 5694 equityLikeShareWeight: String! 5695 } 5696 5697 type ProposalVote { 5698 "Cast vote" 5699 vote: Vote! 5700 "Proposal ID the vote is cast on" 5701 proposalId: ID! 5702 } 5703 5704 type TimeUpdate { 5705 "RFC3339Nano time of new block time" 5706 timestamp: Timestamp! 5707 } 5708 5709 type MarketEvent { 5710 "The market ID" 5711 marketId: ID! 5712 "The message - market events are used for logging" 5713 payload: String! 5714 } 5715 5716 type TransferBalance { 5717 "Account involved in transfer" 5718 account: AccountDetails! 5719 "The new balance of the account" 5720 balance: String! 5721 } 5722 5723 type LedgerEntry { 5724 "Account from which the asset was taken" 5725 fromAccountId: AccountDetails! 5726 "Account to which the balance was transferred" 5727 toAccountId: AccountDetails! 5728 "The amount transferred" 5729 amount: String! 5730 "Type of ledger entry" 5731 type: TransferType! 5732 "RFC3339Nano time at which the transfer was made" 5733 timestamp: Timestamp! 5734 "Sender account balance after the transfer" 5735 fromAccountBalance: String! 5736 "Receiver account balance after the transfer" 5737 toAccountBalance: String! 5738 } 5739 5740 type TransferResponse { 5741 "The ledger entries and balances resulting from a transfer request" 5742 transfers: [LedgerEntry!] 5743 "The balances of accounts involved in the transfer" 5744 balances: [TransferBalance!] 5745 } 5746 5747 type TransferResponses { 5748 "A group of transfer responses - events from core" 5749 responses: [TransferResponse!] 5750 } 5751 5752 type PositionResolution { 5753 "The market ID where position resolution happened" 5754 marketId: ID! 5755 "Number of distressed parties on market" 5756 distressed: Int! 5757 "Number of parties closed out" 5758 closed: Int! 5759 "The mark price at which parties were distressed/closed out" 5760 markPrice: String! 5761 } 5762 5763 type LossSocialization { 5764 "The market ID where loss socialization happened" 5765 marketId: ID! 5766 "The party that was part of the loss socialization" 5767 partyId: ID! 5768 "The amount lost" 5769 amount: String! 5770 } 5771 5772 type TradeSettlement { 5773 "The size of the trade" 5774 size: Int! 5775 "The price of the trade" 5776 price: String! 5777 } 5778 5779 type SettlePosition { 5780 "The market in which a position was settled" 5781 marketId: ID! 5782 "The party who settled a position" 5783 partyId: ID! 5784 "The settle price" 5785 price: String! 5786 "The trades that were settled to close the overall position" 5787 tradeSettlements: [TradeSettlement!] 5788 } 5789 5790 type SettleDistressed { 5791 "The market in which a position was closed out" 5792 marketId: ID! 5793 "The party that was closed out" 5794 partyId: ID! 5795 "The margin taken from distressed party" 5796 margin: String! 5797 "The price at which the position was closed out" 5798 price: String! 5799 } 5800 5801 type MarketTick { 5802 "The market ID" 5803 marketId: ID! 5804 "The block time" 5805 time: String! 5806 } 5807 5808 type AuctionEvent { 5809 "The ID of the market that went into auction" 5810 marketId: ID! 5811 "Event fired because of auction end" 5812 leave: Boolean! 5813 "Event related to opening auction" 5814 openingAuction: Boolean! 5815 "RFC3339Nano start time of auction" 5816 auctionStart: Timestamp! 5817 "RFC3339Nano optional end time of auction" 5818 auctionEnd: Timestamp! 5819 "What triggered the auction" 5820 trigger: AuctionTrigger! 5821 "What, if anything, extended the ongoing auction" 5822 extensionTrigger: AuctionTrigger 5823 } 5824 5825 "Describes the trigger for an auction" 5826 enum AuctionTrigger { 5827 "Invalid trigger (or no auction)" 5828 AUCTION_TRIGGER_UNSPECIFIED 5829 "Auction because market has a frequent batch auction trading mode" 5830 AUCTION_TRIGGER_BATCH 5831 "Opening auction" 5832 AUCTION_TRIGGER_OPENING 5833 "Price monitoring" 5834 AUCTION_TRIGGER_PRICE 5835 "Liquidity monitoring due to unmet target stake" 5836 AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET 5837 "Liquidity monitoring due to not being able to deploy LP orders because there's nothing to peg on one or both sides of the book" 5838 AUCTION_TRIGGER_UNABLE_TO_DEPLOY_LP_ORDERS 5839 "Auction triggered by governance market suspension" 5840 AUCTION_TRIGGER_GOVERNANCE_SUSPENSION 5841 "Auction triggered following a long block, e.g. due to protocol upgrade" 5842 AUCTION_TRIGGER_LONG_BLOCK 5843 "Auction triggered by automated purchase" 5844 AUCTION_TRIGGER_PROTOCOL_AUTOMATED_PURCHASE 5845 } 5846 5847 "Event types" 5848 enum BusEventType { 5849 "Vega Time has changed" 5850 TimeUpdate 5851 "Collateral has deposited in to this Vega network via the bridge" 5852 Deposit 5853 "Collateral has been withdrawn from this Vega network via the bridge" 5854 Withdrawal 5855 "The results from processing at transaction" 5856 TransactionResult 5857 } 5858 5859 "Union type for wrapped events in stream PROPOSAL is mapped to governance data, something to keep in mind" 5860 union Event = TimeUpdate | Deposit | Withdrawal | TransactionResult 5861 5862 type BusEvent { 5863 "The ID for this event" 5864 id: ID! 5865 "The block hash" 5866 block: String! 5867 "The type of event" 5868 type: BusEventType! 5869 "The payload - the wrapped event" 5870 event: Event! 5871 } 5872 5873 "A risk factor emitted by the risk model for a given market" 5874 type RiskFactor { 5875 "Market the risk factor was emitted for" 5876 market: String! 5877 "Short factor" 5878 short: String! 5879 "Long factor" 5880 long: String! 5881 } 5882 5883 "A special order type for liquidity providers" 5884 type LiquidityOrder { 5885 "The value to which this order is tied" 5886 reference: PeggedReference! 5887 "The proportion of the commitment allocated to this order" 5888 proportion: Int! 5889 "Offset from the pegged reference" 5890 offset: String! 5891 } 5892 5893 "Status of a liquidity provision" 5894 enum LiquidityProvisionStatus { 5895 "An active liquidity provision" 5896 STATUS_ACTIVE 5897 "A liquidity provision stopped by the network" 5898 STATUS_STOPPED 5899 "A cancelled liquidity provision" 5900 STATUS_CANCELLED 5901 "Liquidity provision was invalid and got rejected" 5902 STATUS_REJECTED 5903 "The liquidity provision is valid and accepted by the network, but orders aren't deployed" 5904 STATUS_UNDEPLOYED 5905 """ 5906 The liquidity provision is valid and accepted by the network, but orders aren't deployed and 5907 have never been deployed. If when it's possible to deploy them for the first time the 5908 margin check fails, then they will be cancelled without any penalties. 5909 """ 5910 STATUS_PENDING 5911 } 5912 5913 type LiquidityOrderReference { 5914 "The pegged order generated to fulfill this commitment" 5915 order: Order 5916 "The liquidity order" 5917 liquidityOrder: LiquidityOrder! 5918 } 5919 5920 "The command to be sent to the chain for a liquidity provision submission" 5921 type LiquidityProvision { 5922 "Unique identifier for the provision (set by the system after consensus)" 5923 id: ID! 5924 "The party making this commitment" 5925 party: Party! 5926 "RFC3339Nano time when the liquidity provision was initially created" 5927 createdAt: Timestamp! 5928 "RFC3339Nano time when the liquidity provision was updated" 5929 updatedAt: Timestamp 5930 "Market ID for the liquidity provision" 5931 market: Market! 5932 "Specified as a unitless number that represents the amount of the market's settlement asset for the commitment." 5933 commitmentAmount: String! 5934 "Provider's nominated liquidity fee factor, which is an input to the calculation of liquidity fees on the market, as per setting fees and rewarding liquidity providers." 5935 fee: String! 5936 "A set of liquidity sell orders to meet the liquidity provision obligation." 5937 sells: [LiquidityOrderReference!]! 5938 "A set of liquidity buy orders to meet the liquidity provision obligation." 5939 buys: [LiquidityOrderReference!]! 5940 "The version of this liquidity provision" 5941 version: String! 5942 "The current status of this liquidity provision" 5943 status: LiquidityProvisionStatus! 5944 "A reference for the orders created to support this liquidity provision" 5945 reference: String 5946 } 5947 5948 type LiquidityProvisionWithPending { 5949 current: LiquidityProvision! 5950 "Liquidity provision that has been updated by the liquidity provider, and has been accepted by the network, but will not be active until the next epoch." 5951 pending: LiquidityProvision 5952 } 5953 5954 "The command to be sent to the chain for a liquidity provision submission" 5955 type LiquidityProvisionUpdate { 5956 "Unique identifier for the order (set by the system after consensus)" 5957 id: ID! 5958 "The party making this commitment" 5959 partyID: ID! 5960 "RFC3339Nano time when the liquidity provision was initially created" 5961 createdAt: Timestamp! 5962 "RFC3339Nano time when the liquidity provision was updated" 5963 updatedAt: Timestamp 5964 "Market for the order" 5965 marketID: ID! 5966 "Specified as a unit-less number that represents the amount of settlement asset of the market." 5967 commitmentAmount: String! 5968 "Nominated liquidity fee factor, which is an input to the calculation of liquidity fees on the market, as per setting fees and rewarding liquidity providers." 5969 fee: String! 5970 "A set of liquidity sell orders to meet the liquidity provision obligation." 5971 sells: [LiquidityOrderReference!]! 5972 "A set of liquidity buy orders to meet the liquidity provision obligation." 5973 buys: [LiquidityOrderReference!]! 5974 "The version of this liquidity provision" 5975 version: String! 5976 "The current status of this liquidity provision" 5977 status: LiquidityProvisionStatus! 5978 "A reference for the orders created out of this liquidity provision" 5979 reference: String 5980 } 5981 5982 "Reward information for a single party" 5983 type Reward { 5984 "The asset this reward is paid in" 5985 asset: Asset! 5986 "The market ID for which this reward is paid if any" 5987 marketId: ID! @deprecated(reason: "Use gameId") 5988 "The type of reward" 5989 rewardType: AccountType! 5990 "Party receiving the reward" 5991 party: Party! 5992 "Epoch for which this reward was distributed" 5993 epoch: Epoch! 5994 "Amount received for this reward" 5995 amount: String! 5996 "Amount paid as a reward, expressed in asset's quantum unit" 5997 quantumAmount: String! 5998 "Percentage out of the total distributed reward" 5999 percentageOfTotal: String! 6000 "RFC3339Nano time when the rewards were received" 6001 receivedAt: Timestamp! 6002 "The epoch when the reward is released" 6003 lockedUntilEpoch: Epoch! 6004 "Optional game ID for rewards that are paid for participation in a game" 6005 gameId: ID 6006 "Optional team ID for rewards that are paid if the party is a member of a team, and for participation in a game." 6007 teamId: ID 6008 } 6009 6010 type RewardSummary { 6011 "The asset for which these rewards are associated" 6012 asset: Asset! 6013 "Total quantity of rewards awarded in this asset" 6014 amount: String! 6015 6016 "List of individual reward payouts, ordered by epoch" 6017 rewardsConnection( 6018 "An optional asset ID" 6019 assetId: ID 6020 "Cursor pagination information" 6021 pagination: Pagination 6022 "Whether to return all derived parties from AMMs for the given party. If used, party ID is required" 6023 includeDerivedParties: Boolean 6024 ): RewardsConnection 6025 } 6026 6027 "RFC3339Nano value for time" 6028 scalar Timestamp 6029 6030 type AggregatedLedgerEntry { 6031 "RFC3339Nano time from at which this ledger entries records were relevant" 6032 vegaTime: Timestamp! 6033 "Net amount of ledger entries for the accounts specified in the filter at this time" 6034 quantity: String! 6035 "Asset identifier, if query was grouped by asset - else null" 6036 assetId: ID 6037 "Type of the transfer for this ledger entry" 6038 transferType: TransferType 6039 "Party identifier, if query was grouped by sender party - else null" 6040 fromAccountPartyId: ID 6041 "Party identifier, if query was grouped by receiver party - else null" 6042 toAccountPartyId: ID 6043 "Market identifier, if query was grouped by sender market - else null" 6044 fromAccountMarketId: ID 6045 "Market identifier, if query was grouped by receiver market - else null" 6046 toAccountMarketId: ID 6047 "Account type, if query was grouped by sender account type - else null" 6048 fromAccountType: AccountType 6049 "Account type, if query was grouped by receiver account type - else null" 6050 toAccountType: AccountType 6051 "Sender account balance after the transfer" 6052 fromAccountBalance: String! 6053 "Receiver account balance after the transfer" 6054 toAccountBalance: String! 6055 "Transfer ID associated with this aggregated ledger entry" 6056 transferId: ID! 6057 } 6058 6059 type AggregatedLedgerEntriesEdge { 6060 node: AggregatedLedgerEntry! 6061 cursor: String! 6062 } 6063 6064 type AggregatedLedgerEntriesConnection { 6065 edges: [AggregatedLedgerEntriesEdge]! 6066 pageInfo: PageInfo! 6067 } 6068 6069 "Type of transfer between accounts" 6070 enum LedgerEntryField { 6071 TransferType 6072 } 6073 6074 type AggregatedBalance { 6075 "RFC3339Nano time from at which this balance was relevant" 6076 timestamp: Timestamp! 6077 "Net balance of the accounts specified in the filter at this time" 6078 balance: String! 6079 "Account identifier, if query was grouped by account - else null" 6080 partyId: ID 6081 "Asset identifier, if query was grouped by asset - else null" 6082 assetId: ID 6083 "Market identifier, if query was grouped by market - else null" 6084 marketId: ID 6085 "Account type, if query was grouped by account type - else null" 6086 accountType: AccountType 6087 } 6088 6089 type AggregatedBalanceEdge { 6090 "The aggregated balance" 6091 node: AggregatedBalance! 6092 cursor: String! 6093 } 6094 6095 type AggregatedBalanceConnection { 6096 edges: [AggregatedBalanceEdge]! 6097 pageInfo: PageInfo! 6098 } 6099 6100 "Information about whether proposals are enabled, if the markets are still bootstrapping, etc.." 6101 type NetworkLimits { 6102 "Are market proposals allowed at this point in time" 6103 canProposeMarket: Boolean! 6104 "Are asset proposals allowed at this point in time" 6105 canProposeAsset: Boolean! 6106 "Are market proposals enabled on this chain" 6107 proposeMarketEnabled: Boolean! 6108 "Are asset proposals enabled on this chain" 6109 proposeAssetEnabled: Boolean! 6110 "True once the genesis file is loaded" 6111 genesisLoaded: Boolean! 6112 "The date/timestamp in unix nanoseconds at which market proposals will be enabled (0 indicates not set)" 6113 proposeMarketEnabledFrom: Timestamp! 6114 "The date/timestamp in unix nanoseconds at which asset proposals will be enabled (0 indicates not set)" 6115 proposeAssetEnabledFrom: Timestamp! 6116 } 6117 6118 "A segment of data node history" 6119 type HistorySegment { 6120 "From block height of the history segment" 6121 fromHeight: Int! 6122 "To block height of the history segment" 6123 toHeight: Int! 6124 "ID of the history segment" 6125 historySegmentId: String! 6126 } 6127 6128 """ 6129 Pagination constructs to support cursor based pagination in the API 6130 """ 6131 input Pagination { 6132 "The number of items to fetch in the next page traversing forward through the connection" 6133 first: Int 6134 "The cursor to start fetching items after. If empty, data will be fetched from the beginning of the connection" 6135 after: String 6136 "The number of items to fetch in the next page traversing backward through the connection" 6137 last: Int 6138 "The cursor to start fetching items before. If empty data will be fetched from the end of the connection" 6139 before: String 6140 } 6141 6142 "Paging information returned with each page of a connection" 6143 type PageInfo { 6144 "The connection has more pages to fetch when traversing forward through the connection" 6145 hasNextPage: Boolean! 6146 "The connection has more pages to fetch when traversing backward through the connection" 6147 hasPreviousPage: Boolean! 6148 "The first cursor in the current page" 6149 startCursor: String! 6150 "The last cursor in the current page" 6151 endCursor: String! 6152 } 6153 6154 "Edge type containing the trade and cursor information returned by a TradeConnection" 6155 type TradeEdge { 6156 "The trade" 6157 node: Trade! 6158 "The cursor for this trade" 6159 cursor: String! 6160 } 6161 6162 "Filter to apply to the trade subscription request" 6163 input TradesSubscriptionFilter { 6164 partyIds: [ID!] 6165 marketIds: [ID!] 6166 } 6167 6168 "Filter to apply to the trade connection query" 6169 input TradesFilter { 6170 partyIds: [ID!] 6171 marketIds: [ID!] 6172 orderIds: [ID!] 6173 } 6174 6175 "Connection type for retrieving cursor-based paginated trade information" 6176 type TradeConnection { 6177 "The trade in this connection" 6178 edges: [TradeEdge!]! 6179 "The pagination information" 6180 pageInfo: PageInfo! 6181 } 6182 6183 "Edge type containing the party and cursor information returned by a PartyConnection" 6184 type PartyEdge { 6185 "The party" 6186 node: Party! 6187 "The cursor for this party" 6188 cursor: String! 6189 } 6190 6191 "Connection type for retrieving cursor-based paginated party information" 6192 type PartyConnection { 6193 "The parties in this connection" 6194 edges: [PartyEdge!]! 6195 "The pagination information" 6196 pageInfo: PageInfo! 6197 } 6198 6199 "Holds metadata associated to a party." 6200 type PartyProfile { 6201 partyId: ID! 6202 "Alias given to the party." 6203 alias: String! 6204 "Metadata to associate to a party, in a key/value format where the key describes the type of metadata in the value field." 6205 metadata: [Metadata!]! 6206 } 6207 "Edge type containing the party and cursor information returned by a PartiesProfilesConnection" 6208 type PartyProfileEdge { 6209 "The party's profile" 6210 node: PartyProfile! 6211 "The cursor for this party's profile" 6212 cursor: String! 6213 } 6214 6215 "Connection type for retrieving cursor-based paginated profile information for multiple parties" 6216 type PartiesProfilesConnection { 6217 "The profiles in this connection" 6218 edges: [PartyProfileEdge!]! 6219 "The pagination information" 6220 pageInfo: PageInfo! 6221 } 6222 6223 "Edge type containing the market and cursor information returned by a MarketConnection" 6224 type MarketEdge { 6225 "The market" 6226 node: Market! 6227 "The cursor for this market" 6228 cursor: String! 6229 } 6230 6231 "Connection type for retrieving cursor-based paginated market information" 6232 type MarketConnection { 6233 "The markets in this connection" 6234 edges: [MarketEdge!]! 6235 "The pagination information" 6236 pageInfo: PageInfo! 6237 } 6238 6239 type SuccessorMarket { 6240 "The market" 6241 market: Market! 6242 "Proposals for child markets" 6243 proposals: [Proposal] 6244 } 6245 6246 "Edge type containing the market and cursor information returned by a MarketConnection" 6247 type SuccessorMarketEdge { 6248 "The market" 6249 node: SuccessorMarket! 6250 "The cursor for this market" 6251 cursor: String! 6252 } 6253 6254 "Connection type for retrieving cursor-based paginated market information" 6255 type SuccessorMarketConnection { 6256 "The markets in this connection" 6257 edges: [SuccessorMarketEdge!]! 6258 "The pagination information" 6259 pageInfo: PageInfo! 6260 } 6261 6262 "Edge type containing the order and cursor information returned by a OrderConnection" 6263 type OrderEdge { 6264 "The order" 6265 node: Order! 6266 "The cursor for this order" 6267 cursor: String 6268 } 6269 6270 "Edge type containing the stop order and cursor information returned by a StopOrderConnection" 6271 type StopOrderEdge { 6272 "The stop order" 6273 node: StopOrder 6274 "The cursor for this stop order" 6275 cursor: String 6276 } 6277 6278 input OrderFilter { 6279 status: [OrderStatus!] 6280 types: [OrderType!] 6281 timeInForce: [OrderTimeInForce!] 6282 "Date range to retrieve orders from/to. Start and end time should be expressed as an integer value Unix nanoseconds" 6283 dateRange: DateRange 6284 excludeLiquidity: Boolean 6285 """ 6286 If true, only orders that are live will be returned. Orders are live if they have STATUS_ACTIVE or STATUS_PARKED 6287 as per https://github.com/vegaprotocol/specs-internal/blob/master/protocol/0024-OSTA-order_status.md 6288 """ 6289 liveOnly: Boolean 6290 } 6291 6292 "Filter to be applied when querying a list of stop orders. If multiple criteria are specified, e.g. parties and markets, then the filter is applied as an AND." 6293 input StopOrderFilter { 6294 "Zero or more party IDs to filter by" 6295 parties: [ID!] 6296 "Zero or more market IDs to filter by" 6297 markets: [ID!] 6298 "Zero or more order status to filter by" 6299 status: [StopOrderStatus!] 6300 "Zero or more expiry strategies to filter by" 6301 expiryStrategy: [StopOrderExpiryStrategy!] 6302 "Date range to retrieve order from/to. Start and end time should be expressed as an integer value of Unix nanoseconds" 6303 dateRange: DateRange 6304 "Filter for live stop orders only" 6305 liveOnly: Boolean 6306 } 6307 6308 input GameTeamScoreFilter { 6309 "Zero or more game IDs to filter by" 6310 gameIds: [ID!] 6311 "Zero or more team IDs to filter by" 6312 teamIds: [ID!] 6313 "Optional 'from epoch' ID for scores epoch interval" 6314 epochFrom: Int 6315 "Optional 'to epoch' ID for scores epoch interval" 6316 epochTo: Int 6317 } 6318 6319 input GamePartyScoreFilter { 6320 "Zero or more game IDs to filter by" 6321 gameIds: [ID!] 6322 "Zero or more team IDs to filter by" 6323 teamIds: [ID!] 6324 "Zero or more party IDs to filter by" 6325 partyIds: [ID!] 6326 "Optional 'from epoch' ID for scores epoch interval" 6327 epochFrom: Int 6328 "Optional 'to epoch' ID for scores epoch interval" 6329 epochTo: Int 6330 } 6331 6332 input OrderByPartyIdsFilter { 6333 order: OrderFilter 6334 partyIds: [ID!] 6335 } 6336 6337 input OrderByMarketIdsFilter { 6338 order: OrderFilter 6339 marketIds: [ID!] 6340 } 6341 6342 input OrderByMarketAndPartyIdsFilter { 6343 order: OrderFilter 6344 marketIds: [ID!] 6345 partyIds: [ID!] 6346 } 6347 6348 "Connection type for retrieving cursor-based paginated order information" 6349 type OrderConnection { 6350 "The orders in this connection" 6351 edges: [OrderEdge!] 6352 "The pagination information" 6353 pageInfo: PageInfo 6354 } 6355 6356 "Connection type for retrieving cursory-based paginated stop order information" 6357 type StopOrderConnection { 6358 "The stop orders in this connection" 6359 edges: [StopOrderEdge!] 6360 "The pagination information" 6361 pageInfo: PageInfo 6362 } 6363 6364 "Connection type for retrieving cursor-based paginated game team score information" 6365 type GameTeamScoreConnection { 6366 "The game team scores in this connection" 6367 edges: [GameTeamScoreEdge!] 6368 "The pagination information" 6369 pageInfo: PageInfo 6370 } 6371 6372 "Connection type for retrieving cursor-based paginated game party score information" 6373 type GamePartyScoreConnection { 6374 "The game party scores in this connection" 6375 edges: [GamePartyScoreEdge!] 6376 "The pagination information" 6377 pageInfo: PageInfo 6378 } 6379 6380 "Edge type containing the game party scores and cursor information returned by a GamePartyScoreConnection" 6381 type GamePartyScoreEdge { 6382 "The game party score" 6383 node: GamePartyScore 6384 "The cursor for this game party score" 6385 cursor: String 6386 } 6387 6388 "Edge type containing the game team scores and cursor information returned by a GameTeamScoreConnection" 6389 type GameTeamScoreEdge { 6390 "The game team score" 6391 node: GameTeamScore 6392 "The cursor for this game team score" 6393 cursor: String 6394 } 6395 6396 "Edge type containing the position and cursor information returned by a PositionConnection" 6397 type PositionEdge { 6398 "The position" 6399 node: Position! 6400 "The cursor for this position" 6401 cursor: String 6402 } 6403 6404 "Filter to apply to the positions connection query" 6405 input PositionsFilter { 6406 partyIds: [ID!] 6407 marketIds: [ID!] 6408 includeDerivedParties: Boolean 6409 } 6410 6411 "Connection type for retrieving cursor-based paginated position information" 6412 type PositionConnection { 6413 "The positions in this connection" 6414 edges: [PositionEdge!] 6415 "The pagination information" 6416 pageInfo: PageInfo 6417 } 6418 6419 "Edge type containing the vote and cursor information returned by a VoteConnection" 6420 type VoteEdge { 6421 "The vote" 6422 node: Vote! 6423 "The cursor for this vote" 6424 cursor: String 6425 } 6426 6427 "Connection type for retrieving cursor-based paginated vote information" 6428 type VoteConnection { 6429 "The votes in this connection" 6430 edges: [VoteEdge!] 6431 "The pagination information" 6432 pageInfo: PageInfo 6433 } 6434 6435 "Edge type containing the proposal vote and cursor information returned by a ProposalVoteConnection" 6436 type ProposalVoteEdge { 6437 "The proposal vote" 6438 node: ProposalVote! 6439 "The cursor for this proposal vote" 6440 cursor: String 6441 } 6442 6443 "Connection type for retrieving cursor-based paginated proposal vote information" 6444 type ProposalVoteConnection { 6445 "The proposal votes in this connection" 6446 edges: [ProposalVoteEdge!] 6447 "The pagination information" 6448 pageInfo: PageInfo 6449 } 6450 6451 "Edge type containing the margin and cursor information returned by a MarginConnection" 6452 type MarginEdge { 6453 node: MarginLevels! 6454 cursor: String 6455 } 6456 6457 "Connection type for retrieving cursor-based paginated margin information" 6458 type MarginConnection { 6459 "The margin levels in this connection" 6460 edges: [MarginEdge!] 6461 "The pagination information" 6462 pageInfo: PageInfo 6463 } 6464 6465 "Edge type containing the reward and cursor information returned by a MarketDataConnection" 6466 type MarketDataEdge { 6467 node: MarketData! 6468 cursor: String 6469 } 6470 6471 "Connection type for retrieving cursor-based paginated market data information" 6472 type MarketDataConnection { 6473 "The market data elements for the requested page" 6474 edges: [MarketDataEdge] 6475 "The pagination information" 6476 pageInfo: PageInfo 6477 } 6478 6479 "Edge type containing the reward and cursor information returned by a RewardsConnection" 6480 type RewardEdge { 6481 "The reward information" 6482 node: Reward! 6483 "The cursor for this reward" 6484 cursor: String! 6485 } 6486 6487 "Connection type for retrieving cursor-based paginated rewards information" 6488 type RewardsConnection { 6489 "The rewards" 6490 edges: [RewardEdge] 6491 "The pagination information" 6492 pageInfo: PageInfo 6493 } 6494 6495 "Edge type containing the candle and cursor information returned by a CandleDataConnection" 6496 type CandleEdge { 6497 "The candle" 6498 node: Candle! 6499 "The cursor for the candle" 6500 cursor: String! 6501 } 6502 6503 "Connection type for retrieving cursor-based paginated candle information" 6504 type CandleDataConnection { 6505 "The candles" 6506 edges: [CandleEdge] 6507 "The pagination information" 6508 pageInfo: PageInfo 6509 } 6510 6511 "Edge type containing the withdrawal and cursor information returned by a WithdrawalsConnection" 6512 type WithdrawalEdge { 6513 "The withdrawal" 6514 node: Withdrawal! 6515 "The cursor for the withdrawal" 6516 cursor: String! 6517 } 6518 6519 "Connection type for retrieving cursor-based paginated withdrawals information" 6520 type WithdrawalsConnection { 6521 "The withdrawals" 6522 edges: [WithdrawalEdge] 6523 "The pagination information" 6524 pageInfo: PageInfo 6525 } 6526 6527 "Edge type containing the deposit and cursor information returned by a DepositsConnection" 6528 type DepositEdge { 6529 node: Deposit! 6530 cursor: String! 6531 } 6532 6533 "Connection type for retrieving cursor-based paginated deposits information" 6534 type DepositsConnection { 6535 "The deposits" 6536 edges: [DepositEdge] 6537 "The pagination information" 6538 pageInfo: PageInfo 6539 } 6540 6541 "Edge type containing the asset and cursor information returned by a AssetsConnection" 6542 type AssetEdge { 6543 "The asset information" 6544 node: Asset! 6545 "The cursor for the asset" 6546 cursor: String! 6547 } 6548 6549 "Connection type for retrieving cursor-based paginated assets information" 6550 type AssetsConnection { 6551 "The assets" 6552 edges: [AssetEdge] 6553 "The pagination information" 6554 pageInfo: PageInfo 6555 } 6556 6557 type OracleSpecEdge { 6558 "The external data spec" 6559 node: OracleSpec! 6560 "The cursor for the external data" 6561 cursor: String! 6562 } 6563 6564 type OracleSpecsConnection { 6565 edges: [OracleSpecEdge] 6566 pageInfo: PageInfo! 6567 } 6568 6569 type OracleDataEdge { 6570 "The oracle data source" 6571 node: OracleData! 6572 "The cursor for the data item" 6573 cursor: String! 6574 } 6575 6576 type OracleDataConnection { 6577 "The oracle data spec" 6578 edges: [OracleDataEdge] 6579 "The pagination information" 6580 pageInfo: PageInfo! 6581 } 6582 6583 "Edge type containing the liquidity provision and cursor information returned by a LiquidityProvisionsConnection" 6584 type LiquidityProvisionsEdge { 6585 node: LiquidityProvision! 6586 cursor: String! 6587 } 6588 6589 "Connection type for retrieving cursor-based paginated liquidity provision information" 6590 type LiquidityProvisionsConnection { 6591 edges: [LiquidityProvisionsEdge] 6592 pageInfo: PageInfo! 6593 } 6594 6595 "Edge type containing the liquidity provision and cursor information returned by a LiquidityProvisionsWithPendingConnection" 6596 type LiquidityProvisionWithPendingEdge { 6597 node: LiquidityProvisionWithPending! 6598 cursor: String! 6599 } 6600 6601 "Connection type for retrieving cursor-based paginated liquidity provision information" 6602 type LiquidityProvisionsWithPendingConnection { 6603 edges: [LiquidityProvisionWithPendingEdge] 6604 pageInfo: PageInfo! 6605 } 6606 6607 "Information about a liquidity provider" 6608 type LiquidityProvider { 6609 "Party ID of the liquidity provider" 6610 partyId: ID! 6611 "Market ID the liquidity provision is for" 6612 marketId: ID! 6613 "Information used for calculating an LP's fee share, such as the equity-like share, average entry valuation and liquidity score, for the given liquidity provider and market" 6614 feeShare: LiquidityProviderFeeShare 6615 "SLA performance statistics" 6616 sla: LiquidityProviderSLA 6617 } 6618 6619 "Edge type containing the liquidity provider and cursor information" 6620 type LiquidityProviderEdge { 6621 "Liquidity provider's information" 6622 node: LiquidityProvider! 6623 "Cursor for the liquidity provider" 6624 cursor: String! 6625 } 6626 6627 "Connection type for retrieving cursor-based paginated liquidity provider information" 6628 type LiquidityProviderConnection { 6629 "Page of liquidity provider edges for the connection" 6630 edges: [LiquidityProviderEdge!]! 6631 "Current page information" 6632 pageInfo: PageInfo 6633 } 6634 6635 "A transfer fee record" 6636 type TransferFee { 6637 "Transfer ID of the transfer for which the fee was paid" 6638 transferId: ID! 6639 "The fee amount" 6640 amount: String! 6641 "The epoch when this fee was paid" 6642 epoch: Int! 6643 } 6644 6645 "A transfer record with the fee payments associated with the transfer" 6646 type TransferNode { 6647 "The transfer record" 6648 transfer: Transfer! 6649 "The list of fee payments made" 6650 fees: [TransferFee] 6651 } 6652 6653 "Edge type containing the transfer and cursor information returned by a TransferConnection" 6654 type TransferEdge { 6655 node: TransferNode! 6656 cursor: String! 6657 } 6658 6659 "Connection type for retrieving cursor-based paginated transfers information" 6660 type TransferConnection { 6661 edges: [TransferEdge] 6662 pageInfo: PageInfo! 6663 } 6664 6665 "Filter type for specifying the types of transfers to filter for" 6666 enum TransferDirection { 6667 To 6668 From 6669 ToOrFrom 6670 } 6671 6672 union ProposalNode = Proposal | BatchProposal 6673 6674 "Edge type containing the proposals and cursor information returned by a ProposalsConnection" 6675 type ProposalEdge { 6676 "The proposal data" 6677 node: Proposal! @deprecated(reason: "Use proposalNode") 6678 "The data of either single or batch proposal" 6679 proposalNode: ProposalNode 6680 "Cursor identifying the proposal" 6681 cursor: String! 6682 } 6683 6684 "Connection type for retrieving cursor-based paginated proposals information" 6685 type ProposalsConnection { 6686 "List of proposals available for the connection" 6687 edges: [ProposalEdge] 6688 "Page information for the connection" 6689 pageInfo: PageInfo! 6690 } 6691 6692 "Edge type containing the delegation and cursor information returned by a DelegationsConnection" 6693 type DelegationEdge { 6694 "The delegation information" 6695 node: Delegation! 6696 "The cursor for the data item" 6697 cursor: String! 6698 } 6699 6700 "Connection type for retrieving cursor-based paginated delegation information" 6701 type DelegationsConnection { 6702 "The delegation information available on this connection" 6703 edges: [DelegationEdge] 6704 "The pagination information" 6705 pageInfo: PageInfo! 6706 } 6707 6708 "Edge type containing the node and cursor information returned by a NodesConnection" 6709 type NodeEdge { 6710 "The node" 6711 node: Node! 6712 "Cursor identifying the node" 6713 cursor: String! 6714 } 6715 6716 "Connection type for retrieving cursor-based paginated node information" 6717 type NodesConnection { 6718 "List of nodes available for the connection" 6719 edges: [NodeEdge] 6720 "Page information for the connection" 6721 pageInfo: PageInfo! 6722 } 6723 6724 "Edge type containing the network parameter and cursor information returned by a NetworkParametersConnection" 6725 type NetworkParameterEdge { 6726 "The network parameter" 6727 node: NetworkParameter! 6728 "Cursor identifying the network parameter" 6729 cursor: String! 6730 } 6731 6732 "Connection type for retrieving cursor-based paginated network parameters information" 6733 type NetworkParametersConnection { 6734 "List of network parameters available for the connection" 6735 edges: [NetworkParameterEdge] 6736 "Page information for the connection" 6737 pageInfo: PageInfo! 6738 } 6739 6740 "Edge type containing the node signature and cursor information returned by a NodeSignatureConnection" 6741 type NodeSignatureEdge { 6742 "The node signature" 6743 node: NodeSignature! 6744 "Cursor identifying the node signature" 6745 cursor: String! 6746 } 6747 6748 "Connection type for retrieving cursor-based paginated node signature information" 6749 type NodeSignaturesConnection { 6750 "List of node signatures available for the connection" 6751 edges: [NodeSignatureEdge!]! 6752 "Page information for the connection" 6753 pageInfo: PageInfo! 6754 } 6755 6756 "Edge type containing the key rotation and cursor information returned by a KeyRotationConnection" 6757 type KeyRotationEdge { 6758 "The key rotation" 6759 node: KeyRotation! 6760 "Cursor identifying the key rotation" 6761 cursor: String! 6762 } 6763 6764 "Connection type for retrieving cursor-based paginated key rotation information" 6765 type KeyRotationConnection { 6766 "List of key rotations available for the connection" 6767 edges: [KeyRotationEdge] 6768 "Page information for the connection" 6769 pageInfo: PageInfo! 6770 } 6771 6772 "Edge type containing the reward summary and cursor information returned by a RewardSummaryConnection" 6773 type RewardSummaryEdge { 6774 "The reward summary" 6775 node: RewardSummary! 6776 "Cursor identifying the reward summary" 6777 cursor: String! 6778 } 6779 6780 "Connection type for retrieving cursor-based paginated reward summary information" 6781 type RewardSummaryConnection { 6782 "List of reward summaries available for the connection" 6783 edges: [RewardSummaryEdge] 6784 "Page information for the connection" 6785 pageInfo: PageInfo! 6786 } 6787 6788 "Edge type containing the stake linking and cursor information returned by a StakesConnection" 6789 type StakeLinkingEdge { 6790 "The stake linking" 6791 node: StakeLinking! 6792 "Cursor identifying the stake linking" 6793 cursor: String! 6794 } 6795 6796 "Connection type for retrieving cursor-based paginated stake linking information" 6797 type StakesConnection { 6798 "List of stake links available for the connection" 6799 edges: [StakeLinkingEdge] 6800 "Page information for the connection" 6801 pageInfo: PageInfo! 6802 } 6803 6804 "Edge type containing the account and cursor information returned by an AccountsConnection" 6805 type AccountEdge { 6806 "The account" 6807 node: AccountBalance! 6808 "Cursor identifying the account" 6809 cursor: String! 6810 } 6811 6812 "Connection type for retrieving cursor-based paginated list of account" 6813 type AccountsConnection { 6814 "List of accounts available for the connection" 6815 edges: [AccountEdge] 6816 "Page information for the connection" 6817 pageInfo: PageInfo! 6818 } 6819 6820 """ 6821 Range of dates to retrieve information for. 6822 If start and end are provided, data will be returned within the specified range (exclusive). 6823 If start is provided without end, the end date will be the latest time available in the data set. 6824 If end is provided without start, the start time will be the earliest time available in the data set. 6825 """ 6826 input DateRange { 6827 "The start timestamp for the date range (inclusive). RFC3339Nano format" 6828 start: Timestamp 6829 "The end timestamp for the date range (exclusive). RFC3339Nano format" 6830 end: Timestamp 6831 } 6832 6833 "Indicator showing whether the data-node is ready for the protocol upgrade to begin." 6834 type ProtocolUpgradeStatus { 6835 ready: Boolean! 6836 } 6837 6838 "The set of valid statuses for a protocol upgrade proposal" 6839 enum ProtocolUpgradeProposalStatus { 6840 "Invalid proposal state" 6841 PROTOCOL_UPGRADE_PROPOSAL_STATUS_UNSPECIFIED 6842 "Proposal to upgrade protocol version is awaiting sufficient validator approval" 6843 PROTOCOL_UPGRADE_PROPOSAL_STATUS_PENDING 6844 "Proposal to upgrade protocol version accepted" 6845 PROTOCOL_UPGRADE_PROPOSAL_STATUS_APPROVED 6846 "Proposal to upgrade protocol version has been rejected" 6847 PROTOCOL_UPGRADE_PROPOSAL_STATUS_REJECTED 6848 } 6849 6850 "Connection type for retrieving cursor-based paginated protocol upgrade proposals" 6851 type ProtocolUpgradeProposalConnection { 6852 "The positions in this connection" 6853 edges: [ProtocolUpgradeProposalEdge!] 6854 "The pagination information" 6855 pageInfo: PageInfo 6856 } 6857 6858 "Edge type containing the protocol upgrade protocol cursor information" 6859 type ProtocolUpgradeProposalEdge { 6860 "The protocol upgrade proposal" 6861 node: ProtocolUpgradeProposal! 6862 "Cursor identifying the protocol upgrade proposal" 6863 cursor: String! 6864 } 6865 6866 "A proposal to upgrade the vega protocol (i.e. which version of the vega software nodes will run)" 6867 type ProtocolUpgradeProposal { 6868 "At which block the upgrade is proposed" 6869 upgradeBlockHeight: String! 6870 "To which vega release tag the upgrade is proposed" 6871 vegaReleaseTag: String! 6872 "Tendermint validators that have agreed to the upgrade" 6873 approvers: [String!]! 6874 "the status of the proposal" 6875 status: ProtocolUpgradeProposalStatus! 6876 } 6877 6878 type EpochRewardSummaryConnection { 6879 edges: [EpochRewardSummaryEdge] 6880 pageInfo: PageInfo 6881 } 6882 6883 type EpochRewardSummaryEdge { 6884 node: EpochRewardSummary! 6885 cursor: String! 6886 } 6887 6888 "an aggregated reward summary for a combination of epoch/asset/market/reward type" 6889 type EpochRewardSummary { 6890 "The epoch for which summary is generated" 6891 epoch: Int! 6892 "ID of the market" 6893 marketId: ID 6894 "ID of the Asset" 6895 assetId: ID! 6896 "Type of the reward" 6897 rewardType: AccountType! 6898 "Total quantity of rewards awarded in this asset/market/reward type in this epoch" 6899 amount: String! 6900 } 6901 6902 "Connection type for retrieving cursor-based paginated core snapshot data" 6903 type CoreSnapshotConnection { 6904 "The positions in this connection" 6905 edges: [CoreSnapshotEdge!] 6906 "The pagination information" 6907 pageInfo: PageInfo 6908 } 6909 6910 "Edge type containing the core snapshot cursor information" 6911 type CoreSnapshotEdge { 6912 "The core snapshot data" 6913 node: CoreSnapshotData! 6914 "Cursor identifying the core snapshot data" 6915 cursor: String! 6916 } 6917 6918 "A snapshot taken by the core" 6919 type CoreSnapshotData { 6920 "At which block the snapshot was taken" 6921 blockHeight: String! 6922 "The block hash at the snapshot block height" 6923 blockHash: String! 6924 "The current version of vega core" 6925 vegaCoreVersion: String! 6926 } 6927 6928 """ 6929 DataSourceSpecConfigurationTime is the internal data source used for emitting timestamps. 6930 """ 6931 type DataSourceSpecConfigurationTime { 6932 conditions: [Condition]! 6933 } 6934 6935 "Trigger for an internal time data source" 6936 type InternalTimeTrigger { 6937 "Trigger when the vega time is greater or equal to this time, in Unix seconds" 6938 initial: Int 6939 """ 6940 Repeat the trigger every n seconds after the initial. If no time for initial was specified, 6941 begin repeating immediately 6942 """ 6943 every: Int 6944 } 6945 6946 "DataSourceSpecConfigurationTimeTrigger is the internal data source used for emitting timestamps automatically using predefined intervals and conditions" 6947 type DataSourceSpecConfigurationTimeTrigger { 6948 conditions: [Condition]! 6949 triggers: [InternalTimeTrigger]! 6950 } 6951 6952 union InternalDataSourceKind = 6953 DataSourceSpecConfigurationTime 6954 | DataSourceSpecConfigurationTimeTrigger 6955 6956 """ 6957 DataSourceDefinitionInternal is the top level object used for all internal data sources. 6958 It contains one of any of the defined `SourceType` variants. 6959 """ 6960 type DataSourceDefinitionInternal { 6961 sourceType: InternalDataSourceKind! 6962 } 6963 6964 union ExternalDataSourceKind = DataSourceSpecConfiguration | EthCallSpec 6965 6966 """ 6967 DataSourceDefinitionExternal is the top level object used for all external data sources. 6968 It contains one of any of the defined `SourceType` variants. 6969 """ 6970 type DataSourceDefinitionExternal { 6971 sourceType: ExternalDataSourceKind! 6972 } 6973 6974 union DataSourceKind = 6975 DataSourceDefinitionInternal 6976 | DataSourceDefinitionExternal 6977 6978 """ 6979 DataSourceDefinition represents the top level object that deals with data sources. 6980 DataSourceDefinition can be external or internal, with whatever number of data sources are defined 6981 for each type in the child objects below. 6982 """ 6983 type DataSourceDefinition { 6984 sourceType: DataSourceKind! 6985 } 6986 6987 """ 6988 List of all entities created by transaction hash 6989 """ 6990 type Entities { 6991 "List of accounts created by the transaction hash" 6992 accounts: [AccountEvent] 6993 "List of orders created by the transaction hash" 6994 orders: [Order] 6995 "List of positions created by the transaction hash" 6996 positions: [Position] 6997 "List of ledger entries created by the transaction hash" 6998 ledgerEntries: [LedgerEntry] 6999 "List of balance changes created by the transaction hash" 7000 balanceChanges: [AccountBalance] 7001 "List of transfers created by the transaction hash" 7002 transfers: [Transfer] 7003 "List of votes created by the transaction hash" 7004 votes: [Vote] 7005 "List of ERC-20 multisig signer added bundles created by the transaction hash" 7006 erc20MultiSigSignerAddedBundles: [ERC20MultiSigSignerAddedBundle] 7007 "List of ERC-20 multisig signer removed bundles created by the transaction hash" 7008 erc20MultiSigSignerRemovedBundles: [ERC20MultiSigSignerRemovedBundle] 7009 "List of trades created by the transaction hash" 7010 trades: [Trade] 7011 "List of oracle specs created by the transaction hash" 7012 oracleSpecs: [OracleSpec] 7013 "List of oracle data created by the transaction hash" 7014 oracleData: [OracleData] 7015 "List of markets created by the transaction hash" 7016 markets: [Market] 7017 "List of parties created by the transaction hash" 7018 parties: [Party] 7019 "List of margin levels created by the transaction hash" 7020 marginLevels: [MarginLevels] 7021 "List of rewards created by the transaction hash" 7022 rewards: [Reward] 7023 "List of deposits created by the transaction hash" 7024 deposits: [Deposit] 7025 "List of withdrawals created by the transaction hash" 7026 withdrawals: [Withdrawal] 7027 "List of assets created by the transaction hash" 7028 assets: [Asset] 7029 "List of liquidity provisions created by the transaction hash" 7030 liquidityProvisions: [LiquidityProvision] 7031 "List of proposals created by the transaction hash" 7032 proposals: [ProposalDetail] 7033 "List of delegations created by the transaction hash" 7034 delegations: [Delegation] 7035 "List of nodes created by the transaction hash" 7036 nodes: [NodeBasic] 7037 "List of node signatures created by the transaction hash" 7038 nodeSignatures: [NodeSignature] 7039 "List of network parameters created by the transaction hash" 7040 networkParameters: [NetworkParameter] 7041 "List of key rotations created by the transaction hash" 7042 keyRotations: [KeyRotation] 7043 "List of ethereum key rotations created by the transaction hash" 7044 ethereumKeyRotations: [EthereumKeyRotation] 7045 "List of protocol upgrade proposals created by the transaction hash" 7046 protocolUpgradeProposals: [ProtocolUpgradeProposal] 7047 } 7048 7049 "The funding payment from a perpetual market." 7050 type FundingPayment { 7051 "Market the funding payment applies to." 7052 marketId: ID! 7053 "Party the funding payment applies to." 7054 partyId: ID! 7055 "Sequence number of the funding period the funding payment belongs to." 7056 fundingPeriodSeq: Int! 7057 "Amount transferred" 7058 amount: String 7059 "RFC3339Nano timestamp when the data point was received." 7060 timestamp: Timestamp! 7061 "Amount lost due to loss socialisation." 7062 lossAmount: String 7063 } 7064 7065 "Edge type for funding payment" 7066 type FundingPaymentEdge { 7067 "The funding payment" 7068 node: FundingPayment! 7069 "Cursor identifying the funding payment" 7070 cursor: String! 7071 } 7072 7073 "Connection type for funding payment" 7074 type FundingPaymentConnection { 7075 "List of funding payments" 7076 edges: [FundingPaymentEdge!]! 7077 "Pagination information" 7078 pageInfo: PageInfo! 7079 } 7080 7081 "Data point for a funding period." 7082 type FundingPeriodDataPoint { 7083 "Market the data point applies to." 7084 marketId: ID! 7085 "Sequence number of the funding period the data point belongs to." 7086 seq: Int! 7087 "Source of the data point." 7088 dataPointSource: FundingPeriodDataPointSource 7089 "Price of the asset as seen by this data point." 7090 price: String! 7091 "Time-weighted average price calculated from data points for this period from the data source." 7092 twap: String 7093 "RFC3339Nano timestamp when the data point was received." 7094 timestamp: Timestamp! 7095 } 7096 7097 "Edge type for funding period data point" 7098 type FundingPeriodDataPointEdge { 7099 "The funding period data point" 7100 node: FundingPeriodDataPoint! 7101 "Cursor identifying the funding period data point" 7102 cursor: String! 7103 } 7104 7105 "Connection type for funding period data points" 7106 type FundingPeriodDataPointConnection { 7107 "List of funding period data points" 7108 edges: [FundingPeriodDataPointEdge!]! 7109 "Pagination information" 7110 pageInfo: PageInfo! 7111 } 7112 7113 "Details of a funding interval for a perpetual market." 7114 type FundingPeriod { 7115 "Market the funding period relates to." 7116 marketId: ID! 7117 "Sequence number of the funding period." 7118 seq: Int! 7119 "RFC3339Nano time when the funding period started." 7120 startTime: Timestamp! 7121 "RFC3339Nano time when the funding period ended." 7122 endTime: Timestamp 7123 "Funding payment for this period as the difference between the time-weighted average price of the external and internal data point." 7124 fundingPayment: String 7125 "Percentage difference between the time-weighted average price of the external and internal data point." 7126 fundingRate: String 7127 "Time-weighted average price calculated from data points for this period from the external data source." 7128 externalTwap: String 7129 "Time-weighted average price calculated from data points for this period from the internal data source." 7130 internalTwap: String 7131 } 7132 7133 "Sources of funding period data points." 7134 enum FundingPeriodDataPointSource { 7135 "Funding period data point was sourced from an external data source." 7136 SOURCE_EXTERNAL 7137 "Funding period data point was generated internally by the network." 7138 SOURCE_INTERNAL 7139 } 7140 7141 "Edge type containing a funding period cursor and its associated funding period data" 7142 type FundingPeriodEdge { 7143 "The funding period data" 7144 node: FundingPeriod! 7145 "Cursor identifying the funding period data" 7146 cursor: String! 7147 } 7148 7149 "Connection type for retrieving cursor-based paginated funding period data for perpetual markets" 7150 type FundingPeriodConnection { 7151 "The funding periods in this connection" 7152 edges: [FundingPeriodEdge!]! 7153 "The pagination information" 7154 pageInfo: PageInfo! 7155 } 7156 7157 "Referral program information" 7158 type ReferralProgram { 7159 "Unique ID generated from the proposal that created this program." 7160 id: ID! 7161 "Incremental version of the program. It is incremented each time the referral program is edited." 7162 version: Int! 7163 "Defined tiers in increasing order. First element will give Tier 1, second element will give Tier 2, etc." 7164 benefitTiers: [BenefitTier!]! 7165 "Timestamp as Unix time in nanoseconds, after which when the current epoch ends, the program will end and benefits will be disabled." 7166 endOfProgramTimestamp: Timestamp! 7167 "Number of epochs over which to evaluate a referral set's running volume." 7168 windowLength: Int! 7169 """ 7170 Defined staking tiers in increasing order. First element will give Tier 1, 7171 second element will give Tier 2, and so on. Determines the level of 7172 benefit a party can expect based on their staking. 7173 """ 7174 stakingTiers: [StakingTier!]! 7175 } 7176 7177 "Referral program information reported by data node with additional endedAt timestamp." 7178 type CurrentReferralProgram { 7179 "Unique ID generated from the proposal that created this program." 7180 id: ID! 7181 "Incremental version of the program. It is incremented each time the referral program is edited." 7182 version: Int! 7183 "Defined tiers in increasing order. First element will give Tier 1, second element will give Tier 2, etc." 7184 benefitTiers: [BenefitTier!]! 7185 "Timestamp as Unix time in nanoseconds, after which when the current epoch ends, the program will end and benefits will be disabled." 7186 endOfProgramTimestamp: Timestamp! 7187 "Number of epochs over which to evaluate a referral set's running volume." 7188 windowLength: Int! 7189 """ 7190 Defined staking tiers in increasing order. First element will give Tier 1, 7191 second element will give Tier 2, and so on. Determines the level of 7192 benefit a party can expect based on their staking. 7193 """ 7194 stakingTiers: [StakingTier!]! 7195 "Timestamp as RFC3339Nano when the program ended. If present, the current program has ended and no program is currently running." 7196 endedAt: Timestamp 7197 } 7198 7199 "Data relating to a referral set." 7200 type ReferralSet { 7201 "Unique ID of the created set." 7202 id: ID! 7203 "Party that created the set." 7204 referrer: ID! 7205 "Current number of members in the referral set." 7206 totalMembers: Int! 7207 "Timestamp as RFC3339Nano when the referral set was created." 7208 createdAt: Timestamp! 7209 "Timestamp as RFC3339Nano when the referral set was updated." 7210 updatedAt: Timestamp! 7211 } 7212 7213 "Edge type containing the referral set and cursor information returned by a ReferralSetConnection" 7214 type ReferralSetEdge { 7215 "The referral set" 7216 node: ReferralSet! 7217 "The cursor for this referral set" 7218 cursor: String! 7219 } 7220 7221 "Connection type for retrieving cursor-based paginated referral set information" 7222 type ReferralSetConnection { 7223 "The referral sets in this connection" 7224 edges: [ReferralSetEdge]! 7225 "The pagination information" 7226 pageInfo: PageInfo! 7227 } 7228 7229 "Data relating to referees that have joined a referral set" 7230 type ReferralSetReferee { 7231 "Unique ID of the referral set the referee joined." 7232 referralSetId: ID! 7233 "Party that joined the set." 7234 refereeId: ID! 7235 "Timestamp as RFC3339Nano when the party joined the set." 7236 joinedAt: Timestamp! 7237 "Epoch in which the party joined the set." 7238 atEpoch: Int! 7239 "Total notional volume of the referee's aggressive trades over the aggregation period, default is 30 days." 7240 totalRefereeNotionalTakerVolume: String! 7241 "Total rewards generated from the referee over the aggregation period, default is 30 days." 7242 totalRefereeGeneratedRewards: String! 7243 } 7244 7245 "Edge type containing the referral set referee and cursor information returned by a ReferralSetRefereeConnection" 7246 type ReferralSetRefereeEdge { 7247 "The referral set referee" 7248 node: ReferralSetReferee! 7249 "The cursor for this referral set referee" 7250 cursor: String! 7251 } 7252 7253 "Connection type for retrieving cursor-based paginated information about the referral set referees" 7254 type ReferralSetRefereeConnection { 7255 "The referral set referees in this connection" 7256 edges: [ReferralSetRefereeEdge]! 7257 "The pagination information" 7258 pageInfo: PageInfo! 7259 } 7260 7261 "Connection type for retrieving cursor-based paginated referral set statistics information" 7262 type ReferralSetStatsConnection { 7263 "The referral set statistics in this connection" 7264 edges: [ReferralSetStatsEdge]! 7265 "The pagination information" 7266 pageInfo: PageInfo! 7267 } 7268 7269 "Edge type containing the referral set statistics and cursor information returned by a ReferralSetStatsConnection" 7270 type ReferralSetStatsEdge { 7271 "The referral set statistics" 7272 node: ReferralSetStats! 7273 "The cursor for this referral set statistics" 7274 cursor: String! 7275 } 7276 7277 type ReferralSetStats { 7278 "Epoch at which the statistics are updated." 7279 atEpoch: Int! 7280 "Unique ID of the party." 7281 partyId: ID! 7282 "Indicates if the referral set was eligible to be part of the referral program." 7283 wasEligible: Boolean! 7284 "Discount factor applied to the party." 7285 discountFactor: String! @deprecated(reason: "Use discountFactors") 7286 "Reward factor applied to the party." 7287 rewardFactor: String! @deprecated(reason: "Use rewardFactors") 7288 "Discount factors applied to the party." 7289 discountFactors: DiscountFactors! 7290 "Reward factors applied to the party." 7291 rewardFactors: RewardFactors! 7292 "Current referee notional taker volume" 7293 epochNotionalTakerVolume: String! 7294 "Running volume for the set based on the window length of the current referral program." 7295 referralSetRunningNotionalTakerVolume: String! 7296 "The multiplier applied to the referral reward factor when calculating referral rewards due to the referrer." 7297 rewardsMultiplier: String! 7298 "The proportion of the referees taker fees to be rewarded to the referrer." 7299 rewardsFactorMultiplier: String! @deprecated(reason: "Use rewardsFactorsMultiplier") 7300 "The proportion of the referees taker fees to be rewarded to the referrer." 7301 rewardsFactorsMultiplier: RewardFactors! 7302 "The referrer's taker volume" 7303 referrerTakerVolume: String! 7304 } 7305 7306 "Team record containing the team information." 7307 type Team { 7308 "Unique ID of the team." 7309 teamId: ID! 7310 "Party ID that created the team." 7311 referrer: ID! 7312 "Name of the team." 7313 name: String! 7314 "Link to the team's homepage." 7315 teamUrl: String! 7316 "Link to an image of the team's avatar." 7317 avatarUrl: String! 7318 "Current number of members in the team." 7319 totalMembers: Int! 7320 "Time in RFC3339Nano format when the team was created." 7321 createdAt: Timestamp! 7322 "Epoch at which the team was created." 7323 createdAtEpoch: Int! 7324 "Whether or not the team is closed to new party members. When closed, only parties specified in the allow list can join the team." 7325 closed: Boolean! 7326 "List of public keys that are allowed to join the team. Only applicable to closed teams." 7327 allowList: [String!]! 7328 } 7329 7330 "Edge type containing a team cursor and its associated team data" 7331 type TeamEdge { 7332 "Team data" 7333 node: Team! 7334 "Cursor identifying the team data" 7335 cursor: String! 7336 } 7337 7338 "Connection type for retrieving cursor-based paginated team data" 7339 type TeamConnection { 7340 "Teams in this connection" 7341 edges: [TeamEdge!]! 7342 "Pagination information" 7343 pageInfo: PageInfo! 7344 } 7345 7346 "Team's statistics record containing the team information." 7347 type TeamStatistics { 7348 "Team ID the statistics are related to." 7349 teamId: String! 7350 "Total of volume accumulated over the requested epoch period, expressed in quantum value." 7351 totalQuantumVolume: String! 7352 "List of trading volume totals per epoch, over the requested epoch period, expressed in quantum value" 7353 quantumVolumes: [QuantumVolumesPerEpoch!]! 7354 "Total of rewards accumulated over the requested epoch period, expressed in quantum value." 7355 totalQuantumRewards: String! 7356 "List of rewards over the requested epoch period, expressed in quantum value for each epoch" 7357 quantumRewards: [QuantumRewardsPerEpoch!]! 7358 "Total of games played." 7359 totalGamesPlayed: Int! 7360 "List of games played over the requested epoch period." 7361 gamesPlayed: [String!]! 7362 } 7363 7364 type QuantumRewardsPerEpoch { 7365 "Epoch for which this information is valid." 7366 epoch: Int! 7367 "Total of rewards accumulated over the epoch period expressed in quantum value." 7368 totalQuantumRewards: String! 7369 } 7370 7371 type QuantumVolumesPerEpoch { 7372 "Epoch for which this information is valid." 7373 epoch: Int! 7374 "Total volume across all markets, accumulated over the epoch period, expressed in quantum value." 7375 totalQuantumVolumes: String! 7376 } 7377 7378 "Edge type containing a team statistics cursor and its associated team's statistics data" 7379 type TeamStatisticsEdge { 7380 "Team's statistics data" 7381 node: TeamStatistics! 7382 "Cursor identifying the team data" 7383 cursor: String! 7384 } 7385 7386 "Connection type for retrieving cursor-based paginated team statistics data" 7387 type TeamsStatisticsConnection { 7388 "Teams' statistics in this connection" 7389 edges: [TeamStatisticsEdge!]! 7390 "Pagination information" 7391 pageInfo: PageInfo! 7392 } 7393 7394 "Team member's statistics record containing the member's information." 7395 type TeamMemberStatistics { 7396 "Party ID the statistics are related to." 7397 partyId: String! 7398 "Total of volume accumulated over the requested epoch period, expressed in quantum value." 7399 totalQuantumVolume: String! 7400 "List of trading volume totals per epoch, for the requested epoch period, expressed in quantum value" 7401 quantumVolumes: [QuantumVolumesPerEpoch!]! 7402 "Total of rewards accumulated over the requested epoch period, expressed in quantum value." 7403 totalQuantumRewards: String! 7404 "List of rewards over the requested epoch period, expressed in quantum value for each epoch" 7405 quantumRewards: [QuantumRewardsPerEpoch!]! 7406 "Total number of games played." 7407 totalGamesPlayed: Int! 7408 "List of games played over the requested epoch period." 7409 gamesPlayed: [String!]! 7410 } 7411 7412 "Edge type containing a team member statistics cursor and its associated statistics data" 7413 type TeamMemberStatisticsEdge { 7414 "Team member's statistics data" 7415 node: TeamMemberStatistics! 7416 "Cursor identifying the team data" 7417 cursor: String! 7418 } 7419 7420 "Connection type for retrieving cursor-based paginated team member statistics data" 7421 type TeamMembersStatisticsConnection { 7422 "Team members' statistics in this connection" 7423 edges: [TeamMemberStatisticsEdge!]! 7424 "Pagination information" 7425 pageInfo: PageInfo! 7426 } 7427 7428 "A team's referee info" 7429 type TeamReferee { 7430 "Team ID." 7431 teamId: ID! 7432 "Party ID of the referee" 7433 referee: ID! 7434 "Time in RFC3339Nano format when the referee joined the team." 7435 joinedAt: Timestamp! 7436 "Epoch at which the referee joined the team." 7437 joinedAtEpoch: Int! 7438 } 7439 7440 "Edge type containing a team referee cursor and its associated team referee data" 7441 type TeamRefereeEdge { 7442 "Team referee data" 7443 node: TeamReferee! 7444 "Cursor identifying the team referee data" 7445 cursor: String! 7446 } 7447 7448 "Connection type for retrieving cursor-based paginated team referee data" 7449 type TeamRefereeConnection { 7450 "Team referees in this connection" 7451 edges: [TeamRefereeEdge!]! 7452 "Pagination information" 7453 pageInfo: PageInfo! 7454 } 7455 7456 "Referee's team history, i.e. which team a referee has been a member of." 7457 type TeamRefereeHistory { 7458 "ID of the team the referee joined." 7459 teamId: ID! 7460 "Time in RFC3339Nano format when the referee joined the team." 7461 joinedAt: Timestamp! 7462 "Epoch at which the referee joined the team." 7463 joinedAtEpoch: Int! 7464 } 7465 7466 "Edge type containing a team referee history cursor and its associated team referee history data" 7467 type TeamRefereeHistoryEdge { 7468 "Team referee history data" 7469 node: TeamRefereeHistory! 7470 "Cursor identifying the team referee history data" 7471 cursor: String! 7472 } 7473 7474 "Connection type for retrieving cursor-based paginated team referee history data" 7475 type TeamRefereeHistoryConnection { 7476 "Team referee history in this connection" 7477 edges: [TeamRefereeHistoryEdge!]! 7478 "Pagination information" 7479 pageInfo: PageInfo! 7480 } 7481 7482 "Fees that have been applied on a specific asset for a given party." 7483 type FeesStatsForParty { 7484 "The settlement asset of the market." 7485 assetId: String! 7486 "The total referral rewards received by referrer of the referral set." 7487 totalRewardsReceived: String! 7488 "The total referral discounts applied to all referee taker fees" 7489 refereesDiscountApplied: String! 7490 "The total volume discounts applied to all referee taker fees" 7491 volumeDiscountApplied: String! 7492 "The total maker fees received by the maker side." 7493 totalMakerFeesReceived: String! 7494 } 7495 7496 "Fees that have been applied on a specific market/asset up to the given epoch." 7497 type FeesStats { 7498 "The market the fees were paid in" 7499 marketId: String! 7500 "The settlement asset of the market." 7501 assetId: String! 7502 "The epoch for which these stats were valid." 7503 epoch: Int! 7504 "The total referral rewards received by referrer of the referral set." 7505 totalRewardsReceived: [PartyAmount!]! 7506 "The total referral rewards generated by all referee taker fees." 7507 referrerRewardsGenerated: [ReferrerRewardsGenerated!]! 7508 "The total referral discounts applied to all referee taker fees" 7509 refereesDiscountApplied: [PartyAmount!]! 7510 "The total volume discounts applied to all referee taker fees" 7511 volumeDiscountApplied: [PartyAmount!]! 7512 "The total maker fees received by the maker side." 7513 totalMakerFeesReceived: [PartyAmount!]! 7514 "The total maker fees generated by all parties." 7515 makerFeesGenerated: [MakerFeesGenerated!]! 7516 } 7517 7518 "An amount received by a party as a reward or a discount" 7519 type PartyAmount { 7520 "Id of the party that received the payment" 7521 partyId: String! 7522 "Amount received by the party" 7523 amount: String! 7524 } 7525 7526 "Rewards generated for referrers by each of their referees" 7527 type ReferrerRewardsGenerated { 7528 "ID of the referral set's referrer" 7529 referrerId: String! 7530 "The amount of rewards generated per party" 7531 generatedReward: [PartyAmount!]! 7532 } 7533 7534 "Maker fees generated by the trade aggressor" 7535 type MakerFeesGenerated { 7536 "Party that paid the fees" 7537 taker: String! 7538 "Amount of maker fees paid by the taker to the maker" 7539 makerFeesPaid: [PartyAmount!]! 7540 } 7541 7542 "Volume discount program information" 7543 type VolumeDiscountProgram { 7544 "Unique ID generated from the proposal that created this program." 7545 id: ID! 7546 "Incremental version of the program. It is incremented each time the volume discount program is edited." 7547 version: Int! 7548 "Defined tiers in increasing order. First element will give Tier 1, second element will give Tier 2, etc." 7549 benefitTiers: [VolumeBenefitTier!]! 7550 "Timestamp as Unix time in nanoseconds, after which when the current epoch ends, the program will end and benefits will be disabled." 7551 endOfProgramTimestamp: Timestamp! 7552 "Number of epochs over which to evaluate parties' running volume." 7553 windowLength: Int! 7554 "Timestamp as RFC3339Nano when the program ended. If present, the current program has ended and no program is currently running." 7555 endedAt: Timestamp 7556 } 7557 7558 "Connection type for retrieving cursor-based paginated volume discount statistics information" 7559 type VolumeDiscountStatsConnection { 7560 "The volume discount statistics in this connection" 7561 edges: [VolumeDiscountStatsEdge]! 7562 "The pagination information" 7563 pageInfo: PageInfo! 7564 } 7565 7566 "Edge type containing the volume discount statistics and cursor information returned by a VolumeDiscountStatsConnection" 7567 type VolumeDiscountStatsEdge { 7568 "The volume discount statistics" 7569 node: VolumeDiscountStats! 7570 "The cursor for this volume discount statistics" 7571 cursor: String! 7572 } 7573 7574 type VolumeDiscountStats { 7575 "Epoch at which the statistics are updated." 7576 atEpoch: Int! 7577 "Unique ID of the party." 7578 partyId: ID! 7579 "Discount factor applied to the party." 7580 discountFactor: String! @deprecated(reason: "Use discountFactors") 7581 "Discount factors applied to the party." 7582 discountFactors: DiscountFactors! 7583 "Party's running volume." 7584 runningVolume: String! 7585 } 7586 7587 "Liquidity fees that have been paid to a party in a specific market/asset up to the given epoch." 7588 type PaidLiquidityFees { 7589 "The market the fees were paid in" 7590 marketId: String! 7591 "The settlement asset of the market." 7592 assetId: String! 7593 "The epoch for which these stats were valid." 7594 epoch: Int! 7595 "Total fees paid across all parties" 7596 totalFeesPaid: String! 7597 "Fees paid per party" 7598 feesPaidPerParty: [PartyAmount!]! 7599 } 7600 7601 "Connection type for retrieving cursor-based paginated paid liquidity fees statistics" 7602 type PaidLiquidityFeesConnection { 7603 "The volume discount statistics in this connection" 7604 edges: [PaidLiquidityFeesEdge]! 7605 "The pagination information" 7606 pageInfo: PageInfo! 7607 } 7608 7609 "Edge type containing the volume discount statistics and cursor information returned by a PaidLiquidityFeesConnection" 7610 type PaidLiquidityFeesEdge { 7611 "The volume discount statistics" 7612 node: PaidLiquidityFees! 7613 "The cursor for this volume discount statistics" 7614 cursor: String! 7615 } 7616 7617 "Returns total transfer fee discount available" 7618 type TotalTransferFeeDiscount { 7619 "Total per party per asset discount available." 7620 totalDiscount: String! 7621 } 7622 7623 "EstimatedTransferFee Results of estimation of transfer fee and the fee discount" 7624 type EstimatedTransferFee { 7625 "Estimated fee for the transfer." 7626 fee: String! 7627 "Discount applied to the fee." 7628 discount: String! 7629 } 7630 7631 "Individual party participating in a game and their metrics" 7632 type IndividualGameEntity { 7633 "Party ID of the participant" 7634 individual: ID! 7635 "The rank of the individual within the game. If the individual is in a team, then the rank of the individual in the team" 7636 rank: Int! 7637 "The volume traded by the individual" 7638 volume: String! 7639 "The reward metric applied to the game" 7640 rewardMetric: DispatchMetric! 7641 "The rewards earned by the individual during the epoch" 7642 rewardEarned: String! 7643 "Total rewards earned by the individual during the game" 7644 totalRewardsEarned: String! 7645 "The rewards earned by the individual during the epoch in quantum value" 7646 rewardEarnedQuantum: String! 7647 "Total rewards earned by the individual during the game in quantum value" 7648 totalRewardsEarnedQuantum: String! 7649 } 7650 7651 "Team participation information, i.e. the team ID and the metrics for each participating team member." 7652 type TeamParticipation { 7653 "Team ID" 7654 teamId: ID! 7655 "List of participating team members and their metrics." 7656 membersParticipating: [IndividualGameEntity!]! 7657 } 7658 7659 "Team participating in a game and their metrics." 7660 type TeamGameEntity { 7661 "Breakdown of the team members and their contributions to the total team metrics." 7662 team: TeamParticipation! 7663 "Rank of the team within the game." 7664 rank: Int! 7665 "Total volume traded by the team" 7666 volume: String! 7667 "Reward metric applied to the game." 7668 rewardMetric: DispatchMetric! 7669 "Total rewards earned by the team during the epoch" 7670 rewardEarned: String! 7671 "Total rewards earned by the team for the game" 7672 totalRewardsEarned: String! 7673 "Total rewards earned by the team during the epoch in quantum value" 7674 rewardEarnedQuantum: String! 7675 "Total rewards earned by the team for the game in quantum value" 7676 totalRewardsEarnedQuantum: String! 7677 } 7678 7679 union GameEntity = TeamGameEntity | IndividualGameEntity 7680 7681 "Game metrics for a given epoch" 7682 type Game { 7683 "ID of the game." 7684 id: ID! 7685 "Epoch during which the metrics were calculated." 7686 epoch: Int! 7687 "Number of participants that took part in the game during the epoch." 7688 numberOfParticipants: Int! 7689 "Entities that were rewarded during the epoch." 7690 entities: [GameEntity!]! 7691 "ID of asset in which the rewards were paid." 7692 rewardAssetId: ID! 7693 } 7694 7695 "Edge type containing the game metrics and cursor information returned by a GameConnection" 7696 type GameEdge { 7697 "Game information and metrics." 7698 node: Game! 7699 "Cursor identifying the game" 7700 cursor: String! 7701 } 7702 7703 "Connection type for retrieving cursor-based paginated game information" 7704 type GamesConnection { 7705 "Page of game edges for the connection" 7706 edges: [GameEdge] 7707 "Current page information" 7708 pageInfo: PageInfo 7709 } 7710 7711 "Connection type for retrieving cursor-based paginated party margin modes information" 7712 type PartyMarginModesConnection { 7713 "The party margin modes" 7714 edges: [PartyMarginModeEdge] 7715 "The pagination information" 7716 pageInfo: PageInfo 7717 } 7718 7719 "Edge type containing the deposit and cursor information returned by a PartyMarginModeConnection" 7720 type PartyMarginModeEdge { 7721 node: PartyMarginMode! 7722 cursor: String! 7723 } 7724 7725 "Margin mode selected for the given party and market." 7726 type PartyMarginMode { 7727 "Unique ID of the market." 7728 marketId: ID! 7729 "Unique ID of the party." 7730 partyId: ID! 7731 "Selected margin mode." 7732 marginMode: MarginMode! 7733 "Margin factor for the market. Isolated mode only." 7734 marginFactor: String 7735 "Minimum theoretical margin factor for the market. Isolated mode only." 7736 minTheoreticalMarginFactor: String 7737 "Maximum theoretical leverage for the market. Isolated mode only." 7738 maxTheoreticalLeverage: String 7739 "Epoch at which the update happened." 7740 atEpoch: Int! 7741 } 7742 7743 type TimeWeightedNotionalPosition { 7744 "Settlement asset for this position" 7745 assetId: ID! 7746 "Party holding the position" 7747 partyId: ID! 7748 "Game the time weighted notional position was calculated for" 7749 gameId: ID! 7750 "Epoch the time weighted notional position was calculated for" 7751 epoch: Int! 7752 "Time weighted notional position" 7753 timeWeightedNotionalPosition: String! 7754 "Time of the last block in which the metric was updated" 7755 lastUpdated: Timestamp! 7756 } 7757 7758 "Game team score" 7759 type GameTeamScore { 7760 "Game ID" 7761 gameId: ID! 7762 "Team ID" 7763 teamId: ID! 7764 "The epoch for which this score is" 7765 epochId: Int! 7766 "Time of the score in RFC3339Nano" 7767 time: Timestamp! 7768 "The score" 7769 score: String! 7770 } 7771 7772 "Game party score" 7773 type GamePartyScore { 7774 "Game ID" 7775 gameId: ID! 7776 "Team ID (optional)" 7777 teamId: ID 7778 "The epoch for which this score is" 7779 epochId: Int! 7780 "The party ID" 7781 partyId: ID! 7782 "Time of the score in RFC3339Nano" 7783 time: Timestamp! 7784 "The current score of the party in the game" 7785 score: String! 7786 "The staking balance of the party in the game, will be populated only if the game has a requirement for it" 7787 stakingBalance: String 7788 "The open volume of the party in the game, will be populated only if the game has a requirement for it" 7789 openVolume: String 7790 "The total fees paid by the party in the game during the relevant period" 7791 totalFeesPaid: String! 7792 "Is the party eligible for a reward in this game based on existing information" 7793 isEligible: Boolean! 7794 "If the party is a member of a team, this is their relative position in the sorting order of the team's scores" 7795 rank: Int 7796 } 7797 7798 "Connection type for retrieving AMM information" 7799 type AMMConnection { 7800 "Page of AMMs for the connection" 7801 edges: [AMMEdge] 7802 "Current page information" 7803 pageInfo: PageInfo 7804 } 7805 7806 "Edge type containing the AMM and cursor information returned by an AMMConnection" 7807 type AMMEdge { 7808 "AMM information" 7809 node: AMM! 7810 "Cursor identifying the AMM" 7811 cursor: String! 7812 } 7813 7814 type AMM { 7815 "AMM ID" 7816 id: ID! 7817 "Party ID of the AMM creator" 7818 partyId: ID! 7819 "Market ID of the AMM" 7820 marketId: ID! 7821 "Party ID the AMM operates as" 7822 ammPartyId: String! 7823 "Amount committed to the AMM" 7824 commitment: String! 7825 "Parameters for the liquidity provision" 7826 parameters: ConcentratedLiquidityParameters! 7827 "Status of the AMM" 7828 status: AMMStatus! 7829 "Reason for status if applicable" 7830 statusReason: AMMStatusReason! 7831 "Proposed fee" 7832 proposedFee: String 7833 "An AMM with an oracle driven base price will only be updated if abs(new-base-price / old-base-price - 1) >= minimum_price_change_trigger" 7834 minimumPriceChangeTrigger: String! 7835 } 7836 7837 type ConcentratedLiquidityParameters { 7838 "Base amount" 7839 base: String! 7840 "Lower bound" 7841 lowerBound: String! 7842 "Upper bound" 7843 upperBound: String! 7844 "Margin ratio at the upper bound" 7845 leverageAtUpperBound: String! 7846 "Margin ratio at the lower bound" 7847 leverageAtLowerBound: String! 7848 "ID of a data source already used by the market which will be used as the base price for the AMM" 7849 dataSourceId: String 7850 } 7851 7852 enum AMMStatus { 7853 "Status has not been specified" 7854 STATUS_UNSPECIFIED 7855 "The AMM is active on the market and is posting tradable volume" 7856 STATUS_ACTIVE 7857 "The AMM submission was rejected" 7858 STATUS_REJECTED 7859 "The AMM has been cancelled by the owner and is no longer trading" 7860 STATUS_CANCELLED 7861 "The AMM has been stopped by the network and is no longer trading" 7862 STATUS_STOPPED 7863 "AMM will only trade such that it will reduce its position" 7864 STATUS_REDUCE_ONLY 7865 } 7866 7867 enum AMMStatusReason { 7868 "Status has no reason specified" 7869 STATUS_REASON_UNSPECIFIED 7870 "The AMM was cancelled by it's owner" 7871 STATUS_REASON_CANCELLED_BY_PARTY 7872 "The party does not have enough funds in their general account to meet the AMM's commitment" 7873 STATUS_REASON_CANNOT_FILL_COMMITMENT 7874 "The party already has an AMM operating on this market and cannot create another one" 7875 STATUS_REASON_PARTY_ALREADY_OWNS_AMM_FOR_MARKET 7876 "The AMM was liquidated and stopped by the network" 7877 STATUS_REASON_PARTY_CLOSED_OUT 7878 "The AMM was stopped by the network because the market it operated in was closed" 7879 STATUS_REASON_MARKET_CLOSED 7880 "Commitment amount was below the network wide minimum, or its price bounds are too wide that the volume is spread thinly creating zero-volume price-levels" 7881 STATUS_REASON_COMMITMENT_TOO_LOW 7882 "The AMM was unable to rebase its fair-price such that it does not cross with existing orders" 7883 STATUS_REASON_CANNOT_REBASE 7884 } 7885 7886 type NewProtocolAutomatedPurchase { 7887 "The source token that will be swapped" 7888 from: ID! 7889 "The account type for the network from which the tokens will be sourced" 7890 fromAccountType: AccountType! 7891 "The account type for the network to which the purchased tokens will be sent" 7892 toAccountType: AccountType! 7893 "The market that will be used to enact the purchase/sale" 7894 marketId: ID 7895 "The oracle that will define an approximate acceptable price for the transaction" 7896 priceOracle: DataSourceDefinition! 7897 "The final acceptable price is the price oracle value weighted by this factor (e.g. 1.05 to allow for 5% slippage on the purchase)" 7898 oracleOffsetFactor: String! 7899 "A time based oracle for when auctions will occur" 7900 auctionSchedule: DataSourceDefinition 7901 "The duration of the auction" 7902 auctionDuration: String! 7903 "A time based oracle for when an observation will be taken of the balance of the source account. This will emit an event notifying of the balance planned to exchange, along with storing this value. When an auction occurs, the latest reading for this value will be used for the volume to trade, rather than the full balance of the account" 7904 auctionVolumeSnapshotSchedule: DataSourceDefinition! 7905 "Minimum number of tokens to be sold (specified in asset decimals). If less than this is available in the account at the last snapshot before auction, no auction will occur and the balance will roll over to the next scheduled auction" 7906 minimumAuctionSize: String! 7907 "Maximum number of tokens to be sold (specified in asset decimals). If more than this is available in the account at the last snapshot before auction, this maximum value will be used instead, and the remainder will be rolled over to the next scheduled auction" 7908 maximumAuctionSize: String! 7909 "The expiry timestamp in seconds of the automated purchase. 0 if no expiry configured" 7910 expiryTimestamp: Int! 7911 "For how long the price from the price oracle is considered usable, in seconds" 7912 oraclePriceStalenessTolerance: String! 7913 } 7914 7915 type UpdateVolumeRebateProgram { 7916 "The benefit tiers for the program" 7917 benefitTiers: [VolumeRebateBenefitTier!]! 7918 "Timestamp as Unix time in nanoseconds, after which program ends." 7919 endOfProgramTimestamp: Timestamp! 7920 "The window length to consider for the volume discount program" 7921 windowLength: Int! 7922 } 7923 7924 type VolumeRebateBenefitTier { 7925 "The required volume fraction for a party to access this tier" 7926 minimumPartyMakerVolumeFraction: String! 7927 "The additional rebate factor (in percentage of trade_value_for_fee_purposes a party at this tier will receive when they are the maker side of a trade" 7928 additionalMakerRebate: String! 7929 "The tier number" 7930 tierNumber: Int 7931 } 7932 7933 7934 "Volume rebate program information" 7935 type VolumeRebateProgram { 7936 "Unique ID generated from the proposal that created this program." 7937 id: ID! 7938 "Incremental version of the program. It is incremented each time the volume discount program is edited." 7939 version: Int! 7940 "Defined tiers in increasing order. First element will give Tier 1, second element will give Tier 2, etc." 7941 benefitTiers: [VolumeRebateBenefitTier!]! 7942 "Timestamp as Unix time in nanoseconds, after which when the current epoch ends, the program will end and benefits will be disabled." 7943 endOfProgramTimestamp: Timestamp! 7944 "Number of epochs over which to evaluate parties' running volume." 7945 windowLength: Int! 7946 "Timestamp as RFC3339Nano when the program ended. If present, the current program has ended and no program is currently running." 7947 endedAt: Timestamp 7948 } 7949 7950 7951 "Connection type for retrieving cursor-based paginated volume rebate statistics information" 7952 type VolumeRebateStatsConnection { 7953 "The volume rebate statistics in this connection" 7954 edges: [VolumeRebateStatsEdge]! 7955 "The pagination information" 7956 pageInfo: PageInfo! 7957 } 7958 7959 "Edge type containing the volume rebate statistics and cursor information returned by a VolumeRebateStatsConnection" 7960 type VolumeRebateStatsEdge { 7961 "The volume rebate statistics" 7962 node: VolumeRebateStats! 7963 "The cursor for this volume rebate statistics" 7964 cursor: String! 7965 } 7966 7967 type VolumeRebateStats { 7968 "Epoch at which the statistics are updated." 7969 atEpoch: Int! 7970 "Unique ID of the party." 7971 partyId: ID! 7972 "Rebate factor applied to the party." 7973 additionalMakerRebate: String! 7974 "Party's running volume fraction (of maker fee paid over the relevant window)" 7975 makerVolumeFraction: String! 7976 "Party's running volume of maker fee received over the relevant window" 7977 makerFeeReceived: String! 7978 } 7979 7980 type PartyDiscountStats { 7981 "The volume discount tier the party is in" 7982 volumeDiscountTier: Int! 7983 "The volume rebate tier the party is in" 7984 volumeRebateTier: Int! 7985 "The referral discount tier the party is in" 7986 referralDiscountTier: Int! 7987 "The fee percentages the party will pay on a given market, with any rebates and discounts accounted for" 7988 partyMarketFees: [MarketFees!] 7989 } 7990 7991 type MarketFees { 7992 "The market ID" 7993 marketId: ID! 7994 "The taker fees for the market without the discounts applied" 7995 undiscountedTakerFee: String! 7996 "The taker fees as applied for the party (with the discounts applied)" 7997 discountedTakerFee: String! 7998 "The maker fees for the market" 7999 baseMakerFee: String! 8000 "The maker rebate for the party" 8001 userMakerRebate: String! 8002 }