Closed professorhantzen closed 6 years ago
if you use an interval, the returned result is already individual exchanges reduced and aggregated into each time interval, so in my thinking if you want it reduced further, you should not include the interval, either that or not including interval
will give you an aggregation of all individual exchanges into a single aggregate.
Also, result
and type
query parameters don't do anything here, all exchanges are the result of successful transactions, and there is no further subdivision between exchanges that are the result of Payment transactions vs OfferCreate transactions.
This query:
https://data.ripple.com/v2/exchanges/USD+rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q/JPY+r94s8px6kSw1uZ1MV98dhSRTvc6VMPoPcN?descending=true&limit=30&result=tesSUCCESS&type=OfferCreate&interval=1hour&reduce=true
Fails with this error:
{ result: "error", message: "cannot use reduce with interval" }
The documents for Get Exchanges however, state:
"Results can be returned as individual exchanges or aggregated to a specific list of intervals" ... "interval String Aggregation interval: 1minute, 5minute, 15minute, 30minute, 1hour, 2hour, 4hour, 1day, 3day, 7day, or 1month. Defaults to non-aggregated results." .. "reduce Boolean Aggregate all individual results. Defaults to false."
It appears from this that the intended use is contrary to the displayed error - which is correct? Or is the query otherwise malformed?