Learn Courses My Dashboard

I have an error on this app

Hey, y’all. I have always wanted to make a stock market app, not for the challenge though, and recently, I found a good tutorial. But I get an error that says this:

Incorrect argument labels in call (have '_:recieveValue:', expected 'receiveCompletion:receiveValue:')

My code:

import Foundation
import SwiftUI
import Combine

final class ContentViewModel: ObservableObject {
    private var cancellables = Set<AnyCancellable>()
    init() {
        getStockData(for: "AAPL")
    func getStockData(for symbol: String) {
        let url = URL(string: "https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=IBM&interval=\(symbol)&apikey=\(APIKEY)")!
            .dataTaskPublisher(for: url)
            .tryMap{ element -> Data in
                guard let httpResponse = element.response as? HTTPURLResponse,
                      httpResponse.statusCode == 200 else {
                    throw URLError(.badServerResponse)
            return element.data
            .decode(type: StockData.self, decoder: JSONDecoder())
            .sink { completion in //Error is happening here
                switch completion {
                case .failure(let error):
                case .finished:
            } recieveValue: { stockData in
            .store(in: &cancellables)

Thank you!

i think its in your decoder check if you forgot to change something or if it doesn’t match the JSON parameters