-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add Polymarket batch order support #3506
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
Open
loafer-19
wants to merge
3
commits into
nautechsystems:develop
Choose a base branch
from
loafer-19:feature/polymarket-batch-orders
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Polymarket batch order support #3506
loafer-19
wants to merge
3
commits into
nautechsystems:develop
from
loafer-19:feature/polymarket-batch-orders
+1,047
−5
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implement post_orders endpoint support for submitting multiple orders in a single API call: - Add PostOrdersArgs and SubmitOrderList imports - Add _submit_order_list for batch order submission - Add _validate_order_for_batch for order validation - Add _sign_orders_for_batch to sign multiple orders - Add _post_signed_orders_batch for batch submission with retry - Add _reject_all_orders and _process_batch_response helpers
Add TestPolymarketBatchOrderSubmission test class with 6 test cases: - test_submit_order_list_success - test_submit_order_list_partial_failure - test_submit_order_list_with_market_order_denied - test_submit_order_list_empty_list - test_submit_order_list_with_reduce_only_denied - test_submit_order_list_with_post_only_denied
- Add _cancel_all_global() using http_client.cancel_all() - Add _cancel_market_orders() using http_client.cancel_market_orders() - Enable post_only orders with GTC/GTD time in force - Pass post_only parameter to post_order() and PostOrdersArgs - Update tests for new post_only behavior (GTC/GTD required) - Add tests for cancel_all_global and cancel_market_orders
Member
|
Hi @loafer-19 Thank you for the PR! I'll have capacity to review more closely next week. In the mean time, here are some findings to potentially follow up on: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
NautilusTrader prioritizes correctness and reliability, please follow existing patterns for validation and testing.
CONTRIBUTING.mdand followed the established practicesSummary
Add multiple enhancements to PolymarketExecutionClient:
post_ordersendpointcancel_allendpointcancel_market_ordersendpointRelated Issues/PRs
N/A
Type of change
Breaking change details (if applicable)
N/A
Documentation
docs/developer_guide/docs.md)Release notes
RELEASES.mdthat follows the existing conventions (when applicable)Testing
Ensure new or changed logic is covered by tests.
Added test cases in
tests/integration_tests/adapters/polymarket/test_execution.py:test_submit_order_list_success/partial_failuretest_cancel_all_global_success/partial_failuretest_cancel_market_orders_*test_submit_order_post_only_gtc_successtest_submit_order_post_only_ioc_denied