Marfusios / bitfinex-client-websocket

🛠️ C# client for Bitfinex & Ethfinex websocket API version 2.0
Apache License 2.0
55 stars 38 forks source link

Read NOTIFY_INFO from notification message #43

Open vinhins opened 3 years ago

vinhins commented 3 years ago

Hi! Could you add an example how to read the NOTIFY_INFO object from the notification? I found the document here but not sure if we could parse it to every specified type. See here: https://docs.bitfinex.com/reference#ws-auth-notifications This is easy one with raw text:

[
  CHAN_ID, 
  TYPE, //'n' 
  [
    MTS, 
    TYPE, 
    MESSAGE_ID, 
    null, 
      NOTIFY_INFO // NOTIFY_INFO comes as an array or object and differs per notification  
    CODE, 
    STATUS, 
    TEXT,
    ...
  ]
]

[0,"n",[1575282446099,"fon-req",null,null,[41238905,null,null,null,-1000,null,null,null,null,null,null,null,null,null,0.002,2,null,null,null,null,null],null,"SUCCESS","Submitting funding bid of 1000.0 USD at 0.2000 for 2 days."]]

but how about the array/object?

notify_info =  [ 
  ID, 
  GID,
  CID,
  SYMBOL, 
  MTS_CREATE, 
  MTS_UPDATE, 
  AMOUNT, 
  AMOUNT_ORIG, 
  TYPE,
  TYPE_PREV,
  _PLACEHOLDER,
  _PLACEHOLDER,
  FLAGS,
  STATUS,
  _PLACEHOLDER,
  _PLACEHOLDER,
  PRICE,
  PRICE_AVG,
  PRICE_TRAILING,
  PRICE_AUX_LIMIT,
  _PLACEHOLDER,
  _PLACEHOLDER,
  _PLACEHOLDER,
  NOTIFY, 
  HIDDEN, 
  PLACED_ID,
  ...
]

Thanks in advanced!