-
Notifications
You must be signed in to change notification settings - Fork 74
Added kalshi bet predictor example #85
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More code hygiene things but otherwise I think it looks good.
I would add a basic readme on:
- What this repo contains
- What order/commands should I use to run (ie: pip install requirements, find markets, cerebrium deploy and then compare etc)
| poly_market = getMarket(False, poly_slug) | ||
| question = poly_market['question'] # we use polymarket because they have direct question | ||
|
|
||
| kalshi_real_yes = float(kalshi_market['market']['yes_ask']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are kalshi and polymarket returning values in the same way? I would handel the yes/no in the get market function so it makes this easier to follow and so it handles they have the same return format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, they have different response schemas but I think I can refactor for cleaner code
| } | ||
|
|
||
| try: | ||
| async with session.post(endpoint_url, headers=headers, data=payload) as response: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think axios might be much clearner than aiohttp. There a reason you used it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand. How would I use Axios in a python script? Axios is used in node
| total_markets = len(results) | ||
|
|
||
| kalshi_edges = [r['kalshi_edge'] for r in results] | ||
| total_kalshi_edge = sum(kalshi_edges) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its tough to know if this is a count or money. Also is money in dollars or cents?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it more clear. Money is in cents.
No description provided.