- BEP-39: Add MEMO to Transfer WebSocket
This BEP describes an improvement to the Transfer Websocket.
BEP-39 requests that MEMO
data field be added to the /ws/userAddress
websocket.
Currently the MEMO
field is not being returned on the websocket, which means that services that rely on MEMO
to set transaction specifications must then retrieve it from the Transaction API endpoint.
This creates unneccessary burden on the API and slows down the transaction processing.
The solution is to add it to the Transfer Websocket as a data field to stream.
This BEP is already implemented.
Wallets, exchanges, dApps and other services will set transaction state in the MEMO
to allow them to be stateless.
To improve the speed at which the MEMO
field can be read and processed, it should be added to the websocket so it doesn't burden Binance Node API endpoints, which are rate-limited.
The following is the update for the /ws/userAddress
websocket with the added MEMO
field:
{
"stream": "transfers",
"data": {
"e":"outboundTransferInfo", // Event type
"E":12893, // Event height
"H":"0434786487A1F4AE35D49FAE3C6F012A2AAF8DD59EC860DC7E77123B761DD91B", // Transaction hash
"M": "MEMO" // Memo
"f":"bnb1z220ps26qlwfgz5dew9hdxe8m5malre3qy6zr9", // From addr
"t":
[{
"o":"bnb1xngdalruw8g23eqvpx9klmtttwvnlk2x4lfccu", // To addr
"c":[{ // Coins
"a":"BNB", // Asset
"A":"100.00000000" // Amount
}]
}]
}
}
The content is licensed under CC0.