code.vegaprotocol.io/vega@v0.79.0/core/integration/features/orders/amend-order-opening-auction.feature (about) 1 Feature: Amend orders 2 3 Background: 4 Given the average block duration is "1" 5 And the markets: 6 | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | 7 | ETH/DEC19 | BTC | BTC | default-simple-risk-model-2 | default-overkill-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | 8 And the following network parameters are set: 9 | name | value | 10 | market.auction.minimumDuration | 1 | 11 | network.markPriceUpdateMaximumFrequency | 0s | 12 13 @AmendOA 14 Scenario: Amend an order during opening auction, we should leave the auction the next time update 15 # setup accounts 16 Given the parties deposit on asset's general account the following amount: 17 | party | asset | amount | 18 | myboi | BTC | 10000000 | 19 | aux | BTC | 100000000 | 20 | aux2 | BTC | 100000000 | 21 22 # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction 23 When the parties place the following orders: 24 | party | market id | side | volume | price | resulting trades | type | tif | reference | 25 | aux | ETH/DEC19 | buy | 100 | 9900 | 0 | TYPE_LIMIT | TIF_GTC | aux-b-9 | 26 | aux | ETH/DEC19 | sell | 100 | 10010 | 0 | TYPE_LIMIT | TIF_GTC | aux2-s-10 | 27 | aux2 | ETH/DEC19 | buy | 1 | 10000 | 0 | TYPE_LIMIT | TIF_GTC | aux2-b-k | 28 | aux | ETH/DEC19 | sell | 1 | 10001 | 0 | TYPE_LIMIT | TIF_GTC | aux-s-1 | 29 Then the opening auction period ends for market "ETH/DEC19" 30 And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" 31 #And the mark price should be "10000" for the market "ETH/DEC19" 32 33 # Amend order, we remain in auction 34 When the parties amend the following orders: 35 | party | reference | price | size delta | tif | 36 | aux | aux-s-1 | 10000 | 0 | TIF_GTC | 37 Then the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC19" 38 39 # next block 40 When the network moves ahead "1" blocks 41 Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" 42 And the mark price should be "10000" for the market "ETH/DEC19"