MCPcopy Create free account
hub / github.com/ccxt/ccxt / edit_order_request

Method edit_order_request

python/ccxt/async_support/pacifica.py:1704–1725  ·  view source on GitHub ↗
(self, id: str, symbol: str, type: str, side: str, amount: Num, price: Num, market: Market, params={})

Source from the content-addressed store, hash-verified

1702 return self.safe_order({'id': orderId, 'info': response, 'symbol': symbol})
1703
1704 def edit_order_request(self, id: str, symbol: str, type: str, side: str, amount: Num, price: Num, market: Market, params={}):
1705 if amount is None:
1706 raise ArgumentsRequired(self.id + ' editOrder() requires an amount!')
1707 if price is None:
1708 raise ArgumentsRequired(self.id + ' editOrder() requires a price')
1709 operationType = 'edit_order'
1710 clientOrderId = self.safe_string(params, 'clientOrderId')
1711 priceNormalized = self.price_to_precision(symbol, price)
1712 amountNormalized = self.amount_to_precision(symbol, amount)
1713 sigPayload = {
1714 'symbol': self.safe_string(market, 'id'),
1715 'price': priceNormalized,
1716 'amount': amountNormalized,
1717 }
1718 if (clientOrderId is None) and (id is None):
1719 raise ArgumentsRequired('self.id' + 'editOrder() requires either "id" or "clientOrderId"')
1720 if clientOrderId is not None:
1721 sigPayload['client_order_id'] = clientOrderId
1722 else:
1723 sigPayload['order_id'] = self.parse_to_int(id)
1724 request = self.post_action_request(operationType, sigPayload, params)
1725 return request
1726
1727 async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1728 """

Callers 2

edit_orderMethod · 0.95
edit_order_wsMethod · 0.95

Calls 6

post_action_requestMethod · 0.95
ArgumentsRequiredClass · 0.90
safe_stringMethod · 0.80
parse_to_intMethod · 0.80
price_to_precisionMethod · 0.45
amount_to_precisionMethod · 0.45

Tested by

no test coverage detected