Skip to main content
POST
/
account
/
migration
/
restore-orders
Restore retired legacy orders as SettlementV2 orders
curl --request POST \
  --url https://api.context.markets/v2/account/migration/restore-orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "restorations": [
    {
      "legacyOrderId": 1,
      "order": {
        "type": "limit",
        "marketId": "0x1111111111111111111111111111111111111111111111111111111111111111",
        "trader": "0x1111111111111111111111111111111111111111",
        "price": "1000000",
        "size": "1000000",
        "outcomeIndex": 123,
        "side": 0,
        "nonce": "0xabc123",
        "expiry": "1000000",
        "maxFee": "1000000",
        "makerRoleConstraint": 0,
        "inventoryModeConstraint": 0,
        "signature": "0xabc123",
        "buyValue": "1000000",
        "timeInForce": 0,
        "clientOrderType": "limit"
      }
    }
  ]
}
'
{
  "success": true,
  "restoredCount": 123,
  "failedCount": 123,
  "results": [
    {
      "legacyOrderId": 123,
      "success": true,
      "restoredOrderId": 123,
      "restoredOrderHash": "0x1111111111111111111111111111111111111111111111111111111111111111"
    }
  ],
  "settlementV2Address": "0x1111111111111111111111111111111111111111"
}

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Body

application/json
restorations
object[]
required
Required array length: 1 - 50 elements
address
string

Optional wallet address override for SDK/API flows. When omitted, the server uses the authenticated API account wallet.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x1111111111111111111111111111111111111111"

Response

Restoration attempt result

success
boolean
required
restoredCount
integer
required
failedCount
integer
required
results
object[]
required
settlementV2Address
string
required

EVM address

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x1111111111111111111111111111111111111111"