GithubHelp home page GithubHelp logo

dan-da / bitsquare_market Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 16.0 8.74 MB

A simple web interface to view bitsquare markets

License: GNU Lesser General Public License v3.0

HTML 19.10% PHP 62.57% CSS 18.33%
bisq bisq-markets bisq-web bitsquare

bitsquare_market's People

Contributors

dan-da avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bitsquare_market's Issues

Using incomplete cache key results in duplicate data when querying multiple basecurrencies.

I found this problem in the course of investigating:
bisq-network/analytics#1 (comment)

A memory cache is used to store results temporarily during a request. The cache key was not including information about the basecurrency, thus the first result stored for a given key would be used even for other base currencies.

wrong code:

        static $results = null;
        $val = @$results[$key];
        if( $val ) {
            return $val;
        }

fixed code:

        static $results = null;
        $fullkey = $file . $key;
        $val = @$results[$fullkey];
        if( $val ) {
            return $val;
        }

Trades API incorrectly processes timestamp_from

call: https://market.bitsquare.io/api/trades/?market=btc_eur&limit=2?timestamp_from=1471976042413
result:
[{
"direction": "BUY",
"price": "543.32970000",
"amount": "0.10000000",
"trade_id": "ad85bb39-d80b-4e7b-8bb4-c9537eaeb5ec",
"trade_date": 1475150469519
}, {
"direction": "BUY",
"price": "542.00640000",
"amount": "0.10000000",
"trade_id": "7fa96e8b-eeac-45ee-880e-51e1670bbf2f",
"trade_date": 1475102281499
}]

While these results are possible:
}, {
"direction": "SELL",
"price": "515.65000000",
"amount": "0.20000000",
"trade_id": "135e162f-48ef-4722-957b-fa37689b6bbc",
"trade_date": 1472132093072
}, {
"direction": "BUY",
"price": "517.51000000",
"amount": "0.05000000",
"trade_id": "76f22a82-be54-486c-9462-1a9c9e4109d8",
"trade_date": 1471976042413
}]

Sort and Limit incorrect for trades when using ?market=all

The ?market=all option is implemented by calling the trades::get_trades() method once for each basecurrency and then aggregating results. The get_trades() method applies sort and limit params.

However, the original code was not applying sort and limit after the aggregation.

These sorts of complications are a consequence of the fact that the web ui and api is hiding the messiness of multiple basecurrencies in the underlying data source (bisq app).

Change domain from market.bisq.io => markets.bisq.network

  • Add DNS entry for markets.bisq.network pointing to 139.59.183.97
  • Remove A record for market.bisq.io and replace it with CNAME to markets.bisq.network
  • Update the app to accept requests from Host: markets.bisq.network
  • Provision new Let's Encrypt HTTPs cert to support the change
  • Add 301 redirect for market.bisq.io/* => markets.bisq.network/$1

Note the intentional pluralization of "markets" in the new name.

  • @cbeams will handle the DNS changes, see linked issues below.
  • @Emzy is available to help with anything cert-related.

feature: need a solution so people can discover markets with offers, but no trades yet.

Background Discussion:


danda
ok, dash is active on website.
seems there were 3 trades in GBP. only market so far.
M
Manfred_Karrer
cool. yes 3 trades
D
danda
ok, all is well then.
M
Manfred_Karrer
but there are offers about 7
D
danda
hmm, offers not showing up for some reason. let me check other markets.
M
Manfred_Karrer
i can only select GBP is that for the offers as well? the offers are other currnecies
D
danda
oh, i see.
M
Manfred_Karrer
seems the selector is only showing traded currencies
D
danda
at present, the check for active markets only considers markets that have ever had at least 1 trade. does not consider offers.
M
Manfred_Karrer
at doge wher no trades have been all currencies are displayed. i think that should be the default behaviour.
D
danda
you can also add &allmarkets=1 param, but no ui for that now.
M
Manfred_Karrer
otherwise offers are omitted if never traded
can u change the selector logic to either show all currencies or all which have either trade or offer (better)
D
danda
yes, doge does that because there are zero markets with any trades.
it is much more expensive to also parse the offers file.
remember it is for every request also.
the inter-request caching would help with that, but is proken on prod server for some reason. ( research project )
I'm reluctant to just show all markets. very cluttered, and annoying to flip through many empty markets.
what I could do is add a UI button or checkbox to toggle showing all markets or traded markets.
i will make a github issue for it. no time today.
MM
Manfred_Karrer
15:53
i leave it up to you but current state should get fixed

Trade notifications

This would be a feature where users could enter an email address and receive notifications when a new offer is posted.

To do this on the website would require that we run an external process, eg from cron each minute. It would also require some type of database to store the email and associated market(s) for notifications. In turn, we then need a way for users to modify or delete the alerts, which implies some type of authentication system.

So it quickly gets a bit complicated.

I'm not sure but sending SMS might require some type of paid account. I think that starting out with email alerts should be sufficient.

There are some privacy implications, as we would now be storing email addresses associated with markets.

So upon review, I think that this feature is easier and better to implement in the Bisq app itself, which has no need of user auth and can easily call a callback when new offers are posted, plus no central place to store user emails.

anyway, I am entering the issue here for the record.

From email discussion:

idea gentlemen that having alerts to email or sms for new trades posted cud double to triple the amount of completed transactions thru the bisq client (:

On Thu, Jul 6, 2017 at 4:45 PM, Manfred Karrer wrote:

yes that is a longer requested feature, though i am too busy with other stuff...

maybe Dan can deliver something from the markets page?

> On 06.07.2017, at 20:07, Patrick wrote:
>
> Q:could we get alerts for when a new trade is posted for cad/BTC for
> example? Liquidity is low so it would be cooler just to get an alert when a
> new offer is posted than running the app all the time as its decently
> resource-intensive to run

Show all trades on all markets by default

Currently it is not possible to view all trades across all of the markets (showing mainly the trade volume in BTC, as you can with the Bitsquare application).

Could you make it the default view so that it displays the trade history (BTC volume) for all markets, if a specific market is not selected?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.