The numbers are wrong..
How so?
The output says:
"settlement_price": {
"base": {
"asset_id": "1.3.626",
"amount": 85427
},
"quote": {
"asset_id": "1.3.0",
"amount": 55
}
},
which is:
55/85427 BTS/USD = 0.000644 * 10 (precision) BTS/USD
That has been the price yesterday.
For the core_exchange rate (if you look at the code), I added a 5% premium.
Don't see how that is 'wrong'
The result says 85427/10^4 USD == 55/10^5 CORE. (it can be checked with
https://graphene.bitshares.org/ after pushed a price feed.)
The correct result should be like 0.00644 USD == 1 CORE, or 0.0644 USD = 10 CORE. Bring in the precision, it should be 644/10^4 USD == 1000000/10^5 CORE, so the json should be
"settlement_price": {
"base": {
"asset_id": "1.3.626",
"amount": 644
},
"quote": {
"asset_id": "1.3.0",
"amount": 1000000
}
},
By the way, I think
1, it's more human-readable if one of the amount is 10^n
2, a little more precision could be better