该用户的聊天记录定位。
Biggest flaw in polymarket's APIs imo
Biggest flaw in polymarket's APIs imo
Would love a user id field in the order placement endpoint
Would love a user id field in the order placement endpoint
The real pain is WS events for orders coming in before you get order_id's back on order placement requests. Combined with no user submitted identifiers it makes working on a proper OMS an absolute PITA
The real pain is WS events for orders coming in before you get order_id's back on order placement requests. Combined with no user submitted identifiers it makes working on a proper OMS an absolute PITA
Hyperliquid and a few other big time DEFI exchanges disagree. It's just PMKTs growing pains
Hyperliquid and a few other big time DEFI exchanges disagree. It's just PMKTs growing pains
Now that I look again, the docs only mention the .items() iterator, not iter_items(), I probably found that in IDE tooltips though, may want to _hide it or something
Now that I look again, the docs only mention the .items() iterator, not iter_items(), I probably found that in IDE tooltips though, may want to _hide it or something
Will move to the single page iteration to be safe, you guys might want to clarify in the docs that it may hit/exceed limits. Thanks!
Will move to the single page iteration to be safe, you guys might want to clarify in the docs that it may hit/exceed limits. Thanks!
I get that, but the suggested .iter_items() method used here hides when you hit page boundries, and as a result makes it impossible to know the underlying request frequency. The iterator method is mentioned in the docs so I figured it was safe to use with no further rate considerations (https://docs.polymarket.com/dev-tooling/python#pagination) ``` async with AsyncPublicClient() as client: closed_positions_pages = client.list_closed_positions( user=PMKT_API_ACCOUNT_ADDRESS, ) closed_positions = [] try: async for position in closed_positions_pages.iter_items(): try: db_position = ClosedPosition.from_api_closed_position(position) except ValueError as e: logger.warning(f"Skipping closed position {position.token_id} due to parsing error: {e}") continue closed_positions.append(db_position) except Exception as e: raise UserSyncError(f"Sync failed during API fetch: {e}") from e ```
I get that, but the suggested .iter_items() method used here hides when you hit page boundries, and as a result makes it impossible to know the underlying request frequency. The iterator method is mentioned in the docs so I figured it was safe to use with no further rate considerations (https://docs.polymarket.com/dev-tooling/python#pagination) ``` async with AsyncPublicClient() as client: closed_positions_pages = client.list_closed_positions( user=PMKT_API_ACCOUNT_ADDRESS, ) closed_positions = [] try: async for position in closed_positions_pages.iter_items(): try: db_position = ClosedPosition.from_api_closed_position(position) except ValueError as e: logger.warning(f"Skipping closed position {position.token_id} due to parsing error: {e}") continue closed_positions.append(db_position) except Exception as e: raise UserSyncError(f"Sync failed during API fetch: {e}") from e ```
Good to know, a bit odd with how opaque the individual item iteration is but I guess I will move to rate limited page iteration if I ever hit errors there. Is there any risk of permabans if rate limiting is exceeded for a short time?
Good to know, a bit odd with how opaque the individual item iteration is but I guess I will move to rate limited page iteration if I ever hit errors there. Is there any risk of permabans if rate limiting is exceeded for a short time?
I figured they would eventually migrate to SPCX-MARS-1 but figured I had a century or two before I had to worry
I figured they would eventually migrate to SPCX-MARS-1 but figured I had a century or two before I had to worry
Lmao I seriously do not know if you are joking because it would really not surprise me at this point
Lmao I seriously do not know if you are joking because it would really not surprise me at this point
Got a link to an announcement?
Got a link to an announcement?
please no
please no
wut
wut
The most gracious of noobs maybe
The most gracious of noobs maybe
Gotcha, thanks <@173453984638566400>
Gotcha, thanks <@173453984638566400>
Well the official API hides error codes themselves from you, but it is showing this polymarket.errors.RequestRejectedError: Request timed out. Please try again.
Well the official API hides error codes themselves from you, but it is showing this polymarket.errors.RequestRejectedError: Request timed out. Please try again.
Does the official Python SDK have rate limiting built in? I am doing the following but suddenly seeing timeout errors, and I realize now this may be a bit aggressive ```python async with AsyncPublicClient() as client: closed_positions_pages = client.list_closed_positions( user=PMKT_API_ACCOUNT_ADDRESS, ) closed_positions = [] async for position in closed_positions_pages.iter_items(): try: db_position = ClosedPosition.from_api_closed_position(position) except ValueError as e: logger.warning(f"Skipping closed position {position.token_id} due to parsing error: {e}") continue closed_positions.append(db_position) ```
Does the official Python SDK have rate limiting built in? I am doing the following but suddenly seeing timeout errors, and I realize now this may be a bit aggressive ```python async with AsyncPublicClient() as client: closed_positions_pages = client.list_closed_positions( user=PMKT_API_ACCOUNT_ADDRESS, ) closed_positions = [] async for position in closed_positions_pages.iter_items(): try: db_position = ClosedPosition.from_api_closed_position(position) except ValueError as e: logger.warning(f"Skipping closed position {position.token_id} due to parsing error: {e}") continue closed_positions.append(db_position) ```
A lot of end dates are in the past, but the markets are still open and trading
A lot of end dates are in the past, but the markets are still open and trading
IME some end dates are just cooked. Very unreliable...
IME some end dates are just cooked. Very unreliable...
Starting to see a new event type 'auto_redeem' on the user channel that I can't seem to find docs for. Not sure if its actually new or not but I am only just now noticing it. I think it could be useful to utilize, anyone know if docs exist and if not when they may?
Starting to see a new event type 'auto_redeem' on the user channel that I can't seem to find docs for. Not sure if its actually new or not but I am only just now noticing it. I think it could be useful to utilize, anyone know if docs exist and if not when they may?
Do GTD orders get a user channel event on good till cancellations?
Do GTD orders get a user channel event on good till cancellations?
Can you have multiple API creds, or does creating new ones invalidate old ones?
Can you have multiple API creds, or does creating new ones invalidate old ones?