Agara

Replace a pending account batch

POST/trade/v1/batches/{batch_hash}/supersede

Authorization

personal_access_token batches:submit
AuthorizationBearer <token>

Personal access token issued from the web app's Settings → API tokens page. Send as Authorization: Bearer agt_….

In: header

Scope: batches:submit

Path Parameters

batch_hash*string

The PENDING batch to replace

Request Body

application/json

Supersede body: new ops re-signed at the superseded batch's seq.

Response Body

application/json

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/trade/v1/batches/string/supersede" \  -H "Content-Type: application/json" \  -d '{    "deadline_unix_seconds": 0,    "ops": [      {        "condition_id": "string",        "kind": "SPLIT",        "market_id": "6364d859-8e1b-477a-bacc-de8305a9292b",        "shares_micro": 0      }    ],    "signature": "string"  }'
{  "batch": {    "batch_hash": "string",    "created_at": "2019-08-24T14:15:22Z",    "deadline_unix_seconds": 0,    "executed_at": "2019-08-24T14:15:22Z",    "failure": {      "code": "account_frozen",      "detail": "string",      "recovery": {        "strategy": "none"      },      "title": "string"    },    "heals_batch_hash": "string",    "origin": "string",    "seq": 0,    "status": "string",    "superseded_by_batch_hash": "string",    "tx_hash": "string",    "unwound_at": "2019-08-24T14:15:22Z",    "withdrawal": {      "destination": {        "chain_id": "string",        "delivered_at": "2019-08-24T14:15:22Z",        "path": "SPOKE_POOL",        "status": "WAITING",        "tx": "string"      },      "source": {        "chain_id": "string",        "confirmed_at": "2019-08-24T14:15:22Z",        "status": "QUEUED",        "tx_hash": "string"      },      "state": "QUEUED",      "updated_at": "2019-08-24T14:15:22Z"    }  },  "outcome": "SUPERSEDED"}