How to map the date from the alphavantage api request to alphavantagecandle after getting it into the localdate field of map in alphavantagedailyroutine?

firstly we are mapping the data using alphavantagedailyroutine in that part we are getting the date as loacaldate in the map.
but what are we getting into the date field of alphavantagecandle and how to map that localdate in map to the setdate() in alphavantagecandle?

See the response you’re getting from API in Postman or your Web Browser, it is something like in nested form. For parsing and extracting out the information which we need you have to apply different filters. The filter you made is just a first filter and after first filter you have to apply second filter (Hint : see the alphavantage Daily Response file why getCandles method present there). After you apply both filters you will get a map<date, alphavantage> filter. Try to understand maps data and move forward.

Use debugger extensively to understand whats happening behind the scene

I applied the first filter but really getting confused on applying the second filter , i searched a lot but couldn’t get to a constructive approach.
Im mapping data using dailyroutine but after that do i have to extract that data using getcandles and map it to alphavantagecandle? By fetching the key from dailyroutine object for date?

You are on the right track.Just remember that the final result your method returns should be List .

Hi @Pallav_crio

You are going in the right direction. After you map the data using first filter, you need to fetch it. Observe the return type of getCandles and you’ll get an idea what it is giving you. You’ll need to then use that return and the date from the map to construct list of alphavantagecandle objects.

Just one very important hint here, make sure your final data in list of alphavantagecandle is for the specified date range.

Let me know if this helps!

The date field needs to be set using the key of the map only.

If you are getting out of bounds error, are you sure it’s due to this code only?

Hey you are doing everything right just don’t waste your time you have local date as a key in map use it and call setter for local date and set the value and then store the AlphaService object to candle list.

I don’t know where am i going wrong with this but im still unable to get rid of the error:-“indexoutofbound”
i checked with debugger and it shows no values in the candles list.
don’t know why but values are not being fetched into the candles list

i have posted my implementation is there something i am doing wrongly?
p.s:-- currently im not using symbol, hardcoding msft value to first ensure that im getting data in my final cande list. but still im unable to fetch data

Not getting any values.
used debugger but it shows a empty list.
i haveposted my implementation can u tell me where am i going wrong

i got the problem
problem is in my if condition e removing the if condition im able to get the data.
but what is wrong with my if condition? how should i correct it

got my solution for previous errors

now getting this error:-
getting assertion error for propertykeyvalues in both tiingo and alphavantage

@Pallav_crio How you got solution ?? Help to figure out that for me.

i havn’t got solution for this error in propertykeyvalues.

@Pallav_crio Are you solve above issue in
Are you able to get expected output fromAlphavantage API??

do u mean api values in alphavantagecandle?

what particular error r u talking about?

@Pallav_crio I mean filter out the response get from alphavantage api.

@Pallav_crio I got response from the api but cant filter out the response for the particular time interval. Can you help??

u just have to filter response according to the date .
just compare the dates u have extracted to the dates passedin the argument.

are u having difficulty in extracting the date value from the fetched response?

@Pallav_crio yes, i facing problem to fetch the date from response.