post_order
Documentation for eth_defi.cow.order.post_order function.
- post_order(chain_id, order, api_timeout=datetime.timedelta(seconds=600))
Decode CowSwap order from event log and post to CowSwap API
See OrderCreation structure at https://docs.cow.fi/cow-protocol/reference/apis/orderbook
You can debug orders in CowSwap explorer - remember to choose the correct chain
Example error:
eth_defi.cow.api.CowAPIError: Error posting CowSwap order: 404 {"errorType":"NoLiquidity","description":"no route found"}- Raises
CowAPIError – In the case API gives non-200 response.
- Parameters
chain_id (int) –
order (eth_defi.cow.order.GPv2OrderData) –
api_timeout (datetime.timedelta) –
- Return type