code.vegaprotocol.io/vega@v0.79.0/core/integration/features/spot/orders/0011-MARA-020.feature (about) 1 Feature: Spot market 2 3 Background: 4 5 Given the following network parameters are set: 6 | name | value | 7 | network.markPriceUpdateMaximumFrequency | 0s | 8 | market.value.windowLength | 1h | 9 10 Given the following assets are registered: 11 | id | decimal places | 12 | ETH | 2 | 13 | BTC | 2 | 14 15 Given the fees configuration named "fees-config-1": 16 | maker fee | infrastructure fee | 17 | 0.01 | 0.03 | 18 19 Given the log normal risk model named "lognormal-risk-model-1": 20 | risk aversion | tau | mu | r | sigma | 21 | 0.001 | 0.01 | 0 | 0.0 | 1.2 | 22 And the price monitoring named "price-monitoring-1": 23 | horizon | probability | auction extension | 24 | 360000 | 0.999 | 1 | 25 And the spot markets: 26 | id | name | base asset | quote asset | risk model | auction duration | fees | price monitoring | decimal places | position decimal places | sla params | 27 | BTC/ETH | BTC/ETH | BTC | ETH | lognormal-risk-model-1 | 1 | fees-config-1 | price-monitoring-1 | 2 | 2 | default-basic | 28 29 # setup accounts 30 Given the parties deposit on asset's general account the following amount: 31 | party | asset | amount | 32 | party1 | ETH | 10000 | 33 | party2 | ETH | 10000 | 34 | party3 | ETH | 10000 | 35 | party5 | BTC | 100 | 36 And the average block duration is "1" 37 # Place some orders to get out of auction 38 And the parties place the following orders: 39 | party | market id | side | volume | price | resulting trades | type | tif | 40 | party1 | BTC/ETH | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | 41 | party5 | BTC/ETH | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | 42 And the opening auction period ends for market "BTC/ETH" 43 When the network moves ahead "1" blocks 44 Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" 45 46 47 Scenario: In Spot Market, cancelling an order releases the holding amount back to user's general account. (0011-MARA-020) 48 49 # Place a buy order 50 Given the parties place the following orders: 51 | party | market id | side | volume | price | resulting trades | type | tif | reference | 52 | party5 | BTC/ETH | sell | 5 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | sell1 | 53 54 And "party5" should have general account balance of "94" for asset "BTC" 55 56 When the parties place the following orders: 57 | party | market id | side | volume | price | resulting trades | type | tif | reference | 58 | party1 | BTC/ETH | buy | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | buy1 | 59 60 Then the orders should have the following status: 61 | party | reference | status | 62 | party1 | buy1 | STATUS_FILLED | 63 | party5 | sell1 | STATUS_ACTIVE | 64 65 Then the parties cancel the following orders: 66 | party | reference | 67 | party5 | sell1 | 68 69 And "party5" should have general account balance of "98" for asset "BTC"