Skip to content

Commit

Permalink
Merge pull request #73 from Polymarket/feat/amoy-migration
Browse files Browse the repository at this point in the history
Replacing `mumbai` with `amoy`
  • Loading branch information
poly-rodr authored Apr 11, 2024
2 parents 78600d9 + bf73bc2 commit e724b46
Show file tree
Hide file tree
Showing 31 changed files with 73 additions and 73 deletions.
4 changes: 2 additions & 2 deletions examples/GTD_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import ApiCreds, OrderArgs, OrderType
from dotenv import load_dotenv
from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY

from py_clob_client.order_builder.constants import BUY

Expand All @@ -19,7 +19,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

# Create and sign a limit order buying 100 YES tokens for 0.50c each
Expand Down
4 changes: 2 additions & 2 deletions examples/are_orders_scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import ApiCreds, OrdersScoringParams
from dotenv import load_dotenv
from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY

load_dotenv()

Expand All @@ -16,7 +16,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

scoring = client.are_orders_scoring(
Expand Down
4 changes: 2 additions & 2 deletions examples/cancel_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from py_clob_client.clob_types import ApiCreds
from dotenv import load_dotenv

from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY


load_dotenv()
Expand All @@ -18,7 +18,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

resp = client.cancel_all()
Expand Down
4 changes: 2 additions & 2 deletions examples/cancel_market_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from py_clob_client.clob_types import ApiCreds
from dotenv import load_dotenv

from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY


load_dotenv()
Expand All @@ -18,7 +18,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

resp = client.cancel_market_orders(market="0xaaa", asset_id="100")
Expand Down
4 changes: 2 additions & 2 deletions examples/cancel_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from py_clob_client.clob_types import ApiCreds
from dotenv import load_dotenv

from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY


load_dotenv()
Expand All @@ -18,7 +18,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

resp = client.cancel(order_id="0xaaaa")
Expand Down
4 changes: 2 additions & 2 deletions examples/cancel_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from py_clob_client.clob_types import ApiCreds
from dotenv import load_dotenv

from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY


load_dotenv()
Expand All @@ -18,7 +18,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

resp = client.cancel_orders(["0xaaaa"])
Expand Down
4 changes: 2 additions & 2 deletions examples/create_api_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import os

from py_clob_client.client import ClobClient
from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY

load_dotenv()


def main():
host = "http://localhost:8080"
key = os.getenv("PK")
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id)

print(client.create_api_key())
Expand Down
4 changes: 2 additions & 2 deletions examples/derive_api_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import os

from py_clob_client.client import ClobClient
from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY

load_dotenv()


def main():
host = "http://localhost:8080"
key = os.getenv("PK")
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id)

print(client.derive_api_key())
Expand Down
4 changes: 2 additions & 2 deletions examples/drop_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from py_clob_client.clob_types import ApiCreds, DropNotificationParams
from dotenv import load_dotenv

from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY

load_dotenv()

Expand All @@ -18,7 +18,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

print(client.drop_notifications(params=DropNotificationParams(ids=["1", "2"])))
Expand Down
4 changes: 2 additions & 2 deletions examples/get_api_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from py_clob_client.clob_types import ApiCreds
from dotenv import load_dotenv

from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY


load_dotenv()
Expand All @@ -18,7 +18,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

print(client.get_api_keys())
Expand Down
4 changes: 2 additions & 2 deletions examples/get_balance_allowance.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import ApiCreds, BalanceAllowanceParams, AssetType
from dotenv import load_dotenv
from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY

load_dotenv()

Expand All @@ -16,7 +16,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

collateral = client.get_balance_allowance(
Expand Down
4 changes: 2 additions & 2 deletions examples/get_last_trade_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from dotenv import load_dotenv
from pprint import pprint

from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY


load_dotenv()
Expand All @@ -13,7 +13,7 @@
def main():
host = "http://localhost:8080"
key = os.getenv("PK")
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id)

resp = client.get_last_trade_price(
Expand Down
4 changes: 2 additions & 2 deletions examples/get_last_trades_prices.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dotenv import load_dotenv
from pprint import pprint

from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY


load_dotenv()
Expand All @@ -14,7 +14,7 @@
def main():
host = "http://localhost:8080"
key = os.getenv("PK")
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id)

resp = client.get_last_trades_prices(
Expand Down
4 changes: 2 additions & 2 deletions examples/get_market_trades_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import ApiCreds
from dotenv import load_dotenv
from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY

load_dotenv()

Expand All @@ -16,7 +16,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

print(client.get_market_trades_events("condition_id"))
Expand Down
4 changes: 2 additions & 2 deletions examples/get_markets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import ApiCreds
from dotenv import load_dotenv
from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY

load_dotenv()

Expand All @@ -16,7 +16,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

print(client.get_markets())
Expand Down
4 changes: 2 additions & 2 deletions examples/get_mid_market_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import ApiCreds
from dotenv import load_dotenv
from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY


load_dotenv()
Expand All @@ -17,7 +17,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

resp = client.get_midpoint(
Expand Down
4 changes: 2 additions & 2 deletions examples/get_mid_markets_prices.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import ApiCreds, BookParams
from dotenv import load_dotenv
from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY


load_dotenv()
Expand All @@ -17,7 +17,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

resp = client.get_midpoints(
Expand Down
4 changes: 2 additions & 2 deletions examples/get_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from py_clob_client.clob_types import ApiCreds
from dotenv import load_dotenv

from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY

load_dotenv()

Expand All @@ -18,7 +18,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

print(client.get_notifications())
Expand Down
4 changes: 2 additions & 2 deletions examples/get_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import ApiCreds, FilterParams
from dotenv import load_dotenv
from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY

load_dotenv()

Expand All @@ -16,7 +16,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

resp = client.get_order(
Expand Down
4 changes: 2 additions & 2 deletions examples/get_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import ApiCreds, FilterParams
from dotenv import load_dotenv
from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY

load_dotenv()

Expand All @@ -16,7 +16,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

resp = client.get_orders(
Expand Down
4 changes: 2 additions & 2 deletions examples/get_trades.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dotenv import load_dotenv
from pprint import pprint

from py_clob_client.constants import MUMBAI
from py_clob_client.constants import AMOY

load_dotenv()

Expand All @@ -18,7 +18,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

resp = client.get_trades(
Expand Down
4 changes: 2 additions & 2 deletions examples/is_order_scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
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
from py_clob_client.constants import AMOY

load_dotenv()

Expand All @@ -16,7 +16,7 @@ def main():
api_secret=os.getenv("CLOB_SECRET"),
api_passphrase=os.getenv("CLOB_PASS_PHRASE"),
)
chain_id = MUMBAI
chain_id = AMOY
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

scoring = client.is_order_scoring(
Expand Down
Loading

0 comments on commit e724b46

Please sign in to comment.