import Vapor

extension Droplet {
    
    func setupRoutes() throws {

        let api = grouped("api", "v1")
        
        api.get("hello") { request in
            
            var json = JSON()
            try json.set("hello", "world")
            
            return json
        }
        
        let marketController = MarketController()
        
        api.get("market") { request in
            
            return try marketController.market(request)
        }
    }
}

import Vapor

extension Droplet {
    
    func setupRoutes() throws {
        get("hello") { req in
            var json = JSON()
            try json.set("hello", "world")
            return json
        }

        get("plaintext") { req in
            return "Hello, world!"
        }

        // response to requests to /info domain
        // with a description of the request
        get("info") { req in
            return req.description
        }

        get("description") { req in return req.description }
    }
}

--- 
+++ 
@@ -3,22 +3,22 @@
 extension Droplet {
     
     func setupRoutes() throws {
-        get("hello") { req in
+
+        let api = grouped("api", "v1")
+        
+        api.get("hello") { request in
+            
             var json = JSON()
             try json.set("hello", "world")
+            
             return json
         }
-
-        get("plaintext") { req in
-            return "Hello, world!"
+        
+        let marketController = MarketController()
+        
+        api.get("market") { request in
+            
+            return try marketController.market(request)
         }
-
-        // response to requests to /info domain
-        // with a description of the request
-        get("info") { req in
-            return req.description
-        }
-
-        get("description") { req in return req.description }
     }
 }
Update routes to expose /api/v1 and /api/v1/market 
linked to MarketController