polymarket-apis 0.2.5__tar.gz → 0.3.8__tar.gz
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.
- polymarket_apis-0.3.8/.idea/MypyPlugin.xml +8 -0
- polymarket_apis-0.3.8/.idea/dictionaries/project.xml +7 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/.idea/misc.xml +2 -2
- polymarket_apis-0.3.8/.idea/polymarket-apis.iml +10 -0
- polymarket_apis-0.3.8/.idea/ruff.xml +7 -0
- polymarket_apis-0.3.8/.idea/ryecharm.xml +6 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/.idea/vcs.xml +1 -1
- polymarket_apis-0.3.8/.idea/workspace.xml +124 -0
- polymarket_apis-0.3.8/.pre-commit-hooks.yaml +17 -0
- polymarket_apis-0.3.8/PKG-INFO +201 -0
- polymarket_apis-0.3.8/README.md +183 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/pyproject.toml +22 -5
- polymarket_apis-0.3.8/src/polymarket_apis/__init__.py +42 -0
- polymarket_apis-0.3.8/src/polymarket_apis/clients/__init__.py +23 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/clients/clob_client.py +237 -126
- polymarket_apis-0.3.8/src/polymarket_apis/clients/data_client.py +387 -0
- polymarket_apis-0.3.8/src/polymarket_apis/clients/gamma_client.py +822 -0
- polymarket_apis-0.3.8/src/polymarket_apis/clients/graphql_client.py +60 -0
- polymarket_apis-0.3.8/src/polymarket_apis/clients/web3_client.py +901 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/clients/websockets_client.py +25 -9
- polymarket_apis-0.3.8/src/polymarket_apis/types/__init__.py +167 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/types/clob_types.py +37 -16
- polymarket_apis-0.3.8/src/polymarket_apis/types/common.py +40 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/types/data_types.py +50 -5
- polymarket_apis-0.3.8/src/polymarket_apis/types/gamma_types.py +626 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/types/websockets_types.py +95 -44
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/config.py +1 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/constants.py +5 -4
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/exceptions.py +9 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/order_builder/builder.py +38 -20
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/order_builder/helpers.py +13 -12
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/signing/hmac.py +5 -1
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/signing/signer.py +2 -2
- polymarket_apis-0.3.8/src/polymarket_apis/utilities/web3/abis/Safe.json +1138 -0
- polymarket_apis-0.3.8/src/polymarket_apis/utilities/web3/abis/SafeProxyFactory.json +224 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/web3/abis/custom_contract_errors.py +1 -1
- polymarket_apis-0.3.8/src/polymarket_apis/utilities/web3/helpers.py +243 -0
- polymarket_apis-0.3.8/uv.lock +3187 -0
- polymarket_apis-0.2.5/.idea/.gitignore +0 -8
- polymarket_apis-0.2.5/.idea/modules.xml +0 -8
- polymarket_apis-0.2.5/.idea/polymarket-apis.iml +0 -14
- polymarket_apis-0.2.5/.idea/ryecharm.xml +0 -7
- polymarket_apis-0.2.5/.idea/workspace.xml +0 -90
- polymarket_apis-0.2.5/PKG-INFO +0 -18
- polymarket_apis-0.2.5/README.md +0 -3
- polymarket_apis-0.2.5/search_yes_arbs.ipynb +0 -271
- polymarket_apis-0.2.5/src/polymarket_apis/__init__.py +0 -2
- polymarket_apis-0.2.5/src/polymarket_apis/clients/data_client.py +0 -234
- polymarket_apis-0.2.5/src/polymarket_apis/clients/gamma_client.py +0 -331
- polymarket_apis-0.2.5/src/polymarket_apis/clients/graphql_client.py +0 -182
- polymarket_apis-0.2.5/src/polymarket_apis/clients/web3_client.py +0 -261
- polymarket_apis-0.2.5/src/polymarket_apis/types/common.py +0 -51
- polymarket_apis-0.2.5/src/polymarket_apis/types/gamma_types.py +0 -354
- polymarket_apis-0.2.5/src/polymarket_apis/utilities/web3/__init__.py +0 -0
- polymarket_apis-0.2.5/src/polymarket_apis/utilities/web3/abis/__init__.py +0 -0
- polymarket_apis-0.2.5/src/polymarket_apis/utilities/web3/helpers.py +0 -8
- polymarket_apis-0.2.5/test.ipynb +0 -102
- polymarket_apis-0.2.5/uv.lock +0 -2590
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/.github/workflows/ruff.yml +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/.gitignore +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/.idea/copilot.data.migration.agent.xml +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/.idea/copilot.data.migration.ask.xml +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/.idea/copilot.data.migration.ask2agent.xml +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/.idea/copilot.data.migration.edit.xml +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/.idea/ryecharm-overrides.xml +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/requirements-dev.lock +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/requirements.lock +0 -0
- {polymarket_apis-0.2.5/src/polymarket_apis/clients → polymarket_apis-0.3.8/src/polymarket_apis/utilities}/__init__.py +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/endpoints.py +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/headers.py +0 -0
- {polymarket_apis-0.2.5/src/polymarket_apis/types → polymarket_apis-0.3.8/src/polymarket_apis/utilities/order_builder}/__init__.py +0 -0
- {polymarket_apis-0.2.5/src/polymarket_apis/utilities → polymarket_apis-0.3.8/src/polymarket_apis/utilities/signing}/__init__.py +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/signing/eip712.py +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/signing/model.py +0 -0
- {polymarket_apis-0.2.5/src/polymarket_apis/utilities/order_builder → polymarket_apis-0.3.8/src/polymarket_apis/utilities/web3}/__init__.py +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/web3/abis/CTFExchange.json +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/web3/abis/ConditionalTokens.json +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/web3/abis/NegRiskAdapter.json +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/web3/abis/NegRiskCtfExchange.json +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/web3/abis/ProxyWalletFactory.json +0 -0
- {polymarket_apis-0.2.5 → polymarket_apis-0.3.8}/src/polymarket_apis/utilities/web3/abis/UChildERC20Proxy.json +0 -0
- {polymarket_apis-0.2.5/src/polymarket_apis/utilities/signing → polymarket_apis-0.3.8/src/polymarket_apis/utilities/web3/abis}/__init__.py +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="MypySettings">
|
|
4
|
+
<option name="arguments" value="--follow-imports silent --exclude \.pyi$" />
|
|
5
|
+
<option name="mypyExecutable" value="$PROJECT_DIR$/.venv/bin/mypy" />
|
|
6
|
+
<option name="projectDirectory" value="$PROJECT_DIR$" />
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<project version="4">
|
|
3
3
|
<component name="Black">
|
|
4
|
-
<option name="sdkName" value="Python 3.12 virtualenv at ~/
|
|
4
|
+
<option name="sdkName" value="Python 3.12 virtualenv at ~/poly/polymarket-apis/.venv" />
|
|
5
5
|
</component>
|
|
6
|
-
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 virtualenv at ~/
|
|
6
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 virtualenv at ~/pr/polymarket-apis/.venv" project-jdk-type="Python SDK" />
|
|
7
7
|
<component name="PyCharmDSProjectLayout">
|
|
8
8
|
<option name="id" value="JupyterRightHiddenStructureLayout" />
|
|
9
9
|
</component>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module version="4">
|
|
3
|
+
<component name="PyDocumentationSettings">
|
|
4
|
+
<option name="format" value="PLAIN" />
|
|
5
|
+
<option name="myDocStringFormat" value="Plain" />
|
|
6
|
+
</component>
|
|
7
|
+
<component name="TestRunnerService">
|
|
8
|
+
<option name="PROJECT_TEST_RUNNER" value="py.test" />
|
|
9
|
+
</component>
|
|
10
|
+
</module>
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="AutoImportSettings">
|
|
4
|
+
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
|
+
</component>
|
|
6
|
+
<component name="ChangeListManager">
|
|
7
|
+
<list default="true" id="9cbf4d21-9d0c-43a0-80fe-b72fdf89ce0d" name="Changes" comment="web3: added set_all_approvals for all wallet types; enforced stricter typing overall.">
|
|
8
|
+
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
|
|
9
|
+
<change beforePath="$PROJECT_DIR$/pyproject.toml" beforeDir="false" afterPath="$PROJECT_DIR$/pyproject.toml" afterDir="false" />
|
|
10
|
+
<change beforePath="$PROJECT_DIR$/src/polymarket_apis/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/polymarket_apis/__init__.py" afterDir="false" />
|
|
11
|
+
<change beforePath="$PROJECT_DIR$/src/polymarket_apis/clients/web3_client.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/polymarket_apis/clients/web3_client.py" afterDir="false" />
|
|
12
|
+
<change beforePath="$PROJECT_DIR$/src/polymarket_apis/utilities/exceptions.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/polymarket_apis/utilities/exceptions.py" afterDir="false" />
|
|
13
|
+
<change beforePath="$PROJECT_DIR$/src/polymarket_apis/utilities/web3/helpers.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/polymarket_apis/utilities/web3/helpers.py" afterDir="false" />
|
|
14
|
+
</list>
|
|
15
|
+
<option name="SHOW_DIALOG" value="false" />
|
|
16
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
17
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
18
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
19
|
+
</component>
|
|
20
|
+
<component name="FileTemplateManagerImpl">
|
|
21
|
+
<option name="RECENT_TEMPLATES">
|
|
22
|
+
<list>
|
|
23
|
+
<option value="Jupyter Notebook" />
|
|
24
|
+
</list>
|
|
25
|
+
</option>
|
|
26
|
+
</component>
|
|
27
|
+
<component name="Git.Settings">
|
|
28
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
29
|
+
</component>
|
|
30
|
+
<component name="GitHubPullRequestSearchHistory">{
|
|
31
|
+
"lastFilter": {
|
|
32
|
+
"state": "OPEN",
|
|
33
|
+
"assignee": "qualiaenjoyer"
|
|
34
|
+
}
|
|
35
|
+
}</component>
|
|
36
|
+
<component name="GithubPullRequestsUISettings">{
|
|
37
|
+
"selectedUrlAndAccountId": {
|
|
38
|
+
"url": "https://github.com/qualiaenjoyer/polymarket-apis",
|
|
39
|
+
"accountId": "23ce466d-36d9-4058-83a4-50b6bb4e2918"
|
|
40
|
+
}
|
|
41
|
+
}</component>
|
|
42
|
+
<component name="HighlightingSettingsPerFile">
|
|
43
|
+
<setting file="file://$PROJECT_DIR$/src/polymarket_apis/clients/clob_client.py" root0="SKIP_INSPECTION" />
|
|
44
|
+
</component>
|
|
45
|
+
<component name="ProblemsViewState">
|
|
46
|
+
<option name="selectedTabId" value="CurrentFile" />
|
|
47
|
+
</component>
|
|
48
|
+
<component name="ProjectColorInfo">{
|
|
49
|
+
"customColor": "",
|
|
50
|
+
"associatedIndex": 5
|
|
51
|
+
}</component>
|
|
52
|
+
<component name="ProjectId" id="34HNc0USmRKn5QdD9z5lxgd2ljx" />
|
|
53
|
+
<component name="ProjectViewState">
|
|
54
|
+
<option name="hideEmptyMiddlePackages" value="true" />
|
|
55
|
+
<option name="showLibraryContents" value="true" />
|
|
56
|
+
</component>
|
|
57
|
+
<component name="PropertiesComponent">{
|
|
58
|
+
"keyToString": {
|
|
59
|
+
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
|
60
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
61
|
+
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
|
|
62
|
+
"RunOnceActivity.git.unshallow": "true",
|
|
63
|
+
"git-widget-placeholder": "main",
|
|
64
|
+
"insyncwithfoo.ryecharm.ruff.caching.ruleNameToCodeMap": "{\"result\":{\"airflow-variable-name-task-id-mismatch\":\"AIR001\",\"airflow-dag-no-schedule-argument\":\"AIR301\",\"airflow3-removal\":\"AIR302\",\"commented-out-code\":\"ERA001\",\"fast-api-redundant-response-model\":\"FAST001\",\"fast-api-non-annotated-dependency\":\"FAST002\",\"fast-api-unused-path-parameter\":\"FAST003\",\"sys-version-slice3\":\"YTT101\",\"sys-version2\":\"YTT102\",\"sys-version-cmp-str3\":\"YTT103\",\"sys-version-info0-eq3\":\"YTT201\",\"six-py3\":\"YTT202\",\"sys-version-info1-cmp-int\":\"YTT203\",\"sys-version-info-minor-cmp-int\":\"YTT204\",\"sys-version0\":\"YTT301\",\"sys-version-cmp-str10\":\"YTT302\",\"sys-version-slice1\":\"YTT303\",\"missing-type-function-argument\":\"ANN001\",\"missing-type-args\":\"ANN002\",\"missing-type-kwargs\":\"ANN003\",\"missing-type-self\":\"ANN101\",\"missing-type-cls\":\"ANN102\",\"missing-return-type-undocumented-public-function\":\"ANN201\",\"missing-return-type-private-function\":\"ANN202\",\"missing-return-type-special-method\":\"ANN204\",\"missing-return-type-static-method\":\"ANN205\",\"missing-return-type-class-method\":\"ANN206\",\"any-type\":\"ANN401\",\"cancel-scope-no-checkpoint\":\"ASYNC100\",\"trio-sync-call\":\"ASYNC105\",\"async-function-with-timeout\":\"ASYNC109\",\"async-busy-wait\":\"ASYNC110\",\"async-zero-sleep\":\"ASYNC115\",\"long-sleep-not-forever\":\"ASYNC116\",\"blocking-http-call-in-async-function\":\"ASYNC210\",\"create-subprocess-in-async-function\":\"ASYNC220\",\"run-process-in-async-function\":\"ASYNC221\",\"wait-for-process-in-async-function\":\"ASYNC222\",\"blocking-open-call-in-async-function\":\"ASYNC230\",\"blocking-sleep-in-async-function\":\"ASYNC251\",\"assert\":\"S101\",\"exec-builtin\":\"S102\",\"bad-file-permissions\":\"S103\",\"hardcoded-bind-all-interfaces\":\"S104\",\"hardcoded-password-string\":\"S105\",\"hardcoded-password-func-arg\":\"S106\",\"hardcoded-password-default\":\"S107\",\"hardcoded-temp-file\":\"S108\",\"try-except-pass\":\"S110\",\"try-except-continue\":\"S112\",\"request-without-timeout\":\"S113\",\"flask-debug-true\":\"S201\",\"tarfile-unsafe-members\":\"S202\",\"suspicious-pickle-usage\":\"S301\",\"suspicious-marshal-usage\":\"S302\",\"suspicious-insecure-hash-usage\":\"S303\",\"suspicious-insecure-cipher-usage\":\"S304\",\"suspicious-insecure-cipher-mode-usage\":\"S305\",\"suspicious-mktemp-usage\":\"S306\",\"suspicious-eval-usage\":\"S307\",\"suspicious-mark-safe-usage\":\"S308\",\"suspicious-url-open-usage\":\"S310\",\"suspicious-non-cryptographic-random-usage\":\"S311\",\"suspicious-telnet-usage\":\"S312\",\"suspicious-xmlc-element-tree-usage\":\"S313\",\"suspicious-xml-element-tree-usage\":\"S314\",\"suspicious-xml-expat-reader-usage\":\"S315\",\"suspicious-xml-expat-builder-usage\":\"S316\",\"suspicious-xml-sax-usage\":\"S317\",\"suspicious-xml-mini-dom-usage\":\"S318\",\"suspicious-xml-pull-dom-usage\":\"S319\",\"suspicious-xmle-tree-usage\":\"S320\",\"suspicious-ftp-lib-usage\":\"S321\",\"suspicious-unverified-context-usage\":\"S323\",\"hashlib-insecure-hash-function\":\"S324\",\"suspicious-telnetlib-import\":\"S401\",\"suspicious-ftplib-import\":\"S402\",\"suspicious-pickle-import\":\"S403\",\"suspicious-subprocess-import\":\"S404\",\"suspicious-xml-etree-import\":\"S405\",\"suspicious-xml-sax-import\":\"S406\",\"suspicious-xml-expat-import\":\"S407\",\"suspicious-xml-minidom-import\":\"S408\",\"suspicious-xml-pulldom-import\":\"S409\",\"suspicious-lxml-import\":\"S410\",\"suspicious-xmlrpc-import\":\"S411\",\"suspicious-httpoxy-import\":\"S412\",\"suspicious-pycrypto-import\":\"S413\",\"suspicious-pyghmi-import\":\"S415\",\"request-with-no-cert-validation\":\"S501\",\"ssl-insecure-version\":\"S502\",\"ssl-with-bad-defaults\":\"S503\",\"ssl-with-no-version\":\"S504\",\"weak-cryptographic-key\":\"S505\",\"unsafe-yaml-load\":\"S506\",\"ssh-no-host-key-verification\":\"S507\",\"snmp-insecure-version\":\"S508\",\"snmp-weak-cryptography\":\"S509\",\"paramiko-call\":\"S601\",\"subprocess-popen-with-shell-equals-true\":\"S602\",\"subprocess-without-shell-equals-true\":\"S603\",\"call-with-shell-equals-true\":\"S604\",\"start-process-with-a-shell\":\"S605\",\"start-process-with-no-shell\":\"S606\",\"start-process-with-partial-path\":\"S607\",\"hardcoded-sql-expression\":\"S608\",\"unix-command-wildcard-injection\":\"S609\",\"django-extra\":\"S610\",\"django-raw-sql\":\"S611\",\"logging-config-insecure-listen\":\"S612\",\"jinja2-autoescape-false\":\"S701\",\"mako-templates\":\"S702\",\"blind-except\":\"BLE001\",\"boolean-type-hint-positional-argument\":\"FBT001\",\"boolean-default-value-positional-argument\":\"FBT002\",\"boolean-positional-value-in-call\":\"FBT003\",\"unary-prefix-increment-decrement\":\"B002\",\"assignment-to-os-environ\":\"B003\",\"unreliable-callable-check\":\"B004\",\"strip-with-multi-characters\":\"B005\",\"mutable-argument-default\":\"B006\",\"unused-loop-control-variable\":\"B007\",\"function-call-in-default-argument\":\"B008\",\"get-attr-with-constant\":\"B009\",\"set-attr-with-constant\":\"B010\",\"assert-false\":\"B011\",\"jump-statement-in-finally\":\"B012\",\"redundant-tuple-in-exception-handler\":\"B013\",\"duplicate-handler-exception\":\"B014\",\"useless-comparison\":\"B015\",\"raise-literal\":\"B016\",\"assert-raises-exception\":\"B017\",\"useless-expression\":\"B018\",\"cached-instance-method\":\"B019\",\"loop-variable-overrides-iterator\":\"B020\",\"f-string-docstring\":\"B021\",\"useless-contextlib-suppress\":\"B022\",\"function-uses-loop-variable\":\"B023\",\"abstract-base-class-without-abstract-method\":\"B024\",\"duplicate-try-block-exception\":\"B025\",\"star-arg-unpacking-after-keyword-arg\":\"B026\",\"empty-method-without-abstract-decorator\":\"B027\",\"no-explicit-stacklevel\":\"B028\",\"except-with-empty-tuple\":\"B029\",\"except-with-non-exception-classes\":\"B030\",\"reuse-of-groupby-generator\":\"B031\",\"unintentional-type-annotation\":\"B032\",\"duplicate-value\":\"B033\",\"re-sub-positional-args\":\"B034\",\"static-key-dict-comprehension\":\"B035\",\"mutable-contextvar-default\":\"B039\",\"return-in-generator\":\"B901\",\"raise-without-from-inside-except\":\"B904\",\"zip-without-explicit-strict\":\"B905\",\"loop-iterator-mutation\":\"B909\",\"builtin-variable-shadowing\":\"A001\",\"builtin-argument-shadowing\":\"A002\",\"builtin-attribute-shadowing\":\"A003\",\"builtin-import-shadowing\":\"A004\",\"builtin-module-shadowing\":\"A005\",\"builtin-lambda-argument-shadowing\":\"A006\",\"missing-trailing-comma\":\"COM812\",\"trailing-comma-on-bare-tuple\":\"COM818\",\"prohibited-trailing-comma\":\"COM819\",\"unnecessary-generator-list\":\"C400\",\"unnecessary-generator-set\":\"C401\",\"unnecessary-generator-dict\":\"C402\",\"unnecessary-list-comprehension-set\":\"C403\",\"unnecessary-list-comprehension-dict\":\"C404\",\"unnecessary-literal-set\":\"C405\",\"unnecessary-literal-dict\":\"C406\",\"unnecessary-collection-call\":\"C408\",\"unnecessary-literal-within-tuple-call\":\"C409\",\"unnecessary-literal-within-list-call\":\"C410\",\"unnecessary-list-call\":\"C411\",\"unnecessary-call-around-sorted\":\"C413\",\"unnecessary-double-cast-or-process\":\"C414\",\"unnecessary-subscript-reversal\":\"C415\",\"unnecessary-comprehension\":\"C416\",\"unnecessary-map\":\"C417\",\"unnecessary-literal-within-dict-call\":\"C418\",\"unnecessary-comprehension-in-call\":\"C419\",\"unnecessary-dict-comprehension-for-iterable\":\"C420\",\"missing-copyright-notice\":\"CPY001\",\"call-datetime-without-tzinfo\":\"DTZ001\",\"call-datetime-today\":\"DTZ002\",\"call-datetime-utcnow\":\"DTZ003\",\"call-datetime-utcfromtimestamp\":\"DTZ004\",\"call-datetime-now-without-tzinfo\":\"DTZ005\",\"call-datetime-fromtimestamp\":\"DTZ006\",\"call-datetime-strptime-without-zone\":\"DTZ007\",\"call-date-today\":\"DTZ011\",\"call-date-fromtimestamp\":\"DTZ012\",\"datetime-min-max\":\"DTZ901\",\"debugger\":\"T100\",\"django-nullable-model-string-field\":\"DJ001\",\"django-locals-in-render-function\":\"DJ003\",\"django-exclude-with-model-form\":\"DJ006\",\"django-all-with-model-form\":\"DJ007\",\"django-model-without-dunder-str\":\"DJ008\",\"django-unordered-body-content-in-model\":\"DJ012\",\"django-non-leading-receiver-decorator\":\"DJ013\",\"raw-string-in-exception\":\"EM101\",\"f-string-in-exception\":\"EM102\",\"dot-format-in-exception\":\"EM103\",\"shebang-not-executable\":\"EXE001\",\"shebang-missing-executable-file\":\"EXE002\",\"shebang-missing-python\":\"EXE003\",\"shebang-leading-whitespace\":\"EXE004\",\"shebang-not-first-line\":\"EXE005\",\"line-contains-fixme\":\"FIX001\",\"line-contains-todo\":\"FIX002\",\"line-contains-xxx\":\"FIX003\",\"line-contains-hack\":\"FIX004\",\"future-rewritable-type-annotation\":\"FA100\",\"future-required-type-annotation\":\"FA102\",\"f-string-in-get-text-func-call\":\"INT001\",\"format-in-get-text-func-call\":\"INT002\",\"printf-in-get-text-func-call\":\"INT003\",\"single-line-implicit-string-concatenation\":\"ISC001\",\"multi-line-implicit-string-concatenation\":\"ISC002\",\"explicit-string-concatenation\":\"ISC003\",\"unconventional-import-alias\":\"ICN001\",\"banned-import-alias\":\"ICN002\",\"banned-import-from\":\"ICN003\",\"direct-logger-instantiation\":\"LOG001\",\"invalid-get-logger-argument\":\"LOG002\",\"exception-without-exc-info\":\"LOG007\",\"undocumented-warn\":\"LOG009\",\"root-logger-call\":\"LOG015\",\"logging-string-format\":\"G001\",\"logging-percent-format\":\"G002\",\"logging-string-concat\":\"G003\",\"logging-f-string\":\"G004\",\"logging-warn\":\"G010\",\"logging-extra-attr-clash\":\"G101\",\"logging-exc-info\":\"G201\",\"logging-redundant-exc-info\":\"G202\",\"implicit-namespace-package\":\"INP001\",\"unnecessary-placeholder\":\"PIE790\",\"duplicate-class-field-definition\":\"PIE794\",\"non-unique-enums\":\"PIE796\",\"unnecessary-spread\":\"PIE800\",\"unnecessary-dict-kwargs\":\"PIE804\",\"reimplemented-container-builtin\":\"PIE807\",\"unnecessary-range-start\":\"PIE808\",\"multiple-starts-ends-with\":\"PIE810\",\"print\":\"T201\",\"p-print\":\"T203\",\"unprefixed-type-param\":\"PYI001\",\"complex-if-statement-in-stub\":\"PYI002\",\"unrecognized-version-info-check\":\"PYI003\",\"patch-version-comparison\":\"PYI004\",\"wrong-tuple-length-version-comparison\":\"PYI005\",\"bad-version-info-comparison\":\"PYI006\",\"unrecognized-platform-check\":\"PYI007\",\"unrecognized-platform-name\":\"PYI008\",\"pass-statement-stub-body\":\"PYI009\",\"non-empty-stub-body\":\"PYI010\",\"typed-argument-default-in-stub\":\"PYI011\",\"pass-in-class-body\":\"PYI012\",\"ellipsis-in-non-empty-class-body\":\"PYI013\",\"argument-default-in-stub\":\"PYI014\",\"assignment-default-in-stub\":\"PYI015\",\"duplicate-union-member\":\"PYI016\",\"complex-assignment-in-stub\":\"PYI017\",\"unused-private-type-var\":\"PYI018\",\"custom-type-var-return-type\":\"PYI019\",\"quoted-annotation-in-stub\":\"PYI020\",\"docstring-in-stub\":\"PYI021\",\"collections-named-tuple\":\"PYI024\",\"unaliased-collections-abc-set-import\":\"PYI025\",\"type-alias-without-annotation\":\"PYI026\",\"str-or-repr-defined-in-stub\":\"PYI029\",\"unnecessary-literal-union\":\"PYI030\",\"any-eq-ne-annotation\":\"PYI032\",\"type-comment-in-stub\":\"PYI033\",\"non-self-return-type\":\"PYI034\",\"unassigned-special-variable-in-stub\":\"PYI035\",\"bad-exit-annotation\":\"PYI036\",\"redundant-numeric-union\":\"PYI041\",\"snake-case-type-alias\":\"PYI042\",\"t-suffixed-type-alias\":\"PYI043\",\"future-annotations-in-stub\":\"PYI044\",\"iter-method-return-iterable\":\"PYI045\",\"unused-private-protocol\":\"PYI046\",\"unused-private-type-alias\":\"PYI047\",\"stub-body-multiple-statements\":\"PYI048\",\"unused-private-typed-dict\":\"PYI049\",\"no-return-argument-annotation-in-stub\":\"PYI050\",\"redundant-literal-union\":\"PYI051\",\"unannotated-assignment-in-stub\":\"PYI052\",\"string-or-bytes-too-long\":\"PYI053\",\"numeric-literal-too-long\":\"PYI054\",\"unnecessary-type-union\":\"PYI055\",\"unsupported-method-call-on-all\":\"PYI056\",\"byte-string-usage\":\"PYI057\",\"generator-return-from-iter-method\":\"PYI058\",\"generic-not-last-base-class\":\"PYI059\",\"redundant-none-literal\":\"PYI061\",\"duplicate-literal-member\":\"PYI062\",\"pep484-style-positional-only-parameter\":\"PYI063\",\"redundant-final-literal\":\"PYI064\",\"bad-version-info-order\":\"PYI066\",\"pytest-fixture-incorrect-parentheses-style\":\"PT001\",\"pytest-fixture-positional-args\":\"PT002\",\"pytest-extraneous-scope-function\":\"PT003\",\"pytest-missing-fixture-name-underscore\":\"PT004\",\"pytest-incorrect-fixture-name-underscore\":\"PT005\",\"pytest-parametrize-names-wrong-type\":\"PT006\",\"pytest-parametrize-values-wrong-type\":\"PT007\",\"pytest-patch-with-lambda\":\"PT008\",\"pytest-unittest-assertion\":\"PT009\",\"pytest-raises-without-exception\":\"PT010\",\"pytest-raises-too-broad\":\"PT011\",\"pytest-raises-with-multiple-statements\":\"PT012\",\"pytest-incorrect-pytest-import\":\"PT013\",\"pytest-duplicate-parametrize-test-cases\":\"PT014\",\"pytest-assert-always-false\":\"PT015\",\"pytest-fail-without-message\":\"PT016\",\"pytest-assert-in-except\":\"PT017\",\"pytest-composite-assertion\":\"PT018\",\"pytest-fixture-param-without-value\":\"PT019\",\"pytest-deprecated-yield-fixture\":\"PT020\",\"pytest-fixture-finalizer-callback\":\"PT021\",\"pytest-useless-yield-fixture\":\"PT022\",\"pytest-incorrect-mark-parentheses-style\":\"PT023\",\"pytest-unnecessary-asyncio-mark-on-fixture\":\"PT024\",\"pytest-erroneous-use-fixtures-on-fixture\":\"PT025\",\"pytest-use-fixtures-without-parameters\":\"PT026\",\"pytest-unittest-raises-assertion\":\"PT027\",\"bad-quotes-inline-string\":\"Q000\",\"bad-quotes-multiline-string\":\"Q001\",\"bad-quotes-docstring\":\"Q002\",\"avoidable-escaped-quote\":\"Q003\",\"unnecessary-escaped-quote\":\"Q004\",\"unnecessary-paren-on-raise-exception\":\"RSE102\",\"unnecessary-return-none\":\"RET501\",\"implicit-return-value\":\"RET502\",\"implicit-return\":\"RET503\",\"unnecessary-assign\":\"RET504\",\"superfluous-else-return\":\"RET505\",\"superfluous-else-raise\":\"RET506\",\"superfluous-else-continue\":\"RET507\",\"superfluous-else-break\":\"RET508\",\"private-member-access\":\"SLF001\",\"duplicate-isinstance-call\":\"SIM101\",\"collapsible-if\":\"SIM102\",\"needless-bool\":\"SIM103\",\"suppressible-exception\":\"SIM105\",\"return-in-try-except-finally\":\"SIM107\",\"if-else-block-instead-of-if-exp\":\"SIM108\",\"compare-with-tuple\":\"SIM109\",\"reimplemented-builtin\":\"SIM110\",\"uncapitalized-environment-variables\":\"SIM112\",\"enumerate-for-loop\":\"SIM113\",\"if-with-same-arms\":\"SIM114\",\"open-file-with-context-handler\":\"SIM115\",\"if-else-block-instead-of-dict-lookup\":\"SIM116\",\"multiple-with-statements\":\"SIM117\",\"in-dict-keys\":\"SIM118\",\"negate-equal-op\":\"SIM201\",\"negate-not-equal-op\":\"SIM202\",\"double-negation\":\"SIM208\",\"if-expr-with-true-false\":\"SIM210\",\"if-expr-with-false-true\":\"SIM211\",\"if-expr-with-twisted-arms\":\"SIM212\",\"expr-and-not-expr\":\"SIM220\",\"expr-or-not-expr\":\"SIM221\",\"expr-or-true\":\"SIM222\",\"expr-and-false\":\"SIM223\",\"yoda-conditions\":\"SIM300\",\"if-else-block-instead-of-dict-get\":\"SIM401\",\"split-static-string\":\"SIM905\",\"dict-get-with-none-default\":\"SIM910\",\"zip-dict-keys-and-values\":\"SIM911\",\"no-slots-in-str-subclass\":\"SLOT000\",\"no-slots-in-tuple-subclass\":\"SLOT001\",\"no-slots-in-namedtuple-subclass\":\"SLOT002\",\"banned-api\":\"TID251\",\"relative-imports\":\"TID252\",\"banned-module-level-imports\":\"TID253\",\"invalid-todo-tag\":\"TD001\",\"missing-todo-author\":\"TD002\",\"missing-todo-link\":\"TD003\",\"missing-todo-colon\":\"TD004\",\"missing-todo-description\":\"TD005\",\"invalid-todo-capitalization\":\"TD006\",\"missing-space-after-todo-colon\":\"TD007\",\"typing-only-first-party-import\":\"TC001\",\"typing-only-third-party-import\":\"TC002\",\"typing-only-standard-library-import\":\"TC003\",\"runtime-import-in-type-checking-block\":\"TC004\",\"empty-type-checking-block\":\"TC005\",\"runtime-cast-value\":\"TC006\",\"unquoted-type-alias\":\"TC007\",\"quoted-type-alias\":\"TC008\",\"runtime-string-union\":\"TC010\",\"unused-function-argument\":\"ARG001\",\"unused-method-argument\":\"ARG002\",\"unused-class-method-argument\":\"ARG003\",\"unused-static-method-argument\":\"ARG004\",\"unused-lambda-argument\":\"ARG005\",\"os-path-abspath\":\"PTH100\",\"os-chmod\":\"PTH101\",\"os-mkdir\":\"PTH102\",\"os-makedirs\":\"PTH103\",\"os-rename\":\"PTH104\",\"os-replace\":\"PTH105\",\"os-rmdir\":\"PTH106\",\"os-remove\":\"PTH107\",\"os-unlink\":\"PTH108\",\"os-getcwd\":\"PTH109\",\"os-path-exists\":\"PTH110\",\"os-path-expanduser\":\"PTH111\",\"os-path-isdir\":\"PTH112\",\"os-path-isfile\":\"PTH113\",\"os-path-islink\":\"PTH114\",\"os-readlink\":\"PTH115\",\"os-stat\":\"PTH116\",\"os-path-isabs\":\"PTH117\",\"os-path-join\":\"PTH118\",\"os-path-basename\":\"PTH119\",\"os-path-dirname\":\"PTH120\",\"os-path-samefile\":\"PTH121\",\"os-path-splitext\":\"PTH122\",\"builtin-open\":\"PTH123\",\"py-path\":\"PTH124\",\"path-constructor-current-directory\":\"PTH201\",\"os-path-getsize\":\"PTH202\",\"os-path-getatime\":\"PTH203\",\"os-path-getmtime\":\"PTH204\",\"os-path-getctime\":\"PTH205\",\"os-sep-split\":\"PTH206\",\"glob\":\"PTH207\",\"os-listdir\":\"PTH208\",\"static-join-to-f-string\":\"FLY002\",\"unsorted-imports\":\"I001\",\"missing-required-import\":\"I002\",\"complex-structure\":\"C901\",\"numpy-deprecated-type-alias\":\"NPY001\",\"numpy-legacy-random\":\"NPY002\",\"numpy-deprecated-function\":\"NPY003\",\"numpy2-deprecation\":\"NPY201\",\"invalid-class-name\":\"N801\",\"invalid-function-name\":\"N802\",\"invalid-argument-name\":\"N803\",\"invalid-first-argument-name-for-class-method\":\"N804\",\"invalid-first-argument-name-for-method\":\"N805\",\"non-lowercase-variable-in-function\":\"N806\",\"dunder-function-name\":\"N807\",\"constant-imported-as-non-constant\":\"N811\",\"lowercase-imported-as-non-lowercase\":\"N812\",\"camelcase-imported-as-lowercase\":\"N813\",\"camelcase-imported-as-constant\":\"N814\",\"mixed-case-variable-in-class-scope\":\"N815\",\"mixed-case-variable-in-global-scope\":\"N816\",\"camelcase-imported-as-acronym\":\"N817\",\"error-suffix-on-exception-name\":\"N818\",\"invalid-module-name\":\"N999\",\"pandas-use-of-inplace-argument\":\"PD002\",\"pandas-use-of-dot-is-null\":\"PD003\",\"pandas-use-of-dot-not-null\":\"PD004\",\"pandas-use-of-dot-ix\":\"PD007\",\"pandas-use-of-dot-at\":\"PD008\",\"pandas-use-of-dot-iat\":\"PD009\",\"pandas-use-of-dot-pivot-or-unstack\":\"PD010\",\"pandas-use-of-dot-values\":\"PD011\",\"pandas-use-of-dot-read-table\":\"PD012\",\"pandas-use-of-dot-stack\":\"PD013\",\"pandas-use-of-pd-merge\":\"PD015\",\"pandas-nunique-constant-series-check\":\"PD101\",\"pandas-df-variable-name\":\"PD901\",\"unnecessary-list-cast\":\"PERF101\",\"incorrect-dict-iterator\":\"PERF102\",\"try-except-in-loop\":\"PERF203\",\"manual-list-comprehension\":\"PERF401\",\"manual-list-copy\":\"PERF402\",\"manual-dict-comprehension\":\"PERF403\",\"mixed-spaces-and-tabs\":\"E101\",\"indentation-with-invalid-multiple\":\"E111\",\"no-indented-block\":\"E112\",\"unexpected-indentation\":\"E113\",\"indentation-with-invalid-multiple-comment\":\"E114\",\"no-indented-block-comment\":\"E115\",\"unexpected-indentation-comment\":\"E116\",\"over-indented\":\"E117\",\"whitespace-after-open-bracket\":\"E201\",\"whitespace-before-close-bracket\":\"E202\",\"whitespace-before-punctuation\":\"E203\",\"whitespace-after-decorator\":\"E204\",\"whitespace-before-parameters\":\"E211\",\"multiple-spaces-before-operator\":\"E221\",\"multiple-spaces-after-operator\":\"E222\",\"tab-before-operator\":\"E223\",\"tab-after-operator\":\"E224\",\"missing-whitespace-around-operator\":\"E225\",\"missing-whitespace-around-arithmetic-operator\":\"E226\",\"missing-whitespace-around-bitwise-or-shift-operator\":\"E227\",\"missing-whitespace-around-modulo-operator\":\"E228\",\"missing-whitespace\":\"E231\",\"multiple-spaces-after-comma\":\"E241\",\"tab-after-comma\":\"E242\",\"unexpected-spaces-around-keyword-parameter-equals\":\"E251\",\"missing-whitespace-around-parameter-equals\":\"E252\",\"too-few-spaces-before-inline-comment\":\"E261\",\"no-space-after-inline-comment\":\"E262\",\"no-space-after-block-comment\":\"E265\",\"multiple-leading-hashes-for-block-comment\":\"E266\",\"multiple-spaces-after-keyword\":\"E271\",\"multiple-spaces-before-keyword\":\"E272\",\"tab-after-keyword\":\"E273\",\"tab-before-keyword\":\"E274\",\"missing-whitespace-after-keyword\":\"E275\",\"blank-line-between-methods\":\"E301\",\"blank-lines-top-level\":\"E302\",\"too-many-blank-lines\":\"E303\",\"blank-line-after-decorator\":\"E304\",\"blank-lines-after-function-or-class\":\"E305\",\"blank-lines-before-nested-definition\":\"E306\",\"multiple-imports-on-one-line\":\"E401\",\"module-import-not-at-top-of-file\":\"E402\",\"line-too-long\":\"E501\",\"redundant-backslash\":\"E502\",\"multiple-statements-on-one-line-colon\":\"E701\",\"multiple-statements-on-one-line-semicolon\":\"E702\",\"useless-semicolon\":\"E703\",\"none-comparison\":\"E711\",\"true-false-comparison\":\"E712\",\"not-in-test\":\"E713\",\"not-is-test\":\"E714\",\"type-comparison\":\"E721\",\"bare-except\":\"E722\",\"lambda-assignment\":\"E731\",\"ambiguous-variable-name\":\"E741\",\"ambiguous-class-name\":\"E742\",\"ambiguous-function-name\":\"E743\",\"io-error\":\"E902\",\"syntax-error\":\"E999\",\"tab-indentation\":\"W191\",\"trailing-whitespace\":\"W291\",\"missing-newline-at-end-of-file\":\"W292\",\"blank-line-with-whitespace\":\"W293\",\"too-many-newlines-at-end-of-file\":\"W391\",\"doc-line-too-long\":\"W505\",\"invalid-escape-sequence\":\"W605\",\"docstring-missing-returns\":\"DOC201\",\"docstring-extraneous-returns\":\"DOC202\",\"docstring-missing-yields\":\"DOC402\",\"docstring-extraneous-yields\":\"DOC403\",\"docstring-missing-exception\":\"DOC501\",\"docstring-extraneous-exception\":\"DOC502\",\"undocumented-public-module\":\"D100\",\"undocumented-public-class\":\"D101\",\"undocumented-public-method\":\"D102\",\"undocumented-public-function\":\"D103\",\"undocumented-public-package\":\"D104\",\"undocumented-magic-method\":\"D105\",\"undocumented-public-nested-class\":\"D106\",\"undocumented-public-init\":\"D107\",\"fits-on-one-line\":\"D200\",\"no-blank-line-before-function\":\"D201\",\"no-blank-line-after-function\":\"D202\",\"one-blank-line-before-class\":\"D203\",\"one-blank-line-after-class\":\"D204\",\"blank-line-after-summary\":\"D205\",\"indent-with-spaces\":\"D206\",\"under-indentation\":\"D207\",\"over-indentation\":\"D208\",\"new-line-after-last-paragraph\":\"D209\",\"surrounding-whitespace\":\"D210\",\"blank-line-before-class\":\"D211\",\"multi-line-summary-first-line\":\"D212\",\"multi-line-summary-second-line\":\"D213\",\"section-not-over-indented\":\"D214\",\"section-underline-not-over-indented\":\"D215\",\"triple-single-quotes\":\"D300\",\"escape-sequence-in-docstring\":\"D301\",\"ends-in-period\":\"D400\",\"non-imperative-mood\":\"D401\",\"no-signature\":\"D402\",\"first-line-capitalized\":\"D403\",\"docstring-starts-with-this\":\"D404\",\"capitalize-section-name\":\"D405\",\"new-line-after-section-name\":\"D406\",\"dashed-underline-after-section\":\"D407\",\"section-underline-after-name\":\"D408\",\"section-underline-matches-section-length\":\"D409\",\"no-blank-line-after-section\":\"D410\",\"no-blank-line-before-section\":\"D411\",\"blank-lines-between-header-and-content\":\"D412\",\"blank-line-after-last-section\":\"D413\",\"empty-docstring-section\":\"D414\",\"ends-in-punctuation\":\"D415\",\"section-name-ends-in-colon\":\"D416\",\"undocumented-param\":\"D417\",\"overload-with-docstring\":\"D418\",\"empty-docstring\":\"D419\",\"unused-import\":\"F401\",\"import-shadowed-by-loop-var\":\"F402\",\"undefined-local-with-import-star\":\"F403\",\"late-future-import\":\"F404\",\"undefined-local-with-import-star-usage\":\"F405\",\"undefined-local-with-nested-import-star-usage\":\"F406\",\"future-feature-not-defined\":\"F407\",\"percent-format-invalid-format\":\"F501\",\"percent-format-expected-mapping\":\"F502\",\"percent-format-expected-sequence\":\"F503\",\"percent-format-extra-named-arguments\":\"F504\",\"percent-format-missing-argument\":\"F505\",\"percent-format-mixed-positional-and-named\":\"F506\",\"percent-format-positional-count-mismatch\":\"F507\",\"percent-format-star-requires-sequence\":\"F508\",\"percent-format-unsupported-format-character\":\"F509\",\"string-dot-format-invalid-format\":\"F521\",\"string-dot-format-extra-named-arguments\":\"F522\",\"string-dot-format-extra-positional-arguments\":\"F523\",\"string-dot-format-missing-arguments\":\"F524\",\"string-dot-format-mixing-automatic\":\"F525\",\"f-string-missing-placeholders\":\"F541\",\"multi-value-repeated-key-literal\":\"F601\",\"multi-value-repeated-key-variable\":\"F602\",\"expressions-in-star-assignment\":\"F621\",\"multiple-starred-expressions\":\"F622\",\"assert-tuple\":\"F631\",\"is-literal\":\"F632\",\"invalid-print-syntax\":\"F633\",\"if-tuple\":\"F634\",\"break-outside-loop\":\"F701\",\"continue-outside-loop\":\"F702\",\"yield-outside-function\":\"F704\",\"return-outside-function\":\"F706\",\"default-except-not-last\":\"F707\",\"forward-annotation-syntax-error\":\"F722\",\"redefined-while-unused\":\"F811\",\"undefined-name\":\"F821\",\"undefined-export\":\"F822\",\"undefined-local\":\"F823\",\"unused-variable\":\"F841\",\"unused-annotation\":\"F842\",\"raise-not-implemented\":\"F901\",\"eval\":\"PGH001\",\"deprecated-log-warn\":\"PGH002\",\"blanket-type-ignore\":\"PGH003\",\"blanket-noqa\":\"PGH004\",\"invalid-mock-access\":\"PGH005\",\"type-name-incorrect-variance\":\"PLC0105\",\"type-bivariance\":\"PLC0131\",\"type-param-name-mismatch\":\"PLC0132\",\"single-string-slots\":\"PLC0205\",\"dict-index-missing-items\":\"PLC0206\",\"iteration-over-set\":\"PLC0208\",\"useless-import-alias\":\"PLC0414\",\"import-outside-top-level\":\"PLC0415\",\"len-test\":\"PLC1802\",\"compare-to-empty-string\":\"PLC1901\",\"non-ascii-name\":\"PLC2401\",\"non-ascii-import-name\":\"PLC2403\",\"import-private-name\":\"PLC2701\",\"unnecessary-dunder-call\":\"PLC2801\",\"unnecessary-direct-lambda-call\":\"PLC3002\",\"yield-in-init\":\"PLE0100\",\"return-in-init\":\"PLE0101\",\"nonlocal-and-global\":\"PLE0115\",\"continue-in-finally\":\"PLE0116\",\"nonlocal-without-binding\":\"PLE0117\",\"load-before-global-declaration\":\"PLE0118\",\"non-slot-assignment\":\"PLE0237\",\"duplicate-bases\":\"PLE0241\",\"unexpected-special-method-signature\":\"PLE0302\",\"invalid-length-return-type\":\"PLE0303\",\"invalid-bool-return-type\":\"PLE0304\",\"invalid-index-return-type\":\"PLE0305\",\"invalid-str-return-type\":\"PLE0307\",\"invalid-bytes-return-type\":\"PLE0308\",\"invalid-hash-return-type\":\"PLE0309\",\"invalid-all-object\":\"PLE0604\",\"invalid-all-format\":\"PLE0605\",\"potential-index-error\":\"PLE0643\",\"misplaced-bare-raise\":\"PLE0704\",\"repeated-keyword-argument\":\"PLE1132\",\"dict-iter-missing-items\":\"PLE1141\",\"await-outside-async\":\"PLE1142\",\"logging-too-many-args\":\"PLE1205\",\"logging-too-few-args\":\"PLE1206\",\"bad-string-format-character\":\"PLE1300\",\"bad-string-format-type\":\"PLE1307\",\"bad-str-strip-call\":\"PLE1310\",\"invalid-envvar-value\":\"PLE1507\",\"singledispatch-method\":\"PLE1519\",\"singledispatchmethod-function\":\"PLE1520\",\"yield-from-in-async-function\":\"PLE1700\",\"bidirectional-unicode\":\"PLE2502\",\"invalid-character-backspace\":\"PLE2510\",\"invalid-character-sub\":\"PLE2512\",\"invalid-character-esc\":\"PLE2513\",\"invalid-character-nul\":\"PLE2514\",\"invalid-character-zero-width-space\":\"PLE2515\",\"modified-iterating-set\":\"PLE4703\",\"comparison-with-itself\":\"PLR0124\",\"comparison-of-constant\":\"PLR0133\",\"no-classmethod-decorator\":\"PLR0202\",\"no-staticmethod-decorator\":\"PLR0203\",\"property-with-parameters\":\"PLR0206\",\"manual-from-import\":\"PLR0402\",\"too-many-public-methods\":\"PLR0904\",\"too-many-return-statements\":\"PLR0911\",\"too-many-branches\":\"PLR0912\",\"too-many-arguments\":\"PLR0913\",\"too-many-locals\":\"PLR0914\",\"too-many-statements\":\"PLR0915\",\"too-many-boolean-expressions\":\"PLR0916\",\"too-many-positional-arguments\":\"PLR0917\",\"repeated-isinstance-calls\":\"PLR1701\",\"too-many-nested-blocks\":\"PLR1702\",\"redefined-argument-from-local\":\"PLR1704\",\"and-or-ternary\":\"PLR1706\",\"useless-return\":\"PLR1711\",\"repeated-equality-comparison\":\"PLR1714\",\"boolean-chained-comparison\":\"PLR1716\",\"sys-exit-alias\":\"PLR1722\",\"if-stmt-min-max\":\"PLR1730\",\"unnecessary-dict-index-lookup\":\"PLR1733\",\"unnecessary-list-index-lookup\":\"PLR1736\",\"magic-value-comparison\":\"PLR2004\",\"empty-comment\":\"PLR2044\",\"collapsible-else-if\":\"PLR5501\",\"non-augmented-assignment\":\"PLR6104\",\"literal-membership\":\"PLR6201\",\"no-self-use\":\"PLR6301\",\"unnecessary-lambda\":\"PLW0108\",\"useless-else-on-loop\":\"PLW0120\",\"self-assigning-variable\":\"PLW0127\",\"redeclared-assigned-name\":\"PLW0128\",\"assert-on-string-literal\":\"PLW0129\",\"named-expr-without-context\":\"PLW0131\",\"useless-exception-statement\":\"PLW0133\",\"nan-comparison\":\"PLW0177\",\"bad-staticmethod-argument\":\"PLW0211\",\"super-without-brackets\":\"PLW0245\",\"import-self\":\"PLW0406\",\"global-variable-not-assigned\":\"PLW0602\",\"global-statement\":\"PLW0603\",\"global-at-module-level\":\"PLW0604\",\"self-or-cls-assignment\":\"PLW0642\",\"binary-op-exception\":\"PLW0711\",\"bad-open-mode\":\"PLW1501\",\"shallow-copy-environ\":\"PLW1507\",\"invalid-envvar-default\":\"PLW1508\",\"subprocess-popen-preexec-fn\":\"PLW1509\",\"subprocess-run-without-check\":\"PLW1510\",\"unspecified-encoding\":\"PLW1514\",\"eq-without-hash\":\"PLW1641\",\"useless-with-lock\":\"PLW2101\",\"redefined-loop-name\":\"PLW2901\",\"bad-dunder-method-name\":\"PLW3201\",\"nested-min-max\":\"PLW3301\",\"useless-metaclass-type\":\"UP001\",\"type-of-primitive\":\"UP003\",\"useless-object-inheritance\":\"UP004\",\"deprecated-unittest-alias\":\"UP005\",\"non-pep585-annotation\":\"UP006\",\"non-pep604-annotation\":\"UP007\",\"super-call-with-parameters\":\"UP008\",\"utf8-encoding-declaration\":\"UP009\",\"unnecessary-future-import\":\"UP010\",\"lru-cache-without-parameters\":\"UP011\",\"unnecessary-encode-utf8\":\"UP012\",\"convert-typed-dict-functional-to-class\":\"UP013\",\"convert-named-tuple-functional-to-class\":\"UP014\",\"redundant-open-modes\":\"UP015\",\"datetime-timezone-utc\":\"UP017\",\"native-literals\":\"UP018\",\"typing-text-str-alias\":\"UP019\",\"open-alias\":\"UP020\",\"replace-universal-newlines\":\"UP021\",\"replace-stdout-stderr\":\"UP022\",\"deprecated-c-element-tree\":\"UP023\",\"os-error-alias\":\"UP024\",\"unicode-kind-prefix\":\"UP025\",\"deprecated-mock-import\":\"UP026\",\"unpacked-list-comprehension\":\"UP027\",\"yield-in-for-loop\":\"UP028\",\"unnecessary-builtin-import\":\"UP029\",\"format-literals\":\"UP030\",\"printf-string-formatting\":\"UP031\",\"f-string\":\"UP032\",\"lru-cache-with-maxsize-none\":\"UP033\",\"extraneous-parentheses\":\"UP034\",\"deprecated-import\":\"UP035\",\"outdated-version-block\":\"UP036\",\"quoted-annotation\":\"UP037\",\"non-pep604-isinstance\":\"UP038\",\"unnecessary-class-parentheses\":\"UP039\",\"non-pep695-type-alias\":\"UP040\",\"timeout-error-alias\":\"UP041\",\"replace-str-enum\":\"UP042\",\"unnecessary-default-type-args\":\"UP043\",\"non-pep646-unpack\":\"UP044\",\"read-whole-file\":\"FURB101\",\"write-whole-file\":\"FURB103\",\"print-empty-string\":\"FURB105\",\"if-exp-instead-of-or-operator\":\"FURB110\",\"repeated-append\":\"FURB113\",\"f-string-number-format\":\"FURB116\",\"reimplemented-operator\":\"FURB118\",\"readlines-in-for\":\"FURB129\",\"delete-full-slice\":\"FURB131\",\"check-and-remove-from-set\":\"FURB132\",\"if-expr-min-max\":\"FURB136\",\"reimplemented-starmap\":\"FURB140\",\"for-loop-set-mutations\":\"FURB142\",\"slice-copy\":\"FURB145\",\"unnecessary-enumerate\":\"FURB148\",\"math-constant\":\"FURB152\",\"repeated-global\":\"FURB154\",\"hardcoded-string-charset\":\"FURB156\",\"verbose-decimal-constructor\":\"FURB157\",\"bit-count\":\"FURB161\",\"redundant-log-base\":\"FURB163\",\"unnecessary-from-float\":\"FURB164\",\"int-on-sliced-str\":\"FURB166\",\"regex-flag-alias\":\"FURB167\",\"isinstance-type-none\":\"FURB168\",\"type-none-comparison\":\"FURB169\",\"single-item-membership-test\":\"FURB171\",\"implicit-cwd\":\"FURB177\",\"meta-class-abc-meta\":\"FURB180\",\"hashlib-digest-hex\":\"FURB181\",\"list-reverse-copy\":\"FURB187\",\"slice-to-remove-prefix-or-suffix\":\"FURB188\",\"subclass-builtin\":\"FURB189\",\"sorted-min-max\":\"FURB192\",\"ambiguous-unicode-character-string\":\"RUF001\",\"ambiguous-unicode-character-docstring\":\"RUF002\",\"ambiguous-unicode-character-comment\":\"RUF003\",\"collection-literal-concatenation\":\"RUF005\",\"asyncio-dangling-task\":\"RUF006\",\"zip-instead-of-pairwise\":\"RUF007\",\"mutable-dataclass-default\":\"RUF008\",\"function-call-in-dataclass-default-argument\":\"RUF009\",\"explicit-f-string-type-conversion\":\"RUF010\",\"ruff-static-key-dict-comprehension\":\"RUF011\",\"mutable-class-default\":\"RUF012\",\"implicit-optional\":\"RUF013\",\"unnecessary-iterable-allocation-for-first-element\":\"RUF015\",\"invalid-index-type\":\"RUF016\",\"quadratic-list-summation\":\"RUF017\",\"assignment-in-assert\":\"RUF018\",\"unnecessary-key-check\":\"RUF019\",\"never-union\":\"RUF020\",\"parenthesize-chained-operators\":\"RUF021\",\"unsorted-dunder-all\":\"RUF022\",\"unsorted-dunder-slots\":\"RUF023\",\"mutable-fromkeys-value\":\"RUF024\",\"default-factory-kwarg\":\"RUF026\",\"missing-f-string-syntax\":\"RUF027\",\"invalid-formatter-suppression-comment\":\"RUF028\",\"unused-async\":\"RUF029\",\"assert-with-print-message\":\"RUF030\",\"incorrectly-parenthesized-tuple-in-subscript\":\"RUF031\",\"decimal-from-float-literal\":\"RUF032\",\"post-init-default\":\"RUF033\",\"useless-if-else\":\"RUF034\",\"unsafe-markup-use\":\"RUF035\",\"none-not-at-end-of-union\":\"RUF036\",\"redundant-bool-literal\":\"RUF038\",\"unraw-re-pattern\":\"RUF039\",\"invalid-assert-message-literal-argument\":\"RUF040\",\"unnecessary-nested-literal\":\"RUF041\",\"unnecessary-cast-to-int\":\"RUF046\",\"map-int-version-parsing\":\"RUF048\",\"used-dummy-variable\":\"RUF052\",\"unnecessary-regular-expression\":\"RUF055\",\"unused-noqa\":\"RUF100\",\"redirected-noqa\":\"RUF101\",\"invalid-pyproject-toml\":\"RUF200\",\"raise-vanilla-class\":\"TRY002\",\"raise-vanilla-args\":\"TRY003\",\"type-check-without-type-error\":\"TRY004\",\"reraise-no-cause\":\"TRY200\",\"verbose-raise\":\"TRY201\",\"useless-try-except\":\"TRY203\",\"try-consider-else\":\"TRY300\",\"raise-within-try\":\"TRY301\",\"error-instead-of-exception\":\"TRY400\",\"verbose-log-message\":\"TRY401\"},\"executable\":\"/Users/razvan/.rye/self/bin/ruff\",\"timestamp\":1738802705}",
|
|
65
|
+
"last_opened_file_path": "/Users/razvan/pr/polymarket-apis",
|
|
66
|
+
"run.code.analysis.last.selected.profile": "pProject Default",
|
|
67
|
+
"settings.editor.selected.configurable": "insyncwithfoo.ryecharm.configurations.ty.Global"
|
|
68
|
+
}
|
|
69
|
+
}</component>
|
|
70
|
+
<component name="RecentsManager">
|
|
71
|
+
<key name="CopyFile.RECENT_KEYS">
|
|
72
|
+
<recent name="$PROJECT_DIR$/src/polymarket_apis/clients" />
|
|
73
|
+
<recent name="$PROJECT_DIR$/src/polymarket_apis/types" />
|
|
74
|
+
</key>
|
|
75
|
+
<key name="MoveFile.RECENT_KEYS">
|
|
76
|
+
<recent name="$PROJECT_DIR$" />
|
|
77
|
+
</key>
|
|
78
|
+
</component>
|
|
79
|
+
<component name="SharedIndexes">
|
|
80
|
+
<attachedChunks>
|
|
81
|
+
<set>
|
|
82
|
+
<option value="bundled-python-sdk-c298477dffd1-c13f99f12e27-com.jetbrains.pycharm.ds.sharedIndexes.bundled-DS-252.27397.107" />
|
|
83
|
+
</set>
|
|
84
|
+
</attachedChunks>
|
|
85
|
+
</component>
|
|
86
|
+
<component name="TaskManager">
|
|
87
|
+
<task active="true" id="Default" summary="Default task">
|
|
88
|
+
<changelist id="9cbf4d21-9d0c-43a0-80fe-b72fdf89ce0d" name="Changes" comment="" />
|
|
89
|
+
<created>1760866613742</created>
|
|
90
|
+
<option name="number" value="Default" />
|
|
91
|
+
<option name="presentableId" value="Default" />
|
|
92
|
+
<updated>1760866613742</updated>
|
|
93
|
+
</task>
|
|
94
|
+
<servers />
|
|
95
|
+
</component>
|
|
96
|
+
<component name="Vcs.Log.Tabs.Properties">
|
|
97
|
+
<option name="TAB_STATES">
|
|
98
|
+
<map>
|
|
99
|
+
<entry key="MAIN">
|
|
100
|
+
<value>
|
|
101
|
+
<State>
|
|
102
|
+
<option name="CUSTOM_BOOLEAN_PROPERTIES">
|
|
103
|
+
<map>
|
|
104
|
+
<entry key="Show.Git.Branches" value="true" />
|
|
105
|
+
</map>
|
|
106
|
+
</option>
|
|
107
|
+
</State>
|
|
108
|
+
</value>
|
|
109
|
+
</entry>
|
|
110
|
+
</map>
|
|
111
|
+
</option>
|
|
112
|
+
</component>
|
|
113
|
+
<component name="VcsManagerConfiguration">
|
|
114
|
+
<MESSAGE value="added pre-commit hooks for linting and formatting. small formatting changes. updated __init__s." />
|
|
115
|
+
<MESSAGE value="data: added closed positions, total markets traded, open interest, live volume; gamma: updated search function, added tags, teams, sports, series, comments related queries; improved datetime parsing." />
|
|
116
|
+
<MESSAGE value="web3: added support for safe/gnosis wallet; gamma: added missing docs fields to models" />
|
|
117
|
+
<MESSAGE value="added dateutil dependency" />
|
|
118
|
+
<MESSAGE value="lint fix" />
|
|
119
|
+
<MESSAGE value="clob: added get_all_history for token_id, updated get_recent_history and get_history (for start/end intervals) + raise better errors." />
|
|
120
|
+
<MESSAGE value="web3: added support for eoa wallets; clob: renamed proxy_address argument to address; data: added get_all_positions for queries without filters." />
|
|
121
|
+
<MESSAGE value="web3: added set_all_approvals for all wallet types; enforced stricter typing overall." />
|
|
122
|
+
<option name="LAST_COMMIT_MESSAGE" value="web3: added set_all_approvals for all wallet types; enforced stricter typing overall." />
|
|
123
|
+
</component>
|
|
124
|
+
</project>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
# Ruff version.
|
|
4
|
+
rev: v0.14.1
|
|
5
|
+
hooks:
|
|
6
|
+
# Run the linter.
|
|
7
|
+
- id: ruff-check
|
|
8
|
+
args: [ --fix ]
|
|
9
|
+
# Run the formatter.
|
|
10
|
+
- id: ruff-format
|
|
11
|
+
|
|
12
|
+
- repo: https://github.com/facebook/pyrefly-pre-commit
|
|
13
|
+
rev: 0.0.1
|
|
14
|
+
hooks:
|
|
15
|
+
- id: pyrefly-typecheck-system
|
|
16
|
+
name: Pyrefly (type checking)
|
|
17
|
+
pass_filenames: false
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: polymarket-apis
|
|
3
|
+
Version: 0.3.8
|
|
4
|
+
Summary: Unified Polymarket APIs with Pydantic data validation - Clob, Gamma, Data, Web3, Websockets, GraphQL clients.
|
|
5
|
+
Project-URL: repository, https://github.com/qualiaenjoyer/polymarket-apis
|
|
6
|
+
Author-email: Razvan Gheorghe <razvan@gheorghe.me>
|
|
7
|
+
Requires-Python: >=3.12
|
|
8
|
+
Requires-Dist: gql[httpx]>=4.0.0
|
|
9
|
+
Requires-Dist: httpx[http2]>=0.25.1
|
|
10
|
+
Requires-Dist: lomond>=0.3.3
|
|
11
|
+
Requires-Dist: poly-eip712-structs>=0.0.1
|
|
12
|
+
Requires-Dist: py-order-utils>=0.3.2
|
|
13
|
+
Requires-Dist: pydantic>=2.10.5
|
|
14
|
+
Requires-Dist: python-dateutil>=2.9.0
|
|
15
|
+
Requires-Dist: web3>=7.0
|
|
16
|
+
Requires-Dist: wsaccel>=0.6.7
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# polymarket-apis [](https://pypi.org/project/polymarket-apis/)
|
|
20
|
+
|
|
21
|
+
Unified Polymarket APIs with Pydantic data validation - Clob, Gamma, Data, Web3, Websockets, GraphQL clients.
|
|
22
|
+
|
|
23
|
+
## Polymarket Mental Models
|
|
24
|
+
|
|
25
|
+
### Events, Markets and Outcomes
|
|
26
|
+
|
|
27
|
+
The Polymarket ecosystem is organized hierarchically:
|
|
28
|
+
|
|
29
|
+
```mermaid
|
|
30
|
+
flowchart LR
|
|
31
|
+
A([Event]) --- B([Market A])
|
|
32
|
+
A --- C([Market B])
|
|
33
|
+
A ~~~ Dot1@{ shape: sm-circ}
|
|
34
|
+
A ~~~ Dot2@{ shape: sm-circ}
|
|
35
|
+
A ~~~ Dot3@{ shape: sm-circ}
|
|
36
|
+
A -.- D([Market n])
|
|
37
|
+
B --- E([Outcome 1])
|
|
38
|
+
B --- F([Outcome 2])
|
|
39
|
+
C --- G([Outcome 1])
|
|
40
|
+
C --- H([Outcome 2])
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- **Event** — represents a proposition or question such as “How many Fed rate cuts in 2025?”.
|
|
44
|
+
- Identified by a human-readable **`slug`** (e.g. `how-many-fed-rate-cuts-in-2025`) and an **event `id`** (e.g. `16085`).
|
|
45
|
+
|
|
46
|
+
- **Market** — represents a specific option for the related event (e.g. 1 rate cut in 2025). An Event has 1 or more corresponding Markets. (e.g. 9 options in this case - {0, 1, 2, ..., 7, 8 or more} rate cuts in 2025)
|
|
47
|
+
- Identified by a **`condition id`** (e.g. `0x8e9b6942b4dac3117dadfacac2edb390b6d62d59c14152774bb5fcd983fc134e` for 1 rate cut in 2025), a human-readable **`slug`** (e.g. `'will-1-fed-rate-cut-happen-in-2025'`) and a **market `id`** (e.g. `516724`).
|
|
48
|
+
|
|
49
|
+
- **Outcome** — represents a binary option related to a market. (most commonly `Yes`/`No`, but can be e.g. `Paris Saint-Germain`/`Inter Milan` in the case of a match where draws are not possible)
|
|
50
|
+
- Identified by a **`token id`** (e.g. `15353185604353847122370324954202969073036867278400776447048296624042585335546` for the `Yes` outcome in the 1 rate cut in 2025 market)
|
|
51
|
+
|
|
52
|
+
- The different APIs represent Events/Markets differently (e.g. Event, QueryEvent / ClobMarket, GammaMarket, RewardsMarket) but they all use to the same underlying identifiers.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Tokens
|
|
56
|
+
- **Tokens** are the blockchain implementation of **Outcomes** - tradable digital assets on the Polygon blockchain that users buy, hold and sell on Polygon.
|
|
57
|
+
- This helps ensure the logic of binary outcome prediction markets through smart contracts (e.g. collateralization, token prices going to $1.00 or $0.00 after resolution, splits/merges).
|
|
58
|
+
|
|
59
|
+
### Splits and Merges
|
|
60
|
+
- Holding 1 `Yes` share + 1 `No` share in a **Market** (e.g. `'will-1-fed-rate-cut-happen-in-2025'`) covers the entire universe of possibilities and guarantees a $1.00 payout regardless of outcome. This mathematical relationship enables Polymarket's core mechanisms: splitting (1 USDC → 1 `Yes` + 1 `No`) and merging (1 `Yes` + 1 `No` → 1 USDC) at any point before resolution.
|
|
61
|
+
- Splits are the only way tokens are created. Either a user splits USDC into equal shares of the complementary tokens or Polymarket automatically splits USDC when it matches an `Yes` buy order at e.g. 30¢ with a `No` buy order at 70¢.
|
|
62
|
+
|
|
63
|
+
### Unified Order Book
|
|
64
|
+
- Polymarket uses traditional exchange mechanics - a Central Limit Order Book (CLOB), where users place buy and sell orders that get matched by price and time priority.
|
|
65
|
+
- However, because the `Yes` and `No` outcomes form a complete probability universe, certain orders become mathematically equivalent - allowing the matching engine to find trades as exemplified above.
|
|
66
|
+
- This unified structure means every **BUY** order for `Outcome 1` at price **X** is simultaneously visible as a **SELL** order for `Outcome 2` at price **(100¢ - X)**, creating deeper liquidity and tighter spreads than separate order books would allow.
|
|
67
|
+
|
|
68
|
+
### Negative Risk and Conversions
|
|
69
|
+
- If the **Markets** in and **Event** collectively cover a complete universe of possibilities (e.g. {0, 1, 2, ..., 7, 8 or more} rate cuts in 2025) and only one winner is possible, two collections of positions (made up of tokens and USDC) become mathematically equivalent and the **Event** is said to support negative risk.
|
|
70
|
+
- e.g. Hold 1 `No` token in the 0 rate cuts in 2025. This is equivalent to holding 1 `Yes` token in each of the other **Markets** {1, 2, ..., 7, 8 or more}.
|
|
71
|
+
- An interesting consequence is that holding `No` tokens in more than one **Market** is equivalent to `Yes` tokens ***and*** some USDC.
|
|
72
|
+
- e.g. Hold 1 `No` token on each of {0, 1, 2, ..., 7, 8 or more} rate cuts in 2025. Because only one winner is possible, this guarantees that 8 out of the 9 **Markets** resolve to `No`. This is equivalent to a position of 8 USDC.
|
|
73
|
+
- e.g. Hold 1 `No` token on each of {0, 1} rate cuts in 2025. This is equivalent to 1 `Yes` token in {2, ..., 7, 8 or more} and 1 USDC.
|
|
74
|
+
- Polymarket allows for the one way (for capital efficiency) conversion from `No` tokens to a collection of `Yes` tokens and USDC before resolution through a smart contract.
|
|
75
|
+
|
|
76
|
+
## Clients overview
|
|
77
|
+
- ### PolymarketClobClient - Order book related operations
|
|
78
|
+
- #### Order book
|
|
79
|
+
- get one or more order books, best price, spread, midpoint, last trade price by `token_id`(s)
|
|
80
|
+
- #### Orders
|
|
81
|
+
- create and post limit or market orders
|
|
82
|
+
- cancel one or more orders by `order_id`(s)
|
|
83
|
+
- get active orders
|
|
84
|
+
- #### Trades
|
|
85
|
+
- get trade history for a user with filtering by `condition_id`, `token_id`, `trade_id`, time window
|
|
86
|
+
- #### Rewards
|
|
87
|
+
- check if one or more orders are scoring for liquidity rewards by `order_id`(s)
|
|
88
|
+
- get daily earned rewards
|
|
89
|
+
- check if a **Market** offers rewards by `condition_id` - **get_market_rewards()**
|
|
90
|
+
- get all active markets that offer rewards sorted by different metrics and ordered, filtered by a query, show your favourites from the web app - **get_reward_markets()** (*naming would do with some work*)
|
|
91
|
+
- #### Miscellaneous
|
|
92
|
+
- get recent price history by `token_id` in the last 1h, 6h, 1d, 1w, 1m
|
|
93
|
+
- get price history by `token_id` in start/end interval
|
|
94
|
+
- get all price history by `token_id` in 2 min increments
|
|
95
|
+
- get **ClobMarket** by `condition_id`
|
|
96
|
+
- get all **ClobMarkets**
|
|
97
|
+
|
|
98
|
+
### PolymarketGammaClient - Market/Event related operations
|
|
99
|
+
- #### Market
|
|
100
|
+
- get **GammaMarket** by `market_id`
|
|
101
|
+
- get **GammaMarket** by `slug`
|
|
102
|
+
- get **GammaMarkets** with pagination (offset and limit), filter by `slug`s, `market_id`s, `token_id`s, `condition_id`s, `tag_id` or filtered by active, closed, archived, liquidity window, volume window, start date window, end date window and ordered
|
|
103
|
+
- get **Tags** for a **Market** by `market_id`
|
|
104
|
+
- #### Event
|
|
105
|
+
- get **Event** by `event_id`
|
|
106
|
+
- get **Event** by `slug`
|
|
107
|
+
- get **Events** with pagination, filter by `slug`s, `event_id`s, `tag_id` or filtered by active, closed, archived, liquidity window, volume window, start date window, end date window and ordered
|
|
108
|
+
- get all **Events** given some filtration
|
|
109
|
+
- search **Events**, **Tags**, **Profiles**, filter by text query, tags, active/resolved, recurrence, sort by volume/volume_24hr/liquidity/start_date/end_date/competitive
|
|
110
|
+
- grok event summary by **Event** `slug`
|
|
111
|
+
- grok election market explanation by candidate name and election title
|
|
112
|
+
- get **Tags** for an **Event** by `event_id`
|
|
113
|
+
- #### Tag
|
|
114
|
+
- get **Tags** with pagination, order by any **Tag** field
|
|
115
|
+
- get all **Tags**
|
|
116
|
+
- get **Tag** by `tag_id`
|
|
117
|
+
- get **Tag** relations by `tag_id` or `slug`
|
|
118
|
+
- get **Tags** related to a **Tag** by `tag_id` or `slug`
|
|
119
|
+
- #### Sport
|
|
120
|
+
- get **Teams** with pagination, filter by `league`, `name`, `abbreviation`
|
|
121
|
+
- get all **Teams** given some filtration
|
|
122
|
+
- get **Sports** with pagination, filter by `name`
|
|
123
|
+
- get **Sports** metadata
|
|
124
|
+
- #### Series
|
|
125
|
+
- get **Series** with pagination, filter by `slug`, closed status, order by any **Series** field
|
|
126
|
+
- get all **Series** given some filtration
|
|
127
|
+
- #### Comments
|
|
128
|
+
- get comments by `parent_entity_type` and `parent_entity_id` with pagination, order by any **Comment** field
|
|
129
|
+
- get comments by `comment_id` - gets all comments in a thread.
|
|
130
|
+
- get comments by user base address (not proxy address) with pagination, order by any **Comment** field
|
|
131
|
+
|
|
132
|
+
### PolymarketDataClient - Portfolio related operations
|
|
133
|
+
- #### Positions
|
|
134
|
+
- get positions with pagination (offset and limit) by user address, filter by `condition_id`, position size, redeemability, mergeability, title
|
|
135
|
+
- #### Trades
|
|
136
|
+
- get trades with pagination, filter by `condition id`, user address, side, taker only or not, cash amount/token amount
|
|
137
|
+
- #### Activity
|
|
138
|
+
- get activity with pagination by user address, filter by type (trade, split, merge, redeem, reward, conversion), `condition_id`, time window, side, sort by timestamp/tokens/cash
|
|
139
|
+
- #### Holders
|
|
140
|
+
- get top holders by `condition_id`
|
|
141
|
+
- #### Value
|
|
142
|
+
- get positions value by user address and condition_ids
|
|
143
|
+
- `condition_ids` is ***None*** → total value of positions
|
|
144
|
+
- `condition_ids` is ***str*** → value of positions on a market
|
|
145
|
+
- `condition_ids` is ***list[str]*** → sum of values of positions on multiple markets
|
|
146
|
+
- #### Closed positions
|
|
147
|
+
- get closed positions, filter by condition_ids
|
|
148
|
+
- #### Miscellaneous
|
|
149
|
+
- get total number of markets traded by user address
|
|
150
|
+
- get open interest for a list of condition_ids
|
|
151
|
+
- get live volume for an event by `event_id`
|
|
152
|
+
- get pnl timeseries by user address for a period (1d, 1w, 1m, all) with frequency (1h, 3h, 12h, 1d)
|
|
153
|
+
- get overall pnl/volume by user address for a recent window (1d, 7d, 30d, all)
|
|
154
|
+
- get user rank on the profit/volume leaderboards by user address for a recent window (1d, 7d, 30d, all)
|
|
155
|
+
- get top users on the profit/volume leaderboards (at most 100) for a recent window (1d, 7d, 30d, all)
|
|
156
|
+
|
|
157
|
+
### PolymarketWeb3Client - Blockchain related operations
|
|
158
|
+
- #### Supporting EOA(signature_type=0), Email/Magic wallets (signature_type=1) and Safe/Gnosis wallets (signature_type=2)
|
|
159
|
+
- #### Approvals
|
|
160
|
+
- set approvals for all needed usdc and conditional token spenders (needed for full trading functionality)
|
|
161
|
+
- Safe/Gnosis wallet holders need to run deploy_safe before setting approvals
|
|
162
|
+
- #### Balance
|
|
163
|
+
- get usdc balance by user address
|
|
164
|
+
- get token balance by `token_id` and user address
|
|
165
|
+
- #### Transfers
|
|
166
|
+
- transfer usdc to another address - needs recipient address, amount
|
|
167
|
+
- transfer token to another address - needs `token_id`, recipient address, amount
|
|
168
|
+
- #### Token/USDC conversions
|
|
169
|
+
- split USDC into complementary tokens - needs `condition_id`, amount, neg_risk bool
|
|
170
|
+
- merge complementary tokens into USDC - needs `condition_id`, amount, neg_risk bool
|
|
171
|
+
- redeem token into USDC - needs `condition_id`, amounts array [`Yes` shares, `No` shares], neg_risk bool
|
|
172
|
+
- convert 1 or more `No` tokens in a *negative risk* **Event** into a collection of USDC and `Yes` tokens on the other **Markets** in the **Event**
|
|
173
|
+
|
|
174
|
+
### PolymarketWebsocketsClient - Real time data subscriptions
|
|
175
|
+
- subscribe to **market socket** with `token_ids` list, receive different event types:
|
|
176
|
+
- order book summary
|
|
177
|
+
- price change
|
|
178
|
+
- tick size change
|
|
179
|
+
- last trade price
|
|
180
|
+
- subscribe to **user socket** with **ApiCreds**, receive different event types:
|
|
181
|
+
- order (status - live, canceled, matched)
|
|
182
|
+
- trade (status - matched, mined, confirmed, retrying, failed)
|
|
183
|
+
- subscribe to **live data socket** with any combination described [here](https://github.com/Polymarket/real-time-data-client?tab=readme-ov-file#subscribe) - ***newest endpoint*** - includes the other sockets, receive:
|
|
184
|
+
- all of the above event types
|
|
185
|
+
- market (created, resolved)
|
|
186
|
+
- comment/reaction (created, removed)
|
|
187
|
+
- trades/orders_matched (all, not just yours) - filter by **Event** `slug` or **Market** `slug`
|
|
188
|
+
- crypto price
|
|
189
|
+
- request/quote (created, edited, canceled, expired) - rqf not public yet
|
|
190
|
+
|
|
191
|
+
### PolymarketGraphQLClient/AsyncPolymarketGraphQLClient - Goldsky hosted Subgraphs queries
|
|
192
|
+
- instantiate with an endpoint name from:
|
|
193
|
+
- activity_subgraph
|
|
194
|
+
- fpmm_subgraph
|
|
195
|
+
- open_interest_subgraph
|
|
196
|
+
- orderbook_subgraph
|
|
197
|
+
- pnl_subgraph
|
|
198
|
+
- positions_subgraph
|
|
199
|
+
- sports_oracle_subgraph
|
|
200
|
+
- wallet_subgraph
|
|
201
|
+
- ****query()**** takes in a GraphQL query string and returns the raw json
|