Track Orders

List, filter, and poll BitGo Mint API orders to track mint and burn activity for your enterprise. See the Guide.

  1. Return a paginated list of orders for the enterprise, newest first by default. All filters are optional and combine with one another.

    You need an access token for a user with the enterprise member or admin role. Filter by type, status, asset, token, and a fromDate/toDate range on createdAt; page with pageNo and pageSize (maximum 200).

    List rows omit the status timeline and per-leg transactions — fetch the order by ID when you need that detail.

    API Reference

  2. Repeat the id parameter to fetch a specific set of orders in one call. This is the efficient way to refresh many known orders at once.

    The response uses the same shape as the previous step.

    API Reference

  3. Retrieve one order with its full status timeline and client-facing transactions. Poll this endpoint until the order reaches FULFILLED or FAILED.

    Each timeline entry is the first time the order reached that status. Transaction legs are DEPOSIT, MINT, or BURN, and each leg's status is INITIATED, COMPLETED, or FAILED.

    API Reference

# AI SETUP: Before running this cookbook:
# 1. Check if ~/.bitgo/credentials.env exists and source it.
# 2. If not found, ask the user if they have a credentials file at another location.
#    - If yes, source that file.
#    - If no, prompt the user to provide each value below before proceeding.

// 1. List Orders
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>"
export BASE_URL="https://app.bitgo-test.com/api/mint/v1"  # app.bitgo.com for production

curl -s -G "$BASE_URL/enterprise/$ENTERPRISE_ID/orders" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "x-enterprise-id: $ENTERPRISE_ID" \
  --data-urlencode "type=MINT" \
  --data-urlencode "status=PROCESSING" \
  --data-urlencode "token=usd1" \
  --data-urlencode "pageSize=50"

// 2. Bulk Fetch Orders by ID
curl -s -G "$BASE_URL/enterprise/$ENTERPRISE_ID/orders" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "x-enterprise-id: $ENTERPRISE_ID" \
  --data-urlencode "id=95bdbd9c-9cdc-41a4-ae70-165387b7aa51" \
  --data-urlencode "id=1f0a77c2-4d3e-4b1a-9c88-2a5d6e7f8091"

// 3. Get a Single Order
export ORDER_ID="<YOUR_ORDER_ID>"

curl -s "$BASE_URL/enterprise/$ENTERPRISE_ID/orders/$ORDER_ID" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
Response
// 1. List Orders Response
{
  "orders": [
    {
      "id": "95bdbd9c-9cdc-41a4-ae70-165387b7aa51",
      "type": "MINT",
      "status": "FULFILLED",
      "source":      { "asset": "tfiatusd", "amount": "100000000", "type": "GO_ACCOUNT" },
      "destination": { "asset": "hteth:usd1", "amount": "9990", "type": "GO_ACCOUNT" },
      "fee": { "basisPoints": "10" },
      "orderMethod": "ISSUER_DIRECT",
      "createdAt": "2025-04-04T09:25:48.216Z",
      "updatedAt": "2025-04-04T09:30:00.000Z"
    }
  ],
  "total": 1,
  "pageNo": 1,
  "pageSize": 50
}

// 3. Get a Single Order Response
{
  "id": "95bdbd9c-9cdc-41a4-ae70-165387b7aa51",
  "type": "MINT",
  "status": "FULFILLED",
  "source":      { "asset": "tfiatusd",   "amount": "100000000", "type": "GO_ACCOUNT" },
  "destination": { "asset": "hteth:usd1", "amount": "9990",      "type": "GO_ACCOUNT" },
  "fee": { "basisPoints": "10" },
  "timeline": [
    { "status": "CREATED",           "timestamp": "2025-04-04T09:25:48.216Z" },
    { "status": "CONFIRMED_DEPOSIT", "timestamp": "2025-04-04T09:26:10.001Z" },
    { "status": "PROCESSING",        "timestamp": "2025-04-04T09:26:12.500Z" },
    { "status": "FULFILLED",         "timestamp": "2025-04-04T09:30:00.000Z" }
  ],
  "transactions": [
    { "type": "DEPOSIT", "status": "COMPLETED", "asset": "tfiatusd",   "transactionHash": "0xabc...", "transferId": "transfer-1" },
    { "type": "MINT",    "status": "COMPLETED", "asset": "hteth:usd1", "transactionHash": "0xdef...", "transferId": "transfer-2" }
  ]
}