Skip to content

Orders

Detailed information on order management through the Mach API.

Endpoints

POST /v1/orders

  • Description: Submit an order request to the Mach platform.
  • Request Body:
    {
      "chain": "optimism",
      "place_taker_tx": "0x50da55b159ccd423ebcb315dd2949202e584473960008274514c5088f3d26de7",
      "referral_code": "ABC"
    }
    
  • Responses:
  • 200: Successful Response
    {
      "id": "string",
      "taker_address": "string",
      "maker_address": "string",
      "src_asset_address": "string",
      "dst_asset_address": "string",
      "src_chain": "ethereum",
      "dst_chain": "ethereum",
      "src_amount": 0,
      "dst_amount": 0,
      "created_at": "string",
      "filled_at": "string",
      "expires_at": "string",
      "completed": true,
      "place_tx": "string",
      "fill_tx": "string",
      "eta": 0
    }
    
  • 422: Validation Error
    {
      "detail": [
        {
          "loc": ["string", 0],
          "msg": "string",
          "type": "string"
        }
      ]
    }
    

GET /v1/orders

  • Description: Retrieve a list of orders associated with a specific wallet.
  • Parameters: None
  • Responses:
  • 200: List of orders

GET /v1/orders/gas

  • Description: Get an estimate of the gas required for an order.
  • Parameters: None
  • Responses:
  • 200: Gas estimate

GET /v1/orders/{order_id}

  • Description: Retrieve details of a specific order using its ID.
  • Parameters:
  • order_id: The unique identifier of the order.
  • Responses:
  • 200: Order details

POST /v1/orders/cctp

  • Description: Receive a Cross-Chain Transfer Protocol (CCTP) order.
  • Request Body: Details of the CCTP order.
  • Responses:
  • 200: Successful receipt of CCTP order
Back to top