Coinerella API for ALL trustless liquidity pools

Hey,

I’ve posted the URL of our raw.nupool.net API a couple of times, but I think it’s starting to deserve it’s own thread now.

Why am I posting today?

Because I’ve changed some things. There are only three possible outputs left:
Edit: Changed raw.nupool.net to raw.coinerella.com below.


https://raw.coinerella.com/

Gives you a overview of all current tllp operations with current rates and basically all the things you need to know.


https://raw.coinerella.com/?json

Will return the same data as JSON for your application. The JSON is now proper. No more single line JSONs.


Added on 09.08.2015

https://raw.coinerella.com/?liquidity

Returns the current liquidity as JSON.


Updated 08.09.2015

-Changed server name of NuPond_NBT_CNY and NuPond_NBT_BTC to just “NuPond” in ?json and on the site
-added NuRiver Cryptsy BTC and USD pairs


Info:
You may use this service as you like. The data is updated every minute.
/?liquidity is updated with every new block.

Planned:

Liquidity and rate charts for all tllp servers.

Willy

4 Likes

Looks great!
Having it in JSON is convenient for people who want to automate things :smile:

Allow me one question.

Really liquidity for all tllp servers or all servers?
@henry might need to support the extension to all servers, but I think it could be in the interest of Nu to have something like that. And the thread title sounds different from supporting only tllp servers.

Having an output for all pools would fit nicely to https://nubits.com/liquidity-pools to give people who want to provide liquidity an overview where it’s most profitable at that point of time.

And it’s useful for Nu to steer people to pools where the maximum compensated fund amount is not yet reached, because it increases the total amount of (available and reported) liquidity.
…unless Nu bets on people not configuring the tllp bots properly and provide liquidity without being compensated for it…
That should not be the desired way to go, if liquidity providing is regarded as serious business which I think it is.

I’ve changed that like 30 seconds after I started the thread. You’re just to fast :wink:
I’m currently planning to look deeper into how NuLagoon works. For the time in between: tllp servers it is.

2 Likes

That’s still great and most of what I’ve written still applies to it :wink:

https://raw.nupool.net/?liquidity

added into the OP

3 Likes

Great! Thank you!

Awesome.
Now I do not need to try to hack something with my beginner programming skills. :smile:
Anyway any easy to make a restful API from there so that I can display in real time the figures on my media(s)?

1 Like

LiquidBits ccedk (btc/NBT) now available

Looking forward to any web widget - that would be a powerful PR tool

What do you imagine exactly?

  • Price curve vs time
  • Spot Price vs USD
  • Sell Side liquidity
  • Buy Side liquidity

Please note the complete remake of https://raw.nupool.net/

Now available:

-AJAX sorting by most profitable pair using current rates in each sub category (BTC/EUR/USD/CNY)
-overall more pleasing to the eye

Check it out.

Feedback welcome.

4 Likes

Nice!

Perhaps, smaller size overall would be more pleasant to the eyes.

Sorry for being too imaginative. In fact, I think now that since it is json, it should be very easy to extract the data directly from https://raw.nupool.net/?liquidity and create a small service that updates the liquidity in real time.

https://raw.nupool.net/?liquidity returns null right now.

Should work now… the script provided by @masterOfDisaster didn’t work for me any more with Nu 2.0, so I wrote my own liquidity script.

1 Like

I guess it’s related to the changed order of the liquidity - total liquidity was at the end reporting it with 1.2.0, but is at the beginning reporting it with 2.0.0

I start nud with blocknotify to execute a script each time a new block is found:

nud -blocknotify=~/bin/nbtliqlog

This is the content of the script:

#!/bin/bash
date > ~/documents/nu/nbtliquidity-lastblock.log
nud getinfo | grep blocks >> ~/documents/nu/nbtliquidity-lastblock.log
nud getliquidityinfo B | head -n 4 | tail -n 2 >> ~/documents/nu/nbtliquidity-lastblock.log
date >> ~/documents/nu/nbtliquidity-continuous.log
nud getinfo | grep blocks >> ~/documents/nu/nbtliquidity-continuous.log
nud getliquidityinfo B | head -n 4 | tail -n 2 >> ~/documents/nu/nbtliquidity-continuous.log

First: I’ve fixed a small glitch with the ?json query which sometimes resulted in empty responses.

Secondly: We have a small birthday present for Nu.
I’m happy to announce that @TheCrema is willing to help me with the on-going raw.nupool.net interface development.

He’s very capable of JavaScript coding and thus we will be able to provide dynamic JS charts for all ALP pools since July 23rd 2015.
Those charts will visualize current rates and current liquidity over time. Basically the whole data from the ?json is available, so if anyone thinks another value should be visualized, please tell me.

Example for the values recorded so far:

{"pool":"NuPool","exchange":"poloniex","pair":"btc","max_ask":0.3,"max_bid":0.3,"current_ask":0.3,"current_bid":0.3,"ask_target":12500,"ask_filled":20479.82216213,"ask_filled_percent":163.84,"bid_target":12500,"bid_filled":11927.162,"bid_filled_percent":95.42}"
3 Likes

do we have any schematics or documents or presentations on how the bots are designed and work?
for a new guy that wants to “help” in debugging, only the raw python code is available?

Unfortunately: yes.
The code is nearly uncommented and mostly undocumented.