Skip to content

Add polymarket exchange#5

Draft
Herklos wants to merge 2 commits intodkfrom
feature/add-polymarket
Draft

Add polymarket exchange#5
Herklos wants to merge 2 commits intodkfrom
feature/add-polymarket

Conversation

@Herklos
Copy link
Member

@Herklos Herklos commented Dec 19, 2025

No description provided.

@Herklos Herklos requested a review from GuillaumeDSM December 19, 2025 14:56
@Herklos Herklos self-assigned this Dec 19, 2025
@Herklos Herklos force-pushed the feature/add-polymarket branch 16 times, most recently from 412961e to ae46090 Compare December 24, 2025 09:30
@Herklos Herklos marked this pull request as ready for review December 25, 2025 22:26
@Herklos
Copy link
Member Author

Herklos commented Dec 25, 2025

It's ready

@Herklos Herklos force-pushed the feature/add-polymarket branch 7 times, most recently from 410229f to 590d33c Compare January 2, 2026 16:58
Copy link
Member

@GuillaumeDSM GuillaumeDSM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no need to store the py version?

@Herklos Herklos force-pushed the feature/add-polymarket branch 2 times, most recently from 22805d0 to 4fbd3ae Compare January 3, 2026 22:04
@Herklos Herklos force-pushed the feature/add-polymarket branch from 817e755 to 48037c7 Compare January 5, 2026 15:01
@Herklos Herklos force-pushed the feature/add-polymarket branch 3 times, most recently from 481ac07 to 4fe9988 Compare January 16, 2026 16:37
@Herklos Herklos force-pushed the feature/add-polymarket branch 8 times, most recently from 5dbeb0d to 113dd63 Compare January 30, 2026 13:06
@Herklos Herklos force-pushed the feature/add-polymarket branch from 119543d to f329cdc Compare February 4, 2026 08:50
@Herklos Herklos force-pushed the feature/add-polymarket branch 2 times, most recently from c0abda0 to 5bd0e15 Compare February 11, 2026 17:23
@Herklos Herklos marked this pull request as draft February 14, 2026 21:11
@Herklos Herklos force-pushed the feature/add-polymarket branch from 5bd0e15 to 26672b8 Compare February 14, 2026 21:19
@Herklos Herklos changed the title Add polymarket exchange basis Add polymarket exchange Feb 27, 2026
@Herklos Herklos force-pushed the feature/add-polymarket branch 4 times, most recently from bff543a to db0bc5e Compare March 4, 2026 08:54
Signed-off-by: Herklos <herklos.dev@protonmail.com>
@Herklos Herklos force-pushed the feature/add-polymarket branch 5 times, most recently from 362f200 to 9cfe0e0 Compare March 8, 2026 21:16
…resolution rounds price to 0

When a market's defaultTickSize (0.01) rounds a low price like 0.003956 to
0.00, makerAmount becomes 0 causing the API to reject the order with:
  "invalid amounts, maker and taker amount must be higher than 0"

In buildAndSignOrder, after rounding the price, check if it became 0. If
so, scan the price string for the first non-zero decimal digit to determine
the minimum precision needed, then re-round with that precision.

Example: 0.003956 with priceDecimals=2 → 0.00 (broken)
         neededDecimals=3 → re-round → 0.004 (correct)

Also update market['info']['tick_size'] in fetchOrderBook so future order
calls use the correct rounding config once the order book has been fetched.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Herklos Herklos force-pushed the feature/add-polymarket branch from 9cfe0e0 to b1e1913 Compare March 23, 2026 20:36
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

Successfully merging this pull request may close these issues.

2 participants