-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Returns a boolean value where it is indicated if an order is scoring or not. ### HTTP Request ```bash GET {clob-endpoint}/order-scoring?order_id={...} ``` ### Python client ```python scoring = client.is_order_scoring( OrderScoringParams( orderId="0xb816482a5187a3d3db49cbaf6fe3ddf24f53e6c712b5a4bf5e01d0ec7b11dabc" ) ) print(scoring) ```
- Loading branch information
Showing
7 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import os | ||
|
||
from py_clob_client.client import ClobClient | ||
from py_clob_client.clob_types import ApiCreds, OrderScoringParams | ||
from dotenv import load_dotenv | ||
from py_clob_client.constants import MUMBAI | ||
|
||
load_dotenv() | ||
|
||
|
||
def main(): | ||
host = "http://localhost:8080" | ||
key = os.getenv("PK") | ||
creds = ApiCreds( | ||
api_key=os.getenv("CLOB_API_KEY"), | ||
api_secret=os.getenv("CLOB_SECRET"), | ||
api_passphrase=os.getenv("CLOB_PASS_PHRASE"), | ||
) | ||
chain_id = MUMBAI | ||
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds) | ||
|
||
scoring = client.is_order_scoring( | ||
OrderScoringParams( | ||
orderId="0xb816482a5187a3d3db49cbaf6fe3ddf24f53e6c712b5a4bf5e01d0ec7b11dabc" | ||
) | ||
) | ||
print(scoring) | ||
print("Done!") | ||
|
||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
setuptools.setup( | ||
name="py_clob_client", | ||
version="0.3.0", | ||
version="0.4.0", | ||
author="Polymarket Engineering", | ||
author_email="[email protected]", | ||
maintainer="Polymarket Engineering", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters