Mach API Endpoints
Submit Order
Submits a new order after receiving a confirmed transaction
POST
This endpoint allows you to submit an order to Mach after receiving a confirmed transaction calling the PlaceTrade function on the Mach smart contract. The order will be processed and fulfilled by Mach’s market makers.
Request Body
The chain where the transaction was submitted (e.g., “optimism”, “arbitrum”)
The transaction hash of the PlaceTrade call
Optional referral code for tracking and rewards
Response
Unique identifier for the order
The address that initiated the order
The address that fulfilled the order (null if not yet fulfilled)
Address of the token being sold
Address of the token being purchased
The source chain of the order
The destination chain of the order
Amount of source token in the smallest unit
Amount of destination token to be received
Timestamp when the order was created
Timestamp when the order was filled (null if not yet filled)
Timestamp when the order expires (null if no expiration)
Whether the order has been completed
Transaction hash of the order placement
Transaction hash of the order fulfillment (null if not yet fulfilled)
Estimated time in seconds until the order is completed
Type of the order (e.g., “default”, “cctp”)
Status Codes
| Status Code | Description |
|---|---|
| 200 | Success - Order submitted successfully |
| 422 | Validation Error - Invalid parameters |
| 500 | Internal Server Error - Something went wrong on the server |