Born in Lucerne, Stocker began his youth career with SC Kriens, playing there between 1996 and December 2005. As of January 2006 he transferred to the youth department of Basel. He played in their U-18 team for the second half of the 2005–06 season, under coach Patrick Rahmen and his assistant Marco Walker and with them won both the Swiss U-18 championship and the U-19/18 national cup that season.[2] He also played for their Under-21 team in the Swiss 1. Liga, which at that time the third highest tier of the Swiss football league system. A year later, in the 2006–07 season they won their division and the team became Swiss champions at U-21 level.[3] The team defended their title in the 2007–08 season, as division (group2) winners, again becoming champions at U-21 level.[4]
During Basel's 2007–08 season, head coach Christian Gross called Stocker into the first team. Stocker signed his first professional contract on his 18th birthday and just a few months later received an extension.[5] Having played in 12 test matches he made his team debut in that season's Swiss Cup semi-final, a home game in the St. Jakob-Park on 27 February 2008, as Basel won 1–0 against Thun.[6] One week later, in the away match against the same opponent, Stocker played his league debut, as Basel won 3–1 thanks to a hat-trick from Eren Derdiyok.[7] Stocker scored his first league goal on 16 March against FC Sion, but this could not hinder the 4–2 away defeat.[8] On 6 April Basel won the cup final and on 10 May, in the last league game of the season, Stocker scored the first and gave the assist to Marco Streller's second, as Basel won 2–0 over Young Boys. This secured the championship, and therefore, the national double. In the league Stocker had played eleven games and had scored three goals.[9]
In the 2008–09 season Stocker became team regular. To the beginning of the season, he was member of the Basel team that won the Uhrencup. They beat Legia Warsaw 6–1 and played a 2–2 draw with Borussia Dortmund to end the table on top slot above Dortmund and Luzern.[10] Basel joined the 2008–09 UEFA Champions League in the second qualifying round and with an aggregate score of 5–3 they eliminated IFK Göteborg. In the next round they played against Vitória de Guimarães. The first leg ended in a goalless draw, but with a 2–1 win in the second leg they eliminated Vitória, with Stocker scoring his first European goal.[11] Basel advanced to the group stage and were matched with Barcelona, Sporting CP and Shakhtar Donetsk, but ended the group in last position, winning just one point after a 1–1 draw in Camp Nou.[12] Stocker played in nine of these ten games. Basel finished just third in the league table, seven points behind new champions Zürich. Stocker played 32 of the 36 games, scoring five goals.[13]
Basel joined the 2009–10 UEFA Europa League in the second qualifying round. Basel advanced to the group stage, in which despite winning three of the six games the ended in third position and were eliminated. They finished four points behind group winners Roma and one behind Fulham, against whom they lost 3–2 in the last game of the stage. Stocker played in nine of these twelve games.[14] Stocker became a leading player within the team. In the Cup Final he scored a brace, the feams first and fifth goals as Basel won 6–0 against FC Lausanne-Sport.[15] On 16 May 2010, the day of the last match of the league season, Basel and Young Boys were level on points. The two teams played each other in Stadion Wankdorf. Stocker scored the first and gave the assist to Scott Chipperfield's second, as Basel won 2–0. This secured the championship, and therefore, the national double. Stocker played 31 league games, scoring 12 goals.[16]
In the 2010–11 season Stocker played 26 League games, marking seven goals, and he won his third championship medal with the club. But Stocker injured himself on 23 April 2011 in the game against BSC Young Boys.[17] This was his 100th Super League match. The injury was a cruciate ligament rupture and was operated two days later.[18] His recovery times was estimated at six to seven months.
In the 2011–12 season he returned into the team on 3 December 2011 during the 1–0 home victory against FC Luzern and on the same day it was announced that his contract had been extended until the end of June 2016.[19] He was substituted in during the group stage of the 2011–12 UEFA Champions League 2–1 home win against Manchester United, as Basel qualified for the Knockout phase, sending United out of the competition. During the first leg match in the Round of 16 on 22 February 2012 against Bayern Munich he was substituted in and scored the winning goal.[20] At the end of the 2011–12 Swiss Super League season Stocker won his fourth League Championship title with Basel,[21] the third in a row. this was also his third Double because Basel also won the Swiss Cup[22]
Basel's 2013–14 Super League season was very successful. Stocker won his sixth league championship title with Basel.[27] They also reached the final of the 2013–14 Swiss Cup, but were beaten 2–0 by Zürich after extra time.[28] During the 2013–14 Champions League season Basel reached the group stage and finished the group in third position. Thus they qualified for Europa League knockout phase and here they advanced as far as the quarter-finals. In their season 2013–14 Basel played a total of 68 matches (36 Swiss League fixtures, 6 Swiss Cup, 6 Champions League and 10 Europa League and 10 test matches). Stocker totaled 55 appearances, 30 League, 4 Cup, 10 Champions League and 5 Europa League as well 6 in the test games. He scored a total of 19 goals and gave 14 assists in these matches.[29]
Hertha BSC
On 18 May 2014, Hertha BSC officially announced the signing of Stocker.[30] Stocker reportedly received a four-year contract after Hertha and FC Basel agreed on a transfer fee of around €5 million.[31]
Return to Basel
On 10 January 2018, FC Basel announced that Stocker would return to the club, signing a three-and-a-half-year contract dated up until June 2021.[32]
Under trainer Marcel Koller Basel won the Swiss Cup in the 2018–19 season. In the first round Basel beat FC Montlingen 3–0, in the second round Echallens Région 7–2 and in the round of 16 Winterthur 1–0. In the quarter-finals Sion were defeated 4–2 after extra time and in the semi-finals Zürich were defeated 3–1. All these games were played away from home. The final was held on the 19 May 2019 in the Stade de Suisse Wankdorf Bern against Thun. Striker Albian Ajeti scored the first goal, Fabian Frei the second for Basel, then Dejan Sorgić netted a goal for Thun, but the end result was 2–1 for Basel.[33] Stocker played in five cup games and scored the two goals, these both being during the extra time in the match against Sion.[34]
On 17 May 2022, Basel announced that Stocker would retire from playing at the end of the 2021–22 season and will remain at the club as an assistant to the sporting director.[35] Five days later, on 22 May, Stocker was substituted in to play the final 14 Minutes of his last professional game.
During his time with the club Stocker won the Swiss championship six times and the Swiss Cup four times. Between the years 2007 and 2014 and again from 2018 to 2022 he played a total of 515 games for Basel scoring a total of 116 goals. 286 of these games were in the Swiss Super League, 33 in the Swiss Cup, 57 in the UEFA competitions (Champions League, Europa League and Conference League and 99 were friendly games. He scored 74 goal in the domestic league, 9 in the Cup and 18 in the European competitions, the other 15 were scored during the test games.[36] In terms of the number of competitive games, which is 416, he is one of the top five in the club's history, and in terms of goals scored - although not a striker - he is 12th position in the historic FCB rankings.
Stocker was included in Switzerland's squad for the 2014 FIFA World Cup, making one appearance, starting in the opening match against Ecuador before being substituted out at halftime.
^ abcFC Basel 1893 (2006). "Zwei weitere Titel für FCB-Nachwuchs" [Two more titles for FCB youngsters] (in Swiss High German). FC Basel 1893. Archived from the original on 30 December 2013. Retrieved 18 June 2006.{{cite web}}: CS1 maint: numeric names: authors list (link)
^si/son (2 December 2008). "FCB verlängert Vertrag mit Jungstar Stocker" [FCB extends contract with young star Stocker] (in Swiss High German). Berner Zeitung. Retrieved 16 November 2023.
^Verein "Basler Fussballarchiv” (27 February 2008). "FC Basel - FC Thun 1:0 (1:0)". Verein "Basler Fussballarchiv". Retrieved 16 November 2023.
^Verein "Basler Fussballarchiv” (2 March 2008). "FC Thun - FC Basel 1:3 (0:0)". Verein "Basler Fussballarchiv". Retrieved 16 November 2023.
^Verein "Basler Fussballarchiv” (16 March 2008). "FC Sion - FC Basel 4:2 (2:1)". Verein "Basler Fussballarchiv". Retrieved 16 November 2023.