Main > Technical Support

Bitshares JS market trade history

(1/2) > >>

Digital Lucifer:

--- Quote from: Victor118 on December 18, 2018, 11:13:13 am ---Ok I just found why I had an empty array, it seems that params order is dateEnd then dateStart like you did.
But the documentation of bitsharesjs-ws is :
https://github.com/bitshares/bitsharesjs-ws


--- Quote ---get_trade_history   [string base, string quote, date start, date stop, int limit]

--- End quote ---



Thanks

--- End quote ---

Keep in mind that repo and documentation is few months out-of-date :)))

Victor118:
Ok I just found why I had an empty array, it seems that params order is dateEnd then dateStart like you did.
But the documentation of bitsharesjs-ws is :
https://github.com/bitshares/bitsharesjs-ws


--- Quote ---get_trade_history   [string base, string quote, date start, date stop, int limit]

--- End quote ---



Thanks

xeroc:
This is a query that returns a result for me:

{"method": "call", "params": [0, "get_trade_history", ["BTS", "USD", "2018-12-17T16:13:49", "2018-12-16T16:13:49", 10]], "jsonrpc": "2.0", "id": 3}

It requires the market_plugin to be enabled on the backend. Try against "wss://node.bitshares.eu"

Victor118:
Great, it works, thank you.

But I don't know why I have an empty array as result for :


--- Code: ---Apis.instance().db_api().exec( "get_trade_history", [ "BTS","USD","2018-12-16T15:09:11","2018-12-17T15:09:11",100 ] );

--- End code ---

xeroc:
Try this format:

2018-12-17T15:00:00

note that **T** in the middle

Navigation

[0] Message Index

[#] Next page

Go to full version