Open stark71 opened 6 years ago
Establish websocket connection: wss://api.hitbtc.com/api/2/ws
from (honored): Send request: {"method": "getTrades", "params": {"symbol": "ETHBTC", "till": null, "from": "2018-02-05T18:51Z", "sort": "DESC", "limit": 10}, "id": "getTrades"} Response received: {"jsonrpc":"2.0","result":{"data":[{"id":183450196,"price":"0.096500","quantity":"3.098","side":"sell","timestamp":"2018-02-05T19:29:22.072Z"},{"id":183450195,"price":"0.096500","quantity":"0.137","side":"sell","timestamp":"2018-02-05T19:29:22.072Z"},{"id":183450194,"price":"0.096500","quantity":"1.200","side":"sell","timestamp":"2018-02-05T19:29:22.072Z"},{"id":183450193,"price":"0.096500","quantity":"0.072","side":"sell","timestamp":"2018-02-05T19:29:22.072Z"},{"id":183450153,"price":"0.096540","quantity":"0.047","side":"buy","timestamp":"2018-02-05T19:29:18.758Z"},{"id":183450148,"price":"0.096508","quantity":"1.195","side":"sell","timestamp":"2018-02-05T19:29:18.756Z"},{"id":183450147,"price":"0.096509","quantity":"0.268","side":"sell","timestamp":"2018-02-05T19:29:18.756Z"},{"id":183450146,"price":"0.096509","quantity":"7.089","side":"sell","timestamp":"2018-02-05T19:29:18.756Z"},{"id":183450145,"price":"0.096509","quantity":"2.486","side":"sell","timestamp":"2018-02-05T19:29:18.753Z"},{"id":183450143,"price":"0.096509","quantity":"1.425","side":"sell","timestamp":"2018-02-05T19:29:18.753Z"}],"symbol":"ETHBTC"},"id":"getTrades"}
{"method": "getTrades", "params": {"symbol": "ETHBTC", "till": null, "from": "2018-02-05T18:51Z", "sort": "DESC", "limit": 10}, "id": "getTrades"}
{"jsonrpc":"2.0","result":{"data":[{"id":183450196,"price":"0.096500","quantity":"3.098","side":"sell","timestamp":"2018-02-05T19:29:22.072Z"},{"id":183450195,"price":"0.096500","quantity":"0.137","side":"sell","timestamp":"2018-02-05T19:29:22.072Z"},{"id":183450194,"price":"0.096500","quantity":"1.200","side":"sell","timestamp":"2018-02-05T19:29:22.072Z"},{"id":183450193,"price":"0.096500","quantity":"0.072","side":"sell","timestamp":"2018-02-05T19:29:22.072Z"},{"id":183450153,"price":"0.096540","quantity":"0.047","side":"buy","timestamp":"2018-02-05T19:29:18.758Z"},{"id":183450148,"price":"0.096508","quantity":"1.195","side":"sell","timestamp":"2018-02-05T19:29:18.756Z"},{"id":183450147,"price":"0.096509","quantity":"0.268","side":"sell","timestamp":"2018-02-05T19:29:18.756Z"},{"id":183450146,"price":"0.096509","quantity":"7.089","side":"sell","timestamp":"2018-02-05T19:29:18.756Z"},{"id":183450145,"price":"0.096509","quantity":"2.486","side":"sell","timestamp":"2018-02-05T19:29:18.753Z"},{"id":183450143,"price":"0.096509","quantity":"1.425","side":"sell","timestamp":"2018-02-05T19:29:18.753Z"}],"symbol":"ETHBTC"},"id":"getTrades"}
Till not honored Send request: {"method": "getTrades", "params": {"symbol": "ETHBTC", "from": null, "till": "2018-02-05T18:51Z", "sort": "DESC", "limit": 10}, "id": "getTrades"} Response received: {"jsonrpc":"2.0","result":{"data":[],"symbol":"ETHBTC"},"id":"getTrades"}
{"method": "getTrades", "params": {"symbol": "ETHBTC", "from": null, "till": "2018-02-05T18:51Z", "sort": "DESC", "limit": 10}, "id": "getTrades"}
{"jsonrpc":"2.0","result":{"data":[],"symbol":"ETHBTC"},"id":"getTrades"}
Same thing happens when from & till are both present
Hi @stark71
Till specifies trades has timestamp earlier than 2018-02-05T18:51Z
You have answered this issue after modifying the endpoint. The issue is no longer reproducible.
It took 4 months to get feedback.
Establish websocket connection: wss://api.hitbtc.com/api/2/ws
from (honored): Send request:
{"method": "getTrades", "params": {"symbol": "ETHBTC", "till": null, "from": "2018-02-05T18:51Z", "sort": "DESC", "limit": 10}, "id": "getTrades"}
Response received:{"jsonrpc":"2.0","result":{"data":[{"id":183450196,"price":"0.096500","quantity":"3.098","side":"sell","timestamp":"2018-02-05T19:29:22.072Z"},{"id":183450195,"price":"0.096500","quantity":"0.137","side":"sell","timestamp":"2018-02-05T19:29:22.072Z"},{"id":183450194,"price":"0.096500","quantity":"1.200","side":"sell","timestamp":"2018-02-05T19:29:22.072Z"},{"id":183450193,"price":"0.096500","quantity":"0.072","side":"sell","timestamp":"2018-02-05T19:29:22.072Z"},{"id":183450153,"price":"0.096540","quantity":"0.047","side":"buy","timestamp":"2018-02-05T19:29:18.758Z"},{"id":183450148,"price":"0.096508","quantity":"1.195","side":"sell","timestamp":"2018-02-05T19:29:18.756Z"},{"id":183450147,"price":"0.096509","quantity":"0.268","side":"sell","timestamp":"2018-02-05T19:29:18.756Z"},{"id":183450146,"price":"0.096509","quantity":"7.089","side":"sell","timestamp":"2018-02-05T19:29:18.756Z"},{"id":183450145,"price":"0.096509","quantity":"2.486","side":"sell","timestamp":"2018-02-05T19:29:18.753Z"},{"id":183450143,"price":"0.096509","quantity":"1.425","side":"sell","timestamp":"2018-02-05T19:29:18.753Z"}],"symbol":"ETHBTC"},"id":"getTrades"}
Till not honored Send request:
{"method": "getTrades", "params": {"symbol": "ETHBTC", "from": null, "till": "2018-02-05T18:51Z", "sort": "DESC", "limit": 10}, "id": "getTrades"}
Response received:{"jsonrpc":"2.0","result":{"data":[],"symbol":"ETHBTC"},"id":"getTrades"}
Same thing happens when from & till are both present