forked from pendle-finance/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-spec.json
More file actions
10599 lines (10599 loc) · 290 KB
/
api-spec.json
File metadata and controls
10599 lines (10599 loc) · 290 KB
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
{
"openapi": "3.0.0",
"paths": {
"/v2/limit-orders": {
"get": {
"description": "This endpoint is for analytics purpose, if you want to analyze the limit orders data, this endpoint return all the orders that have been made, including the ones that have been cancelled or fully filled. \n\nThe results could be very large, so each time we returns at most 1000 orders, you can use the resumeToken to fetch the next page. \n\nTo get limit order for filling, use the [Get limit orders to match by YT address](#tag/limit-orders/get/v1/limit-orders/takers/limit-orders) endpoint!",
"operationId": "LimitOrdersController_getAllLimitOrders",
"parameters": [
{
"name": "chainId",
"required": false,
"in": "query",
"description": "Chain id to filter by, leave blank to fetch all chains.",
"schema": {
"type": "number"
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Maximum number of results to return. The parameter is capped at 1000.",
"schema": {
"default": 100,
"type": "number"
}
},
{
"name": "maker",
"required": false,
"in": "query",
"description": "Maker address to filter orders by",
"schema": {
"type": "string"
}
},
{
"name": "yt",
"required": false,
"in": "query",
"description": "Market address to filter orders by",
"schema": {
"type": "string"
}
},
{
"name": "timestamp_start",
"required": false,
"in": "query",
"schema": {
"format": "date-time",
"type": "string"
}
},
{
"name": "timestamp_end",
"required": false,
"in": "query",
"schema": {
"format": "date-time",
"type": "string"
}
},
{
"name": "resumeToken",
"required": false,
"in": "query",
"description": "Resume token for pagination",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Returns limit orders with resume token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LimitOrdersV2Response"
}
}
}
}
},
"summary": "Get all limit orders for analytics",
"tags": [
"Limit Orders"
],
"x-computing-unit": "3",
"x-retail-api-rank": 6969
}
},
"/v2/limit-orders/archived": {
"get": {
"description": "This have the same interface and usecase as the endpoint above, but it returns the archived orders\n\nWhen an order is not fillable anymore, we **might** archive it to save storage space, to fetch it, use this endpoint.\n\nSo to fetch full limit orders in history, using this and the endpoint above. Not all orders are archived, it depends on some conditions.",
"operationId": "LimitOrdersController_getAllArchivedLimitOrders",
"parameters": [
{
"name": "chainId",
"required": false,
"in": "query",
"description": "Chain id to filter by, leave blank to fetch all chains.",
"schema": {
"type": "number"
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Maximum number of results to return. The parameter is capped at 1000.",
"schema": {
"default": 100,
"type": "number"
}
},
{
"name": "maker",
"required": false,
"in": "query",
"description": "Maker address to filter orders by",
"schema": {
"type": "string"
}
},
{
"name": "yt",
"required": false,
"in": "query",
"description": "Market address to filter orders by",
"schema": {
"type": "string"
}
},
{
"name": "timestamp_start",
"required": false,
"in": "query",
"schema": {
"format": "date-time",
"type": "string"
}
},
{
"name": "timestamp_end",
"required": false,
"in": "query",
"schema": {
"format": "date-time",
"type": "string"
}
},
{
"name": "resumeToken",
"required": false,
"in": "query",
"description": "Resume token for pagination",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Returns archived limit orders with resume token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LimitOrdersV2Response"
}
}
}
}
},
"summary": "Get all archived limit orders for analytics",
"tags": [
"Limit Orders"
],
"x-computing-unit": "3",
"x-retail-api-rank": 6969
}
},
"/v1/limit-orders/makers/limit-orders": {
"get": {
"description": "This endpoint let you fetch limit orders of a user in a market, it have more filter options than the analytics endpoint but have less item per page than the analytics endpoint.\n\nThis limitation is more than enough for most use cases, given that a user can only have 50 orders per markets.",
"operationId": "LimitOrdersController_getMakerLimitOrder",
"parameters": [
{
"name": "skip",
"required": false,
"in": "query",
"description": "Number of results to skip. The parameter is capped at 1000.",
"schema": {
"default": 0,
"type": "number"
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Maximum number of results to return. The parameter is capped at 100.",
"schema": {
"default": 10,
"type": "number"
}
},
{
"name": "chainId",
"required": true,
"in": "query",
"description": "ChainId",
"schema": {
"type": "number"
}
},
{
"name": "maker",
"required": true,
"in": "query",
"description": "Maker's address",
"schema": {
"type": "string"
}
},
{
"name": "yt",
"required": false,
"in": "query",
"description": "Order's YT address",
"schema": {
"type": "string"
}
},
{
"name": "type",
"required": false,
"in": "query",
"description": "LimitOrderType { 0 : TOKEN_FOR_PT, 1 : PT_FOR_TOKEN, 2 : TOKEN_FOR_YT, 3 : YT_FOR_TOKEN }",
"schema": {
"enum": [
0,
1,
2,
3
],
"type": "number"
}
},
{
"name": "isActive",
"required": false,
"in": "query",
"description": "isActive=true to get all maker's active orders, isActive=false otherwise and do not set isActive if you want to fetch all maker's orders",
"schema": {
"type": "boolean"
}
}
],
"responses": {
"201": {
"description": "Returns limit orders",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LimitOrdersResponse"
}
}
}
}
},
"summary": "Get user limit orders in market",
"tags": [
"Limit Orders"
],
"x-computing-unit": "3",
"x-retail-api-rank": 6969
},
"post": {
"operationId": "LimitOrdersController_createOrder",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateLimitOrderDto"
}
}
}
},
"responses": {
"201": {
"description": "Returns created limit order",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LimitOrderResponse"
}
}
}
},
"400": {
"description": "Validation failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HttpErrorResponse"
}
}
}
},
"422": {
"description": "Validation failed - unsupported token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HttpErrorResponse"
}
}
}
}
},
"summary": "Create limit order",
"tags": [
"Limit Orders"
],
"x-computing-unit": "3",
"x-retail-api-rank": 1
}
},
"/v1/limit-orders/makers/generate-limit-order-data": {
"post": {
"description": "Generate the limit order payload for signing with your private key/wallet",
"operationId": "LimitOrdersController_generateLimitOrderData",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateLimitOrderDataDto"
}
}
}
},
"responses": {
"201": {
"description": "Return generated limit order data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateLimitOrderDataResponse"
}
}
}
},
"400": {
"description": "Validation failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HttpErrorResponse"
}
}
}
}
},
"summary": "Generate limit order data for signing",
"tags": [
"Limit Orders"
],
"x-computing-unit": "3",
"x-retail-api-rank": 2
}
},
"/v1/limit-orders/makers/generate-scaled-order-data": {
"post": {
"description": "Generate multiple limit order (scaled) payloads for signing with your private key/wallet",
"operationId": "LimitOrdersController_generateScaledLimitOrderData",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateScaledOrderDataDto"
}
}
}
},
"responses": {
"201": {
"description": "Return generated limit order data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateScaledOrderResponse"
}
}
}
}
},
"summary": "Generate list of limit orders (scaled) for signing",
"tags": [
"Limit Orders"
],
"x-computing-unit": "3",
"x-retail-api-rank": 6969
}
},
"/v1/limit-orders/takers/limit-orders": {
"get": {
"description": "This endpoint returns best matching limit orders for a given YT address.",
"operationId": "LimitOrdersController_getTakerLimitOrders",
"parameters": [
{
"name": "skip",
"required": false,
"in": "query",
"description": "Number of results to skip. The parameter is capped at 1000.",
"schema": {
"default": 0,
"type": "number"
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Maximum number of results to return. The parameter is capped at 100.",
"schema": {
"default": 10,
"type": "number"
}
},
{
"name": "chainId",
"required": true,
"in": "query",
"description": "ChainId",
"schema": {
"type": "number"
}
},
{
"name": "yt",
"required": true,
"in": "query",
"description": "Order's YT address",
"schema": {
"type": "string"
}
},
{
"name": "type",
"required": true,
"in": "query",
"description": "LimitOrderType { 0 : TOKEN_FOR_PT, 1 : PT_FOR_TOKEN, 2 : TOKEN_FOR_YT, 3 : YT_FOR_TOKEN }",
"schema": {
"enum": [
0,
1,
2,
3
],
"type": "number"
}
},
{
"name": "sortBy",
"required": false,
"in": "query",
"schema": {
"enum": [
"Implied Rate"
],
"type": "string"
}
},
{
"name": "sortOrder",
"required": false,
"in": "query",
"schema": {
"enum": [
"asc",
"desc"
],
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Limit orders data for takers",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LimitOrdersTakerResponse"
}
}
}
},
"400": {
"description": "Validation failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HttpErrorResponse"
}
}
}
}
},
"summary": "Get limit orders to match by YT address",
"tags": [
"Limit Orders"
],
"x-computing-unit": "5",
"x-retail-api-rank": 3
}
},
"/v1/prices/assets": {
"get": {
"description": "USD prices for assets, this endpoint support all tokens that are available in Pendle App, including non-Pendle tokens (like USDC, USDT, etc.). \n\nPrice are updated every minute. \n\nTo get real-time price of YT and PT, use the [swapping-price](#tag/sdk/get/v1/sdk/{chainId}/markets/{market}/swapping-prices) endpoint.",
"operationId": "PricesCrossChainController_getAllAssetPricesByAddressesCrossChains",
"parameters": [
{
"name": "ids",
"required": false,
"in": "query",
"description": "Token ids to data for (comma-separated), leave blank to fetch all tokens. Up to 20 ids allowed.",
"schema": {
"example": "1-0x5fe30ac5cb1abb0e44cdffb2916c254aeb368650,1-0xc5cd692e9b4622ab8cdb57c83a0f99f874a169cd",
"type": "string"
}
},
{
"name": "chainId",
"required": false,
"in": "query",
"description": "Chain id to filter by, leave blank to fetch all chains.",
"schema": {
"example": 1,
"type": "number"
}
},
{
"name": "skip",
"required": false,
"in": "query",
"description": "Number of results to skip.",
"schema": {
"default": 0,
"type": "number"
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Maximum number of results to return. Leave blank to fetch all results.",
"schema": {
"type": "number"
}
},
{
"name": "type",
"required": false,
"in": "query",
"description": "Asset types to filter by (comma-separated). Valid values: `PENDLE_LP`, `SY`, `PT`, `YT`. Leave blank to fetch all assets types.",
"schema": {
"$ref": "#/components/schemas/PendleAssetType"
}
}
],
"responses": {
"200": {
"description": "Assets chainId-address mapped to their current USD prices across all chains.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetAssetPricesCrossChainResponse"
}
}
}
}
},
"summary": "Get asset prices by IDs",
"tags": [
"Assets"
],
"x-computing-unit": "1",
"x-retail-api-rank": 6969
}
},
"/v4/{chainId}/prices/{address}/ohlcv": {
"get": {
"description": "Historical price data for PT / YT tokens / LP tokens. We do not support historical price for **SY and non-Pendle tokens**.\n\nThe data is OHLCV data, returns in CSV format with open, high, low, close prices and volume. \n\nPlease note that in case of LP, volume data will be 0. To get the correct volume, please use our `notional-volume-by-market` bellow. \n\nReturns at most 1440 data points. Computing unit cost is max(3, result length / 100)",
"operationId": "PricesController_ohlcv_v4",
"parameters": [
{
"name": "chainId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
},
{
"name": "address",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
},
{
"name": "time_frame",
"required": false,
"in": "query",
"description": "Time interval for OHLCV data aggregation. Valid values: `hour`, `day`, `week`.",
"schema": {
"default": "hour",
"enum": [
"hour",
"day",
"week"
],
"type": "string"
}
},
{
"name": "timestamp_start",
"required": false,
"in": "query",
"description": "ISO Date string of the start time you want to query",
"schema": {
"format": "date-time",
"type": "string"
}
},
{
"name": "timestamp_end",
"required": false,
"in": "query",
"description": "ISO Date string of the end time you want to query",
"schema": {
"format": "date-time",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OHLCV data in CSV format with time, open, high, low, close, volume.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PriceOHLCVCSVResponse"
},
"example": {
"total": 1,
"currency": "USD",
"timeFrame": "hour",
"timestamp_start": 1756245600,
"timestamp_end": 1756245600,
"results": "time,open,high,low,close,volume\n1756245600,42.4563,42.4563,42.4563,42.4563,0.0000"
}
}
}
}
},
"summary": "Get PT / YT / LP historical price by address",
"tags": [
"Assets"
],
"x-computing-unit": "3 - 15",
"x-retail-api-rank": 6969
}
},
"/v1/{chainId}/prices/{address}/notional-volume-by-market": {
"get": {
"description": "Notional trading volume data for a specific market.\n\nReturns at most 1440 data points. Computing unit cost is max(3, result length / 100)",
"operationId": "PricesController_notionalVolumeByMarket",
"parameters": [
{
"name": "chainId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
},
{
"name": "address",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
},
{
"name": "time_frame",
"required": false,
"in": "query",
"description": "Time interval for OHLCV data aggregation. Valid values: `hour`, `day`, `week`.",
"schema": {
"default": "hour",
"enum": [
"hour",
"day",
"week"
],
"type": "string"
}
},
{
"name": "timestamp_start",
"required": false,
"in": "query",
"description": "ISO Date string of the start time you want to query",
"schema": {
"format": "date-time",
"type": "string"
}
},
{
"name": "timestamp_end",
"required": false,
"in": "query",
"description": "ISO Date string of the end time you want to query",
"schema": {
"format": "date-time",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotionalVolumeResponse"
}
}
}
}
},
"summary": "Get market volume by address",
"tags": [
"Markets"
],
"x-computing-unit": "3 - 15",
"x-retail-api-rank": 4
}
},
"/v1/assets/all": {
"get": {
"description": "Returns list of PT, YT, LP, SY assets supported in Pendle App, including: name, symbol, address, decimals, expiry (if applicable), icon.\n\nCan filter by chain id, asset id, asset type.\n\nPrice are not included in the response.",
"operationId": "AssetsCrossChainController_getPendleAssetsMetadata",
"parameters": [
{
"name": "ids",
"required": false,
"in": "query",
"description": "Token ids to data for (comma-separated), leave blank to fetch all tokens. Up to 20 ids allowed.",
"schema": {
"example": "1-0x5fe30ac5cb1abb0e44cdffb2916c254aeb368650,1-0xc5cd692e9b4622ab8cdb57c83a0f99f874a169cd",
"type": "string"
}
},
{
"name": "chainId",
"required": false,
"in": "query",
"description": "Chain id to filter by, leave blank to fetch all chains.",
"schema": {
"example": 1,
"type": "number"
}
},
{
"name": "skip",
"required": false,
"in": "query",
"description": "Number of results to skip.",
"schema": {
"default": 0,
"type": "number"
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "Maximum number of results to return. Leave blank to fetch all results.",
"schema": {
"type": "number"
}
},
{
"name": "type",
"required": false,
"in": "query",
"description": "Asset types to filter by (comma-separated). Valid values: `PENDLE_LP`, `SY`, `PT`, `YT`. Leave blank to fetch all assets types.",
"schema": {
"$ref": "#/components/schemas/PendleAssetType"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetAllAssetsCrossChainResponse"
}
}
}
}
},
"summary": "Get supported PT, YT, LP, SY assets",
"tags": [
"Assets"
],
"x-computing-unit": "1",
"x-retail-api-rank": 1
}
},
"/v1/markets/all": {
"get": {
"description": "Get whitelisted markets list with its metadata across all chains.\n\nThe data returns contains: market name, expiry, yt/pt/sy addresses, liquidity, trading volume, underlying apy, swap fee APY, pendle APY, fee rate, yield range, total pt, total sy in market, total supply of LP token, lp wrapper address (if applicable), etc. \n\nYou can use chainId, isActive or ids params to filter markets.",
"operationId": "MarketsCrossChainController_getAllMarkets",
"parameters": [
{
"name": "isActive",
"required": false,
"in": "query",
"description": "Filter to active or inactive markets",
"schema": {
"type": "boolean"
}
},
{
"name": "chainId",
"required": false,
"in": "query",
"description": "Filter to markets on a specific blockchain network",
"schema": {
"type": "number"
}
},
{
"name": "ids",
"required": false,
"in": "query",
"description": "Market ids to fetch metadata for (comma-separated), leave blank to fetch all markets. Up to 20 ids allowed.",
"schema": {
"example": "1-0x7b246b8dbc2a640bf2d8221890cee8327fc23917,1-0x44474d98d1484c26e8d296a43a721998731cf775",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetMarketsCrossChainResponse"
}
}
}
}
},
"summary": "Get whitelisted markets list",
"tags": [
"Markets"
],
"x-computing-unit": "1",
"x-retail-api-rank": 1
}
},
"/v1/markets/points-market": {
"get": {
"description": "Get all markets that have points. This endpoint returns the points configs and market id, to fetch market metadata, use the endpoint above.",
"operationId": "MarketsCrossChainController_getPointsMarkets",
"parameters": [
{
"name": "isActive",
"required": false,
"in": "query",
"description": "Filter to active or inactive markets",
"schema": {
"type": "boolean"
}
},
{
"name": "chainId",
"required": false,
"in": "query",
"description": "Filter to markets on a specific blockchain network",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetPointsMarketsResponse"
}
}
}
}
},
"summary": "Get points market",
"tags": [
"Markets"
],
"x-computing-unit": "1",
"x-retail-api-rank": 2
}
},
"/v2/{chainId}/markets/{address}/data": {
"get": {
"description": "Returns the latest/historical market data for a given market address.\n\nIf timestamp is given, it will return the historical market data at the given timestamp. Otherwise, it will return the latest market data. \n\nThis endpoint have have: market liquidity, trading volume, underlying APY, implied apy, apy breakdown, voter apys, ...",
"operationId": "MarketsController_marketData_v2",
"parameters": [
{
"name": "chainId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
},
{
"name": "address",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
},
{
"name": "timestamp",
"required": false,
"in": "query",
"schema": {
"format": "date-time",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Returns market latest detailed data",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MarketDataResponse"
}
}
}
}
},
"summary": "Get latest/historical market data by address",
"tags": [
"Markets"
],
"x-retail-api-rank": 6969
}
},
"/v2/{chainId}/markets/{address}/historical-data": {
"get": {
"description": "Returns the time-series data for a given market. Useful to draw charts or do data analysis. \n\nThis endpoint supports field selection via the `fields` query parameter. Available fields include: timestamp, maxApy, baseApy, underlyingApy, impliedApy, tvl, totalTvl, underlyingInterestApy, underlyingRewardApy, ytFloatingApy, swapFeeApy, voterApr, pendleApy, lpRewardApy, totalPt, totalSy, totalSupply, ptPrice, ytPrice, syPrice, lpPrice, lastEpochVotes, tradingVolume.",
"operationId": "MarketsController_marketHistoricalData_v2",
"parameters": [
{
"name": "chainId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
},
{
"name": "address",
"required": true,
"in": "path",
"schema": {