-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpolywrap.graphql
294 lines (239 loc) · 9.49 KB
/
polywrap.graphql
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
#import { Ping } from "./types/ping.graphql"
#import { CompaniesPublicTreasury } from "./types/companies.graphql"
#import { GlobalDefi, Global } from "./types/global.graphql"
#import { DerivativeExchange, DerivativeExchangeId, Derivative } from "./types/derivatives.graphql"
#import { SearchTrending } from "./types/trending.graphql"
#import { IndexId, MarketIndex, Index } from "./types/indexes.graphql"
#import { ExchangeId, Exchange } from "./types/exchanges.graphql"
#import { ExchangeRates } from "./types/exchange_rates.graphql"
#import { Category, CategoryId, Contract, MarketChart, History, CoinMarketItem, CoinsItem } from "./types/coins.graphql"
#import { AssetPlatform } from "./types/asset_platform.graphql"
#import { Tickers } from "./types/common.graphql"
#import { Module } into Http from "wrapscan.io/polywrap/[email protected]"
""" CoinGecko API V3 """
type Module {
########################################################################
# PING #
########################################################################
""" Check API server status """
ping: Ping!
########################################################################
# SIMPLE #
########################################################################
""" Get the current price of any cryptocurrencies in any other supported currencies that you need. """
simplePrice(
ids: String
vs_currencies: String
include_market_cap: Boolean
include_24hr_vol: Boolean
include_24hr_change: Boolean
include_last_updated_at: Boolean
): Map! @annotate(type: "Map<String!, Map<String!, BigNumber>!>!")
""" Get current price of tokens (using contract addresses) for a given platform in any other currency that you need. """
simpleTokenPrice(
id: String!
contract_addresses: String
vs_currencies: String
include_market_cap: Boolean
include_24hr_vol: Boolean
include_24hr_change: Boolean
include_last_updated_at: Boolean
): Map! @annotate(type: "Map<String!, Map<String!, BigNumber>!>!")
""" Get list of supported_vs_currencies. """
simpleSupportedVsCurrencies: [String!]!
########################################################################
# COINS #
########################################################################
""" List all supported coins id, name and symbol (no pagination required) """
coinsList(
include_platform: Boolean
): [CoinListItem!]!
""" List all supported coins price, market cap, volume, and market related data """
coinsMarkets(
vs_currency: String!
ids: String
category: String
order: String
per_page: Int
page: Int
sparkline: Boolean
price_change_percentage: String
): [CoinMarketItem!]!
""" Get current data (name, price, market, ... including exchange tickers) for a coin """
coin(
id: String!
localization: String
tickers: Boolean
market_data: Boolean
community_data: Boolean
developer_data: Boolean
sparkline: Boolean
): CoinsItem!
""" Get coin tickers (paginated to 100 items) """
coinTickers(
id: String!
exchange_ids: String
include_exchange_logo: Boolean
page: Int
order: String
depth: String
): Tickers!
""" Get historical data (name, price, market, stats) at a given date for a coin """
coinHistory(
id: String!
date: String!
localization: String
): History!
""" Get historical market data include price, market cap, and 24h volume (granularity auto) """
coinMarketChart(
id: String!
vs_currency: String!
days: String!
interval: String
): MarketChart!
""" Get historical market data include price, market cap, and 24h volume within a range of timestamp (granularity auto) """
coinMarketChartRange(
id: String!
vs_currency: String!
from: String!
to: String!
): MarketChart!
""" Get coin's OHLC """
coinOhlc(
id: String!
vs_currency: String!
days: String!
): [[BigNumber!]!]!
########################################################################
# CONTRACT #
########################################################################
""" Get coin info from contract address """
coinContract(
id: String!
contract_address: String!
): Contract!
""" Get historical market data include price, market cap, and 24h volume (granularity auto) from a contract address """
coinContractMarketChart(
id: String!
contract_address: String!
vs_currency: String!
days: String!
): MarketChart!
""" Get historical market data include price, market cap, and 24h volume within a range of timestamp (granularity auto) from a contract address """
coinContractMarketChartRange(
id: String!
contract_address: String!
vs_currency: String!
from: String!
to: String!
): MarketChart!
########################################################################
# ASSET PLATFORMS #
########################################################################
""" List all asset platforms (Blockchain networks) """
assetPlatforms: [AssetPlatform!]!
########################################################################
# CATEGORIES #
########################################################################
""" List all categories """
coinsCategoriesList: [CategoryId!]!
""" List all categories with market data """
coinsCategories(
order: String
): [Category!]!
########################################################################
# EXCHANGES #
########################################################################
""" List all exchanges (Active with trading volumes) """
exchanges(
per_page: Int
page: String
): [Exchange!]!
""" List all supported markets id and name (no pagination required) """
exchangesList: [ExchangeId!]!
""" Get exchange volume in BTC and top 100 tickers only """
exchange(
id: String!
): Exchange!
""" Get exchange tickers (paginated, 100 tickers per page) """
exchangeTickers(
id: String!
coin_ids: String
include_exchange_logo: String
page: Int
depth: String
order: String
): Tickers!
""" Get volume_chart data for a given exchange """
exchangeVolumeChart(
id: String!
days: Int!
): [[BigNumber!]!]!
########################################################################
# INDEXES #
########################################################################
""" List all market indexes """
indexes(
per_page: Int
page: Int
): [Index!]!
""" get market index by market id and index id """
marketIndexes(
market_id: String!
id: String!
): MarketIndex!
""" list market indexes id and name """
indexesList: [IndexId!]!
########################################################################
# DERIVATIVES #
########################################################################
""" List all derivative tickers """
derivatives(
include_tickers: String
): [Derivative!]!
""" List all derivative exchanges """
derivativesExchanges(
order: String
per_page: Int
page: Int
): [DerivativeExchange!]!
""" show derivative exchange data """
derivativesExchange(
id: String!
include_tickers: String
): DerivativeExchange!
""" List all derivative exchanges name and identifier """
derivativesExchangesList: [DerivativeExchangeId!]!
########################################################################
# EXCHANGE RATES #
########################################################################
# FIXME: issue _type -> serde rename
""" Get BTC-to-Currency exchange rates """
exchangeRates: ExchangeRates!
########################################################################
# SEARCH #
########################################################################
""" Search for coins, categories and markets on CoinGecko """
search(
query: String!
): JSON!
########################################################################
# TRENDING #
########################################################################
""" Get trending search coins (Top-7) on CoinGecko in the last 24 hours """
searchTrending: SearchTrending!
########################################################################
# GLOBAL #
########################################################################
""" Get cryptocurrency global data """
global: Global!
""" Get cryptocurrency global decentralized finance(defi) data """
globalDecentralizedFinanceDefi: GlobalDefi!
########################################################################
# COMPANIES #
########################################################################
""" Get public companies data """
companiesPublicTreasury(
coin_id: String!
): CompaniesPublicTreasury!
}