hi everyone,
does anyone know how to retrieve all active markets via the api? also, is there a simple way to categorize them? I specifically need to get all the sports markets
I tried:
url = "https://gamma-api.polymarket.com/events"
params = {
"active": "true",
"tag": "sports"
}
and
url = "https://gamma-api.polymarket.com/events"
params = {
"active": "true",
"closed": "false",
"tag": "sports",
}
but for some reason, the response either clearly isn't related to sports or includes markets that closed a long time ago. is this even possible using the official api?
hi everyone,
does anyone know how to retrieve all active markets via the api? also, is there a simple way to categorize them? I specifically need to get all the sports markets
I tried:
url = "https://gamma-api.polymarket.com/events"
params = {
"active": "true",
"tag": "sports"
}
and
url = "https://gamma-api.polymarket.com/events"
params = {
"active": "true",
"closed": "false",
"tag": "sports",
}
but for some reason, the response either clearly isn't related to sports or includes markets that closed a long time ago. is this even possible using the official api?
and sports tag id is 1
and sports tag id is 1
sorry, do you mean
url = "https://gamma-api.polymarket.com/events"
params = {
"active": "true",
"closed": "false",
"tag_ids": "1"
}
?
because I'm still getting responses like
------------------------------
Event: Will Russia invade a NATO country by...?
ID: 25413
------------------------------
Event: Trump eliminates capital gains tax on crypto by ___?
ID: 25487
------------------------------
Event: Israel and Syria normalize relations by...?
ID: 25815
------------------------------
sorry, do you mean
url = "https://gamma-api.polymarket.com/events"
params = {
"active": "true",
"closed": "false",
"tag_ids": "1"
}
?
because I'm still getting responses like
------------------------------
Event: Will Russia invade a NATO country by...?
ID: 25413
------------------------------
Event: Trump eliminates capital gains tax on crypto by ___?
ID: 25487
------------------------------
Event: Israel and Syria normalize relations by...?
ID: 25815
------------------------------
sorry, I'm sure these are obvious questions, but I've gotten really confused somehow
and thanks for the help!
sorry, I'm sure these are obvious questions, but I've gotten really confused somehow
and thanks for the help!
bro why aren't you using the docs
bro why aren't you using the docs
https://docs.polymarket.com/api-reference/markets/list-markets-keyset-pagination
https://docs.polymarket.com/api-reference/markets/list-markets-keyset-pagination
just tired. I had almost finished the code when I noticed that the table was picking up more than just sports markets. I was planning to go to bed and let the tests run overnight, but the error seemed like a simple one. I thought I’d get an answer here faster than digging through the docs
just tired. I had almost finished the code when I noticed that the table was picking up more than just sports markets. I was planning to go to bed and let the tests run overnight, but the error seemed like a simple one. I thought I’d get an answer here faster than digging through the docs