[bisq-network/bisq-markets] Re-implement Markets API service with pre-caching proxy + risq backend (#20)
Justin Carter
notifications at github.com
Mon Nov 11 15:12:28 UTC 2019
> I tested right now only the `https://bisq-markets.appspot.com/api/volumes?basecurrency=BTC&interval=day` endpoint.
I have done some digging and as far as I can tell the legacy system is missing data.
Have a look at this for example:
Checking out the `/volumes` query old api reports 1 trade in period.
```
$ curl -s 'https://markets.bisq.network/api/volumes?basecurrency=btc&interval=minute' | jq '.[] | select(.period_start == 1573138020)'
{
"period_start": 1573138020,
"volume": "0.01000000",
"num_trades": 1
}
```
New api reports 2 trades in period.
```
$ curl -s 'https://bisq-markets.appspot.com/api/volumes?basecurrency=btc&interval=minute' | jq '.[] | select(.period_start == 1573138020)'
{
"volume": "0.02000000",
"num_trades": 2,
"period_start": 1573138020
}
```
Now lets check the `/trades` to see what the trades are:
Old api:
```
curl -s 'https://markets.bisq.network/api/trades?market=all×tamp_from=1573138020×tamp_to=1573138080'
[
{
"market": "btc_eur",
"direction": "BUY",
"price": "8337.80000000",
"amount": "0.01000000",
"volume": "83.37800000",
"payment_method": "SEPA",
"trade_id": "qkL80-3d40145c-460e-4116-a0b8-bb8c09bbe5ff-122",
"trade_date": 1573138032443
}
]%
```
New api:
```
curl -s 'https://bisq-markets.appspot.com/api/trades?market=all×tamp_from=1573138020×tamp_to=1573138080'
[
{
"market": "btc_eur",
"direction": "BUY",
"price": "8335.85000000",
"amount": "0.01000000",
"volume": "83.35850000",
"payment_method": "SEPA",
"trade_id": "45349666-2d049416-69d0-42c6-8f9a-397f7939a691-122",
"trade_date": 1573138067406
},
{
"market": "btc_eur",
"direction": "BUY",
"price": "8337.80000000",
"amount": "0.01000000",
"volume": "83.37800000",
"payment_method": "SEPA",
"trade_id": "qkL80-3d40145c-460e-4116-a0b8-bb8c09bbe5ff-122",
"trade_date": 1573138032443
}
]
```
Trade ID: `45349666-2d049416-69d0-42c6-8f9a-397f7939a691-122` is not being reported by the old system.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq-markets/pull/20#issuecomment-552484183
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191111/c2c67431/attachment.html>
More information about the bisq-github
mailing list