@ignore edit a trade order https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#cancel-an-existing-order-and-send-a-new-order-trade :param str id: cancel order id :param str symbol: unified symbol of the market to create an order in
(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={})
| 5182 | return self.parse_trades(response, market, since, limit) |
| 5183 | |
| 5184 | def edit_spot_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}): |
| 5185 | """ |
| 5186 | @ignore |
| 5187 | edit a trade order |
| 5188 | |
| 5189 | https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#cancel-an-existing-order-and-send-a-new-order-trade |
| 5190 | |
| 5191 | :param str id: cancel order id |
| 5192 | :param str symbol: unified symbol of the market to create an order in |
| 5193 | :param str type: 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP' |
| 5194 | :param str side: 'buy' or 'sell' |
| 5195 | :param float amount: how much of currency you want to trade in units of base currency |
| 5196 | :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| 5197 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 5198 | :param str [params.marginMode]: 'cross' or 'isolated', for spot margin trading |
| 5199 | :returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>` |
| 5200 | """ |
| 5201 | self.load_markets() |
| 5202 | market = self.market(symbol) |
| 5203 | if not market['spot']: |
| 5204 | raise NotSupported(self.id + ' editSpotOrder() does not support ' + market['type'] + ' orders') |
| 5205 | payload = self.edit_spot_order_request(id, symbol, type, side, amount, price, params) |
| 5206 | response = self.privatePostOrderCancelReplace(payload) |
| 5207 | # |
| 5208 | # spot |
| 5209 | # |
| 5210 | # { |
| 5211 | # "cancelResult": "SUCCESS", |
| 5212 | # "newOrderResult": "SUCCESS", |
| 5213 | # "cancelResponse": { |
| 5214 | # "symbol": "BTCUSDT", |
| 5215 | # "origClientOrderId": "web_3f6286480b194b079870ac75fb6978b7", |
| 5216 | # "orderId": 16383156620, |
| 5217 | # "orderListId": -1, |
| 5218 | # "clientOrderId": "Azt6foVTTgHPNhqBf41TTt", |
| 5219 | # "price": "14000.00000000", |
| 5220 | # "origQty": "0.00110000", |
| 5221 | # "executedQty": "0.00000000", |
| 5222 | # "cummulativeQuoteQty": "0.00000000", |
| 5223 | # "status": "CANCELED", |
| 5224 | # "timeInForce": "GTC", |
| 5225 | # "type": "LIMIT", |
| 5226 | # "side": "BUY" |
| 5227 | # }, |
| 5228 | # "newOrderResponse": { |
| 5229 | # "symbol": "BTCUSDT", |
| 5230 | # "orderId": 16383176297, |
| 5231 | # "orderListId": -1, |
| 5232 | # "clientOrderId": "x-TKT5PX2F22ecb58eb9074fb1be018c", |
| 5233 | # "transactTime": 1670891847932, |
| 5234 | # "price": "13500.00000000", |
| 5235 | # "origQty": "0.00085000", |
| 5236 | # "executedQty": "0.00000000", |
| 5237 | # "cummulativeQuoteQty": "0.00000000", |
| 5238 | # "status": "NEW", |
| 5239 | # "timeInForce": "GTC", |
| 5240 | # "type": "LIMIT", |
| 5241 | # "side": "BUY", |
no test coverage detected