code.vegaprotocol.io/vega@v0.79.0/core/integration/features/spot/orders/0014-ORDT-087.feature (about) 1 Feature: Spot market 2 3 Background: 4 Given time is updated to "2024-01-01T00:00:00Z" 5 6 Given the following network parameters are set: 7 | name | value | 8 | network.markPriceUpdateMaximumFrequency | 0s | 9 | market.value.windowLength | 1h | 10 11 Given the following assets are registered: 12 | id | decimal places | 13 | ETH | 2 | 14 | BTC | 2 | 15 16 Given the fees configuration named "fees-config-1": 17 | maker fee | infrastructure fee | 18 | 0.01 | 0.03 | 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 26 And the spot markets: 27 | id | name | base asset | quote asset | risk model | auction duration | fees | price monitoring | decimal places | position decimal places | sla params | 28 | BTC/ETH | BTC/ETH | BTC | ETH | lognormal-risk-model-1 | 1 | fees-config-1 | price-monitoring-1 | 2 | 2 | default-basic | 29 30 # setup accounts 31 Given the parties deposit on asset's general account the following amount: 32 | party | asset | amount | 33 | party1 | ETH | 10000 | 34 | party3 | BTC | 100 | 35 | party4 | BTC | 100 | 36 | party5 | BTC | 100 | 37 And the average block duration is "1" 38 39 Scenario: A persistent GTC iceberg order that is not crossed with the order book is included in the order book 40 with order book volume == initial peak size. No trades are generated (0014-ORDT-087) 41 42 # Place some orders to get out of auction 43 And the parties place the following orders: 44 | party | market id | side | volume | price | resulting trades | type | tif | 45 | party1 | BTC/ETH | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | 46 | party5 | BTC/ETH | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | 47 48 And the opening auction period ends for market "BTC/ETH" 49 When the network moves ahead "1" blocks 50 Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" 51 52 # Place some orders to give price levels in the book 53 And the parties place the following orders: 54 | party | market id | side | volume | price | resulting trades | type | tif | reference | 55 | party1 | BTC/ETH | buy | 1 | 999 | 0 | TYPE_LIMIT | TIF_GTC | buy1 | 56 | party5 | BTC/ETH | sell | 1 | 1001 | 0 | TYPE_LIMIT | TIF_GTC | sell1 | 57 58 When the parties place the following iceberg orders: 59 | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | only | 60 | party1 | BTC/ETH | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | 5 | 2 | post | 61 62 Then the order book should have the following volumes for market "BTC/ETH": 63 | side | price | volume | 64 | buy | 999 | 1 | 65 | buy | 1000 | 5 | 66 | sell | 1001 | 1 | 67 68 69 Scenario: A persistent GTT iceberg order that is not crossed with the order book is included in the order book 70 with order book volume == initial peak size. No trades are generated (0014-ORDT-087) 71 72 # Place some orders to get out of auction 73 And the parties place the following orders: 74 | party | market id | side | volume | price | resulting trades | type | tif | 75 | party1 | BTC/ETH | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | 76 | party5 | BTC/ETH | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | 77 78 And the opening auction period ends for market "BTC/ETH" 79 When the network moves ahead "1" blocks 80 Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" 81 82 # Place some orders to give price levels in the book 83 And the parties place the following orders: 84 | party | market id | side | volume | price | resulting trades | type | tif | reference | 85 | party1 | BTC/ETH | buy | 1 | 999 | 0 | TYPE_LIMIT | TIF_GTC | buy1 | 86 | party5 | BTC/ETH | sell | 1 | 1001 | 0 | TYPE_LIMIT | TIF_GTC | sell1 | 87 88 When the parties place the following iceberg orders: 89 | party | market id | side | volume | price | resulting trades | type | tif | expires in | peak size | minimum visible size | only | 90 | party1 | BTC/ETH | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 3600 | 5 | 2 | post | 91 92 Then the order book should have the following volumes for market "BTC/ETH": 93 | side | price | volume | 94 | buy | 999 | 1 | 95 | buy | 1000 | 5 | 96 | sell | 1001 | 1 | 97 98 99 100 Scenario: A persistent GFA iceberg order that is not crossed with the order book is included in the order book 101 with order book volume == initial peak size. No trades are generated (0014-ORDT-087) 102 103 # Place some orders to give price levels in the book 104 And the parties place the following orders: 105 | party | market id | side | volume | price | resulting trades | type | tif | reference | 106 | party1 | BTC/ETH | buy | 1 | 999 | 0 | TYPE_LIMIT | TIF_GTC | buy1 | 107 | party5 | BTC/ETH | sell | 1 | 1001 | 0 | TYPE_LIMIT | TIF_GTC | sell1 | 108 109 When the parties place the following iceberg orders: 110 | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | only | 111 | party1 | BTC/ETH | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | 5 | 2 | post | 112 113 Then the order book should have the following volumes for market "BTC/ETH": 114 | side | price | volume | 115 | buy | 999 | 1 | 116 | buy | 1000 | 5 | 117 | sell | 1001 | 1 | 118 119 120 Scenario: A persistent GFN iceberg order that is not crossed with the order book is included in the order book 121 with order book volume == initial peak size. No trades are generated (0014-ORDT-087) 122 123 # Place some orders to get out of auction 124 And the parties place the following orders: 125 | party | market id | side | volume | price | resulting trades | type | tif | 126 | party1 | BTC/ETH | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | 127 | party5 | BTC/ETH | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | 128 129 And the opening auction period ends for market "BTC/ETH" 130 When the network moves ahead "1" blocks 131 Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" 132 133 # Place some orders to give price levels in the book 134 And the parties place the following orders: 135 | party | market id | side | volume | price | resulting trades | type | tif | reference | 136 | party1 | BTC/ETH | buy | 1 | 999 | 0 | TYPE_LIMIT | TIF_GTC | buy1 | 137 | party5 | BTC/ETH | sell | 1 | 1001 | 0 | TYPE_LIMIT | TIF_GTC | sell1 | 138 139 When the parties place the following iceberg orders: 140 | party | market id | side | volume | price | resulting trades | type | tif | peak size | minimum visible size | only | 141 | party1 | BTC/ETH | buy | 10 | 1000 | 0 | TYPE_LIMIT | TIF_GFN | 5 | 2 | post | 142 143 Then the order book should have the following volumes for market "BTC/ETH": 144 | side | price | volume | 145 | buy | 999 | 1 | 146 | buy | 1000 | 5 | 147 | sell | 1001 | 1 |