This repository has been archived by the owner on Dec 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
openapi.yml
309 lines (305 loc) · 8.11 KB
/
openapi.yml
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
swagger: "2.0"
info:
x-logo:
url: "https://coinpaprika.com/static/files/d6d3c6e3.svg#greywizard/rock-coin-web/assets/coin/img/cp-logo-beta.svg"
backgroundColor: "#FFFFFF"
description: |
Coinpaprika API delivers free & frequently updated market data from the world of crypto: coin prices, volumes, market caps, ATHs, return rates and more.
# Clients
* [PHP](https://github.com/coinpaprika/coinpaprika-api-php-client)
* [NodeJS](https://github.com/coinpaprika/coinpaprika-api-nodejs-client)
* [GO](https://github.com/coinpaprika/coinpaprika-api-go-client)
* [Swift](https://github.com/coinpaprika/coinpaprika-api-swift-client)
* Community Contributed Clients:
* [C#](https://github.com/MSiccDev/CoinpaprikaAPI)
# General
* The base endpoint is: https://api.coinpaprika.com/v1/
* All endpoints return either a JSON object or array
* All timestamp related fields are in seconds
# Errors
* API errors are formatted as JSON:
```{"error": "<error message>"}```
* HTTP 4XX return codes are used for invalid requests - the issue is on the sender's side
* HTTP 429 return code is used when breaking a request rate limit
* HTTP 5XX return codes are used for internal errors - the issue is on coinpaprika's side
# Rate limit
* Single IP address can send less than 10 requests per second
version: "1.2.1"
title: "Coinpaprika API"
host: "api.coinpaprika.com"
basePath: "/v1"
tags:
- name: "global"
- name: "coins"
- name: "ticker"
- name: "search"
schemes:
- "https"
paths:
/global:
get:
tags:
- "global"
summary: "Get global information"
produces:
- "application/json"
responses:
200:
description: "successful operation"
schema:
type: "array"
items:
$ref: "#/definitions/Global"
429:
description: "too many requests"
/coins:
get:
tags:
- "coins"
summary: "Get all coins listed on coinpaprika"
produces:
- "application/json"
responses:
200:
description: "successful operation"
schema:
type: "array"
items:
$ref: "#/definitions/Coin"
429:
description: "too many requests"
/ticker:
get:
tags:
- "ticker"
summary: "Get ticker information for all coins"
produces:
- "application/json"
responses:
200:
description: "successful operation"
schema:
type: "array"
items:
$ref: "#/definitions/Tick"
429:
description: "too many requests"
/ticker/{coin_id}:
get:
tags:
- "ticker"
summary: "Get ticker information for specific coin"
produces:
- "application/json"
parameters:
- name: "coin_id"
in: "path"
required: true
description: "ID of coin to return e.g. btc-bitcoin, eth-ethereum"
type: "string"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Tick"
429:
description: "too many requests"
404:
description: "coin not found"
/search/:
get:
tags:
- "search"
summary: "Search for currencies/icos/people/exchanges/tags"
produces:
- "application/json"
parameters:
- name: "q"
in: "query"
required: true
description: "phrase for search eg. `btc`"
type: "string"
- name: "c"
in: "query"
required: false
description: "one or more categories (comma separated) to search. Available options: `currencies|exchanges|icos|people|tags`"
default: "currencies,exchanges,icos,people,tags"
type: "string"
- name: "limit"
in: "query"
required: false
description: "limit of results per category (max 250)"
default: 6
type: "integer"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/SearchResults"
429:
description: "too many requests"
400:
description: "invalid parameters"
definitions:
Tick:
type: "object"
description: "Tick response. Missing values are returned as empty string"
properties:
id:
type: "string"
example: "btc-bitcoin"
name:
type: "string"
example: "Bitcoin"
symbol:
type: "string"
example: "BTC"
rank:
type: "string"
example: "1"
price_usd:
type: "string"
example: "9259.01"
price_btc:
type: "string"
example: "1"
volume_24h_usd:
type: "string"
example: "8102619999"
market_cap_usd:
type: "string"
example: "157468557128"
circulating_supply:
type: "string"
example: "17007062"
total_supply:
type: "string"
example: "17007062"
max_supply:
type: "string"
example: "21000000"
percent_change_1h:
type: "string"
example: "-0.26"
percent_change_24h:
type: "string"
example: "0.22"
percent_change_7d:
type: "string"
example: "4.1"
last_updated:
type: "string"
example: "1525088839"
Coin:
type: "object"
properties:
id:
type: "string"
example: "btc-bitcoin"
name:
type: "string"
example: "Bitcoin"
symbol:
type: "string"
example: "BTC"
rank:
type: "integer"
example: 1
is_new:
type: "boolean"
example: false
description: "If currency was added within last 5 days"
is_active:
type: "boolean"
example: true
Global:
type: "object"
properties:
market_cap_usd:
type: "number"
example: 430252937008
volume_24h_usd:
type: "number"
example: 430252937008
bitcoin_dominance_percentage:
type: "number"
example: 36.67
cryptocurrencies_number:
type: "integer"
example: 1587
last_updated:
type: "integer"
example: 1525089441
SearchResults:
type: "object"
properties:
currencies:
type: "array"
items:
$ref: "#/definitions/Coin"
icos:
type: "array"
items:
type: "object"
properties:
id:
type: "string"
example: "fil-filecoin-futures"
name:
type: "string"
example: "Filecoin"
symbol:
type: "string"
example: "FIL"
is_new:
type: "boolean"
example: false
description: "If ico was added within last 5 days"
exchanges:
type: "array"
items:
type: "object"
properties:
id:
type: "string"
example: "binance"
name:
type: "string"
example: "Binance"
rank:
type: "integer"
example: 1
people:
type: "array"
items:
type: "object"
properties:
id:
type: "string"
example: "vitalik-buterin"
name:
type: "string"
example: "Vitalik Buterin"
teams_count:
type: "integer"
example: 5
description: "Number of teams where person is a member"
tags:
type: "array"
items:
type: "object"
properties:
id:
type: "string"
example: "blockchain-service"
name:
type: "string"
example: "Blockchain Service"
coin_counter:
type: "integer"
example: 160
description: "Number of currencies with this tag"
ico_counter:
type: "integer"
example: 80
description: "Number of icos with this tag"