docs/api: remove "gap" parameter, add "groupBy" example response

This commit is contained in:
Vladyslav Burzakovskyy 2020-01-08 15:26:28 +01:00 committed by Martin
parent 2399f245e4
commit c7730de36a

View File

@ -648,7 +648,7 @@ Example error response (e.g. rate unavailable, incorrect currency...):
Returns a balance history for the specified XPUB or address. Returns a balance history for the specified XPUB or address.
``` ```
GET /api/v2/balancehistory/<XPUB | address>?from=<dateFrom>&to=<dateTo>[&fiatcurrency=<currency>&gap=<gap>&groupBy=<groupBySeconds>] GET /api/v2/balancehistory/<XPUB | address>?from=<dateFrom>&to=<dateTo>[&fiatcurrency=<currency>&groupBy=<groupBySeconds>]
``` ```
Query parameters: Query parameters:
@ -657,7 +657,6 @@ Query parameters:
The optional query parameters: The optional query parameters:
- *fiatcurrency*: if specified, the response will contain calculated fiat amounts at the time of transaction. - *fiatcurrency*: if specified, the response will contain calculated fiat amounts at the time of transaction.
- *gap*: TODO
- *groupBy*: an interval in seconds, to group results by. Default is 3600 seconds. - *groupBy*: an interval in seconds, to group results by. Default is 3600 seconds.
Example response (fiatcurrency=usd): Example response (fiatcurrency=usd):
@ -681,6 +680,20 @@ Example response (fiatcurrency=usd):
] ]
``` ```
Example response (fiatcurrency=usd&groupBy=100000):
```javascript
[
{
"time":1397700000,
"txs":2,
"received":"6169114",
"sent":"6169114",
"fiatRate":478.2312
}
]
```
### Websocket API ### Websocket API
Websocket interface is provided at `/websocket/`. The interface can be explored using Blockbook Websocket Test Page found at `/test-websocket.html`. Websocket interface is provided at `/websocket/`. The interface can be explored using Blockbook Websocket Test Page found at `/test-websocket.html`.