bitshares / bitshares/bitshares-core
get_ticker API base / quote / price denotation issue
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 660
- Avg merge
- 8h 17m
- Merged PRs (30d)
- 26
Description
**Bug Description**
@sschiessl-bcp mentioned in Telegram:
>Did anyone ever notice (or maybe I am looking wrong now) that the `get_ticker` denotes quote and base wrong?
>
>Response is e.g.
> ```
> {
> "time": "2020-02-03T12:34:39",
> "base": "OPEN.BTC",
> "quote": "BTS",
> "latest": "0.0000039215685000482011",
> "lowest_ask": "0.000003905770881883969",
> "highest_bid": "0.0000035929221157085541",
> "percent_change": "11.44",
> "base_volume": "0.95764133",
> "quote_volume": "260008.45989"
>}
>```
>According to the definition, a price (exchange rate) should be how much quote I need to put on the >table to get 1 unit of base.
> A market BTS/BTC (base/quote) has a price defined how much BTC do I need to buy BTS, at least outside BitShares, but the ticker returns the inverse.
> Fun thing is, order book call does it the other way round again
In my opinion, since the API has been (mis)behaving in that way for a long time, it might be broadly used by a lot of client applications, so it's inappropriate to just fix the (mis)behavior, instead, a better approach for us is to clearly document the (mis)behavior.
**Impacts**
Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.
- [x] API (the application programming interface)
- [ ] Build (the build process or something prior to compiled code)
- [ ] CLI (the command line wallet)
- [ ] Deployment (the deployment process after building such as Docker, Travis, etc.)
- [ ] DEX (the Decentralized EXchange, market engine, etc.)
- [ ] P2P (the peer-to-peer network for transaction/block propagation)
- [ ] Performance (system or user efficiency, etc.)
- [ ] Protocol (the blockchain logic, consensus, validation, etc.)
- [ ] Security (the security of system or user data, etc.)
- [ ] UX (the User Experience)
- [ ] Other (please add below)
## CORE TEAM TASK LIST
- [ ] Evaluate / Prioritize Bug Report
- [ ] Refine User Stories / Requirements
- [ ] Define Test Cases
- [ ] Design / Develop Solution
- [ ] Perform QA/Testing
- [ ] Update Documentation
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the get_ticker API entry point and compare its base, quote, price, and volume semantics with the order book API described in the issue. Document the existing behavior and the distinction between the two APIs, including an example, so client applications can interpret the responses correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api, blockchain
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100