getAssetByName does not default to last 360 blocks
Per default the behavior of returned prices and volume should consider only the last 360 blocks.
The normal getAsset behaves as expected, while the getAssetsByName does not:
https://europe3.testnet.signum.network/api?requestType=getAsset&asset=15642419791511030974
{
"account": "3717233121669243640",
"accountRS": "TS-LSRS-UKC8-KMHZ-55L79",
"publicKey": "556722b844e80e7389b551037553d063576ba55debf27768727eb55b1fa3392e",
"name": "TestnetAss",
"description": "buy low, sell high - easy going asset",
"decimals": 5,
"mintable": false,
"quantityQNT": "1000000000",
"quantityBurntQNT": "0",
"asset": "15642419791511030974",
"quantityCirculatingQNT": "1000000000",
"numberOfTrades": 1,
"numberOfTransfers": 1,
"numberOfAccounts": 2,
"volumeQNT": "0",
"priceHigh": "0",
"priceLow": "0",
"priceOpen": "0",
"priceClose": "0",
"requestProcessingTime": 7
}
https://europe3.testnet.signum.network/api?requestType=getAssetsByName&name=TEST
"assets": [
{
"account": "3717233121669243640",
"accountRS": "TS-LSRS-UKC8-KMHZ-55L79",
"publicKey": "556722b844e80e7389b551037553d063576ba55debf27768727eb55b1fa3392e",
"name": "TestnetAss",
"description": "buy low, sell high - easy going asset",
"decimals": 5,
"mintable": false,
"quantityQNT": "1000000000",
"quantityBurntQNT": "0",
"asset": "15642419791511030974",
"quantityCirculatingQNT": "1000000000",
"numberOfTrades": 1,
"numberOfTransfers": 1,
"numberOfAccounts": 2,
"volumeQNT": "500000000",
"priceHigh": "100000000",
"priceLow": "100000000",
"priceOpen": "100000000",
"priceClose": "100000000"
},
...
https://europe3.testnet.signum.network/api?requestType=getAssetsByName&name=TEST&heightStart=474739&heightEnd=475099
{
"nextIndex": 10,
"assets": [
{
"account": "8703144722673801264",
"accountRS": "TS-M83J-2GDW-9YVZ-9AYKK",
"name": "TRESTC",
"description": "Token issued and controlled by smart contract ID: 8703144722673801264",
"decimals": 2,
"mintable": true,
"quantityQNT": "0",
"quantityCirculatingQNT": "29500000",
"asset": "9224329060507884640",
"numberOfTrades": 0,
"numberOfTransfers": 1,
"numberOfAccounts": 1,
"volumeQNT": "0",
"priceHigh": "0",
"priceLow": "0",
"priceOpen": "0",
"priceClose": "0",
"requestProcessingTime": 67
}]}
Furthermore it returns only one token in the given case, although we have about 20 with the name TEST
This problem is probably a bit more complex...maybe we simplify the call returning only basic data without height feature and prices.... not sure.
Currently we use the price information in the landing page , so i would keep the data stack as it is
well... we cannot use the returned price information as they do not match.... either I just get a limited result of matching assets, or I get wrong prices.... my current workaround is to use no heights, just the name and refetch for each returned asset Id the correct price data using getAsset
@ohager is the volume stuff correct now ? The multiple entries seems to be fixed