code.vegaprotocol.io/vega@v0.79.0/core/integration/features/spot/orders/0025-OCRE-006.feature (about)

     1  Feature: In Spot market, holding will taken before the order is entered into the book
     2  
     3    Background:    
     4      Given the following assets are registered:
     5        | id  | decimal places |
     6        | ETH | 2              |
     7        | BTC | 2              |
     8  
     9      Given the fees configuration named "fees-config-1":
    10        | maker fee | infrastructure fee |
    11        | 0.005     | 0.002              |
    12      And the simple risk model named "my-simple-risk-model":
    13        | long                   | short                  | max move up | min move down | probability of trading |
    14        | 0.08628781058136630000 | 0.09370922348428490000 | -1          | -1            | 0.2                    |
    15      And the fees configuration named "my-fees-config":
    16        | maker fee | infrastructure fee |
    17        | 0.004     | 0.001              |
    18      And the spot markets:
    19        | id      | name    | base asset | quote asset | risk model           | auction duration | fees          | price monitoring | sla params    | tick size |
    20        | BTC/ETH | BTC/ETH | BTC        | ETH         | my-simple-risk-model | 1                | fees-config-1 | default-none     | default-basic |     1     |
    21  
    22      And the average block duration is "1"
    23  
    24      # setup accounts
    25      Given the parties deposit on asset's general account the following amount:
    26        | party  | asset | amount   |
    27        | party1 | ETH   | 1000000  |
    28        | party2 | ETH   | 1000000  |
    29        | party3 | BTC   | 100      |
    30        | party4 | BTC   | 100      |
    31        | party5 | BTC   | 10000    |
    32        | party6 | ETH   | 100      |
    33  
    34    Scenario: In Spot market, holding will taken before the order is entered into the book (0025-OCRE-005, 0025-OCRE-006)
    35      # Place an iceberg order that we want to full match
    36      When the parties place the following iceberg orders:
    37        | party  | market id | side | volume | price | resulting trades | type       | tif     | peak size | minimum visible size | only | reference |
    38        | party1 | BTC/ETH   | buy  | 10     | 1000  | 0                | TYPE_LIMIT | TIF_GTC | 2         | 2                    | post | iceberg1  |
    39  
    40  
    41      # Place normal GFA orders to match with the full amount of the iceberg order
    42      And the parties place the following orders:
    43        | party  | market id | side | volume | price | resulting trades | type       | tif     | reference |
    44        | party5 | BTC/ETH   | sell | 10     | 1000  | 0                | TYPE_LIMIT | TIF_GFA | sell1     |
    45  
    46      And the opening auction period ends for market "BTC/ETH"
    47      When the network moves ahead "1" blocks
    48      Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH"
    49  
    50      And the parties place the following orders:
    51        | party  | market id | side | volume  | price | resulting trades | type       | tif     | reference | error |
    52        | party3 | BTC/ETH   | sell | 1       | 1000  | 0                | TYPE_LIMIT | TIF_GTC | p3-s1     |       |
    53        | party6 | BTC/ETH   | buy  | 100     | 1000  | 0                | TYPE_LIMIT | TIF_GTC | p6-s1     | party does not have sufficient balance to cover the trade and fees  |
    54  
    55      Then the orders should have the following states:
    56        | party  | market id   | reference | side | volume | remaining | price | status        |
    57        | party3 | BTC/ETH     | p3-s1     | sell | 1      | 1         | 1000  | STATUS_ACTIVE |