Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate simple html website from orderbook #1495

Closed
kilrau opened this issue Apr 22, 2020 · 9 comments · Fixed by ExchangeUnion/xud-docker#582
Closed

Generate simple html website from orderbook #1495

kilrau opened this issue Apr 22, 2020 · 9 comments · Fixed by ExchangeUnion/xud-docker#582
Assignees
Labels
P2 mid priority

Comments

@kilrau
Copy link
Contributor

kilrau commented Apr 22, 2020

Step 1:

  • create a simple .html website with some JS connecting to xud's webproxy endpoint
  • features: pair switcher (default to btc/usdt), orderbook buy/sell, node alias, node advertised address (pubkey@hostname:port), connected peers count
  • use https://api.exchangeunion.com/#subscribeorders to show
    showing the current local orderbook of a node
  • color scheme should be dark (e.g. like this, or grey/orange OpenDEX colors)
  • needs external webserver like nginx/apache to host this

Step 2:

  • add an (default false) config option to enable (orderbook ui) container which includes nginx to host this
  • add price chart, visual depth and other fancy things

What is the goal? An easy display into the OpenDEX network, a way to show the public what's going on on the network by clicking on a link, e.g. ob.kilrau.com will host the orderbook of my mainnet node.

What is not the goal? A performanet web UI to control xud, a trade UI. It is display only.

@kilrau kilrau added the P2 mid priority label Apr 22, 2020
@michael1011
Copy link
Contributor

Idea for architecture: daemon listening to xud subscribeorders on machine -> EventSource HTTP stream -> frontend listening to stream

@ghost
Copy link

ghost commented Apr 23, 2020

We could do some light research if we can use grpc-web to subscribeorders directly in the future. At the moment this would also require that we have read-only macaroons because we wouldn't want the client being able to access other gRPC calls.

For now subscribeorders -> wrapper service -> client/frontend would be the easiest to implement.

@kilrau
Copy link
Contributor Author

kilrau commented Apr 23, 2020

We could do some light research if we can use grpc-web to subscribeorders directly in the future.

Something for you? @hatmer

Something reusable from the exchange orderbook UI you built a while ago? @reliveyy

@reliveyy
Copy link
Contributor

Something reusable from the exchange orderbook UI you built a while ago?

@kilrau I'd like to give is a try in watchdog container which combines my previous created reactjs app in the later PRs in xud-docker repo.

@hatmer
Copy link
Collaborator

hatmer commented Apr 24, 2020

macaroons can be JSON serialized and grpc-web allows for custom headers, so Karl's idea would work

@hatmer
Copy link
Collaborator

hatmer commented Apr 24, 2020

@reliveyy you could use JSON-serialized macaroons from reactjs too

@kilrau
Copy link
Contributor Author

kilrau commented May 5, 2020

I like #1495 (comment).

Interested in taking the xud "backend" part of this one? @hatmer @reliveyy can provide a simple orderbook frontend he already cooked a while ago I think :)

@hatmer
Copy link
Collaborator

hatmer commented May 5, 2020

Yes sure, it will go nicely with the macaroons project

@kilrau kilrau assigned reliveyy and hatmer and unassigned hatmer Jun 2, 2020
@kilrau kilrau added P1 top priority and removed P2 mid priority labels Jun 13, 2020
@kilrau kilrau changed the title Generate html website from orderbook Generate simple html website from orderbook Jun 13, 2020
@kilrau
Copy link
Contributor Author

kilrau commented Jun 13, 2020

EDITed issue as per discussion with @reliveyy . Moved to @reliveyy , bumped prio to P1.

@kilrau kilrau added P2 mid priority and removed P1 top priority labels Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 mid priority
Projects
None yet
4 participants