- changed milestone to 2.0.0
Propagate the liquidity identifier through the network
And display the breakdown per identifier in getliquidityinfo.
It may need to be included in a mandatory upgrade.
Comments (7)
-
Michael Witrant reporter
-
Michael Witrant reporter
-
assigned issue to
Michael Witrant
-
assigned issue to
-
Michael Witrant reporter
Implementation details have been discussed here: https://bitbucket.org/JordanLeePeershares/nubottrading/issue/173/tier-liquidity-details-in-the-nu-client
The syntax of
liquidityinfowill not be changed as it already includes the identifier:liquidityinfo <currency> <buyamount> <sellamount> <grantaddress> [<indentifier>]
The identifier can be any string and is an empty string by default. It is propagated as is through the network. Probably limited in size (255 bytes for example) and in the character set (printable ASCII for example).
The client currently stores one liquidity info per custodian. After the change the client will store one liquidity info per custodian and identifier pair.
The identifiers will have this syntax (although it's not enforced by the protocol):
tier:pair:exchange:sessionid. The list of codes used by NuBot is available here: https://bitbucket.org/JordanLeePeershares/nubottrading/src/333dfc5b9105456678bf188a5dc810a5c27dbd35/NuBot/res/exchanges.json?at=feature/179_exchangefilegetliquidityinfowill report the identifiers of each custodian address. And thetotalsection will be removed. For example:{ "B5VFcW5FKpyrPMKCQxApcmpnikfMP8sMZy": { "1:NBT_BTC:btce:2_BTCNBT_ccedk_0.1.5|1424193501841|788606": { "buy": 0.0, "sell": 0.0 }, "1:NBT_PPC:btce:2_BTCPPC_ccedk_0.1.5|1424193501841|788606": { "buy": 0.0, "sell": 0.0 } }, "B5viA2YWcoLBvT8TWJywasQyAT9xkwhmWc": { "": { "buy": 2023.8632, "sell": 11724.5173 } } }A new RPC
getliquiditysummarywill be added to get interpreted and summarized liquidity info.It will try to interpret the tier field and give a breakdown for each tier. The identifier will have to match the regexp
^[0-9]+:. Otherwise the liquidity info won't be listed in any tier.Example result:
{ "total": { "buy": 2023.8632, "sell": 11724.5173 }, "tier": { "1": { "buy": 2023.8632, "sell": 11724.5173 }, "2": { "buy": 2023.8632, "sell": 11724.5173 }, } } -
Michael Witrant reporter
The GUI will also display the tier breakdown. Maybe something like that: https://moqups.com/ouvrages/9EqOoTIv/p:a3d993ac4
-
Michael Witrant reporter
(I edited the
getliquidityinfooutput in the post above to move identifiers to a 2nd level) -
Michael Witrant reporter
Solution proposed in pull request #222. The RPC are different as the ones proposed here, and the GUI changes haven't been implemented.
-
Michael Witrant reporter
- changed status to resolved
Pull request merged (and it includes the GUI changes)
- Log in to comment