-
Notifications
You must be signed in to change notification settings - Fork 0
/
socket.yml
175 lines (168 loc) · 4.81 KB
/
socket.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
name: coinmarketcap
description: >-
Integrates coinmarketcap for tracking capitalization of various
cryptocurrencies.
version: 0.0.3
runtime: nodejs_v8
keywords:
- ticker
- global
- currency
- crypto
endpoints:
ticker:
description: Displays current prices of crypto coins
inputs:
properties:
start:
type: integer
description: 'return results from rank [start] and above'
examples:
- 10
limit:
type: integer
description: >-
return a maximum of [limit] results (default is 100, use 0 to return
all results)
examples:
- 100
convert:
type: string
description: >-
return price, 24h volume, and market cap in terms of another
currency.
long_description: >
Valid values are "AUD", "BRL", "CAD", "CHF", "CLP", "CNY", "CZK",
"DKK", "EUR", "GBP", "HKD",
"HUF", "IDR", "ILS", "INR", "JPY", "KRW", "MXN", "MYR", "NOK",
"NZD", "PHP", "PKR", "PLN",
"RUB", "SEK", "SGD", "THB", "TRY", "TWD", "ZAR"
examples:
- EUR
outputs:
success:
description: Success
required:
- message
properties:
message:
description: Ticker success data
examples:
- |
{
"message": 'OK',
"statusCode": 200,
"data": [{}]
}
fail:
exit_code: 400
description: Failed
required:
- message
properties:
message:
description: Error message
examples:
- |
{
"code": 400,
"message": "Make sure to use GET request method."
}
ticker-by-currency:
description: Displays current prices of crypto coins based on id (a.k.a. currency)
inputs:
required:
- id
- convert
properties:
id:
type: string
description: Compulsory value to target a specific currency.
examples:
- bitcoin
convert:
type: string
description: >-
return price, 24h volume, and market cap in terms of another
currency.
long_description: >
Valid values are "AUD", "BRL", "CAD", "CHF", "CLP", "CNY", "CZK",
"DKK", "EUR", "GBP", "HKD",
"HUF", "IDR", "ILS", "INR", "JPY", "KRW", "MXN", "MYR", "NOK",
"NZD", "PHP", "PKR", "PLN",
"RUB", "SEK", "SGD", "THB", "TRY", "TWD", "ZAR"
examples:
- EUR
outputs:
success:
description: Success
required:
- message
properties:
message:
description: Ticker-by-currency success message
examples:
- |
{
"message": 'OK',
"statusCode": 200,
"data": [{}]
}
fail:
exit_code: 400
description: Failed
required:
- message
properties:
message:
description: Error message
examples:
- |
{
"message": "NOT FOUND",
"statusCode": 404,
"data": { "error": "id not found" }
}
global:
description: Returns aggregated statistics across all crypto-currencies
inputs:
properties:
convert:
type: string
description: 'return 24h volume, and market cap in terms of another currency.'
long_description: >
Valid values are "AUD", "BRL", "CAD", "CHF", "CLP", "CNY", "CZK",
"DKK", "EUR", "GBP", "HKD",
"HUF", "IDR", "ILS", "INR", "JPY", "KRW", "MXN", "MYR", "NOK",
"NZD", "PHP", "PKR", "PLN",
"RUB", "SEK", "SGD", "THB", "TRY", "TWD", "ZAR"
examples:
- EUR
outputs:
success:
description: Success
required:
- message
properties:
message:
description: Global success message
examples:
- |
{
"message": 'OK',
"statusCode": 200,
"data": {}
}
fail:
exit_code: 400
description: Failed
required:
- message
properties:
message:
description: Error message
examples:
- |
{
"argError": "You can only use the optional value(s) listed in ticker method. Check https://coinmarketcap.com/api/ for more information."
}