forked from mess110/coinmarketcap.northpole.ro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
98 lines (98 loc) · 2.79 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
swagger: "2.0"
info:
description: "A straightforward JSON API for all the currencies and assets found\
\ on [coinmarketcap.com](https://coinmarketcap.com) crawled every 5 minutes.\n\
\nCORS enabled\n\n[Github](https://github.com/mess110/coinmarketcap.northpole.ro)\n\
\n[Twitter](https://twitter.com/mess110)\n"
version: "v8"
title: "CoinMarketCap Json Api"
license:
name: "MIT"
url: "https://opensource.org/licenses/MIT"
host: "coinmarketcap.northpole.ro"
schemes:
- "http"
paths:
/coins.json:
get:
tags:
- "API"
summary: "Return a list of supported coins"
produces:
- "application/json"
parameters: []
responses:
200:
description: "Return a list of coins"
/ticker.json:
get:
tags:
- "API"
summary: "Return coin ticker"
description: "Returns the timestamp, info about the coins, currency exchange\
\ rates and global data.\n"
produces:
- "application/json"
parameters:
- name: "symbol"
in: "query"
description: "Market or array of markets `BTC,DOGE`"
required: false
type: "string"
- name: "identifier"
in: "query"
description: "Market or array of markets `bitcoin,dogecoin`"
required: false
type: "string"
- name: "page"
in: "query"
description: "Page number"
required: false
type: "number"
default: 0
- name: "size"
in: "query"
description: "Number of items per page"
required: false
type: "number"
default: 20
responses:
200:
description: "Returns the coin ticker"
/history.json:
get:
tags:
- "API"
summary: "Return daily historical coin data"
description: "Returns daily historical coin data.\n\nHistory is written at the\
\ first `5 minutes` of each day. Server timezone is `UTC+01:00`.\n\nIf the\
\ `period` param is set to `14days` it returns hourly data from the last 14\
\ days.\n"
produces:
- "application/json"
parameters:
- name: "coin"
in: "query"
description: "Coin - bitcoin"
required: true
type: "string"
- name: "period"
in: "query"
description: "Defaults to current year. `14days` is also an option"
required: false
type: "string"
default: "2017"
- name: "format"
in: "query"
description: "Can be `array` or `hash`"
required: false
type: "string"
default: "array"
responses:
200:
description: "Returns the history"
400:
description: "Format not supported\n\nInvalid coin\n\nInvalid year\n\nNo\
\ history in year\n"
definitions: {}