-
Notifications
You must be signed in to change notification settings - Fork 844
exchanges: Add MEXC Exchange Support #1897
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.
Pull Request Overview
This PR introduces support for the MEXC exchange while concurrently refactoring how order time‐in-force values are represented across various order types. In addition, the changes update multiple Binance-related order requests, tests, and documentation to use a consolidated string field for timeInForce.
- Converted order request structures (e.g. NewOrderRequest) to use a string for TimeInForce instead of a custom type.
- Updated tests and wrapper logic to reflect the new TimeInForce field, replacing ImmediateOrCancel/PostOnly usage.
- Added MEXC exchange support in helpers, docs, and supported exchanges lists.
Reviewed Changes
Copilot reviewed 84 out of 87 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
exchanges/binanceus/binanceus_types.go | Changed TimeInForce field from a custom type to string and removed deprecated constants. |
exchanges/binanceus/binanceus_test.go | Updated tests to retrieve TimeInForce via order.GoodTillCancel.String(). |
exchanges/binanceus/binanceus.go | Updated parameter conversion for TimeInForce consistently. |
exchanges/binance/cfutures_types.go | Similar refactoring of TimeInForce field. |
exchanges/binance/binance_wrapper.go | Refactored TimeInForce handling in order submission. |
exchanges/binance/binance_types.go | Removed legacy TimeInForce type definitions and updated usage accordingly. |
exchanges/binance/binance_test.go | Updated tests to use string-based TimeInForce values. |
exchanges/binance/binance_cfutures.go | Adjusted TimeInForce collection logic to use strings directly. |
exchange/websocket/connection.go | Changed binary response parsing to skip flate decompression and check for empty responses. |
engine/order_manager.go | Consolidated order modification fields by replacing ImmediateOrCancel/PostOnly with TimeInForce. |
engine/helpers.go | Added MEXC exchange import for support. |
docs/OHLCV.md, docs/ADD_NEW_EXCHANGE.md, README.md | Added MEXC exchange support in documentation and lists. |
cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go | Updated test cases to pass TimeInForce as order.ImmediateOrCancel. |
cmd/exchange_wrapper_issues/main.go | Removed the case for order.ImmediateOrCancel in parseOrderType. |
Files not reviewed (3)
- cmd/documentation/exchanges_templates/exchanges_trade_readme.tmpl: Language not supported
- cmd/documentation/root_templates/root_readme.tmpl: Language not supported
- config_example.json: Language not supported
Thank you, @Copilot, for the summary. Yours is much better than mine—I almost felt like you might take over my job! |
…ate functions using it
Shaloom 🕊️ team,
This pull request introduces support for the MEXC exchange, including both spot and futures assets. All stable (non-experimental) endpoints have been implemented. The codebase includes comprehensive unit tests, and all exported fields and methods are properly documented. The implementation supports both REST and WebSocket interfaces for real-time channel subscriptions and data retrieval.
Fixes # (issue)
Type of change
Please delete options that are not relevant and add an
x
in[]
as item is complete.How has this been tested
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and
also consider improving test coverage whilst working on a certain feature or package.
Checklist