Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/trades endpoint always returns an empty array #62

Open
CrazybutSolid opened this issue Jul 31, 2023 · 0 comments
Open

/trades endpoint always returns an empty array #62

CrazybutSolid opened this issue Jul 31, 2023 · 0 comments

Comments

@CrazybutSolid
Copy link

Overview

the /trades endpoint always returns an empty array, independently of adding any of the possible URL params in all their combinations

Description

This is the code I'm running as from the example:

import os
from py_clob_client.constants import POLYGON
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import OrderArgs
from py_clob_client.order_builder.constants import BUY
from py_clob_client.clob_types import ApiCreds, FilterParams
from dotenv import load_dotenv
from pprint import pprint

from py_clob_client.constants import POLYGON

load_dotenv()

def main():
host = "https://clob.polymarket.com"
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 = POLYGON
client = ClobClient(host, key=key, chain_id=chain_id, creds=creds)

resp = client.get_trades(
    FilterParams(
        limit=100,
         taker=client.get_address()
  )
)
pprint(resp)
print("Done!")

main()

Notes

The reply is always

[]
Done!

I have added and removed limit, before, after, changed maker and taker, added market (condition_id), and the array always comes back empty.

Action items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant