Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update all asset-related API's to support asset symbol as parameter #1051

Closed
6 tasks
abitmore opened this issue Jun 13, 2018 · 5 comments
Closed
6 tasks

Update all asset-related API's to support asset symbol as parameter #1051

abitmore opened this issue Jun 13, 2018 · 5 comments
Assignees
Labels
2d Developing Status indicating currently designing and developing a solution 3b Feature Classification indicating the addition of novel functionality to the design 4b Normal Priority Priority indicating the moderate impact to system/user -OR- existing workaround is costly to perform 6 API Impact flag identifying the application programing interface (API)

Comments

@abitmore
Copy link
Member

abitmore commented Jun 13, 2018

User Story
As an API user I want to use asset symbols directly for all APIs. Some APIs support asset symbols, e.g. get_ticker, but others don't support, e.g. get_market_history.

Additional Context (optional)
https://bitsharestalk.org/index.php?topic=26699.0

CORE TEAM TASK LIST

  • Evaluate / Prioritize Feature Request
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation
@oxarbitrage
Copy link
Member

to be done after #989

@oxarbitrage oxarbitrage self-assigned this Jun 14, 2018
@oxarbitrage oxarbitrage added 2c Ready for Development Status indicating the Requirements are sufficent to begin designing a solution 3b Feature Classification indicating the addition of novel functionality to the design 4b Normal Priority Priority indicating the moderate impact to system/user -OR- existing workaround is costly to perform 6 API Impact flag identifying the application programing interface (API) labels Jun 14, 2018
@oxarbitrage
Copy link
Member

oxarbitrage commented Jul 13, 2018

changes will be made at the following api calls.

in database_api:

  • get_assets
  • get_limit_orders
  • get_call_orders
  • get_settle_orders
  • get_collateral_bids
  • subscribe_to_market
  • unsubscribe_from_market
  • get_required_fees

in api:

  • get_fill_order_history
  • get_market_history
  • get_asset_holders
  • get_asset_holders_count
  • get_grouped_limit_orders

cli wallet changes:

other impacts

  • get_ticker, get_24_volume, etc are fine as they use lookup_asset_symbols with the base and quote string, it can be an ID or a name. no changed needed.
  • test cases that use asset_id_type(), asset_id_type(1), etc as an argument of one of the modified calls will need to be casted to a string with the asset id on it.

@oxarbitrage
Copy link
Member

Please check ee0a8ce for support asset symbol or name in get_limit_orders

Additionally, commit also do the following(please check carefully as the same changes will be added to to at least get_call_orders and get_settle_orders:

  • current version of get_limit_orders accepting ids is moved to implementation for internal use.
  • changed database api to new version, after converting the strings to ids with get_asset_from_string it will call internal impl version.
  • limit was not checked in this call so added a check into database api call get_limit_orders with a max of 100(this will end up in 200 results by keeping the current behaviour).
  • added reserve of the results to increase performance a bit with a size of limit*2 in both calls(internal and api).

@abitmore
Copy link
Member Author

get_limit_orders with a max of 100

I think it may break bitshares-ui.

@oxarbitrage oxarbitrage added 2d Developing Status indicating currently designing and developing a solution and removed 2c Ready for Development Status indicating the Requirements are sufficent to begin designing a solution labels Aug 30, 2018
@oxarbitrage
Copy link
Member

closed by #1272

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
2d Developing Status indicating currently designing and developing a solution 3b Feature Classification indicating the addition of novel functionality to the design 4b Normal Priority Priority indicating the moderate impact to system/user -OR- existing workaround is costly to perform 6 API Impact flag identifying the application programing interface (API)
Projects
None yet
Development

No branches or pull requests

2 participants