polymarket-apis 0.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of polymarket-apis might be problematic. Click here for more details.

Files changed (40) hide show
  1. polymarket_apis/__init__.py +2 -0
  2. polymarket_apis/clients/__init__.py +0 -0
  3. polymarket_apis/clients/clob_client.py +730 -0
  4. polymarket_apis/clients/data_client.py +234 -0
  5. polymarket_apis/clients/gamma_client.py +311 -0
  6. polymarket_apis/clients/web3_client.py +261 -0
  7. polymarket_apis/clients/websockets_client.py +131 -0
  8. polymarket_apis/types/__init__.py +0 -0
  9. polymarket_apis/types/clob_types.py +494 -0
  10. polymarket_apis/types/common.py +49 -0
  11. polymarket_apis/types/data_types.py +161 -0
  12. polymarket_apis/types/gamma_types.py +313 -0
  13. polymarket_apis/types/websockets_types.py +191 -0
  14. polymarket_apis/utilities/__init__.py +0 -0
  15. polymarket_apis/utilities/config.py +36 -0
  16. polymarket_apis/utilities/constants.py +26 -0
  17. polymarket_apis/utilities/endpoints.py +37 -0
  18. polymarket_apis/utilities/exceptions.py +11 -0
  19. polymarket_apis/utilities/headers.py +54 -0
  20. polymarket_apis/utilities/order_builder/__init__.py +0 -0
  21. polymarket_apis/utilities/order_builder/builder.py +240 -0
  22. polymarket_apis/utilities/order_builder/helpers.py +61 -0
  23. polymarket_apis/utilities/signing/__init__.py +0 -0
  24. polymarket_apis/utilities/signing/eip712.py +28 -0
  25. polymarket_apis/utilities/signing/hmac.py +20 -0
  26. polymarket_apis/utilities/signing/model.py +8 -0
  27. polymarket_apis/utilities/signing/signer.py +25 -0
  28. polymarket_apis/utilities/web3/__init__.py +0 -0
  29. polymarket_apis/utilities/web3/abis/CTFExchange.json +1851 -0
  30. polymarket_apis/utilities/web3/abis/ConditionalTokens.json +705 -0
  31. polymarket_apis/utilities/web3/abis/NegRiskAdapter.json +999 -0
  32. polymarket_apis/utilities/web3/abis/NegRiskCtfExchange.json +1856 -0
  33. polymarket_apis/utilities/web3/abis/ProxyWalletFactory.json +319 -0
  34. polymarket_apis/utilities/web3/abis/UChildERC20Proxy.json +1438 -0
  35. polymarket_apis/utilities/web3/abis/__init__.py +0 -0
  36. polymarket_apis/utilities/web3/abis/custom_contract_errors.py +31 -0
  37. polymarket_apis/utilities/web3/helpers.py +8 -0
  38. polymarket_apis-0.2.2.dist-info/METADATA +18 -0
  39. polymarket_apis-0.2.2.dist-info/RECORD +40 -0
  40. polymarket_apis-0.2.2.dist-info/WHEEL +4 -0
