Does Bitmex Bulk order require different parameters?
See original GitHub issueI have successfully placed all necessary orders via exchange.create_order. Now i would like to optimize work with exchange and place one bulk order instead of sending orders separately.
Example of code for separate Stop order placement. It works
parameters = {'stopPx': stop_loss, 'execInst': 'Close'}
await ccxt.bitmex.create_order(symbol, 'Stop', side, amount_per_trade, None, parameters)
Code which i am trying to use for bulk order placement (Stop)
orders = list()
parameters = {'stopPx': stop_loss, 'execInst': 'Close'}
orders.append({"symbol": native_exchange_symbol, "type": "Stop", "side": order_side,
"orderQty": amount_per_trade, "price": None, "parameters": parameters})
await ccxt.bitmex.private_post_order_bulk({'orders': json.dumps(orders)})
Data in orders list.
<class 'dict'>: {'symbol': 'ETHUSD', 'type': 'Stop', 'side': 'Sell', 'orderQty': 111.0, 'price': None, 'parameters': {'stopPx': 199, 'execInst': 'Close'}}
returns error -->{“error”:{“message”:“Invalid stopPx for ordType”,“name”:“HTTPError”}}
It seams that I am doing something wrong with parameters…
- OS: Linux
- Programming Language version: Python 3.6
- CCXT version: 1.18.824
- Exchange: Bitmex
- Method: private_post_order_bulk
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
BitMEX API Changelog
Order : Bulk order requests with duplicate clOrdID s will now be rejected. ... If these values are unchanged, a 400 (Bad Request)...
Read more >REST API - BitMEX
The BitMEX API conforms to the Swagger spec for REST endpoints. Any Swagger-compatible client can connect to the BitMEX API and execute commands....
Read more >Update to bulk order request functionality - BitMEX Blog
Beginning on 20 February at 04:00 UTC, market orders will no longer be permitted in bulk order requests submitted through the API.
Read more >BitMEX API Explorer
Parameters ; ordType. Order type. Valid options: Market, Limit, Stop, StopLimit, MarketIfTouched, LimitIfTouched, Pegged. Defaults to 'Limit' when price is ...
Read more >API Update: 10 New Order Types, Bulk ... - BitMEX Blog
(docs) Send an array of orders and they will all be validated and executed at the same time. If any of the orders...
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
@qwasko1212 why do you send
parameters
to bitmex? Their endpoint for placing orders does not support a key calledparameters
inside an order. Each order should be a plain dict without nested dicts, and thestopPx
should be on the same level withprice
.Also, bitmex doesnt support bulk market orders. https://blog.bitmex.com/api_announcement/update-to-bulk-order-request-functionality/