{"swagger":"2.0","info":{"description":"Provides recent market prices for a wide range of assets including cryptocurrency, commodities, forex pairs and more\n[https://1k.money](https://1k.money)\n","version":"1.0.0","title":"1k.money","termsOfService":"https://1k.money/","license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"contact":{"url":"https://1k.money/","email":"example@1k.money"}},"schemes":["https"],"host":"1k.money","basePath":"/api/v1","tags":[{"name":"products","description":"Assets to explore"}],"paths":{"/products":{"get":{"tags":["products"],"summary":"Get a list of assets covered by the API","produces":["application/json"],"responses":{"200":{"description":"success","schema":{"type":"array","items":{"$ref":"#/definitions/Product"}}}}}},"/products/{group_key}":{"get":{"tags":["products by group"],"summary":"Filters the list of products to products belonging to a specific group (e.g. \"commodities\")","produces":["application/json"],"parameters":[{"name":"group_key","in":"path","description":"Return a list of products belonging to the specific group_key","required":true,"type":"string"}],"responses":{"200":{"description":"success","schema":{"type":"array","items":{"$ref":"#/definitions/Product"}}},"400":{"description":"Invalid group_key"}}}},"/products/{group_key}/{product_key}":{"get":{"tags":["product"],"summary":"Get details on a specifed asset including price","produces":["application/json"],"parameters":[{"name":"group_key","in":"path","description":"Return a list of products belonging to the specific group_key","required":true,"type":"string"},{"name":"product_key","in":"path","description":"The product key for which to get details","required":true,"type":"string"}],"responses":{"200":{"description":"success","schema":{"$ref":"#/definitions/Product-Details"}},"400":{"description":"Invalid group_key or product_key"}}}},"/products/{group_key}/{product_key}/price-history":{"get":{"tags":["product"],"summary":"Get price history of a product","produces":["application/json"],"parameters":[{"name":"group_key","in":"path","description":"Return a list of products belonging to the specific group_key","required":true,"type":"string"},{"name":"product_key","in":"path","description":"The product key for which to get details","required":true,"type":"string"},{"name":"rangeDays","in":"query","type":"integer","description":"Range of history to return (this many days ago until today). Between 1 and 365"}],"responses":{"200":{"description":"success","schema":{"type":"array","items":{"$ref":"#/definitions/Product-Price-History-Result"}}},"400":{"description":"Invalid group_key or product_key"}}}},"/products/search/":{"get":{"tags":["product"],"summary":"Search for a product","produces":["application/json"],"parameters":[{"in":"query","name":"query","description":"Search query","required":true,"type":"string"},{"name":"limit","in":"query","description":"Limit number of results returned","required":false,"type":"integer"}],"responses":{"200":{"description":"success","schema":{"type":"array","items":{"$ref":"#/definitions/Product-Search-Result"}}},"422":{"description":"Missing or empty query parameter"}}}}},"definitions":{"Product":{"type":"object","properties":{"group_key":{"type":"string","example":"crypto"},"product_key":{"type":"string","example":"bitcoin"},"title":{"type":"string","example":"Bitcoin"}}},"Product-Details":{"type":"object","properties":{"group_key":{"type":"string","example":"commodities"},"product_key":{"type":"string","example":"coffee"},"title":{"type":"string","example":"Coffee"},"description":{"type":"string","example":"Coffee is an important commodity"},"price":{"type":"number","example":1.12},"units":{"type":"string","example":"lb","description":"nullable"},"last_updated":{"type":"string","format":"date-time","description":"iso8601 timestamp","example":"2020-12-29T00:01:15Z"}}},"Product-Price-History-Result":{"type":"object","properties":{"date":{"type":"string","example":"2020-01-01T00:00:00Z","description":"iso8601 timestamp"},"price":{"type":"number","example":1.23}}},"Product-Search-Result":{"type":"object","properties":{"group_key":{"type":"string","example":"commodities"},"product_key":{"type":"string","example":"coffee"},"title":{"type":"string","example":"Coffee"}}}},"externalDocs":{"description":"Find out more about Swagger","url":"http://swagger.io"}}