Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R4R] IocNoFill semantic correct #516

Merged
merged 4 commits into from
Apr 1, 2019
Merged

[R4R] IocNoFill semantic correct #516

merged 4 commits into from
Apr 1, 2019

Conversation

ackratos
Copy link
Contributor

@ackratos ackratos commented Mar 27, 2019

Query service and frontend need process newly added IocExpire order status before deploy

Description

New semantic:
IocNoFill: no filled ioc order
IocExpire: partial filled ioc order

Rationale

Follow up of a review comment from @darren-liu
#500 (comment)

Example

For IocNoFill:

{  
   "Height":269,
   "Timestamp":1553753193,
   "NumOfMsgs":2,
   "Trades":{  
      "NumOfMsgs":0,
      "Trades":null
   },
   "Orders":{  
      "NumOfMsgs":2,
      "Orders":[  
         {  
            "Symbol":"NNB-18A_BNB",
            "Status":0,
            "OrderId     ":"52C6A4983177443541AC1ACCC3756FA20B05D3AB-11",
            "TradeId":"",
            "Owner":"bnb12tr2fxp3wazr2sdvrtxvxat05g9st5atnegh7s",
            "Side":2,
            "OrderType":2,
            "Price":800000000,
            "Qty":2000000000,
            "LastExecutedPrice":0,
            "LastExecutedQty":0,
            "CumQty":0,
            "Fee":"",
            "OrderCreationTime":1553753193,
            "TransactionTime":1553753193,
            "TimeInForce":3,
            "CurrentExecutionType":0,
            "TxHash":"334A365540FE11EB7D4329B8083EAC2CE8272055AD0AEC12F97565CD4FD07EC6"
         },
         {  
            "Symbol":"NNB-18A_BNB",
            "Status":3,
            "OrderId":"52C6A4983177443541AC1ACCC3756FA20B05D3AB-11     ",
            "TradeId":"",
            "Owner":"bnb12tr2fxp3wazr2sdvrtxvxat05g9st5atnegh7s",
            "Side":2,
            "OrderType":2,
            "Price":800000000,
            "Qty":2000000000,
            "LastExecutedPrice":0,
            "LastExecutedQty":0,
            "CumQty":0,
            "Fee":"BNB:10000;#Exp:1",
            "OrderCreationTime":1553753193,
            "TransactionTime":1553753193,
            "TimeInForce":3,
            "CurrentExecutionType":0,
            "TxHash":"334A365540FE11EB7D4     329B8083EAC2CE8272055AD0AEC12F97565CD4FD07EC6"
         }
      ]
   },
   "Proposals":{  
      "NumOfMsgs":0,
      "Proposals":null
   }
}

For IocExpire:

{  
   "Height":1051,
   "Timestamp":1553754024,
   "NumOfMsgs":5,
   "Trades":{  
      "NumOfMsgs":1,
      "Trades":[  
         {  
            "Id":"1051-0",
            "Symbol":"NNB-18A_BNB",
            "Price":800000000,
            "Qty":2000000000,
            "Sid":"5     2C6A4983177443541AC1ACCC3756FA20B05D3AB-16",
            "Bid":"52C6A4983177443541AC1ACCC3756FA20B05D3AB-17",
            "Sfee":"BNB:12800000",
            "Bfee":"BNB:12800000",
            "SAddr":"bnb12tr2fxp3wazr2s     dvrtxvxat05g9st5atnegh7s",
            "BAddr":"bnb12tr2fxp3wazr2sdvrtxvxat05g9st5atnegh7s"
         }
      ]
   },
   "Orders":{  
      "NumOfMsgs":4,
      "Orders":[  
         {  
            "Symbol":"NNB-18A_BNB",
            "Status":0,
            "OrderId":"52C6A     4983177443541AC1ACCC3756FA20B05D3AB-17",
            "TradeId":"",
            "Owner":"bnb12tr2fxp3wazr2sdvrtxvxat05g9st5atnegh7s",
            "Side":1,
            "OrderType":2,
            "Price":800000000,
            "Qty":3000000000,
            "La     stExecutedPrice":0,
            "LastExecutedQty":0,
            "CumQty":2000000000,
            "Fee":"",
            "OrderCreationTime":1553754024,
            "TransactionTime":1553754024,
            "TimeInForce":3,
            "CurrentExecutionType":0,
            "TxHash":"8083CEC263C8F759BC5E51BDB185CEE982345854038974F539AE869C1CEA6B71"
         },
         {  
            "Symbol":"NNB-18A_BNB",
            "Status":5,
            "OrderId":"52C6A4983177443541AC1ACCC3756FA20B05D3AB-1     7",
            "TradeId":"1051-0",
            "Owner":"bnb12tr2fxp3wazr2sdvrtxvxat05g9st5atnegh7s",
            "Side":1,
            "OrderType":2,
            "Price":800000000,
            "Qty":3000000000,
            "LastExecutedPrice":800000000,
            "Las     tExecutedQty":2000000000,
            "CumQty":2000000000,
            "Fee":"BNB:12800000",
            "OrderCreationTime":1553754024,
            "TransactionTime":1553754024,
            "TimeInForce":3,
            "CurrentExecutionType":0,
            "TxHash":"8083CEC263C8F759BC5E51BDB185CEE982345854038974F539AE869C1CEA6B71"
         },
         {  
            "Symbol":"NNB-18A_BNB",
            "Status":4,
            "OrderId":"52C6A4983177443541AC1ACCC3756FA20B05D3AB-17",
            "TradeId":"",
            "Owner":"bnb12tr2fxp3wazr2sdvrtxvxat05g9st5atnegh7s",
            "Side":1,
            "OrderType":2,
            "Price":800000000,
            "Qty":3000000000,
            "LastExecutedPrice":0,
            "LastExecutedQty":0,
            "CumQty":2000000000,
            "Fee":"BNB:12800000",
            "OrderCreationTime":1553754024,
            "TransactionTime":1553754024,
            "TimeInForce":3,
            "CurrentExecutionType":0,
            "TxHash":"8083CEC263C8F75     9BC5E51BDB185CEE982345854038974F539AE869C1CEA6B71"
         },
         {  
            "Symbol":"NNB-18A_BNB",
            "Status":6,
            "OrderId":"52C6A4983177443541AC1ACCC3756FA20B05D3AB-16",
            "TradeId":"1051-0",
            "Owne     r":"bnb12tr2fxp3wazr2sdvrtxvxat05g9st5atnegh7s",
            "Side":2,
            "OrderType":2,
            "Price":800000000,
            "Qty":2000000000,
            "LastExecutedPrice":800000000,
            "LastExecutedQty":2000000000,
            "C     umQty":2000000000,
            "Fee":"BNB:12800000",
            "OrderCreationTime":1553754014,
            "TransactionTime":1553754024,
            "TimeInForce":1,
            "CurrentExecutionType":0,
            "TxHash":"7706D0D1B24195BE6     9A6F4AAF15ED017C6278C70A9FE332F7DD50811BA3E9C46"
         }
      ]
   },
   "Proposals":{  
      "NumOfMsgs":0,
      "Proposals":null
   }
}

Changes

Preflight checks

  • build passed (make build)
  • tests passed (make test)
  • integration tests passed (make integration_test)
  • manual transaction test passed (cli invoke)

Already reviewed by

...

Related issues

#499

@ackratos ackratos self-assigned this Mar 27, 2019
@ackratos ackratos merged commit 192ee3c into develop Apr 1, 2019
@unclezoro unclezoro deleted the ioc_no_fill branch May 10, 2022 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants