Closed krasnyd closed 10 months ago
Could you share the result of fetchPositions
please?
Hey @krasnyd it looks like one-way mode orders don't work on bitget v2 if the tradeSide
parameter is filled which is required for hedge mode orders. I opened a pull request that will allow you to set "oneWayMode": true
in the createOrder params so that you can create one way mode orders without getting the unilateral error.
Hello everyone,
I recently tried to integrate the "oneWayMode": true parameter into my request to the Bitget API, hoping it would allow me to place orders in one-way mode without encountering the unilateral position type error. Unfortunately, I'm still facing the same issue.
headers :
{'ACCESS-KEY': '***', 'ACCESS-SIGN': '***', 'ACCESS-PASSPHRASE': '***', 'ACCESS-TIMESTAMP': '1709932155263', 'Content-Type': 'application/json', 'locale': 'en-US'}
body :
{"symbol": "SOLUSDT", "productType": "usdt-futures", "marginMode": "isolated", "marginCoin": "USDT", "size": "0.1", "side": "buy", "orderType": "market", "oneWayMode": true}
I received the following error:
{"code":"40774","msg":"The order type for unilateral position must also be the unilateral position type.","requestTime":1709932155542,"data":null}
Thank you in advance for your help!
@slava387 could you try calling setPositionMode (false)
before calling createOrder with the oneWayMode param set to true and let me know if that works for you
If anyone has the same problem, you can also simply go to the trading preferences of your Bitget app or website and change the position mode in your trading preferences to 'One-way mode'.
Hello, just want to say, that I have been struggeling for days to get the basic buy/sell working on bitget futures perpetual. I gave up with ccxt as bitget configuration requirements (margin, one way/ dual, ticket multiple names etc..) is so weird and because nothing worked for me. :/ Finally I could make it thanks to this projet: https://github.com/BitgetLimited/v3-bitget-api-sdk/tree/master/bitget-python-sdk-api/bitget Everyone, from this great project, can just understand the basic api cals, based on request for a simple version of buy/sell !
It turn out that I had to implement bybit, then kucoin, kraken and now bit get and for EVERY brooker I had problems and long hours of searchin/debugging !! 85% ~of API REST tested sample code on internet does not work :/ Why minimal example are not maintained by brookers.. that would make crypto trader life easier !
I had the same problem with the documentation, the documentation provided by Bitget is not up to date
I also managed to call the API for the buy/sell as well as retrieve basic information but I have difficulty placing a stop loss on an already existing order.
Hi i have the same issue, but figured out it works from my gitpod dev but get the error from google func cloud. Possible they have different servers with different versions and schemantic reactions or they have other semantkic for ip ranges from US (I have had the same wih other crypto exchange). Generaly i think the messages is absoloet. if i send something with to place a limit order without params so i get the same errror.
my code is from 4 months ago but is on my github in public. I am also available if you have any questions.
Operating System
Ubuntu
Programming Languages
Python
CCXT Version
4.2.3
Description
I want to create a market order with a one-way mode. When I try to use the standard
createOrder
function, the API is giving me an error:{"code":"40774","msg":"The order type for unilateral position must also be the unilateral position type."}
The same error was already discussed in issue #19140 and the suggestion was to use the function
create_market_order
that calls the Bitget API V1 (https://bitgetlimited.github.io/apidoc/en/mix/#place-order). Is there some option for creating the same order with API V2? (https://www.bitget.com/api-doc/contract/trade/Place-Order)Code