@@ -0,0 +1,705 @@
1
+ [
2
+ {
3
+ "constant": true,
4
+ "inputs": [
5
+ {
6
+ "name": "owner",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "name": "id",
11
+ "type": "uint256"
12
+ }
13
+ ],
14
+ "name": "balanceOf",
15
+ "outputs": [
16
+ {
17
+ "name": "",
18
+ "type": "uint256"
19
+ }
20
+ ],
21
+ "payable": false,
22
+ "stateMutability": "view",
23
+ "type": "function"
24
+ },
25
+ {
26
+ "constant": false,
27
+ "inputs": [
28
+ {
29
+ "name": "collateralToken",
30
+ "type": "address"
31
+ },
32
+ {
33
+ "name": "parentCollectionId",
34
+ "type": "bytes32"
35
+ },
36
+ {
37
+ "name": "conditionId",
38
+ "type": "bytes32"
39
+ },
40
+ {
41
+ "name": "indexSets",
42
+ "type": "uint256[]"
43
+ }
44
+ ],
45
+ "name": "redeemPositions",
46
+ "outputs": [ ],
47
+ "payable": false,
48
+ "stateMutability": "nonpayable",
49
+ "type": "function"
50
+ },
51
+ {
52
+ "constant": true,
53
+ "inputs": [
54
+ {
55
+ "name": "interfaceId",
56
+ "type": "bytes4"
57
+ }
58
+ ],
59
+ "name": "supportsInterface",
60
+ "outputs": [
61
+ {
62
+ "name": "",
63
+ "type": "bool"
64
+ }
65
+ ],
66
+ "payable": false,
67
+ "stateMutability": "view",
68
+ "type": "function"
69
+ },
70
+ {
71
+ "constant": true,
72
+ "inputs": [
73
+ {
74
+ "name": "",
75
+ "type": "bytes32"
76
+ },
77
+ {
78
+ "name": "",
79
+ "type": "uint256"
80
+ }
81
+ ],
82
+ "name": "payoutNumerators",
83
+ "outputs": [
84
+ {
85
+ "name": "",
86
+ "type": "uint256"
87
+ }
88
+ ],
89
+ "payable": false,
90
+ "stateMutability": "view",
91
+ "type": "function"
92
+ },
93
+ {
94
+ "constant": false,
95
+ "inputs": [
96
+ {
97
+ "name": "from",
98
+ "type": "address"
99
+ },
100
+ {
101
+ "name": "to",
102
+ "type": "address"
103
+ },
104
+ {
105
+ "name": "ids",
106
+ "type": "uint256[]"
107
+ },
108
+ {
109
+ "name": "values",
110
+ "type": "uint256[]"
111
+ },
112
+ {
113
+ "name": "data",
114
+ "type": "bytes"
115
+ }
116
+ ],
117
+ "name": "safeBatchTransferFrom",
118
+ "outputs": [ ],
119
+ "payable": false,
120
+ "stateMutability": "nonpayable",
121
+ "type": "function"
122
+ },
123
+ {
124
+ "constant": true,
125
+ "inputs": [
126
+ {
127
+ "name": "collateralToken",
128
+ "type": "address"
129
+ },
130
+ {
131
+ "name": "collectionId",
132
+ "type": "bytes32"
133
+ }
134
+ ],
135
+ "name": "getPositionId",
136
+ "outputs": [
137
+ {
138
+ "name": "",
139
+ "type": "uint256"
140
+ }
141
+ ],
142
+ "payable": false,
143
+ "stateMutability": "pure",
144
+ "type": "function"
145
+ },
146
+ {
147
+ "constant": true,
148
+ "inputs": [
149
+ {
150
+ "name": "owners",
151
+ "type": "address[]"
152
+ },
153
+ {
154
+ "name": "ids",
155
+ "type": "uint256[]"
156
+ }
157
+ ],
158
+ "name": "balanceOfBatch",
159
+ "outputs": [
160
+ {
161
+ "name": "",
162
+ "type": "uint256[]"
163
+ }
164
+ ],
165
+ "payable": false,
166
+ "stateMutability": "view",
167
+ "type": "function"
168
+ },
169
+ {
170
+ "constant": false,
171
+ "inputs": [
172
+ {
173
+ "name": "collateralToken",
174
+ "type": "address"
175
+ },
176
+ {
177
+ "name": "parentCollectionId",
178
+ "type": "bytes32"
179
+ },
180
+ {
181
+ "name": "conditionId",
182
+ "type": "bytes32"
183
+ },
184
+ {
185
+ "name": "partition",
186
+ "type": "uint256[]"
187
+ },
188
+ {
189
+ "name": "amount",
190
+ "type": "uint256"
191
+ }
192
+ ],
193
+ "name": "splitPosition",
194
+ "outputs": [ ],
195
+ "payable": false,
196
+ "stateMutability": "nonpayable",
197
+ "type": "function"
198
+ },
199
+ {
200
+ "constant": true,
201
+ "inputs": [
202
+ {
203
+ "name": "oracle",
204
+ "type": "address"
205
+ },
206
+ {
207
+ "name": "questionId",
208
+ "type": "bytes32"
209
+ },
210
+ {
211
+ "name": "outcomeSlotCount",
212
+ "type": "uint256"
213
+ }
214
+ ],
215
+ "name": "getConditionId",
216
+ "outputs": [
217
+ {
218
+ "name": "",
219
+ "type": "bytes32"
220
+ }
221
+ ],
222
+ "payable": false,
223
+ "stateMutability": "pure",
224
+ "type": "function"
225
+ },
226
+ {
227
+ "constant": true,
228
+ "inputs": [
229
+ {
230
+ "name": "parentCollectionId",
231
+ "type": "bytes32"
232
+ },
233
+ {
234
+ "name": "conditionId",
235
+ "type": "bytes32"
236
+ },
237
+ {
238
+ "name": "indexSet",
239
+ "type": "uint256"
240
+ }
241
+ ],
242
+ "name": "getCollectionId",
243
+ "outputs": [
244
+ {
245
+ "name": "",
246
+ "type": "bytes32"
247
+ }
248
+ ],
249
+ "payable": false,
250
+ "stateMutability": "view",
251
+ "type": "function"
252
+ },
253
+ {
254
+ "constant": false,
255
+ "inputs": [
256
+ {
257
+ "name": "collateralToken",
258
+ "type": "address"
259
+ },
260
+ {
261
+ "name": "parentCollectionId",
262
+ "type": "bytes32"
263
+ },
264
+ {
265
+ "name": "conditionId",
266
+ "type": "bytes32"
267
+ },
268
+ {
269
+ "name": "partition",
270
+ "type": "uint256[]"
271
+ },
272
+ {
273
+ "name": "amount",
274
+ "type": "uint256"
275
+ }
276
+ ],
277
+ "name": "mergePositions",
278
+ "outputs": [ ],
279
+ "payable": false,
280
+ "stateMutability": "nonpayable",
281
+ "type": "function"
282
+ },
283
+ {
284
+ "constant": false,
285
+ "inputs": [
286
+ {
287
+ "name": "operator",
288
+ "type": "address"
289
+ },
290
+ {
291
+ "name": "approved",
292
+ "type": "bool"
293
+ }
294
+ ],
295
+ "name": "setApprovalForAll",
296
+ "outputs": [ ],
297
+ "payable": false,
298
+ "stateMutability": "nonpayable",
299
+ "type": "function"
300
+ },
301
+ {
302
+ "constant": false,
303
+ "inputs": [
304
+ {
305
+ "name": "questionId",
306
+ "type": "bytes32"
307
+ },
308
+ {
309
+ "name": "payouts",
310
+ "type": "uint256[]"
311
+ }
312
+ ],
313
+ "name": "reportPayouts",
314
+ "outputs": [ ],
315
+ "payable": false,
316
+ "stateMutability": "nonpayable",
317
+ "type": "function"
318
+ },
319
+ {
320
+ "constant": true,
321
+ "inputs": [
322
+ {
323
+ "name": "conditionId",
324
+ "type": "bytes32"
325
+ }
326
+ ],
327
+ "name": "getOutcomeSlotCount",
328
+ "outputs": [
329
+ {
330
+ "name": "",
331
+ "type": "uint256"
332
+ }
333
+ ],
334
+ "payable": false,
335
+ "stateMutability": "view",
336
+ "type": "function"
337
+ },
338
+ {
339
+ "constant": false,
340
+ "inputs": [
341
+ {
342
+ "name": "oracle",
343
+ "type": "address"
344
+ },
345
+ {
346
+ "name": "questionId",
347
+ "type": "bytes32"
348
+ },
349
+ {
350
+ "name": "outcomeSlotCount",
351
+ "type": "uint256"
352
+ }
353
+ ],
354
+ "name": "prepareCondition",
355
+ "outputs": [ ],
356
+ "payable": false,
357
+ "stateMutability": "nonpayable",
358
+ "type": "function"
359
+ },
360
+ {
361
+ "constant": true,
362
+ "inputs": [
363
+ {
364
+ "name": "",
365
+ "type": "bytes32"
366
+ }
367
+ ],
368
+ "name": "payoutDenominator",
369
+ "outputs": [
370
+ {
371
+ "name": "",
372
+ "type": "uint256"
373
+ }
374
+ ],
375
+ "payable": false,
376
+ "stateMutability": "view",
377
+ "type": "function"
378
+ },
379
+ {
380
+ "constant": true,
381
+ "inputs": [
382
+ {
383
+ "name": "owner",
384
+ "type": "address"
385
+ },
386
+ {
387
+ "name": "operator",
388
+ "type": "address"
389
+ }
390
+ ],
391
+ "name": "isApprovedForAll",
392
+ "outputs": [
393
+ {
394
+ "name": "",
395
+ "type": "bool"
396
+ }
397
+ ],
398
+ "payable": false,
399
+ "stateMutability": "view",
400
+ "type": "function"
401
+ },
402
+ {
403
+ "constant": false,
404
+ "inputs": [
405
+ {
406
+ "name": "from",
407
+ "type": "address"
408
+ },
409
+ {
410
+ "name": "to",
411
+ "type": "address"
412
+ },
413
+ {
414
+ "name": "id",
415
+ "type": "uint256"
416
+ },
417
+ {
418
+ "name": "value",
419
+ "type": "uint256"
420
+ },
421
+ {
422
+ "name": "data",
423
+ "type": "bytes"
424
+ }
425
+ ],
426
+ "name": "safeTransferFrom",
427
+ "outputs": [ ],
428
+ "payable": false,
429
+ "stateMutability": "nonpayable",
430
+ "type": "function"
431
+ },
432
+ {
433
+ "anonymous": false,
434
+ "inputs": [
435
+ {
436
+ "indexed": true,
437
+ "name": "conditionId",
438
+ "type": "bytes32"
439
+ },
440
+ {
441
+ "indexed": true,
442
+ "name": "oracle",
443
+ "type": "address"
444
+ },
445
+ {
446
+ "indexed": true,
447
+ "name": "questionId",
448
+ "type": "bytes32"
449
+ },
450
+ {
451
+ "indexed": false,
452
+ "name": "outcomeSlotCount",
453
+ "type": "uint256"
454
+ }
455
+ ],
456
+ "name": "ConditionPreparation",
457
+ "type": "event"
458
+ },
459
+ {
460
+ "anonymous": false,
461
+ "inputs": [
462
+ {
463
+ "indexed": true,
464
+ "name": "conditionId",
465
+ "type": "bytes32"
466
+ },
467
+ {
468
+ "indexed": true,
469
+ "name": "oracle",
470
+ "type": "address"
471
+ },
472
+ {
473
+ "indexed": true,
474
+ "name": "questionId",
475
+ "type": "bytes32"
476
+ },
477
+ {
478
+ "indexed": false,
479
+ "name": "outcomeSlotCount",
480
+ "type": "uint256"
481
+ },
482
+ {
483
+ "indexed": false,
484
+ "name": "payoutNumerators",
485
+ "type": "uint256[]"
486
+ }
487
+ ],
488
+ "name": "ConditionResolution",
489
+ "type": "event"
490
+ },
491
+ {
492
+ "anonymous": false,
493
+ "inputs": [
494
+ {
495
+ "indexed": true,
496
+ "name": "stakeholder",
497
+ "type": "address"
498
+ },
499
+ {
500
+ "indexed": false,
501
+ "name": "collateralToken",
502
+ "type": "address"
503
+ },
504
+ {
505
+ "indexed": true,
506
+ "name": "parentCollectionId",
507
+ "type": "bytes32"
508
+ },
509
+ {
510
+ "indexed": true,
511
+ "name": "conditionId",
512
+ "type": "bytes32"
513
+ },
514
+ {
515
+ "indexed": false,
516
+ "name": "partition",
517
+ "type": "uint256[]"
518
+ },
519
+ {
520
+ "indexed": false,
521
+ "name": "amount",
522
+ "type": "uint256"
523
+ }
524
+ ],
525
+ "name": "PositionSplit",
526
+ "type": "event"
527
+ },
528
+ {
529
+ "anonymous": false,
530
+ "inputs": [
531
+ {
532
+ "indexed": true,
533
+ "name": "stakeholder",
534
+ "type": "address"
535
+ },
536
+ {
537
+ "indexed": false,
538
+ "name": "collateralToken",
539
+ "type": "address"
540
+ },
541
+ {
542
+ "indexed": true,
543
+ "name": "parentCollectionId",
544
+ "type": "bytes32"
545
+ },
546
+ {
547
+ "indexed": true,
548
+ "name": "conditionId",
549
+ "type": "bytes32"
550
+ },
551
+ {
552
+ "indexed": false,
553
+ "name": "partition",
554
+ "type": "uint256[]"
555
+ },
556
+ {
557
+ "indexed": false,
558
+ "name": "amount",
559
+ "type": "uint256"
560
+ }
561
+ ],
562
+ "name": "PositionsMerge",
563
+ "type": "event"
564
+ },
565
+ {
566
+ "anonymous": false,
567
+ "inputs": [
568
+ {
569
+ "indexed": true,
570
+ "name": "redeemer",
571
+ "type": "address"
572
+ },
573
+ {
574
+ "indexed": true,
575
+ "name": "collateralToken",
576
+ "type": "address"
577
+ },
578
+ {
579
+ "indexed": true,
580
+ "name": "parentCollectionId",
581
+ "type": "bytes32"
582
+ },
583
+ {
584
+ "indexed": false,
585
+ "name": "conditionId",
586
+ "type": "bytes32"
587
+ },
588
+ {
589
+ "indexed": false,
590
+ "name": "indexSets",
591
+ "type": "uint256[]"
592
+ },
593
+ {
594
+ "indexed": false,
595
+ "name": "payout",
596
+ "type": "uint256"
597
+ }
598
+ ],
599
+ "name": "PayoutRedemption",
600
+ "type": "event"
601
+ },
602
+ {
603
+ "anonymous": false,
604
+ "inputs": [
605
+ {
606
+ "indexed": true,
607
+ "name": "operator",
608
+ "type": "address"
609
+ },
610
+ {
611
+ "indexed": true,
612
+ "name": "from",
613
+ "type": "address"
614
+ },
615
+ {
616
+ "indexed": true,
617
+ "name": "to",
618
+ "type": "address"
619
+ },
620
+ {
621
+ "indexed": false,
622
+ "name": "id",
623
+ "type": "uint256"
624
+ },
625
+ {
626
+ "indexed": false,
627
+ "name": "value",
628
+ "type": "uint256"
629
+ }
630
+ ],
631
+ "name": "TransferSingle",
632
+ "type": "event"
633
+ },
634
+ {
635
+ "anonymous": false,
636
+ "inputs": [
637
+ {
638
+ "indexed": true,
639
+ "name": "operator",
640
+ "type": "address"
641
+ },
642
+ {
643
+ "indexed": true,
644
+ "name": "from",
645
+ "type": "address"
646
+ },
647
+ {
648
+ "indexed": true,
649
+ "name": "to",
650
+ "type": "address"
651
+ },
652
+ {
653
+ "indexed": false,
654
+ "name": "ids",
655
+ "type": "uint256[]"
656
+ },
657
+ {
658
+ "indexed": false,
659
+ "name": "values",
660
+ "type": "uint256[]"
661
+ }
662
+ ],
663
+ "name": "TransferBatch",
664
+ "type": "event"
665
+ },
666
+ {
667
+ "anonymous": false,
668
+ "inputs": [
669
+ {
670
+ "indexed": true,
671
+ "name": "owner",
672
+ "type": "address"
673
+ },
674
+ {
675
+ "indexed": true,
676
+ "name": "operator",
677
+ "type": "address"
678
+ },
679
+ {
680
+ "indexed": false,
681
+ "name": "approved",
682
+ "type": "bool"
683
+ }
684
+ ],
685
+ "name": "ApprovalForAll",
686
+ "type": "event"
687
+ },
688
+ {
689
+ "anonymous": false,
690
+ "inputs": [
691
+ {
692
+ "indexed": false,
693
+ "name": "value",
694
+ "type": "string"
695
+ },
696
+ {
697
+ "indexed": true,
698
+ "name": "id",
699
+ "type": "uint256"
700
+ }
701
+ ],
702
+ "name": "URI",
703
+ "type": "event"
704
+ }
705
+ ]