-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API History commands #329
Comments
There's a difference between the CLI API and the node API. get_fill_order_history is a node API method. The CLI does not expose all node API commands, but adds some convenience methods and wallet handling stuff that's not part of the node API. I don't know what the rationale is/was for adding access to node API methods as CLI commands. I suppose the basic question is - why would someone want to do that on the command line? AFAICT from the linked thread, the goal is to programmatically call that method. In that case the solution is to simply call the node API instead of the CLI API. |
they are node api calls, correct. they can be used like this following the curl examples in the forum thread:
or with wscat:
as @pmconrad describes it seems this could be started by manual cli_wallet users or lazy client side devs that wanted to do everything from the cli_wallet :) maybe a
|
Damn, it doesn't include IDs of the users involved in the trade 😞 Attempting get_fill_order_history against a full node doesn't work neither
Right, so back to scanning every account for assets held then scanning their trade history to the filter for filled orders.. unless there's a get_asset_holders or a retrievable asset_holder object? I could scrape cryptofresh's API for asset holders, however it isn't always online. |
the following calls are in the asset_api, you need to be logged. here you can get the count of asset_holders:
here a call to get the top 10 holders of BTS:
not sure if it is what you need, hope it helps! |
Cool, so I could do get_asset_holders_count then forward the count into get_asset_holders to retrieve a full list of account holders to then scan for transaction histories. Thanks for the help guys 👍 |
Rather than querying the quantity of holders, grabbing their account names then dumping their individual overall transaction history for a time period then filtering for filled orders against the trading pair I'm interested in, it would be far simpler if the 'get_trade_history' command included user id's for the buyer and seller. Would it be possible to add this data to the get_trade_history command, or was it left out for increased privacy on the BTS DEX? |
i don't think it will be any problem for us if we add the the following pull request do just that: #344 new output:
|
A trade has two participants. Best if we add two fields, a maker and a taker. Otherwise it would confuse people. By the way, IMHO that CLI API has other flaws. For example, it uses |
I agree with @abitmore, having both maker&taker account_id's would be beneficial. Thank you very much for working on this improvement @oxarbitrage 👍 @abitmore Will the changes being discussed in #342 fix the rounding issues in the CLI or will additional changes be required within the cli wallet? Thanks |
added the account of the 2 sides of the trade to pull request, output is now:
for each trade 2 fill orders are created for each side of the it. the iteration is incremented by 2 in the call to avoid the duplicates but the new code addition will go over the skipped itr to get the second account id involved. i was not able to know if the first in the sequence is the maker and the next is the taker, or if the first is the taker and the second the maker or if it is not guaranteed to keep this order. |
merged the changes to the develop branch and closing the issue. |
@oxarbitrage Hey, has this change made it into the production Bishares-Core client yet? I've requested that this functionality is extended to the python-bitshares library, since i'm working on the HUG REST API right now. Cheers 👍 |
yes, this change is at master already. |
Hey,
The graphene documentation makes reference to functions which are not available within the CLI wallet, such as:
get_trade_history
vector<market_trade> graphene::app::database_api::get_trade_history(const string &base, const string "e, fc::time_point_sec start, fc::time_point_sec stop, unsigned limit = 100)
And get_fill_order_history:
vector<order_history_object> graphene::app::history_api::get_fill_order_history(asset_id_type a, asset_id_type b, uint32_t limit) const
Is this functionality disabled in BTS?
Thanks
Reference thread: https://bitsharestalk.org/index.php/topic,24622.msg309020.html#msg309020
The text was updated successfully, but these errors were encountered: