generated from mintlify/starter
/
openapi.yaml
1885 lines (1881 loc) · 56.3 KB
/
openapi.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
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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
servers:
- url: https://api.mobula.io/api/1
components:
schemas:
Asset:
type: object
properties:
data:
type: object
properties:
id:
type: integer
name:
type: string
symbol:
type: string
contracts:
type: array
items:
type: string
nullable: true
blockchains:
type: array
items:
type: string
twitter:
type: string
nullable: true
website:
type: string
nullable: true
logo:
type: string
price:
type: number
market_cap:
type: integer
liquidity:
type: integer
volume:
type: integer
description:
type: string
kyc:
type: string
nullable: true
audit:
type: string
nullable: true
total_supply_contracts:
type: array
items:
type: string
nullable: true
total_supply:
type: integer
circulating_supply:
type: integer
circulating_supply_addresses:
type: array
items:
type: string
discord:
type: string
nullable: true
max_supply:
type: integer
chat:
type: string
nullable: true
CryptoData:
example:
blockchains:
- Ethereum
id: 100000871
name: Arc
symbol: ARC
properties:
blockchains:
description: The blockchains on which the cryptocurrency exists
items:
type: string
nullable: true
type: array
id:
description: The unique identifier of the cryptocurrency
type: integer
name:
description: The name of the cryptocurrency
type: string
contracts:
description: The contracts associated with the cryptocurrency
items:
type: string
nullable: true
type: array
symbol:
description: The symbol of the cryptocurrency
type: string
nullable: true
type: object
ErrorResponse:
properties:
error:
type: string
type: object
MarketDataPairResponse:
type: object
properties:
data:
type: object
properties:
pairs:
type: array
items:
type: object
properties:
address:
type: string
token0:
type: object
properties:
address:
type: string
decimals:
type: integer
symbol:
type: string
name:
type: string
logo:
type: string
price:
type: number
priceToken:
type: number
id:
type: integer
token1:
type: object
properties:
address:
type: string
decimals:
type: integer
symbol:
type: string
name:
type: string
logo:
type: string
price:
type: number
priceToken:
type: number
id:
type: integer
liquidity:
type: number
volume:
type: number
price:
type: number
protocol:
type: string
blockchain:
type: string
exchange:
type: string
nullable: true
factory:
type: string
MarketHistoryResponse:
type: object
properties:
data:
type: object
properties:
price_history:
type: array
items:
additionalProperties: true
MarketMultiHistoryResponse:
type: object
properties:
data:
type: array
items:
type: object
properties:
name:
type: string
price_history:
type: array
items:
additionalProperties: true
MarketHistoryPairResponse:
type: object
properties:
data:
type: array
items:
properties:
volume:
type: number
open:
type: number
close:
type: number
high:
type: number
low:
type: number
time:
type: integer
MarketMetrics:
type: object
properties:
market_cap:
type: number
format: float
description: The market capitalization of the cryptocurrency.
market_cap_diluted:
type: number
format: float
description: The diluted market capitalization of the cryptocurrency.
liquidity:
type: number
format: float
description: The liquidity of the cryptocurrency.
liquidity_change_24h:
type: number
format: float
description: The 24-hour change in liquidity.
price:
type: number
format: float
description: The current price of the cryptocurrency.
off_chain_volume:
type: number
format: float
description: The off-chain trading volume.
volume:
type: number
format: float
description: The trading volume of the cryptocurrency.
volume_change_24h:
type: number
format: float
description: The 24-hour change in trading volume.
volume_7d:
type: number
format: float
description: The 7-day trading volume.
is_listed:
type: boolean
description: Indicates whether the cryptocurrency is listed or not.
price_change_24h:
type: number
format: float
description: The 24-hour price change.
price_change_1h:
type: number
format: float
description: The 1-hour price change.
price_change_7d:
type: number
format: float
description: The 7-day price change.
price_change_1m:
type: number
format: float
description: The 1-month price change.
price_change_1y:
type: number
format: float
description: The 1-year price change.
ath:
type: number
description: The all-time high price.
atl:
type: number
format: float
description: The all-time low price.
additionalProperties: true
MultiDataResponse:
type: object
properties:
data:
type: object
additionalProperties:
$ref: "#/components/schemas/MarketMetrics"
MarketTradesPairResponse:
type: object
properties:
data:
type: array
items:
properties:
token_amount:
description: The amount of asset in the trade.
type: number
token_amount_usd:
description: The amount in USD of the trade.
type: number
token_price:
description: The price (usd) of the asset in the trade.
type: number
token_price_vs:
description: The price (usd) of the asset in the trade.
type: number
blockchain:
description: The blockchain used for the trade.
type: string
hash:
description: The transaction hash of the trade.
type: string
date:
description: The timestamp of the trade.
type: integer
type: object
NFTTransaction:
properties:
collection:
description: The NFT collection name.
type: string
from:
description: The sender's address.
type: string
timestamp:
description: The timestamp of the transaction.
type: integer
to:
description: The receiver's address.
type: string
tokenId:
description: The NFT token id.
type: string
type: object
AssetTransaction:
type: object
properties:
name:
type: string
symbol:
type: string
id:
type: integer
contract:
type: string
logo:
type: string
Transaction:
type: object
properties:
timestamp:
type: integer
asset:
$ref: "#/components/schemas/AssetTransaction"
type:
type: string
method_id:
type: string
nullable: true
hash:
type: string
blockchain:
type: string
amount:
type: number
amount_usd:
type: number
to:
type: string
from:
type: string
tx_cost:
type: number
QuoteResponse:
properties:
asset:
properties:
id:
description: The ID of the asset.
type: integer
name:
description: The name of the asset.
type: string
symbol:
description: The symbol of the asset.
type: string
type: object
quote:
properties:
market_cap:
description: The market cap of the asset.
type: number
price:
description: The price of the asset.
type: number
volume:
description: The volume of the asset.
type: number
type: object
type: object
SearchCryptoData:
type: object
properties:
blockchains:
type: array
items:
type: string
contracts:
type: array
items:
type: string
nullable: true # Allows null values in the contracts array
id:
type: integer
liquidity:
type: integer
format: int64
logo:
type: string
market_cap:
type: integer
format: int64
name:
type: string
price:
type: number
format: float
symbol:
type: string
twitter:
type: string
nullable: true
volume:
type: integer
format: int64
website:
type: string
nullable: true
example:
blockchains: [Ethereum]
contracts: ["0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"]
id: 100001656
liquidity: 626115369
logo: https://assets.coingecko.com/coins/images/1/large/bitcoin.png?1547033579
market_cap: 513425544929
name: Bitcoin
price: 26470.3509662373
symbol: BTC
twitter: https://twitter.com/bitcoin
volume: 42592947
website: http://www.bitcoin.org
TradeHistoryItem:
properties:
blockchain:
type: string
date:
format: date-time
type: string
hash:
type: string
token_amount:
type: number
token_price:
type: number
type:
type: string
value_usd:
type: number
type: object
TradeHistoryResponse:
type: object
properties:
data:
type: array
items:
type: object
properties:
date:
type: integer
hash:
type: string
value_usd:
type: number
token_amount:
type: number
token_price:
type: number
type:
type: string
blockchain:
type: string
WalletHistoryResponse:
type: object
properties:
data:
type: object
properties:
wallet:
type: array
items:
type: string
balance_usd:
type: number
balance_history:
type: array
items:
type: object
WalletMomentResponse:
properties:
balance_usd:
description: The balance in USD.
type: number
detailed_balance:
additionalProperties:
properties:
balance:
type: number
balance_usd:
type: number
type: object
type: object
wallet:
description: The wallet address.
type: string
type: object
WalletNFTsResponse:
properties:
transactions:
items:
$ref: "#/components/schemas/NFTTransaction"
type: array
type: object
WalletPortfolioResponse:
type: object
properties:
data:
type: object
properties:
total_wallet_balance:
type: number
wallet:
type: string
assets:
type: array
items:
type: object
properties:
asset:
type: object
properties:
name:
type: string
symbol:
type: string
id:
type: integer
contracts:
type: array
items:
type: string
logo:
type: string
price:
type: number
estimated_balance:
type: number
token_balance:
type: number
cross_chain_balances:
type: object
additionalProperties:
type: object
properties:
address:
type: string
balance:
type: number
balanceRaw:
type: string
chainId:
type: integer
lastUpdated:
type: object
additionalProperties:
type: object
properties:
normal:
type: integer
internal:
type: integer
token:
type: integer
last_updated:
type: integer
Pair:
type: object
properties:
token0:
type: object
properties:
address:
type: string
name:
type: string
price:
type: number
priceToken:
type: number
token1:
type: object
properties:
address:
type: string
name:
type: string
price:
type: number
priceToken:
type: number
MultiPair:
properties:
address:
type: string
token0:
type: object
properties:
address:
type: string
decimals:
type: integer
symbol:
type: string
name:
type: string
logo:
type: string
price:
type: number
priceToken:
type: number
nullable: true
id:
type: integer
token1:
type: object
properties:
address:
type: string
decimals:
type: integer
symbol:
type: string
name:
type: string
logo:
type: string
price:
type: number
priceToken:
type: number
nullable: true
id:
type: integer
liquidity:
type: number
volume:
type: number
price:
type: number
protocol:
type: string
blockchain:
type: string
exchange:
type: string
nullable: true
factory:
type: string
nullable: true
info:
description: A tool that allows the user to fetch real-time data for all crypto metrics.
title: Mobula
version: v1
openapi: 3.0.1
paths:
/search:
get:
operationId: SearchCryptoByName
parameters:
- in: query
name: input
description: Name, symbol, contract address of the asset / pair / wallet
schema:
type: string
example: bitcoin
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
$ref: "#/components/schemas/SearchCryptoData"
/wallet/nfts:
get:
operationId: fetchWalletNFTs
summary: Get Portfolio
parameters:
- in: query
name: wallet
schema:
type: string
example: "0x554efD74C693999bABf7CC0f5646D465A31b32CB"
description: Wallet address or ENS or Mobula username
- in: query
name: force
schema:
type: boolean
description: Will force a new on-chain data fetch
example: true
- in: query
name: blockchains
schema:
type: string
example: 56,Ethereum
description: Blockchains to fetch NFTs from (by default, all) - comma separated, chain ID or chain name
responses:
"200":
description: A list of NFTs in the queried wallet
content:
application/json:
schema:
type: object
properties:
data:
type: array
items:
type: object
properties:
token_address:
type: string
token_id:
type: string
amount:
type: string
token_hash:
type: string
contract_type:
type: string
name:
type: string
symbol:
type: string
nullable: true
token_uri:
type: string
metadata:
type: string
nullable: true
/all:
get:
operationId: fetchAllCryptoDetails
parameters:
- description: Extra fields needed
in: query
name: fields
schema:
description: "Comma-separated list of fields. Available fields include contracts, blockchains, twitter, website, logo, price, market_cap, liquidity, volume"
example: blockchains,contracts
type: string
responses:
"200":
content:
application/json:
schema:
properties:
data:
items:
$ref: "#/components/schemas/CryptoData"
type: array
type: object
description: OK
summary: Get all crypto data with extra fields as needed
/market/data:
get:
operationId: fetchAssetMarketData
parameters:
- description: "The asset you want to target - asset name only works for assets listed on Mobula."
in: query
name: asset
schema:
example: Bitcoin
type: string
- description:
"Blockchain of the asset - only mandatory if asset is sent as
smart-contract."
in: query
name: blockchain
schema:
type: string
- description: Symbol of the asset - only mandatory if no asset name/contract is provided
in: query
name: symbol
schema:
type: string
example: BTC
responses:
"200":
content:
application/json:
schema:
properties:
data:
$ref: "#/components/schemas/MarketMetrics"
type: object
description: OK
summary: Get the market metrics for any asset
/market/pair:
get:
operationId: fetchPairMarketData
parameters:
- description: Blockchain of the pair (only mandatory for Balancer V2 pairs).
in: query
name: blockchain
schema:
type: string
example: Mantle
- description: The address of the smart-contract of the pair (or pool, or vault).
in: query
name: address
required: true
schema:
example: "0x6488f911c6cd86c289aa319c5a826dcf8f1ca065"
type: string
- description: The name/address of the asset you want in return
in: query
name: asset
required: false
schema:
example: Tether
- description: If market stats should be included
in: query
name: stats
required: false
schema:
example: true
type: boolean
responses:
"200":
content:
application/json:
schema:
properties:
data:
$ref: "#/components/schemas/Pair"
description: OK
summary: Get the market metrics for any DEX pair
/market/history/pair:
get:
operationId: fetchPairMarketHistory
parameters:
- description: Address of the pair to retrieve market history for.
in: query
name: address
required: true
schema:
type: string
- description: Maximum number of results to return.
in: query
name: amount
required: false
schema:
example: 20
type: integer
- description: The Asset you want to target - asset name only works for assets listed on Mobula.
in: query
name: asset
required: false
schema:
type: string
- description: The blockchain of the asset (only mandatory if asset is sent as smart-contract).
in: query
name: blockchain
required: false
schema:
type: string
- description: The resolution of the market history
in: query
name: period
required: false
schema:
type: string
enum:
- 1min
- 5min
- 15min
- 1h
- 2h
- 4h
- 1d
- 1w
example: 1min
- description: JS Timestamp (milliseconds) of the beginning of the timeframe (if not provided, genesis)
in: query
name: from
schema:
type: integer
- description: JS Timestamp (milliseconds) of the end of the timeframe (if not provided, end)
in: query
name: to
schema:
type: integer
- description: Whether to return in USD or native token
in: query
name: usd
required: false
schema:
type: boolean
default: false
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/MarketHistoryPairResponse"
description: OK
summary: Get the market metrics of a DEX pair over a given timeframe
/market/pairs:
get:
operationId: fetchPairsMarketData
parameters:
- description: "The asset you want to target - asset name only works for assets listed on Mobula."
in: query
name: asset
required: true
schema:
example: Bitcoin
type: string
- description: "Blockchain of the asset - only mandatory if asset is sent as smart-contract."
in: query
name: blockchain
schema:
type: string
- description: The offset of the results
in: query
name: offset
schema:
type: integer
example: 0
responses:
"200":
content:
application/json:
schema:
properties:
data:
type: object
properties:
pairs:
type: array
items:
$ref: "#/components/schemas/MultiPair"
type: object
description: OK
summary: Fetch all DEX pairs from a specific asset
/market/history:
get:
operationId: fetchAssetMarketHistory
parameters:
- description:
Blockchain of the asset - only mandatory if asset is sent as
smart-contract.
in: query
name: blockchain
schema:
type: string
- description:
The asset you want to target - asset name only works for assets
listed on Mobula.
in: query
name: asset
required: true
schema:
type: string
- description:
JS Timestamp (milliseconds) of the beginning of the timeframe (if
not provided, genesis)
in: query
name: from
schema: