Block Explorer and Delegates Listing

Started by svk, August 02, 2014, 06:45:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

svk

Quote from: abit on January 09, 2015, 10:48:27 AM
Interesting.. BTSBOTS's batch market transactions are identified as 'Ask'?

BTW transaction types should include 'cancel an order'.

Yes, alt uses a batch order type that results in a transaction json that is a big mess, and I haven't yet taken the time to figure out how to properly parse those transactions. Inside each transaction he makes there are multiple asks and bids, here's an example:

"operations" : [
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : -5647295378,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "0.009116877267",
                                        "quote_asset_id" : 14,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : -7260131,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.0086060402284",
                                        "quote_asset_id" : 14,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : -6771472,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.0014288611238",
                                        "quote_asset_id" : 22,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : -5647295378,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "0.0014841017886",
                                        "quote_asset_id" : 22,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : -9035672605,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "0.000963457088546",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : -21169369,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.000920771559878",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : -382936,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.0000872081983",
                                        "quote_asset_id" : 6,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : -270875539,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "0.0000911262779",
                                        "quote_asset_id" : 6,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : -1129459075,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "0.0012568445525",
                                        "quote_asset_id" : 21,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : -122032,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "10.39636579435647",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 6
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : -63822,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "10.73746535796045",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 6
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : -773230,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.75377827493836",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 21
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : -5292342,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.10391519935325",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 14
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : -4103872,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.63835386897072",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 22
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : -1128578,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "0.65534361043162",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 22
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : 7259168,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.0086945299727",
                                        "quote_asset_id" : 14,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : 5589250291,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "0.0091209892616",
                                        "quote_asset_id" : 14,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : 6771317,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.0014436337606",
                                        "quote_asset_id" : 22,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : 5589250291,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "0.0014847321116",
                                        "quote_asset_id" : 22,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : 20977584,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.000929923741666",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : 8942800466,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "0.000955159170799",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : 382936,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.000088110026",
                                        "quote_asset_id" : 6,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : 300609899,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "0.0000911632181",
                                        "quote_asset_id" : 6,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : 1117850058,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "0.0012572913187",
                                        "quote_asset_id" : 21,
                                        "base_asset_id" : 0
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : 135437,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "10.39270968600078",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 6
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : 63822,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "10.64018828233291",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 6
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : 773230,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.75355078431618",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 21
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : 5244395,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.10387391456867",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 14
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "bid_op_type",
                            "data" : {
                                "amount" : 4103871,
                                "bid_index" : {
                                    "order_price" : {
                                        "ratio" : "0.63811703937197",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 22
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "ask_op_type",
                            "data" : {
                                "amount" : 1128552,
                                "ask_index" : {
                                    "order_price" : {
                                        "ratio" : "0.64940796753075",
                                        "quote_asset_id" : 250,
                                        "base_asset_id" : 22
                                    },
                                    "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY"
                                }
                            }
                        },
                        {
                            "type" : "deposit_op_type",
                            "data" : {
                                "amount" : 190826970,
                                "condition" : {
                                    "asset_id" : 0,
                                    "slate_id" : 0,
                                    "type" : "withdraw_signature_type",
                                    "data" : {
                                        "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY",
                                        "memo" : null
                                    }
                                }
                            }
                        },
                        {
                            "type" : "deposit_op_type",
                            "data" : {
                                "amount" : 963,
                                "condition" : {
                                    "asset_id" : 14,
                                    "slate_id" : 0,
                                    "type" : "withdraw_signature_type",
                                    "data" : {
                                        "owner" : "BTSEzmSPTwQys6AgdJFjLoTioVdLXMWujPzY",
                                        "memo" : null
                                    }
                                }
                            }
                        },
                        {
                            "type" : "deposit_op_type",

               
Worker: dev.bitsharesblocks

abit

Interesting.. BTSBOTS's batch market transactions are identified as 'Ask'?

BTW transaction types should include 'cancel an order'.
BitShares committee member: abit
BitShares witness: in.abit

xeroc


doesn't make sense to me .. the red color just looks bad :)

monsterer

Quote from: svk on November 28, 2014, 10:31:46 AM
Yea that makes sense since the API calls are on a different port. I'm running the site with apache on port 80 but I've been considering switching it over to nginx and also creating a proxy to funnel api calls through something like api.bitsharesblocks.com as well, that would work right?

As long as everything is on port 80/443, you'll be fine so having a sub-domain for the api makes perfect sense :)
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

svk

Quote from: arhag on December 03, 2014, 03:19:20 AM
svk, for some reason http://www.bitsharesblocks.com/delegates is filtering out certain delegates from the table such as dev0.nikolai (rank 2), dev.bitsharesblocks (rank 30), and dev-metaexchange.monsterer (rank 67). They are included in the JSON returned by the API, just filtered out by the UI.

The only thing I see that they have in common that other delegates that aren't filtered out don't is that their names all start with a "dev". I think the offending part of the code is in the "render" method of "reactDelegates" class that filters the parsed JSON using the following predicate:

function (a) {
    return a.name.toLowerCase().indexOf("dev")
}

Haha you're right of course, before pushing it to live I was testing filtering performance, I forgot to comment it out before pushing it. In my defense it was 1am so I was a bit tired! Fixed now, thanks.
Worker: dev.bitsharesblocks

arhag

svk, for some reason http://www.bitsharesblocks.com/delegates is filtering out certain delegates from the table such as dev0.nikolai (rank 2), dev.bitsharesblocks (rank 30), and dev-metaexchange.monsterer (rank 67). They are included in the JSON returned by the API, just filtered out by the UI.

The only thing I see that they have in common that other delegates that aren't filtered out don't is that their names all start with a "dev". I think the offending part of the code is in the "render" method of "reactDelegates" class that filters the parsed JSON using the following predicate:

function (a) {
    return a.name.toLowerCase().indexOf("dev")
}

svk

Quote from: monsterer on November 28, 2014, 10:01:40 AM
Just a quick point, you might already be aware - the site isn't (fully) accessible from locations where only ports 80 and 443 are open. I presume you have API requests going on a different port? The result is that no data is ever displayed, although the pages themselves load.

Yea that makes sense since the API calls are on a different port. I'm running the site with apache on port 80 but I've been considering switching it over to nginx and also creating a proxy to funnel api calls through something like api.bitsharesblocks.com as well, that would work right?
Worker: dev.bitsharesblocks

monsterer

Just a quick point, you might already be aware - the site isn't (fully) accessible from locations where only ports 80 and 443 are open. I presume you have API requests going on a different port? The result is that no data is ever displayed, although the pages themselves load.
My opinions do not represent those of metaexchange unless explicitly stated.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

svk

Quote from: xeroc on November 28, 2014, 08:05:45 AM
The asset=USD page misses a closing bracket:
Quote
PRICE HISTORY (BTS/bitUSD

Indeed, I'll fix it once I get home.
Worker: dev.bitsharesblocks

xeroc

The asset=USD page misses a closing bracket:
Quote
PRICE HISTORY (BTS/bitUSD

svk

I've just pushed a big update to the site. It includes a lot of things but most notably the translation framework is in place! Currently only English and French are available, I'll make another post with some bounties for translations, probably tomorrow. The update includes but is not limited to:

  • Translations!
  • Delegate public data fields (ann, bid, description, location, website, handle, role currently supported)
  • Various bug fixes and improvements on the backend
  • Charting fixes: dates and y axis formatting mainly
  • Shorting information now uses the correct formula for amounts
  • +++
You might need to force a refresh of the site to get the updates, shift+F5 should do the trick. As always , if you see anything incorrect or have any issues, give me a shout!
Worker: dev.bitsharesblocks

cass

Quote from: svk on November 23, 2014, 11:35:17 AM
Quote from: cass on November 23, 2014, 11:12:11 AM
FYI  - site doesn't work for me currently...

Most likely cache related from the switch to Cloudflare, I had to tweak some settings and I think it broke on some computers as a result. Try doing shift+F5 to force a refresh, there might also be some localstorage items with CLOUDFLARE in the name that you can delete if you have them.

ok will check it ! FYI you'Re now directly linked on bitshares.org more tab ;)
█║▌║║█  - - -  The quieter you become, the more you are able to hear  - - -  █║▌║║█

svk

Quote from: cass on November 23, 2014, 11:12:11 AM
FYI  - site doesn't work for me currently...

Most likely cache related from the switch to Cloudflare, I had to tweak some settings and I think it broke on some computers as a result. Try doing shift+F5 to force a refresh, there might also be some localstorage items with CLOUDFLARE in the name that you can delete if you have them.
Worker: dev.bitsharesblocks

cass

FYI  - site doesn't work for me currently...
█║▌║║█  - - -  The quieter you become, the more you are able to hear  - - -  █║▌║║█

svk

Quote from: arhag on November 22, 2014, 01:10:33 AM
Svk, I see the share supply on bitsharesblocks.com is approximately 2.5 billion. Are you planning on adding the ability to measure how much non-vested BTS is currently available? Currently the functionality to withdraw isn't even in the client so the non-vested BTS is approximately 0.5 billion BTS less than the share supply reported by bitsharesblocks.com. But when the functionality to withdraw some amount of the vested stake is later added, the calculation will become more complicated. Are you planning on tracking the amount of vested stake that has been withdrawn and using that to calculate available supply? Actually it would probably be a more fair estimate of available supply to use a formula like ((max(1.0, (number of days since November 5, 2014)/730) * 0.5 billion BTS) + (stake in non-vested balances) - (accumulated stake moved out of vested balances)).

The reason I bring this up is because coinmarketcap seems to be using the 2.5 billion supply figure to calculate market cap now even though that is not the fair "available supply". We are essentially pulling a mini-Ripple at the moment. I think coinmarketcap uses data from bitsharesblocks.com, correct? I think it would be good if we have an appropriate available supply value on bitsharesblocks.com that they could use.

Yes I believe they are using one of my api calls to update their data, but I never got confirmation on that except in the case of assets.

There's no way to distinguish between vested and non-vested balances though, so the only real option IMO is to use your formula for vested supply and do "Total supply - share_drop + unvested_vested_supply. We'd have a supply growing daily for two years from 2 billion to 2.5 billion basically.

I'm not sure it's a good idea though, now that CMC is reporting 2.5 billion I'm for just leaving it like that. I could add a tracker for the amount of vested supply that's become available though.
Worker: dev.bitsharesblocks