-
Notifications
You must be signed in to change notification settings - Fork 21
Description
This is more of a question than a bug report. I am investigating the proper way to find out that a transaction is either Transfer, PlaceOrder or CancelOrder. For example the response for block number 1675624 looks like so:
"data": { "txs": [ "0QHwYl3uClcWbmgbChQuWkaHZ7auJklLB/2D3jU9pDqcGBIMTUlUSC1DNzZfQk5CGi0yRTVBNDY4NzY3QjZBRTI2NDk0QjA3RkQ4M0RFMzUzREE0M0E5QzE4LTEzOTMScAom61rphyEDOF/+FGN7KGHRLSAjgklqmU2HytDmBpVzSQel4mPXhK0SQJ1VWVNwyZcVP4jdU5BkmasjCvj9XXh+kVav22mbzgkIRYxRnzUQFeFr+f5g3PrJp5Muhv+m5Pf8rl8g7Bcean0Y8gUg/QogAw==", "4gHwYl3uCmjObcBDChQ5gxX3iAGQO700xCvwmaTWpeXTlxItMzk4MzE1Rjc4ODAxOTAzQkJEMzRDNDJCRjA5OUE0RDZBNUU1RDM5Ny0xMTI1GgxNSVRILUM3Nl9CTkIgAigBMISRDjiA0I3AkhhAARJwCibrWumHIQMsx1J1eWZeFQP1hDa5pZlEFbtWX3ZxVnAPFLQJ8TPbshJA58WuHDJfFc1Km5dxUIkT97lvByNfYyEqxTzr34BfS2IGbDl4/esmVpNUwTcCew+naYpN+uPazjFyaXjY4HpMYhjzBSDkCCAD", "4gHwYl3uCmjObcBDChTkgZtIllLDN+FImM1f4L0nY3PhJRItRTQ4MTlCNDg5NjUyQzMzN0UxNDg5OENENUZFMEJEMjc2MzczRTEyNS0xNjE3GgxNSVRILUM3Nl9CTkIgAigBMJnQDjiApOiujxJAARJwCibrWumHIQMuE8JaXBNga6hZX+nAihtky08q1hO5WZohXAdgwsUbGBJAi+fInpJE4dv6xR8pPnUMokRG2vgKXHDptW4Lw0pT3ApDEqKAUg6IcX5d2J12KMFCpeZdWRnBAeG0IdeHZ4LHhhj0BSDQDCAD" ]
Trying to decode the first of those transactions as all of the possible types returns meaningful result. The results are like so:
Transfer is { inputs: [ { address: , coins: [Array] } ],
outputs: [ { address: , coins: [Array] } ],
msgType: 'MsgSend' }
Place order is: { sender: <Buffer 2e 5a 46 87 67 b6 ae 26 49 4b 07 fd 83 de 35 3d a4 3a 9c 18>,
id: 'MITH-C76_BNB',
symbol: '2E5A468767B6AE26494B07FD83DE353DA43A9C18-1393',
ordertype: 112,
side: 38,
price: 0,
quantity: 0,
timeinforce: 0,
msgType: 'NewOrderMsg' }
Cancel order is: { sender: <Buffer 2e 5a 46 87 67 b6 ae 26 49 4b 07 fd 83 de 35 3d a4 3a 9c 18>,
symbol: 'MITH-C76_BNB',
refid: '2E5A468767B6AE26494B07FD83DE353DA43A9C18-1393',
msgType: 'CancelOrderMsg' }
{}
As there is nothing in the response specifying the type, what would be the proper way to find it out.
Thanks!