How to change leverage and its mode on MECX?
See original GitHub issueHow i can change leverages and set mode for futures on MECX with ccxt?
mexc_futures = ccxt.mexc({
"apiKey": config.MEXC_API_KEY,
"secret": config.MEXC_SECRET_KEY,
"options": {'defaultType': 'swap' }
})
mexc_futures.set_leverage(10, "BTC/USDT")
Got
ccxt.base.errors.ArgumentsRequired: mexc setLeverage() requires a positionId parameter
Issue Analytics
- State:
- Created a year ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Lesson 3. How to Use Leverage Trading
In this video our YouTube Host Mark will guide you through process of margin trading and multiply assets. Ready to Earn by our...
Read more >Isolated and Cross Margin
When using Isolated Margin, you are able to adjust your leverage on the fly via the leverage slider. Setting and Adjusting Isolated Margin....
Read more >LEVERAGE TRADING with MEXC X2 | X5 | X10 - YouTube
Register an account with MEXC and get 20% off the trading fee ... This video will set you up for Margin Trading in...
Read more >Unified contract naming conventions · Issue #10931 · ccxt ...
In order to unify the contract trading aspects CCXT is going to alter the way it handles ... How to change leverage and...
Read more >Distance Education for Teacher Training: Modes, Models, ...
Section I: Distance Education: Modes and Models . ... This finding is consistent with the literature on teacher change, success, and persistence in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Now works Thanks
`fetch Request: mexc POST https://contract.mexc.com/api/v1/private/position/change_leverage RequestHeaders: {‘ApiKey’: ‘mx0merTKMZUjmqMvm8’, ‘Request-Time’: ‘1652802870408’, ‘Content-Type’: ‘application/json’, ‘Signature’: ‘12de46df39d4b3e7b5f4dabf35a40a99a4c35e37e77d5e4b9bf7f1023f2a2623’, ‘User-Agent’: ‘python-requests/2.27.1’, ‘Accept-Encoding’: ‘gzip, deflate’, ‘Accept’: ‘/’, ‘Connection’: ‘keep-alive’} RequestBody: {“leverage”:10,“openType”:1,“symbol”:“ADA/USDT:USDT”,“positionType”:1}
fetch Response: mexc POST https://contract.mexc.com/api/v1/private/position/change_leverage 200 ResponseHeaders: {‘Content-Type’: ‘application/json’, ‘Content-Encoding’: ‘gzip’, ‘Content-Length’: ‘90’, ‘Expires’: ‘Tue, 17 May 2022 15:54:30 GMT’, ‘Cache-Control’: ‘max-age=0, no-cache, no-store’, ‘Pragma’: ‘no-cache’, ‘Date’: ‘Tue, 17 May 2022 15:54:30 GMT’, ‘Connection’: ‘keep-alive’, ‘Vary’: ‘Accept-Encoding’, ‘Server-Timing’: ‘cdn-cache; desc=MISS, edge; dur=116, origin; dur=12’} ResponseBody: {“success”:false,“code”:1001,“message”:“Contract does not exist!”} `
ccxt.base.errors.ExchangeError: mexc {"success":false,"code":1001,"message":"Contract does not exist!"}